#2917 Policy can fail on deleted tags
Closed: Fixed 3 years ago by tkopecek. Opened 3 years ago by mikem.

If a tag has been deleted and it comes up in a policy check (e.g. in policy_get_build_tags), then the policy check will fail on get_tag(t, strict=True).


This came up with the side tags plugin. So we have a common workflow where build tags might be deleted for a build that needs to be tagged.

Metadata Update from @mikem:
- Custom field Size adjusted to None

3 years ago

This issue is not really limited to policy. This is just where it's coming up. See #1506

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.27
- Issue tagged with: bug

3 years ago

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.26 (was: 1.27)

3 years ago

It turns out #1506 is probably not enough here. Even if the policy successfully gets the deleted taginfo, it will then try to read the inheritance for said tag. Since inheritance entries are also deleted when a tag is deleted, the result will be an empty list, making the check less useful.

Likely we need to have the test be smart about the event to query at. The data is available, but it looks like a bit of work to get it and propagate it to where we need it.

Also, I note that the taginfo option for policy_get_build_tags is not honored in all cases. We should fix that too.

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.27 (was: 1.26)

3 years ago

Moving to next release as we first need #1506 merged.

Metadata Update from @jcupova:
- Issue tagged with: testing-ready

3 years ago

Metadata Update from @mfilip:
- Issue tagged with: testing-done

3 years ago

Commit 6ff606b relates to this ticket

Log in to comment on this ticket.

Metadata
Related Pull Requests
  • #2989 Merged 3 years ago
  • #2923 Merged 3 years ago