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

Fixes #38264 - prevent duplicate entries #11334

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sbernhard
Copy link
Member

@sbernhard sbernhard commented Mar 4, 2025

What are the changes introduced in this pull request?

Prevent to bind to the on ContentLoad multiple times which would lead to duplicate entries in the Lifecycle Environment Selection on the CreateHost page.

Considerations taken when implementing this change?

Unbind to the event and then bind new to prevent duplicate entries.

What are the testing steps for this pull request?

  • Use the create host page
  • Select the Hostgroup which uses ContentSource and all Katello related stuff
  • Unselect (x) the Content Source
  • Select the same Content Source
  • Try to pick another Hostgroup and Unselect/Select the Content Source for another test
    At all stages, the Lifcecycle Environment Selection should not have duplicate entries.

@sbernhard
Copy link
Member Author

Looks like there is a issue then with the content view. Need to analyze.

@sbernhard sbernhard changed the title Fixes #38264 - prevent duplicate entries Draft: Fixes #38264 - prevent duplicate entries Mar 5, 2025
@sbernhard sbernhard marked this pull request as draft March 5, 2025 09:57
@sbernhard sbernhard force-pushed the fix_38264 branch 2 times, most recently from 4720d27 to f7a9241 Compare March 5, 2025 13:21
@sbernhard sbernhard marked this pull request as ready for review March 5, 2025 13:25
@sbernhard sbernhard changed the title Draft: Fixes #38264 - prevent duplicate entries Fixes #38264 - prevent duplicate entries Mar 5, 2025
@jeremylenz
Copy link
Member

Is this fixing the same issue as #11329 ?

@sbernhard
Copy link
Member Author

sbernhard commented Mar 5, 2025

yes, but mine is using namespaces and clears all events of the given namespace - which is a little bit more readable :)

... and, I was not aware of #11329 - congratulation to the bug fix at @ofedoren ;-)

@ofedoren
Copy link
Contributor

ofedoren commented Mar 6, 2025

yes, but mine is using namespaces and clears all events of the given namespace - which is a little bit more readable :)

... and, I was not aware of #11329 - congratulation to the bug fix at @ofedoren ;-)

I don't mind any solution as long as it fixes the issue, doesn't introduce new ones and everyone is happy with the approach :)

@sbernhard sbernhard force-pushed the fix_38264 branch 2 times, most recently from 3568c9f to 26c7b3d Compare March 17, 2025 14:42
@lfu
Copy link
Member

lfu commented Mar 20, 2025

Tested. LGTM 👍
Before
rm1

After
rm2

@jeremylenz
Copy link
Member

Tests will fail (and thus merging is blocked) until #11120 is merged, probably early next week.

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.

4 participants