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 #36540 - Accurately checks custom product enablement upgrade task #10641

Closed
wants to merge 1 commit into from

Conversation

parthaa
Copy link
Contributor

@parthaa parthaa commented Jul 11, 2023

What are the changes introduced in this pull request?

This commit tries to address the issues listed here

PR for Issue #36120 changed default enablement for custom repos. By default all custom repos got disabled in candlepin. However a migration task was provided to add overrides for existing custom repos.

We needed a way for the custom product enablement upgrade task to only run if needed without having to rely on UpgradeTask.needing_run

This commit checks if there are any custom product content who's enablement is set to true. This implies that upgrade rake task update_custom_products_enablement has not run and hence the task can be run.

Considerations taken when implementing this change?

Multiple approaches were thought of but the current product enablement check makes the most sense

What are the testing steps for this pull request?

  • Create a few custom repositories.
  • bundle exec rake katello:upgrades:4.9:update_custom_products_enablement should not change the enablement of anything.
  • Now update the enablement for that product content in candlepin and katello
  • bundle exec rake katello:upgrades:4.9:update_custom_products_enablement should now run and change the enablement of of the repo to false

PR for Issue #36120 changed behavior of custom repos. By default all
custom repos got disabled in candlepin. However a migration task was
provided to add overrides for existing custom repos.

This commit checks if there are any custom product content who's
enablement is set to true. This implies that upgrade rake task
update_custom_products_enablement has not run and hence the task can be
run.
@theforeman-bot
Copy link

Issues: #36540

@parthaa
Copy link
Contributor Author

parthaa commented Jul 12, 2023

Moved it to #10644

@parthaa parthaa closed this Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants