Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/dependency check #13587

Merged
merged 71 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
104dc71
fix: Hopefully fixed the build of the cpp-example on windows systems
chrisdutz Aug 17, 2023
0db1a8f
Merge remote-tracking branch 'upstream/master'
chrisdutz Aug 17, 2023
1bdc2cf
Merge remote-tracking branch 'upstream/master'
chrisdutz Aug 18, 2023
0ea9e78
Merge remote-tracking branch 'upstream/master'
chrisdutz Aug 21, 2023
4b79d7a
Merge remote-tracking branch 'upstream/master'
chrisdutz Aug 31, 2023
5e54115
Merge remote-tracking branch 'upstream/master'
chrisdutz Aug 31, 2023
b16c9a0
Merge remote-tracking branch 'upstream/master'
chrisdutz Sep 5, 2023
d162a48
Merge branch 'apache:master' into master
chrisdutz Sep 6, 2023
13ef12e
Merge remote-tracking branch 'upstream/master'
chrisdutz Sep 7, 2023
4f22e11
Merge branch 'apache:master' into master
chrisdutz Sep 8, 2023
bbbf3e3
Merge remote-tracking branch 'upstream/master'
chrisdutz Sep 14, 2023
8a56b00
Merge remote-tracking branch 'upstream/master'
chrisdutz Sep 19, 2023
2ad77a6
Merge remote-tracking branch 'upstream/master'
chrisdutz Oct 17, 2023
383d101
Merge remote-tracking branch 'upstream/master'
chrisdutz Nov 1, 2023
f6f4ac6
Merge remote-tracking branch 'upstream/master'
chrisdutz Nov 7, 2023
e1c6f72
fix: Increase the timeout even more to finally make the build succeed.
chrisdutz Nov 7, 2023
8a18cf3
Merge remote-tracking branch 'upstream/master'
chrisdutz Nov 9, 2023
8b9075a
Merge remote-tracking branch 'upstream/master'
chrisdutz Nov 29, 2023
a6c11a0
Merge remote-tracking branch 'upstream/master'
chrisdutz Nov 29, 2023
18ccb78
Merge remote-tracking branch 'upstream/master'
chrisdutz Jan 3, 2024
1c5d175
Merge remote-tracking branch 'upstream/master'
chrisdutz Jan 8, 2024
d650a88
Merge remote-tracking branch 'upstream/master'
chrisdutz Jan 9, 2024
c84581a
Merge remote-tracking branch 'upstream/master'
chrisdutz Jan 23, 2024
f6e5f1c
Merge remote-tracking branch 'upstream/master'
chrisdutz Jan 30, 2024
bf64c2f
Merge remote-tracking branch 'upstream/master'
chrisdutz Feb 5, 2024
66680d1
Merge remote-tracking branch 'upstream/master'
chrisdutz Mar 13, 2024
9e62ab3
Merge remote-tracking branch 'upstream/master'
chrisdutz Mar 14, 2024
24f7842
fix: Fix the build.
chrisdutz Mar 14, 2024
9012fa9
Merge remote-tracking branch 'refs/remotes/origin/master'
chrisdutz Apr 15, 2024
9e5b39a
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz Apr 15, 2024
055fc0d
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz Apr 18, 2024
c08a231
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz Apr 22, 2024
1134199
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz May 2, 2024
a835848
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz May 17, 2024
ac5791a
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz May 24, 2024
9d7e9bd
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz May 27, 2024
af5cbcc
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz May 28, 2024
4e32ab5
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz Jun 4, 2024
2bb282f
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz Jun 7, 2024
8e6f9b3
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz Jun 11, 2024
ff8f7d2
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz Jun 12, 2024
d4cc59d
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz Jun 13, 2024
9124725
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz Jun 25, 2024
2510143
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz Jul 10, 2024
7b678c7
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz Jul 11, 2024
8153f1e
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz Jul 31, 2024
77f7acf
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz Aug 5, 2024
9ced664
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz Aug 5, 2024
7deb8ed
Merge remote-tracking branch 'upstream/master'
chrisdutz Aug 14, 2024
86c019a
Merge remote-tracking branch 'upstream/master'
chrisdutz Aug 14, 2024
1a0df2f
Merge remote-tracking branch 'upstream/master'
chrisdutz Aug 14, 2024
8fd8f8a
Merge remote-tracking branch 'upstream/master'
chrisdutz Aug 19, 2024
b836fcb
Merge remote-tracking branch 'upstream/master'
chrisdutz Aug 21, 2024
cd14a19
Merge remote-tracking branch 'upstream/master'
chrisdutz Aug 26, 2024
d4a35c4
Merge remote-tracking branch 'upstream/master'
chrisdutz Aug 26, 2024
8108229
Merge remote-tracking branch 'upstream/master'
chrisdutz Aug 28, 2024
d5f1ea1
Merge remote-tracking branch 'upstream/master'
chrisdutz Aug 29, 2024
332a762
Merge remote-tracking branch 'upstream/master'
chrisdutz Sep 4, 2024
fbef7f6
Merge remote-tracking branch 'upstream/master'
chrisdutz Sep 9, 2024
0c7dece
Merge remote-tracking branch 'upstream/master'
chrisdutz Sep 19, 2024
0b54a0f
Merge remote-tracking branch 'upstream/master'
chrisdutz Sep 19, 2024
3f93b5a
Merge remote-tracking branch 'refs/remotes/upstream/master'
chrisdutz Sep 23, 2024
4738ade
feat: Added a check that fails the build if the projects list of depe…
chrisdutz Sep 23, 2024
f5aa633
chore: Updated the pyproject.toml file to match the version of the ma…
chrisdutz Sep 23, 2024
c6a302d
fix: changed the format of the dependencies.txt to json to avoid cros…
chrisdutz Sep 24, 2024
7681b71
feat: Added a switch to skip the dependencies check.
chrisdutz Sep 24, 2024
6534bbc
chore: Disabled the dependency check per default and added a github w…
chrisdutz Sep 24, 2024
7829197
chore: Disabled the dependency check per default and added a github w…
chrisdutz Sep 24, 2024
3817d72
chore: Added a dummy dependency to trigger a dependency check failure
chrisdutz Sep 24, 2024
17241bc
chore: Removed the dummy dependency to trigger a dependency check fai…
chrisdutz Sep 24, 2024
f3d839d
chore: Removed the commented out parts of the xslt
chrisdutz Sep 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/dependency-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# This workflow will check if dependencies have changed (adding new dependencies or removing existing ones)

