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

Dependency upgrade process #515

Closed
4 tasks done
kaklakariada opened this issue Jan 24, 2024 · 3 comments · Fixed by #522 or #532
Closed
4 tasks done

Dependency upgrade process #515

kaklakariada opened this issue Jan 24, 2024 · 3 comments · Fixed by #522 or #532
Assignees
Labels
feature Product feature

Comments

@kaklakariada
Copy link
Collaborator

kaklakariada commented Jan 24, 2024

Goal

Speedup process for fixing vulnerabilities in third party dependencies.

Implementation

When the dependencies_check.yml workflow finds new vulnerabilities in dependencies it will trigger another GitHub workflow. This new workflow will upgrade all dependencies to their latest versions.

Input

We add a new update-dependencies mode to PK that gets an optional parameter. This parameter describes:

  • Issue that fixes the vulnerability
  • Details about the vulnerability

Process

  1. Create new branch if main branch is checked out currently
  2. Read version from pom, increment patch version and set version in pom using maven version plugin.
  3. Update project-keeper version in pom
  4. Update dependencies via mvn versions:use-latest-releases && mvn versions:update-properties, see update-properties & use-latest-releases
  5. Run PK fix
  6. Update changelog if vulnerability details are available:
    * release date = today
    * Code name: Fix vulnerabilities CVE-.... in dependency ...
    * Summary: This release fixes the following vulnerabilities: ...
    * Changes: # Security * #... Fixed CVE-... in dependency ...
  7. Commit to new branch & push it
  8. Create a pull request with "Closes #..." comment

Tasks

Preview Give feedback

Open questions

  • Implement Git/GitHub operations (create branch, create PR, ...) in GH workflow or in PK Java code?

Delimitations / out-of-scope

@kaklakariada kaklakariada added the feature Product feature label Jan 24, 2024
@kaklakariada kaklakariada self-assigned this Jan 24, 2024
kaklakariada added a commit that referenced this issue Jan 25, 2024
kaklakariada added a commit that referenced this issue Jan 26, 2024
kaklakariada added a commit that referenced this issue Jan 29, 2024
@pj-spoelders
Copy link
Contributor

I don't know if you kept this in mind, but another nice thing would be to manually be able to batch update projects' multiple dependencies when we release something, eg in case of virtual-schema-common-jdbc being updated .. I'm not sure if that's out of scope or not.

@ckunki
Copy link
Collaborator

ckunki commented Feb 1, 2024

Review effort .2

kaklakariada added a commit that referenced this issue Feb 1, 2024
kaklakariada added a commit that referenced this issue Feb 1, 2024
kaklakariada added a commit that referenced this issue Feb 7, 2024
kaklakariada added a commit that referenced this issue Feb 8, 2024
kaklakariada added a commit that referenced this issue Feb 8, 2024
kaklakariada added a commit that referenced this issue Feb 8, 2024
kaklakariada added a commit that referenced this issue Feb 8, 2024
Co-authored-by: Christoph Kuhnke <[email protected]>
@ckunki ckunki reopened this Feb 23, 2024
kaklakariada added a commit that referenced this issue Feb 26, 2024
Co-authored-by: Christoph Kuhnke <[email protected]>
kaklakariada added a commit that referenced this issue Feb 26, 2024
@kaklakariada
Copy link
Collaborator Author

Effort: ~8pd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Product feature
Projects
None yet
3 participants