camunda / camunda-bpm-platform

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.
https://camunda.com/
Apache License 2.0
4.12k stars 1.56k forks source link

Make dependency updates more efficient #2781

Closed ThorbenLindhauer closed 1 year ago

ThorbenLindhauer commented 2 years ago

This issue was imported from JIRA:

Field Value
JIRA Link CAM-14890
Reporter @toco-cam
Has restricted visibility comments false

Acceptance Criteria (Required on creation):

Hints (optional):

Links:

### PRs
- [ ] https://github.com/camunda/automation-platform-github-actions/pull/14
- [ ] https://github.com/camunda/infra-core/pull/6629
### Rollout PRs
- [ ] https://github.com/camunda/camunda-bpm-platform/pull/3799
- [ ] https://github.com/camunda/camunda-bpm-platform/pull/3823
- [ ] https://github.com/camunda/camunda-bpm-platform-maintenance/pull/1085
- [ ] https://github.com/camunda/camunda-bpm-platform-maintenance/pull/1075
- [ ] https://github.com/camunda/camunda-bpm-platform-maintenance/pull/1076
- [ ] https://github.com/camunda/camunda-bpm-platform-ee/pull/866
- [ ] https://github.com/camunda/camunda-bpm-platform-ee-maintenance/pull/444
- [ ] https://github.com/camunda/camunda-bpm-platform-ee-maintenance/pull/441
- [ ] https://github.com/camunda/camunda-bpm-platform-ee-maintenance/pull/442
- [ ] https://github.com/camunda/camunda-connect/pull/84
- [ ] https://github.com/camunda/camunda-spin/pull/212
- [ ] https://github.com/camunda/camunda-commons/pull/37
- [ ] https://github.com/camunda/camunda-template-engines-jsr223/pull/32
- [ ] https://github.com/camunda/camunda-bpm-rpa-bridge-ee/pull/90
ThorbenLindhauer commented 1 year ago

Experiment for automatically detecting licenses:

  1. Run mvn org.codehaus.mojo:license-maven-plugin:2.0.0:aggregate-download-licenses in the root directory of the repo.
  2. Compare license book to generated report

Findings:

ThorbenLindhauer commented 1 year ago

https://www.mojohaus.org/license-maven-plugin/aggregate-add-third-party-mojo.html and its configuration are quite powerful, e.g. the parameter templateFile can be used to create a JSON document (or any other text format).

ThorbenLindhauer commented 1 year ago

Same experiment as above using https://github.com/CycloneDX/cyclonedx-maven-plugin/:

Dependencies not detected:

Incorrect licenses:

The plugin gets the license information from Maven (I assume that this means it retrieves whatever is declared in the pom.xml of the Maven artifact). See https://github.com/CycloneDX/cyclonedx-maven-plugin/blob/cyclonedx-maven-plugin-2.7.9/src/main/java/org/cyclonedx/maven/DefaultModelConverter.java#L297 and calling code.

ThorbenLindhauer commented 1 year ago

Idea for the tool chain:

Side notes:

ThorbenLindhauer commented 1 year ago

Test PRs:

Breakdown of remaining tasks:

ThorbenLindhauer commented 1 year ago

Blocked HTTP repository example output:

Downloading from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml
Downloading from camunda-public-repository: https://artifacts.camunda.com/artifactory/public/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml
Downloading from maven-default-http-blocker: http://0.0.0.0/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml
Downloading from apache.snapshots: https://repository.apache.org/snapshots/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml
Progress (1): 622 B

Downloaded from camunda-public-repository: https://artifacts.camunda.com/artifactory/public/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml (622 B at 6.1 kB/s)
Downloading from JBoss public: https://repository.jboss.org/nexus/content/groups/public/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml
Progress (1): 622 B

Downloading from sonatype-oss-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml
Downloaded from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml (622 B at 2.3 kB/s)
Progress (1): 622 B

Downloaded from sonatype-oss-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml (622 B at 1.3 kB/s)
[WARNING] Could not transfer metadata org.camunda.bpm.webapp:camunda-webapp-root:7.20.0-SNAPSHOT/maven-metadata.xml from/to maven-default-http-blocker (http://0.0.0.0/): transfer failed for http://0.0.0.0/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml
Downloading from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/camunda-webapp-root-7.20.0-20230818.070330-58.pom
Progress (1): 4.1/10 kB
Progress (1): 7.8/10 kB
Progress (1): 10 kB    

Downloaded from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/camunda-webapp-root-7.20.0-20230818.070330-58.pom (10 kB at 42 kB/s)
[WARNING] org.camunda.bpm.webapp:camunda-webapp-root:7.20.0-SNAPSHOT/maven-metadata.xmlfailed to transfer from http://0.0.0.0/ during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of maven-default-http-blocker has elapsed or updates are forced. Original error: Could not transfer metadata org.camunda.bpm.webapp:camunda-webapp-root:7.20.0-SNAPSHOT/maven-metadata.xml from/to maven-default-http-blocker (http://0.0.0.0/): transfer failed for http://0.0.0.0/org/camunda/bpm/webapp/camunda-webapp-root/7.20.0-SNAPSHOT/maven-metadata.xml
ThorbenLindhauer commented 1 year ago

Repos that we will roll out the workflow to:

camunda/camunda-bpm-platform camunda/camunda-bpm-platform-maintenance camunda/camunda-bpm-platform-ee camunda/camunda-bpm-platform-ee-maintenance camunda/camunda-connect camunda/camunda-spin camunda/camunda-commons camunda/camunda-template-engines-jsr223 camunda/camunda-bpm-rpa-bridge-ee

danielkelemen commented 1 year ago

We will also need the 7.20 branches. ❓Should we also include the older but still active branches for spin, commons and connect? Or it's unnecessary.

ThorbenLindhauer commented 1 year ago

The workflow rollout PRs miss a reference to the main branch for the reusable workflow, I thought it'd pick it by default.

uses: camunda/automation-platform-github-actions/.github/workflows/java-dependency-check.yml

needs to be changed to

uses: camunda/automation-platform-github-actions/.github/workflows/java-dependency-check.yml@main
ThorbenLindhauer commented 1 year ago

@danielkelemen I have added the 7.20 PRs and corrected the workflow references. Please re-review.

ThorbenLindhauer commented 1 year ago

❓Should we also include the older but still active branches for spin, commons and connect? Or it's unnecessary.

Forgot to respond here. I decided to not do backports there to save some effort. Anyone who needs it can still do it when they work with such a branch.