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

Update Test Suite #52

Closed
wants to merge 1 commit into from
Closed

Conversation

jeremylong
Copy link

  1. Correct versions that included a purl with an un-encoded colon in the version (test-suite-data.json:88).

    Per purl-spec#character-encoding

    the '#', '?', '@' and ':' characters must NOT be encoded when used as separators. They may need to be encoded elsewhere

  2. Corrected copy paste issue in description of check for /// (test-suite-data.json:255).

  3. Added test for un-necessary trailing slash (test-suite-data.json:267).

  4. Added a bintray example to test namespaces with multiple segments (test-suite-data.json:279).

  5. Added test case to check for invalid '..' segments in the subpath (test-suite-data.json:327).

  6. Added test case to check for invalid '.' segments in the subpath (test-suite-data.json:339).

"purl": "pkg:docker/customer/dockerimage@sha256:244fd47e07d1004f0aed9c?repository_url=gcr.io",
"canonical_purl": "pkg:docker/customer/dockerimage@sha256:244fd47e07d1004f0aed9c?repository_url=gcr.io",
"purl": "pkg:docker/customer/dockerimage@sha256%3A244fd47e07d1004f0aed9c?repository_url=gcr.io",
"canonical_purl": "pkg:docker/customer/dockerimage@sha256%3A244fd47e07d1004f0aed9c?repository_url=gcr.io",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hasn't been clarified yet and is a subject of discussion in #39 which needs to be clarified before merge.

@@ -252,7 +252,7 @@
"is_invalid": false
},
{
"description": "slash /// after type is not significant",
"description": "slash /// after scheme is not significant",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the correction. This is a carryover from a time before PackageURLs began with pkg:/

@@ -263,6 +263,30 @@
"subpath": null,
"is_invalid": false
},
{
"description": "slash / between version and qualifiers separator is not significant",
"purl": "pkg:maven/org.apache.commons/[email protected]/?scope=test",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec states that leading and trailing / is not significant on namespace and subpath only. This may be an invalid test case. Need clarification @pombredanne

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added as part of code coverage in the java implementation. If this is invalid - then the How to parse may contain unnecessary steps. The step after Split the remainder once from left on ':' is Strip the remainder from leading and trailing '/'. Trying to figure out what other type of URL would end up with a trailing '/' at this point in parsing.

@JimFuller-RedHat
Copy link

this is an old PR - everything seems addressed except for the maven/java fun - can this PR be closed ?

@pombredanne
Copy link
Member

@JimFuller-RedHat re:

this is an old PR - everything seems addressed except for the maven/java fun - can this PR be closed ?

Likely so, but there is still some encoding issue that @johnmhoran is tracking in #344 and I created at least #361

The other topics addressed in the PR would need to be carefully reviewed and adopted or pushed back. @jeremylong IMHO there are too many important but separate concerns in the PR, and I think we should address both the test suite and the spec at once, each with small PRs.

@johnmhoran
Copy link
Member

Thanks for your comment @JimFuller-RedHat. IMHO this is not ready to be closed -- it raises a version issue, a subpath issue, and an issue re that odd '/' just before the '?' separator. I am trying to address the various topics raised here -- see, e.g., the worksheet I'm drafting to track all encoding issues at once, grouped by PURL component so we can make a better informed decision. See https://docs.google.com/spreadsheets/d/1biOCUY4eCqQaYmfGDHVrASV9igYEzct6

@jeremylong
Copy link
Author

@johnmhoran I agree with @pombredanne - would you want me to split this into multiple PRs?

@johnmhoran
Copy link
Member

That would be great @jeremylong -- thank you. 👍

jeremylong added a commit to jeremylong/purl-spec that referenced this pull request Dec 10, 2024
See package-url#39
Supercedes package-url#52

Signed-off-by: Jeremy Long <[email protected]>
jeremylong added a commit to jeremylong/purl-spec that referenced this pull request Dec 10, 2024
jeremylong added a commit to jeremylong/purl-spec that referenced this pull request Dec 10, 2024
Supercedes package-url#52

Signed-off-by: Jeremy Long <[email protected]>
jeremylong added a commit to jeremylong/purl-spec that referenced this pull request Dec 10, 2024
jeremylong added a commit to jeremylong/purl-spec that referenced this pull request Dec 10, 2024
@jeremylong
Copy link
Author

Closing this PR as it has been broken down into separate PRs: #364, #365, #366, #367, and #368.

@jeremylong jeremylong closed this Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants