1080647 - added validation that a unit profile is not None before reques...#890
1080647 - added validation that a unit profile is not None before reques...#890
Conversation
…uesting applicability regeneration by repos
There was a problem hiding this comment.
This comment isn't quite accurate. The problem is that the consumer's profile changed, and there was an existing RepoProfileApplicability object that referenced the consumer's old profile that hasn't been cleaned up yet. We have a monthly task that looks for stale objects and cleans them out, and until that happens there can be dangling references.
I believe it is safe to remove these dangling RepoProfileApplicability objects here, since they reference profiles that no longer exist.
There was a problem hiding this comment.
That said, I also do not believe it is harmful to leave the dangling objects in place, and rely on the cleanup to take care of them.
There was a problem hiding this comment.
Also, the unit test you've written does not actually trigger this condition, and this line is not tested.
There was a problem hiding this comment.
Updated the comment.
|
I think this is the correct fix for the bug, but the unit test doesn't create the condition for the bug and therefore doesn't assert that the flaw is fixed. Also, we should fix the comment in the code to be accurate. Let's make sure we have coverage on the fix and strong assertions before we merge this. |
|
Please re-review for updated comment and unit test. |
|
Merge when you are ready. |
1080647 - added validation that a unit profile is not None before requesting applicability regeneration by repos
The implementation was using a depth-first-search which did not traverse in the same order on all platforms. Some Puppet modules contain other modules as dependencies, and the DFS implementation could incorrectly find the wrong one. This uses a very dumb approach which looks for metadata.json in the top level folder of the the tar.gz uploaded Puppet module. This is based on the Puppet packaging guidelines [0]. [0]: https://docs.puppetlabs.com/puppet/latest/reference/modules_fundamentals.html#module-fundamentals https://pulp.plan.io/issues/890 closes pulp#890
...ting applicability regeneration by repos
https://bugzilla.redhat.com/show_bug.cgi?id=1080647