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

Remove inheritance with the same name, too #50

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Remove inheritance with the same name, too #50

wants to merge 5 commits into from

Conversation

ahills
Copy link
Collaborator

@ahills ahills commented Aug 27, 2019

Koji won't allow a tag's parents to include two of the same name nor priority, so remove matches for either, instead of just priority. This will allow changing a parent's priority when another parent already has that priority, by removing both inheritance links before setting the desired one.

It also allows removing inheritance link by either parent tag name or priority, as well as both (exact match).

@ktdreyer
Copy link
Owner

I will test this tomorrow

Koji won't allow a tag's parents to include two of the same name nor priority,
so remove matches for either, instead of just priority. This will allow
changing a parent's priority when another parent already has that priority, by
removing both inheritance links before setting the desired one.

It also allows removing inheritance link by either parent tag name or priority,
as well as both (exact match).
@ahills
Copy link
Collaborator Author

ahills commented Nov 20, 2019

Rebased on #68, improved commit message and documentation, and expanded test coverage.

Prior to this change, we only tested deleting by parent_tag name.

Add tests to cover deleting by priority as well. Now we have four
scenarios:

  delete-1: Delete by parent_tag name only
  delete-2: Delete by priority only
  delete-3: Delete by parent_tag name and priority
  delete-4: Do *not* delete if parent_tag name and priority fail to
            match
@ktdreyer
Copy link
Owner

I think this is a lot easier to review now, thanks. If you rebase on master again, it'll be easier to see the single commit.

tests/integration/koji_tag_inheritance/update-1.yml fails now:
xmlrpc.client.Fault: <Fault 1000: 'Changes should not contain duplicated parent_id(5)'>

We need more integration tests for this behavior, so I added them as a pull request to your branch: https://github.com/ahills/koji-ansible/pull/1

Andrew Hills and others added 3 commits November 21, 2019 10:02
Koji won't allow a tag's parents to include two of the same name nor
priority, so remove matches for either, instead of just priority. This
will allow changing a parent's priority.
tests: more delete tests for koji_tag_inheritance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants