Skip to content

fix: handle short Maven group ids in the repository verifier - #1465

Open
lenamonj wants to merge 1 commit into
oracle:mainfrom
lenamonj:1463-maven-namespace-index-error
Open

fix: handle short Maven group ids in the repository verifier#1465
lenamonj wants to merge 1 commit into
oracle:mainfrom
lenamonj:1463-maven-namespace-index-error

Conversation

@lenamonj

@lenamonj lenamonj commented Sep 6, 2026

Copy link
Copy Markdown

Summary

Return a verification result instead of raising IndexError when a Maven group id has fewer than three segments.

Description of changes

verify_domains compared group_parts[1] and group_parts[2] unconditionally. A group id such as com.github or io.github, with the repository reported on github.com, raised IndexError and aborted the analysis. Such a namespace names no account to compare, so the method now returns UNKNOWN with reason git_ns_mismatch, the same answer a wrong account gets and the same guard maven_central_registry.same_organization applies.

Validate: pytest tests/repo_verifier/test_repo_verifier.py fails on main for the four short namespaces and passes with this change; make check and make test pass.

Related issues

Closes #1463

Checklist

  • I have reviewed the contribution guide.
  • My PR title and commits follow the Conventional Commits convention.
  • My commits include the "Signed-off-by" line.
  • I have signed my commits following the instructions provided by GitHub.
  • I have updated the relevant documentation, if applicable.
  • I have tested my changes and verified they work as expected.

A group id such as com.github or io.github, with the repository reported on github.com, raised IndexError in verify_domains and aborted the analysis. Fewer than three segments names no account to compare, so the method now returns UNKNOWN with reason git_ns_mismatch, the answer a wrong account gets.

Closes oracle#1463

Signed-off-by: Jeff Lenamon <jlenamon@gmail.com>
@lenamonj
lenamonj requested a review from behnazh-w as a code owner September 6, 2026 20:32
@oracle-contributor-agreement

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Required At least one contributor does not have an approved Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RepoVerifierMaven raises IndexError for a group id with fewer than three segments

1 participant