name: Dependency Check

on:
push:
branches:
- master
- 'rel/*'
- "rc/*"
paths-ignore:
- 'docs/**'
- 'site/**'
pull_request:
branches:
- master
- 'rel/*'
- "rc/*"
paths-ignore:
- 'docs/**'
- 'site/**'
# allow manually run the action:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
MAVEN_ARGS: --batch-mode --no-transfer-progress
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}

jobs:
dependency-check:
strategy:
fail-fast: false
max-parallel: 15
matrix:
java: [ 17 ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: ${{ matrix.java }}
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-
- name: Do the dependency check
shell: bash
run: mvn verify -Dmaven.test.skip=true -DdependencyCheck.skip=false -Dmdep.analyze.skip=true
167 changes: 167 additions & 0 deletions dependencies.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
{
"dependencies": [
"cglib:cglib",
"ch.qos.logback:logback-classic",
"ch.qos.logback:logback-core",
"ch.qos.reload4j:reload4j",
"com.bugsnag:bugsnag",
"com.digitalpetri.fsm:strict-machine",
"com.digitalpetri.netty:netty-channel-fsm",
"com.fasterxml.jackson.core:jackson-annotations",
"com.fasterxml.jackson.core:jackson-core",
"com.fasterxml.jackson.core:jackson-databind",
"com.fasterxml.jackson.dataformat:jackson-dataformat-yaml",
"com.fasterxml.jackson.datatype:jackson-datatype-jsr310",
"com.fasterxml.jackson.jaxrs:jackson-jaxrs-base",
"com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider",
"com.fasterxml.jackson.module:jackson-module-jaxb-annotations",
"com.github.ben-manes.caffeine:caffeine",
"com.github.luben:zstd-jni",
"com.github.stephenc.jcip:jcip-annotations",
"com.github.wendykierp:JTransforms",
"com.google.code.findbugs:jsr305",
"com.google.code.gson:gson",
"com.google.errorprone:error_prone_annotations",
"com.google.guava:failureaccess",
"com.google.guava:guava",
"com.google.guava:listenablefuture",
"com.google.j2objc:j2objc-annotations",
"com.h2database:h2-mvstore",
"com.librato.metrics:librato-java",
"com.librato.metrics:metrics-librato",
"com.lmax:disruptor",
"com.nimbusds:content-type",
"com.nimbusds:lang-tag",
"com.nimbusds:nimbus-jose-jwt",
"com.nimbusds:oauth2-oidc-sdk",
"com.sun.istack:istack-commons-runtime",
"com.zaxxer:HikariCP",
"commons-cli:commons-cli",
"commons-codec:commons-codec",
"commons-io:commons-io",
"commons-logging:commons-logging",
"io.airlift:airline",
"io.airlift:concurrent",
"io.airlift:log",
"io.airlift:units",
"io.dropwizard.metrics:metrics-core",
"io.dropwizard.metrics:metrics-jvm",
"io.jsonwebtoken:jjwt-api",
"io.micrometer:micrometer-commons",
"io.micrometer:micrometer-core",
"io.micrometer:micrometer-observation",
"io.moquette:moquette-broker",
"io.netty:netty-buffer",
"io.netty:netty-codec",
"io.netty:netty-codec-dns",
"io.netty:netty-codec-http",
"io.netty:netty-codec-http2",
"io.netty:netty-codec-mqtt",
"io.netty:netty-codec-socks",
"io.netty:netty-common",
"io.netty:netty-handler",
"io.netty:netty-handler-proxy",
"io.netty:netty-resolver",
"io.netty:netty-resolver-dns",
"io.netty:netty-resolver-dns-classes-macos",
"io.netty:netty-resolver-dns-native-macos",
"io.netty:netty-transport",
"io.netty:netty-transport-classes-epoll",
"io.netty:netty-transport-native-epoll",
"io.netty:netty-transport-native-unix-common",
"io.projectreactor:reactor-core",
"io.projectreactor.netty:reactor-netty-core",
"io.projectreactor.netty:reactor-netty-http",
"io.swagger:swagger-annotations",
"io.swagger:swagger-core",
"io.swagger:swagger-jaxrs",
"io.swagger:swagger-models",
"jakarta.activation:jakarta.activation-api",
"jakarta.annotation:jakarta.annotation-api",
"jakarta.servlet:jakarta.servlet-api",
"jakarta.validation:jakarta.validation-api",
"jakarta.ws.rs:jakarta.ws.rs-api",
"jakarta.xml.bind:jakarta.xml.bind-api",
"net.java.dev.jna:jna",
"net.minidev:accessors-smart",
"net.minidev:json-smart",
"org.antlr:antlr4-runtime",
"org.apache.commons:commons-collections4",
"org.apache.commons:commons-csv",
"org.apache.commons:commons-jexl3",
"org.apache.commons:commons-lang3",
"org.apache.commons:commons-math3",
"org.apache.commons:commons-pool2",
"org.apache.httpcomponents:httpclient",
"org.apache.httpcomponents:httpcore",
"org.apache.ratis:ratis-client",
"org.apache.ratis:ratis-common",
"org.apache.ratis:ratis-grpc",
"org.apache.ratis:ratis-metrics-api",
"org.apache.ratis:ratis-proto",
"org.apache.ratis:ratis-server",
"org.apache.ratis:ratis-server-api",
"org.apache.ratis:ratis-thirdparty-misc",
"org.apache.thrift:libthrift",
"org.apache.tsfile:common",
"org.apache.tsfile:tsfile",
"org.bouncycastle:bcpkix-jdk18on",
"org.bouncycastle:bcprov-jdk18on",
"org.bouncycastle:bcutil-jdk18on",
"org.checkerframework:checker-qual",
"org.eclipse.collections:eclipse-collections",
"org.eclipse.collections:eclipse-collections-api",
"org.eclipse.jetty:jetty-http",
"org.eclipse.jetty:jetty-io",
"org.eclipse.jetty:jetty-security",
"org.eclipse.jetty:jetty-server",
"org.eclipse.jetty:jetty-servlet",
"org.eclipse.jetty:jetty-util",
"org.eclipse.jetty:jetty-util-ajax",
"org.eclipse.milo:bsd-core",
"org.eclipse.milo:bsd-generator",
"org.eclipse.milo:sdk-client",
"org.eclipse.milo:sdk-core",
"org.eclipse.milo:sdk-server",
"org.eclipse.milo:stack-client",
"org.eclipse.milo:stack-core",
"org.eclipse.milo:stack-server",
"org.fusesource.hawtbuf:hawtbuf",
"org.fusesource.hawtdispatch:hawtdispatch",
"org.fusesource.hawtdispatch:hawtdispatch-transport",
"org.fusesource.mqtt-client:mqtt-client",
"org.glassfish.hk2:hk2-api",
"org.glassfish.hk2:hk2-locator",
"org.glassfish.hk2:hk2-utils",
"org.glassfish.hk2:osgi-resource-locator",
"org.glassfish.hk2.external:aopalliance-repackaged",
"org.glassfish.hk2.external:jakarta.inject",
"org.glassfish.jaxb:jaxb-runtime",
"org.glassfish.jaxb:txw2",
"org.glassfish.jersey.containers:jersey-container-servlet-core",
"org.glassfish.jersey.core:jersey-client",
"org.glassfish.jersey.core:jersey-common",
"org.glassfish.jersey.core:jersey-server",
"org.glassfish.jersey.inject:jersey-hk2",
"org.glassfish.jersey.media:jersey-media-multipart",
"org.hdrhistogram:HdrHistogram",
"org.java-websocket:Java-WebSocket",
"org.javassist:javassist",
"org.jline:jline",
"org.jvnet.mimepull:mimepull",
"org.latencyutils:LatencyUtils",
"org.lz4:lz4-java",
"org.ops4j.pax.jdbc:pax-jdbc-common",
"org.osgi:osgi.cmpn",
"org.osgi:osgi.core",
"org.ow2.asm:asm",
"org.reactivestreams:reactive-streams",
"org.reflections:reflections",
"org.slf4j:slf4j-api",
"org.slf4j:slf4j-reload4j",
"org.tukaani:xz",
"org.xerial.snappy:snappy-java",
"org.yaml:snakeyaml",
"pl.edu.icm:JLargeArrays"
]
}
2 changes: 1 addition & 1 deletion iotdb-core/ainode/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "apache-iotdb-ainode"
version = "1.4.0.dev"
version = "2.0.0.dev"
description = "Apache IoTDB AINode"
readme = "README.md"
authors = ["Apache Software Foundation <[email protected]>"]
Expand Down
85 changes: 85 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
<commons-pool2.version>2.11.1</commons-pool2.version>
<commons.collections4.version>4.4</commons.collections4.version>
<ctest.skip.tests>false</ctest.skip.tests>
<dependencyCheck.skip>true</dependencyCheck.skip>
<disruptor.version>3.4.4</disruptor.version>
<drill.freemarker.maven.plugin.version>1.21.1</drill.freemarker.maven.plugin.version>
<dropwizard.metrics.version>4.2.19</dropwizard.metrics.version>
Expand Down Expand Up @@ -1360,6 +1361,90 @@
</execution>
</executions>
</plugin>
<!-- Check if we've changed any dependencies being included -->
<plugin>
<groupId>org.cyclonedx</groupId>
<artifactId>cyclonedx-maven-plugin</artifactId>
<!-- Only run this in the root module of the project -->
<inherited>false</inherited>
<configuration>
<outputName>apache-${project.artifactId}-${project.version}-sbom</outputName>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>makeAggregateBom</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<version>1.1.0</version>
<!-- Only run this in the root module of the project -->
<inherited>false</inherited>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>transform</goal>
</goals>
<configuration>
<transformationSets>
<transformationSet>
<dir>${project.basedir}/target/</dir>
<includes>apache-${project.artifactId}-${project.version}-sbom.xml</includes>
<stylesheet>src/main/xslt/sbom-filter.xsl</stylesheet>
<outputDir>${project.basedir}/target/</outputDir>
<fileMappers>
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
<targetExtension>transformed.json</targetExtension>
</fileMapper>
</fileMappers>
</transformationSet>
</transformationSets>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>12.5</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<version>2.1.1</version>
<!-- Only run this in the root module of the project -->
<inherited>false</inherited>
<executions>
<execution>
<id>compare-with-reference-list</id>
<phase>verify</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<properties>
<skipDependencyCheck>${dependencyCheck.skip}</skipDependencyCheck>
</properties>
<source>src/main/groovy/checkDependencies.groovy</source>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
<version>4.0.22</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<licenses>
Expand Down
60 changes: 60 additions & 0 deletions src/main/groovy/checkDependencies.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
package src.main.groovy
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import groovy.json.JsonSlurper

if(Boolean.parseBoolean(properties['skipDependencyCheck']).booleanValue()) {
println "Skipping dependency check"
return
}

def jsonSlurper = new JsonSlurper()

var referenceFile = new File(basedir, "dependencies.json")
if(!referenceFile.exists()) {
throw new RuntimeException("Missing Reference: dependencies.json")
}
def referenceJson = jsonSlurper.parse(referenceFile)

var curBuildFile = new File(project.build.directory, "apache-${project.artifactId}-${project.version}-sbom.transformed.json")
if(!curBuildFile.exists()) {
throw new RuntimeException("Missing Build: apache-${project.artifactId}-${project.version}-sbom.transformed.json")
}
def curBuildJson = jsonSlurper.parse(curBuildFile)

def differencesFound = false
referenceJson.dependencies.each {
if(!curBuildJson.dependencies.contains(it)) {
println "current build has removed a dependency: " + it
differencesFound = true
}
}
curBuildJson.dependencies.each {
if(!referenceJson.dependencies.contains(it)) {
println "current build has added a dependency: " + it
differencesFound = true
}
}

if(differencesFound) {
println "Differences were found between the information in ${referenceFile.getPath()} and ${curBuildFile.toPath()}"
println "The simplest fix for this, is to replace the content of ${referenceFile.getPath()} with that of ${curBuildFile.toPath()} and to inspect the diff of the resulting file in your IDE of choice."
throw new RuntimeException("Differences found.")
}
Loading
Loading