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

Extend length of PURL and PURLCOORDINATES columns from 255 to 786 #3560

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

nscuro
Copy link
Member

@nscuro nscuro commented Mar 17, 2024

Description

Extends length of PURL and PURLCOORDINATES columns from 255 to 786.

Because PURLs are also used to populate the TARGET column of COMPONENTANALYSISCACHE, that column's length also has to be extended.

Addressed Issue

Fixes #2076

Additional Details

The length of 786 was chosen as a middle ground between the current 255 and the more optimal 1024. Mainly because MSSQL versions before 2016 have a maximum index key length of 900 (#2076 (comment)).

We don't want to break anything in that respect at the moment, and 786 should still be plenty of space.

Running DT with MySQL already takes manual effort, due to MySQL's even more restrictive key length limits (#271 (comment)). We're not making it worse by increasing the column length even more.

Tested upgrade from DT v4.10.1 to v4.11.0-SNAPSHOT for:

  • H2
  • MSSQL
  • PostgreSQL

Checklist

  • I have read and understand the contributing guidelines
  • This PR fixes a defect, and I have provided tests to verify that the fix is effective
  • This PR implements an enhancement, and I have provided tests to verify that it works as intended
  • This PR introduces changes to the database model, and I have added corresponding update logic
  • This PR introduces new or alters existing behavior, and I have updated the documentation accordingly

@nscuro nscuro added the defect Something isn't working label Mar 17, 2024
@nscuro nscuro added this to the 4.11 milestone Mar 17, 2024
Copy link

codacy-production bot commented Mar 17, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.10% (target: -1.00%) 0.00% (target: 70.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (5a496b6) 21545 15971 74.13%
Head commit (72121d6) 21573 (+28) 15971 (+0) 74.03% (-0.10%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3560) 30 0 0.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

You may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation

Because PURLs are also used to populate the `TARGET` column of `COMPONENTANALYSISCACHE`, that column's length also has to be extended.

Fixes DependencyTrack#2076

Signed-off-by: nscuro <nscuro@protonmail.com>
@nscuro nscuro merged commit 3b52284 into DependencyTrack:master Mar 19, 2024
10 of 12 checks passed
@nscuro nscuro deleted the issue-2076 branch March 19, 2024 17:43
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
defect Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

It's not possible to import components with PURLs with more than 255 characters
1 participant