pulp / pulp_ansible

A Pulp plugin that manages Ansible content, i.e. roles, collections
https://docs.pulpproject.org/pulp_ansible/
GNU General Public License v2.0
59 stars 54 forks source link

`is_latest` violates content immutability #1550

Open mdellweg opened 1 year ago

mdellweg commented 1 year ago
          > I'm really not happy, we ignore that content must be immutable. What happens if we remove the uniqueness constraint on the `is_latest` and specifically allow it to be a bit fuzzy at times? A mutable field within a uniqueness constraint seems to be additionally painful. Also what is true for a collection in one repository version does not necessarily be as true in another. Could we move that information elsewhere?

This is how it has been for years... Yes we should refactor it to better be align with Pulp philosophy, not sure how though. For AAH it has been fine to have this field calculated on the model since they only cared about one repository, but with the introduction of repo management it might be time to look at this field again. I think we should file an issue for this and put the design discussion there.

_Originally posted by @gerrod3 in https://github.com/pulp/pulp_ansible/issues/1548#issuecomment-1670132690_

webknjaz commented 1 year ago

FTR there's also a race condition related to this: https://github.com/pulp/pulp_ansible/issues/1571.