Skip to content

Commit

Permalink
Merge branch 'master' into bq_timers_api_refractor
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurinehate authored Sep 5, 2023
2 parents 1b3d5b5 + 9f223c0 commit c77a9ab
Show file tree
Hide file tree
Showing 384 changed files with 13,117 additions and 10,853 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/airflow-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Airflow Plugin
on:
push:
branches:
- master
paths:
- ".github/workflows/airflow-plugin.yml"
- "metadata-ingestion-modules/airflow-plugin/**"
- "metadata-ingestion/**"
- "metadata-models/**"
pull_request:
branches:
- master
paths:
- ".github/**"
- "metadata-ingestion-modules/airflow-plugin/**"
- "metadata-ingestion/**"
- "metadata-models/**"
release:
types: [published]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
airflow-plugin:
runs-on: ubuntu-latest
env:
SPARK_VERSION: 3.0.3
DATAHUB_TELEMETRY_ENABLED: false
strategy:
matrix:
include:
- python-version: "3.7"
extraPythonRequirement: "apache-airflow~=2.1.0"
- python-version: "3.7"
extraPythonRequirement: "apache-airflow~=2.2.0"
- python-version: "3.10"
extraPythonRequirement: "apache-airflow~=2.4.0"
- python-version: "3.10"
extraPythonRequirement: "apache-airflow~=2.6.0"
- python-version: "3.10"
extraPythonRequirement: "apache-airflow>2.6.0"
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install dependencies
run: ./metadata-ingestion/scripts/install_deps.sh
- name: Install airflow package and test (extras ${{ matrix.extraPythonRequirement }})
run: ./gradlew -Pextra_pip_requirements='${{ matrix.extraPythonRequirement }}' :metadata-ingestion-modules:airflow-plugin:lint :metadata-ingestion-modules:airflow-plugin:testQuick
- name: pip freeze show list installed
if: always()
run: source metadata-ingestion-modules/airflow-plugin/venv/bin/activate && pip freeze
- uses: actions/upload-artifact@v3
if: ${{ always() && matrix.python-version == '3.10' && matrix.extraPythonRequirement == 'apache-airflow>2.6.0' }}
with:
name: Test Results (Airflow Plugin ${{ matrix.python-version}})
path: |
**/build/reports/tests/test/**
**/build/test-results/test/**
**/junit.*.xml
- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: .
fail_ci_if_error: false
flags: airflow-${{ matrix.python-version }}-${{ matrix.extraPythonRequirement }}
name: pytest-airflow
verbose: true

event-file:
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v3
with:
name: Event File
path: ${{ github.event_path }}
9 changes: 3 additions & 6 deletions .github/workflows/metadata-ingestion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
metadata-ingestion:
runs-on: ubuntu-latest
env:
SPARK_VERSION: 3.0.3
SPARK_VERSION: 3.3.2
DATAHUB_TELEMETRY_ENABLED: false
# TODO: Enable this once the test is fixed.
# DATAHUB_LOOKML_GIT_TEST_SSH_KEY: ${{ secrets.DATAHUB_LOOKML_GIT_TEST_SSH_KEY }}
Expand All @@ -42,9 +42,7 @@ jobs:
]
include:
- python-version: "3.7"
extraPythonRequirement: "sqlalchemy==1.3.24 apache-airflow~=2.2.0"
- python-version: "3.10"
extraPythonRequirement: "sqlalchemy~=1.4.0 apache-airflow>=2.4.0"
fail-fast: false
steps:
- uses: actions/checkout@v3
Expand All @@ -56,8 +54,8 @@ jobs:
run: ./metadata-ingestion/scripts/install_deps.sh
- name: Install package
run: ./gradlew :metadata-ingestion:installPackageOnly
- name: Run metadata-ingestion tests (extras ${{ matrix.extraPythonRequirement }})
run: ./gradlew -Pextra_pip_requirements='${{ matrix.extraPythonRequirement }}' :metadata-ingestion:${{ matrix.command }}
- name: Run metadata-ingestion tests
run: ./gradlew :metadata-ingestion:${{ matrix.command }}
- name: pip freeze show list installed
if: always()
run: source metadata-ingestion/venv/bin/activate && pip freeze
Expand All @@ -80,7 +78,6 @@ jobs:
name: pytest-${{ matrix.command }}
verbose: true


event-file:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/spark-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
python-version: "3.7"
- name: Install dependencies
run: ./metadata-ingestion/scripts/install_deps.sh
- name: Remove images
run: docker image prune -a -f || true
- name: Smoke test
run: |
./gradlew :metadata-integration:java:spark-lineage:integrationTest \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test Results

