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

Fix revision incrementation when approving a package in a repo registered with --directory #125

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Oct 17, 2024

  1. Add package directory to ListPackageRevision filtering

    - make revision incrementation on rpkg approve work with --directory repos
    - add new Directory attribute to PackageRevisionKey
      - and use it when matching PackageRevisions to filter out from the List operation
    - package approval flow looks for previous copies of the package to
      determine new latest revision string (e.g. v1 -> v2)
      - this involves matching the package-for-approval's path attribute
        against existing packages' packageName attribute
      - however:
          - when a repo is registered using --directory to associate it with
            a subfolder in the upstream Git repo, packageName is deliberately trimmed
            of the directory attribute if it exists
          - but the path in the package-for-approval still has the directory part
          - so no existing packages can match to be counted as previous copies
          - therefore the revision can never increase beyond "v1" and the v1 tag is
            overwritten in Git with each new approval
          - this also results in previous package copies disappearing
    JamesMcDermott committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    a83a4bc View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2024

  1. Add E2E test for revision incrementation with --directory repos

    - also for packages with slashes in the name
    JamesMcDermott committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    1ae60b4 View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2024

  1. Configuration menu
    Copy the full SHA
    76b9a2e View commit details
    Browse the repository at this point in the history