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

Introduce isLatest flag to mark latest version of project #4148

Closed
2 tasks done
rkg-mm opened this issue Sep 14, 2024 · 1 comment · Fixed by #4184
Closed
2 tasks done

Introduce isLatest flag to mark latest version of project #4148

rkg-mm opened this issue Sep 14, 2024 · 1 comment · Fixed by #4184
Labels
enhancement New feature or request p2 Non-critical bugs, and features that help organizations to identify and reduce risk size/M Medium effort
Milestone

Comments

@rkg-mm
Copy link
Contributor

rkg-mm commented Sep 14, 2024

Current Behavior

Currently, Dependency-Track has no idea which version is the latest. Version numbers follow different formats, so figuring this out automatically is difficult, as no solution will fit everyone.
Some users try to get around this, by labelling latest versions with tags. However, having this information in a standardized format would be much more beneficial:

  1. Other features (e.g. collection logic, see Introduce "collection" projects for better usage of hierarchical view #2041  #3258) could make use of it. In future possibly also rules could be applied only to latest versions (e.g. outdated dependency rules, which make no sense on older versions)
  2. The system could automate the update of this flag, not relying on client scripts to update the "old" latest project to remove the tag and add it to the newest version. This causes additional client scripting effort and can fail, leaving it in inconsistent state.

Proposed Behavior

Based on discussion with @nscuro in #3258 there should be a flag "isLatest" introduced, which marks a project as latest version.
When this is set to TRUE on a project, the flag automatically is reset to FALSE on all other versions of this project.
This can be enforced with UNIQUE constraint on (NAME, IS_LATEST).

Hint:
If #3258 is merged already, the preparation for Collection logic LATEST_VERSION_CHILDREN in ProjectMetricsUpdateTask.updateLatestVersionChildrenCollectionMetrics() should be activated during implementation of this feature.

Checklist

@rkg-mm rkg-mm added the enhancement New feature or request label Sep 14, 2024
@nscuro nscuro added p2 Non-critical bugs, and features that help organizations to identify and reduce risk size/M Medium effort labels Sep 14, 2024
@nscuro nscuro added this to the 4.12 milestone Sep 29, 2024
Copy link
Contributor

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request p2 Non-critical bugs, and features that help organizations to identify and reduce risk size/M Medium effort
Projects
None yet
2 participants