on:
workflow_run:
workflows: ["build & test", "metadata ingestion"]
workflows: ["build & test", "metadata ingestion", "Airflow Plugin"]
types:
- completed

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ metadata-ingestion/generated/**
# docs
docs/generated/
docs-website/versioned_docs/
docs-website/versioned_sidebars/
tmp*
temp/**

Expand Down
22 changes: 12 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {
ext.junitJupiterVersion = '5.6.1'
// Releases: https://github.com/linkedin/rest.li/blob/master/CHANGELOG.md
ext.pegasusVersion = '29.22.16'
ext.pegasusVersion = '29.45.0'
ext.mavenVersion = '3.6.3'
ext.springVersion = '5.3.29'
ext.springBootVersion = '2.7.14'
Expand All @@ -18,6 +18,7 @@ buildscript {
ext.hadoop3Version = '3.3.5'
ext.kafkaVersion = '2.3.0'
ext.hazelcastVersion = '5.3.1'
ext.ebeanVersion = '12.16.1'

ext.docker_registry = 'linkedin'

Expand All @@ -29,16 +30,16 @@ buildscript {
classpath 'io.acryl.gradle.plugin:gradle-avro-plugin:0.8.1'
classpath 'org.springframework.boot:spring-boot-gradle-plugin:' + springBootVersion
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.30.0"
classpath "com.palantir.gradle.gitversion:gradle-git-version:0.12.3"
classpath "org.gradle.playframework:gradle-playframework:0.12"
classpath "gradle.plugin.org.hidetake:gradle-swagger-generator-plugin:2.18.1"
classpath "com.palantir.gradle.gitversion:gradle-git-version:3.0.0"
classpath "org.gradle.playframework:gradle-playframework:0.14"
classpath "gradle.plugin.org.hidetake:gradle-swagger-generator-plugin:2.19.1"
}
}

plugins {
id 'com.gorylenko.gradle-git-properties' version '2.4.0-rc2'
id 'com.github.johnrengelman.shadow' version '6.1.0'
id "com.palantir.docker" version "0.35.0"
id 'com.palantir.docker' version '0.35.0'
// https://blog.ltgt.net/javax-jakarta-mess-and-gradle-solution/
// TODO id "org.gradlex.java-ecosystem-capabilities" version "1.0"
}
Expand Down Expand Up @@ -86,16 +87,17 @@ project.ext.externalDependency = [
'dgraph4j' : 'io.dgraph:dgraph4j:21.03.1',
'dropwizardMetricsCore': 'io.dropwizard.metrics:metrics-core:4.2.3',
'dropwizardMetricsJmx': 'io.dropwizard.metrics:metrics-jmx:4.2.3',
'ebean': 'io.ebean:ebean:11.33.3',
'ebeanAgent': 'io.ebean:ebean-agent:11.27.1',
'ebean': 'io.ebean:ebean:' + ebeanVersion,
'ebeanAgent': 'io.ebean:ebean-agent:' + ebeanVersion,
'ebeanDdl': 'io.ebean:ebean-ddl-generator:' + ebeanVersion,
'elasticSearchRest': 'org.elasticsearch.client:elasticsearch-rest-high-level-client:' + elasticsearchVersion,
'elasticSearchTransport': 'org.elasticsearch.client:transport:' + elasticsearchVersion,
'findbugsAnnotations': 'com.google.code.findbugs:annotations:3.0.1',
'graphqlJava': 'com.graphql-java:graphql-java:19.5',
'graphqlJavaScalars': 'com.graphql-java:graphql-java-extended-scalars:19.1',
'gson': 'com.google.code.gson:gson:2.8.9',
'guice': 'com.google.inject:guice:4.2.3',
'guava': 'com.google.guava:guava:27.0.1-jre',
'guava': 'com.google.guava:guava:32.1.2-jre',
'h2': 'com.h2database:h2:2.1.214',
'hadoopCommon':'org.apache.hadoop:hadoop-common:2.7.2',
'hadoopMapreduceClient':'org.apache.hadoop:hadoop-mapreduce-client-core:2.7.2',
Expand Down Expand Up @@ -239,7 +241,7 @@ configure(subprojects.findAll {! it.name.startsWith('spark-lineage')}) {

subprojects {

apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'com.gorylenko.gradle-git-properties'

gitProperties {
Expand All @@ -253,7 +255,7 @@ subprojects {

plugins.withType(JavaPlugin) {
dependencies {
testCompile externalDependency.testng
testImplementation externalDependency.testng
constraints {
implementation('io.netty:netty-all:4.1.86.Final')
implementation('org.apache.commons:commons-compress:1.21')
Expand Down
10 changes: 5 additions & 5 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ buildscript {
}

dependencies {
compile('io.acryl:json-schema-avro:0.1.5') {
implementation('io.acryl:json-schema-avro:0.1.5') {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
exclude group: 'com.google.guava', module: 'guava'
}
compile 'com.google.guava:guava:27.0.1-jre'
compile 'com.fasterxml.jackson.core:jackson-databind:2.13.5'
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.5'
compile 'commons-io:commons-io:2.11.0'
implementation 'com.google.guava:guava:32.1.2-jre'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.5'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.5'
implementation 'commons-io:commons-io:2.11.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@
import java.util.List;
import java.util.stream.Collectors;
import org.gradle.api.DefaultTask;
import org.gradle.api.tasks.CacheableTask;
import org.gradle.api.tasks.InputDirectory;
import org.gradle.api.tasks.OutputDirectory;
import org.gradle.api.tasks.TaskAction;
import org.gradle.api.tasks.*;

import static com.github.fge.processing.ProcessingUtil.*;
import static org.apache.commons.io.FilenameUtils.*;
Expand All @@ -46,6 +43,7 @@ public void setInputDirectory(String inputDirectory) {
}

@InputDirectory
@PathSensitive(PathSensitivity.NAME_ONLY)
public String getInputDirectory() {
return inputDirectory;
}
Expand Down
8 changes: 4 additions & 4 deletions datahub-frontend/app/controllers/CentralLogoutController.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
*/
@Slf4j
public class CentralLogoutController extends LogoutController {
private static final String DEFAULT_BASE_URL_PATH = "/login";
private static final String AUTH_URL_CONFIG_PATH = "/login";
private static final String DEFAULT_BASE_URL_PATH = "/";
private static Boolean _isOidcEnabled = false;

@Inject
Expand All @@ -36,8 +37,7 @@ public CentralLogoutController(Config config) {
public Result executeLogout(Http.Request request) {
if (_isOidcEnabled) {
try {
return Results.redirect(DEFAULT_BASE_URL_PATH)
.removingFromSession(request);
return logout(request).toCompletableFuture().get().withNewSession();
} catch (Exception e) {
log.error("Caught exception while attempting to perform SSO logout! It's likely that SSO integration is mis-configured.", e);
return redirect(
Expand All @@ -47,7 +47,7 @@ public Result executeLogout(Http.Request request) {
.withNewSession();
}
}
return Results.redirect(DEFAULT_BASE_URL_PATH)
return Results.redirect(AUTH_URL_CONFIG_PATH)
.withNewSession();
}
}
4 changes: 2 additions & 2 deletions datahub-frontend/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "io.github.kobylynskyi.graphql.codegen" version "4.1.1"
id 'com.palantir.docker'
id 'scala'
id 'com.palantir.docker'
}

apply from: "../gradle/versioning/versioning.gradle"
Expand Down Expand Up @@ -96,7 +96,7 @@ task unversionZip(type: Copy, dependsOn: [':datahub-web-react:build', dist]) {
into "${buildDir}/docker/"
rename "datahub-frontend-${version}.zip", "datahub-frontend.zip"
}
tasks.getByName("docker").dependsOn(unversionZip)
tasks.getByPath(":datahub-frontend:docker").dependsOn(unversionZip)

task cleanLocalDockerImages {
doLast {
Expand Down
14 changes: 7 additions & 7 deletions datahub-frontend/play.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: "org.gradle.playframework"
project.ext.httpPort = 9001
project.ext.playBinaryBaseName = "datahub-frontend"

tasks.withType(PlayRun) {
runPlay {
httpPort = project.ext.httpPort
}

Expand Down Expand Up @@ -33,8 +33,8 @@ dependencies {
}
}

compile project(":metadata-service:restli-client")
compile project(":metadata-service:auth-config")
implementation project(":metadata-service:restli-client")
implementation project(":metadata-service:auth-config")

implementation externalDependency.jettyJaas
implementation externalDependency.graphqlJava
Expand Down Expand Up @@ -70,15 +70,15 @@ dependencies {
testImplementation 'no.nav.security:mock-oauth2-server:0.3.1'
testImplementation 'org.junit-pioneer:junit-pioneer:1.9.1'
testImplementation externalDependency.junitJupiterApi
testRuntime externalDependency.junitJupiterEngine
testRuntimeOnly externalDependency.junitJupiterEngine

implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
runtime externalDependency.guice
runtime (externalDependency.playDocs) {
runtimeOnly externalDependency.guice
runtimeOnly (externalDependency.playDocs) {
exclude group: 'com.typesafe.akka', module: 'akka-http-core_2.12'
}
runtime externalDependency.playGuice
runtimeOnly externalDependency.playGuice
implementation externalDependency.log4j2Api

implementation externalDependency.logbackClassic
Expand Down
23 changes: 12 additions & 11 deletions datahub-graphql-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,26 @@ plugins {
apply plugin: 'java'

dependencies {
compile project(':metadata-service:restli-client')
compile project(':metadata-service:auth-impl')
compile project(':metadata-service:auth-config')
compile project(':metadata-service:configuration')
compile project(':metadata-service:services')
compile project(':metadata-io')
compile project(':metadata-utils')
implementation project(':metadata-service:restli-client')
implementation project(':metadata-service:auth-impl')
implementation project(':metadata-service:auth-config')
implementation project(':metadata-service:configuration')
implementation project(':metadata-service:services')
implementation project(':metadata-io')
implementation project(':metadata-utils')

implementation externalDependency.graphqlJava
implementation externalDependency.graphqlJavaScalars
compile externalDependency.antlr4Runtime
compile externalDependency.antlr4
compile externalDependency.guava
implementation externalDependency.antlr4Runtime
implementation externalDependency.antlr4
implementation externalDependency.guava
implementation externalDependency.opentelemetryAnnotations

implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
annotationProcessor externalDependency.lombok

testCompile externalDependency.mockito
testImplementation externalDependency.mockito
}

graphqlCodegen {
Expand Down
Loading

0 comments on commit c77a9ab

Please sign in to comment.