Skip to content

Commit

Permalink
Merge branch 'datahub-project:master' into soda-connector
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylJonny authored Oct 9, 2024
2 parents 0f2adc8 + 0bdd83d commit 0594c68
Show file tree
Hide file tree
Showing 507 changed files with 12,824 additions and 7,836 deletions.
113 changes: 106 additions & 7 deletions .github/workflows/docker-unified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ jobs:
with:
image: ${{ env.DATAHUB_GMS_IMAGE }}:${{ needs.setup.outputs.unique_tag }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.8.0
uses: aquasecurity/trivy-action@0.25.0
env:
TRIVY_OFFLINE_SCAN: true
with:
Expand Down Expand Up @@ -250,7 +250,7 @@ jobs:
with:
image: ${{ env.DATAHUB_MAE_CONSUMER_IMAGE }}:${{ needs.setup.outputs.unique_tag }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.8.0
uses: aquasecurity/trivy-action@0.25.0
env:
TRIVY_OFFLINE_SCAN: true
with:
Expand Down Expand Up @@ -314,7 +314,7 @@ jobs:
with:
image: ${{ env.DATAHUB_MCE_CONSUMER_IMAGE }}:${{ needs.setup.outputs.unique_tag }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.8.0
uses: aquasecurity/trivy-action@0.25.0
env:
TRIVY_OFFLINE_SCAN: true
with:
Expand Down Expand Up @@ -378,7 +378,7 @@ jobs:
with:
image: ${{ env.DATAHUB_UPGRADE_IMAGE }}:${{ needs.setup.outputs.unique_tag }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.8.0
uses: aquasecurity/trivy-action@0.25.0
env:
TRIVY_OFFLINE_SCAN: true
with:
Expand Down Expand Up @@ -444,7 +444,7 @@ jobs:
with:
image: ${{ env.DATAHUB_FRONTEND_IMAGE }}:${{ needs.setup.outputs.unique_tag }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.8.0
uses: aquasecurity/trivy-action@0.25.0
env:
TRIVY_OFFLINE_SCAN: true
with:
Expand Down Expand Up @@ -480,6 +480,39 @@ jobs:
context: .
file: ./docker/kafka-setup/Dockerfile
platforms: linux/amd64,linux/arm64/v8
kafka_setup_scan:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
name: "[Monitoring] Scan Kafka Setup images for vulnerabilities"
runs-on: ubuntu-latest
needs: [ setup, kafka_setup_build ]
if: ${{ needs.setup.outputs.kafka_setup_change == 'true' || (needs.setup.outputs.publish == 'true' || needs.setup.outputs.pr-publish == 'true') }}
steps:
- name: Checkout # adding checkout step just to make trivy upload happy
uses: acryldata/sane-checkout-action@v3
- name: Download image
uses: ishworkh/docker-image-artifact-download@v1
if: ${{ needs.setup.outputs.publish != 'true' && needs.setup.outputs.pr-publish != 'true' }}
with:
image: ${{ env.DATAHUB_KAFKA_SETUP_IMAGE }}:${{ needs.setup.outputs.unique_tag }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.25.0
env:
TRIVY_OFFLINE_SCAN: true
with:
image-ref: ${{ env.DATAHUB_KAFKA_SETUP_IMAGE }}:${{ needs.setup.outputs.unique_tag }}
format: "template"
template: "@/contrib/sarif.tpl"
output: "trivy-results.sarif"
severity: "CRITICAL,HIGH"
ignore-unfixed: true
vuln-type: "os,library"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: "trivy-results.sarif"

mysql_setup_build:
name: Build and Push DataHub MySQL Setup Docker Image
Expand All @@ -501,6 +534,39 @@ jobs:
context: .
file: ./docker/mysql-setup/Dockerfile
platforms: linux/amd64,linux/arm64/v8
mysql_setup_scan:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
name: "[Monitoring] Scan MySQL Setup images for vulnerabilities"
runs-on: ubuntu-latest
needs: [ setup, mysql_setup_build ]
if: ${{ needs.setup.outputs.mysql_setup_change == 'true' || (needs.setup.outputs.publish == 'true' || needs.setup.outputs.pr-publish == 'true') }}
steps:
- name: Checkout # adding checkout step just to make trivy upload happy
uses: acryldata/sane-checkout-action@v3
- name: Download image
uses: ishworkh/docker-image-artifact-download@v1
if: ${{ needs.setup.outputs.publish != 'true' && needs.setup.outputs.pr-publish != 'true' }}
with:
image: ${{ env.DATAHUB_MYSQL_SETUP_IMAGE }}:${{ needs.setup.outputs.unique_tag }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.25.0
env:
TRIVY_OFFLINE_SCAN: true
with:
image-ref: ${{ env.DATAHUB_MYSQL_SETUP_IMAGE }}:${{ needs.setup.outputs.unique_tag }}
format: "template"
template: "@/contrib/sarif.tpl"
output: "trivy-results.sarif"
severity: "CRITICAL,HIGH"
ignore-unfixed: true
vuln-type: "os,library"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: "trivy-results.sarif"

elasticsearch_setup_build:
name: Build and Push DataHub Elasticsearch Setup Docker Image
Expand All @@ -522,6 +588,39 @@ jobs:
context: .
file: ./docker/elasticsearch-setup/Dockerfile
platforms: linux/amd64,linux/arm64/v8
elasticsearch_setup_scan:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
name: "[Monitoring] Scan ElasticSearch setup images for vulnerabilities"
runs-on: ubuntu-latest
needs: [ setup, elasticsearch_setup_build ]
if: ${{ needs.setup.outputs.elasticsearch_setup_change == 'true' || (needs.setup.outputs.publish == 'true' || needs.setup.outputs.pr-publish == 'true' ) }}
steps:
- name: Checkout # adding checkout step just to make trivy upload happy
uses: acryldata/sane-checkout-action@v3
- name: Download image
uses: ishworkh/docker-image-artifact-download@v1
if: ${{ needs.setup.outputs.publish != 'true' && needs.setup.outputs.pr-publish != 'true' }}
with:
image: ${{ env.DATAHUB_ELASTIC_SETUP_IMAGE }}:${{ needs.setup.outputs.unique_tag }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.25.0
env:
TRIVY_OFFLINE_SCAN: true
with:
image-ref: ${{ env.DATAHUB_ELASTIC_SETUP_IMAGE }}:${{ needs.setup.outputs.unique_tag }}
format: "template"
template: "@/contrib/sarif.tpl"
output: "trivy-results.sarif"
severity: "CRITICAL,HIGH"
ignore-unfixed: true
vuln-type: "os,library"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: "trivy-results.sarif"

datahub_ingestion_base_build:
name: Build and Push DataHub Ingestion (Base) Docker Image
Expand Down Expand Up @@ -709,7 +808,7 @@ jobs:
with:
image: ${{ env.DATAHUB_INGESTION_IMAGE }}:${{ needs.datahub_ingestion_slim_build.outputs.tag }}
- name: Run Trivy vulnerability scanner Slim Image
uses: aquasecurity/trivy-action@0.8.0
uses: aquasecurity/trivy-action@0.25.0
env:
TRIVY_OFFLINE_SCAN: true
with:
Expand Down Expand Up @@ -797,7 +896,7 @@ jobs:
with:
image: ${{ env.DATAHUB_INGESTION_IMAGE }}:${{ needs.datahub_ingestion_full_build.outputs.tag }}
- name: Run Trivy vulnerability scanner Full Image
uses: aquasecurity/trivy-action@0.8.0
uses: aquasecurity/trivy-action@0.25.0
env:
TRIVY_OFFLINE_SCAN: true
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/metadata-io.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- "li-utils/**"
- "metadata-models/**"
- "metadata-io/**"
- ".github/workflows/metadata-io.yml"
pull_request:
branches:
- "**"
Expand All @@ -16,6 +17,7 @@ on:
- "li-utils/**"
- "metadata-models/**"
- "metadata-io/**"
- ".github/workflows/metadata-io.yml"
release:
types: [published]

Expand Down Expand Up @@ -52,6 +54,8 @@ jobs:
sudo apt-get remove 'dotnet-*' azure-cli || true
sudo rm -rf /usr/local/lib/android/ || true
sudo docker image prune -a -f || true
- name: Disk Check
run: df -h . && docker images
- uses: acryldata/sane-checkout-action@v3
- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down
13 changes: 7 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ project.ext.externalDependency = [
'awsRds':'software.amazon.awssdk:rds:2.18.24',
'cacheApi': 'javax.cache:cache-api:1.1.0',
'commonsCli': 'commons-cli:commons-cli:1.5.0',
'commonsIo': 'commons-io:commons-io:2.4',
'commonsIo': 'commons-io:commons-io:2.17.0',
'commonsLang': 'commons-lang:commons-lang:2.6',
'commonsText': 'org.apache.commons:commons-text:1.10.0',
'commonsText': 'org.apache.commons:commons-text:1.12.0',
'commonsCollections': 'commons-collections:commons-collections:3.2.2',
'caffeine': 'com.github.ben-manes.caffeine:caffeine:3.1.8',
'datastaxOssNativeProtocol': 'com.datastax.oss:native-protocol:1.5.1',
Expand Down Expand Up @@ -270,12 +270,12 @@ project.ext.externalDependency = [
'zookeeper': 'org.apache.zookeeper:zookeeper:3.8.4',
'wire': 'com.squareup.wire:wire-compiler:3.7.1',
'charle': 'com.charleskorn.kaml:kaml:0.53.0',
'common': 'commons-io:commons-io:2.7',
'jline':'jline:jline:1.4.1',
'jetbrains':' org.jetbrains.kotlin:kotlin-stdlib:1.6.0',
'annotationApi': 'javax.annotation:javax.annotation-api:1.3.2',
'jakartaAnnotationApi': 'jakarta.annotation:jakarta.annotation-api:3.0.0',
'classGraph': 'io.github.classgraph:classgraph:4.8.172',
'mustache': 'com.github.spullara.mustache.java:compiler:0.9.14'
]

allprojects {
Expand Down Expand Up @@ -391,12 +391,13 @@ subprojects {
implementation externalDependency.annotationApi
constraints {
implementation("com.google.googlejavaformat:google-java-format:$googleJavaFormatVersion")
implementation('io.netty:netty-all:4.1.100.Final')
implementation('org.apache.commons:commons-compress:1.26.0')
implementation('org.apache.velocity:velocity-engine-core:2.3')
implementation('io.netty:netty-all:4.1.114.Final')
implementation('org.apache.commons:commons-compress:1.27.1')
implementation('org.apache.velocity:velocity-engine-core:2.4')
implementation('org.hibernate:hibernate-validator:6.0.20.Final')
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("com.fasterxml.jackson.core:jackson-dataformat-cbor:$jacksonVersion")
implementation(externalDependency.commonsIo)
}
}

Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies {
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'
implementation 'commons-io:commons-io:2.17.0'

compileOnly 'org.projectlombok:lombok:1.18.30'
annotationProcessor 'org.projectlombok:lombok:1.18.30'
Expand Down
2 changes: 1 addition & 1 deletion datahub-frontend/play.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies {
play('com.nimbusds:nimbus-jose-jwt:8.18')
play('com.typesafe.akka:akka-actor_2.12:2.6.20')
play(externalDependency.jsonSmart)
play('io.netty:netty-all:4.1.86.Final')
play('io.netty:netty-all:4.1.114.Final')
implementation(externalDependency.commonsText) {
because("previous versions are vulnerable to CVE-2022-42889")
}
Expand Down
2 changes: 1 addition & 1 deletion datahub-frontend/run/frontend.env
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ELASTIC_CLIENT_PORT=9200
# AUTH_JAAS_ENABLED=false

# Change to disable Metadata Service Authentication
METADATA_SERVICE_AUTH_ENABLED=true
# METADATA_SERVICE_AUTH_ENABLED=false

# Change to override max header count defaults
DATAHUB_AKKA_MAX_HEADER_COUNT=64
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1192,13 +1192,15 @@ private void configureMutationResolvers(final RuntimeWiring.Builder builder) {
.dataFetcher(
"updateDescription",
new UpdateDescriptionResolver(entityService, this.entityClient))
.dataFetcher("addOwner", new AddOwnerResolver(entityService))
.dataFetcher("addOwners", new AddOwnersResolver(entityService))
.dataFetcher("batchAddOwners", new BatchAddOwnersResolver(entityService))
.dataFetcher("removeOwner", new RemoveOwnerResolver(entityService))
.dataFetcher("batchRemoveOwners", new BatchRemoveOwnersResolver(entityService))
.dataFetcher("addOwner", new AddOwnerResolver(entityService, entityClient))
.dataFetcher("addOwners", new AddOwnersResolver(entityService, entityClient))
.dataFetcher(
"batchAddOwners", new BatchAddOwnersResolver(entityService, entityClient))
.dataFetcher("removeOwner", new RemoveOwnerResolver(entityService, entityClient))
.dataFetcher(
"batchRemoveOwners", new BatchRemoveOwnersResolver(entityService, entityClient))
.dataFetcher("addLink", new AddLinkResolver(entityService, this.entityClient))
.dataFetcher("removeLink", new RemoveLinkResolver(entityService))
.dataFetcher("removeLink", new RemoveLinkResolver(entityService, entityClient))
.dataFetcher("addGroupMembers", new AddGroupMembersResolver(this.groupService))
.dataFetcher("removeGroupMembers", new RemoveGroupMembersResolver(this.groupService))
.dataFetcher("createGroup", new CreateGroupResolver(this.groupService))
Expand All @@ -1212,7 +1214,8 @@ private void configureMutationResolvers(final RuntimeWiring.Builder builder) {
.dataFetcher("deleteDomain", new DeleteDomainResolver(entityClient))
.dataFetcher(
"setDomain", new SetDomainResolver(this.entityClient, this.entityService))
.dataFetcher("batchSetDomain", new BatchSetDomainResolver(this.entityService))
.dataFetcher(
"batchSetDomain", new BatchSetDomainResolver(this.entityService, entityClient))
.dataFetcher(
"updateDeprecation",
new UpdateDeprecationResolver(this.entityClient, this.entityService))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import static com.linkedin.metadata.Constants.CORP_USER_ENTITY_NAME;
import static com.linkedin.metadata.Constants.CORP_USER_STATUS_LAST_MODIFIED_FIELD_NAME;
import static com.linkedin.metadata.utils.CriterionUtils.buildCriterion;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
Expand Down Expand Up @@ -30,7 +31,6 @@
import com.linkedin.metadata.query.filter.Condition;
import com.linkedin.metadata.query.filter.ConjunctiveCriterion;
import com.linkedin.metadata.query.filter.ConjunctiveCriterionArray;
import com.linkedin.metadata.query.filter.Criterion;
import com.linkedin.metadata.query.filter.CriterionArray;
import com.linkedin.metadata.query.filter.Filter;
import com.linkedin.metadata.query.filter.SortCriterion;
Expand Down Expand Up @@ -153,12 +153,11 @@ private SearchResult searchForNewUsers(@Nonnull final OperationContext opContext
.setAnd(
new CriterionArray(
ImmutableList.of(
new Criterion()
.setField(CORP_USER_STATUS_LAST_MODIFIED_FIELD_NAME)
.setCondition(Condition.GREATER_THAN)
.setValue(
String.valueOf(
trailingMonthDateRange.getStart())))))))),
buildCriterion(
CORP_USER_STATUS_LAST_MODIFIED_FIELD_NAME,
Condition.GREATER_THAN,
String.valueOf(
trailingMonthDateRange.getStart())))))))),
Collections.singletonList(
new SortCriterion()
.setField(CORP_USER_STATUS_LAST_MODIFIED_FIELD_NAME)
Expand Down
Loading

0 comments on commit 0594c68

Please sign in to comment.