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

Add check for annotations field while looking for pkg_repo_ann #1127

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

praveenrewar
Copy link
Member

@praveenrewar praveenrewar commented Mar 7, 2023

What this PR does / why we need it:

Add check for annotations field while looking for pkg_repo_ann

Manually tested the following scenarios:

  • Existing package with no annotation present (package repository was successfully created and assumed ownership of the package)
  • Existing package with some annotations present (package repository was successfully created and assumed ownership of the package)
  • Existing package part of another repository (package repository was created successfully without owning the package)

Which issue(s) this PR fixes:

Fixes #1054

Does this PR introduce a user-facing change?


Additional Notes for your reviewer:

Review Checklist:
  • Follows the developer guidelines
  • Relevant tests are added or updated
  • Relevant docs in this repo added or updated
  • Relevant carvel.dev docs added or updated in a separate PR and there's
    a link to that PR
  • Code is at least as readable and maintainable as it was before this
    change

Additional documentation e.g., Proposal, usage docs, etc.:


@praveenrewar praveenrewar changed the title Add check for annotations field while looking for pkg_repo_ann Add check for annotations field while looking for pkg_repo_ann Mar 7, 2023
Copy link
Contributor

@neil-hickey neil-hickey left a comment

Choose a reason for hiding this comment

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

LGTM - I would really like it if there was a test for this. I saw you did manual testing... Given urgency, happy to merge. But I think if we can - we should have test for it

Signed-off-by: Praveen Rewar <8457124+praveenrewar@users.noreply.github.com>
@praveenrewar
Copy link
Member Author

We have tests for scenarios that cover overlapping packages from 2 different package repositories. I have added a test to cover a scenario where the existing package is not part of any repository.

Copy link
Contributor

@neil-hickey neil-hickey left a comment

Choose a reason for hiding this comment

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

LGTM, ty for adding the test!

@praveenrewar praveenrewar merged commit a22e859 into develop Mar 9, 2023
@praveenrewar praveenrewar deleted the pkg-repo-ann branch March 9, 2023 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Kapp controller failing to reconcile package repository if already package exists
2 participants