#2917 Policy can fail on deleted tags
Closed: Fixed 2 years ago by tkopecek. Opened 2 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

2 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

2 years ago

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

2 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)

2 years ago

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

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

2 years ago

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

2 years ago

Commit 6ff606b relates to this ticket

Login to comment on this ticket.

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