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 #37666 - Fix Candlepin reset in reset rake task #11083

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

chris1984
Copy link
Member

@chris1984 chris1984 commented Jul 19, 2024

What are the changes introduced in this pull request?

  • With the recent changes to Candlepin and cpdb we forgot to update the reset rake task
basically, instead of cpdb --create --schema-only you need to be now running cpdb --create  (--schema-only no longer exists), 

instead of cpdb --update the new command is now cpdb --update-schema  (although, cpdb --update
may still work, because bash knows --update is start of --update-schema)
  • Instead of using runuser postgres cpdb can create and drop the database for us, so switched to that for all native candlepin db actions.

Considerations taken when implementing this change?

  • Make sure the Candlepin database gets recreated still

What are the testing steps for this pull request?

  • Check out PR
  • Reset your devel box bundle exec rake katello:reset --trace
  • Verify you do not see the error message anymore

ianballou
ianballou previously approved these changes Jul 19, 2024
Copy link
Member

@ianballou ianballou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working well for me, just one rubocop issue.

@ianballou ianballou dismissed their stale review July 19, 2024 15:33

will ack after rubocop's fixed

@chris1984
Copy link
Member Author

@ianballou updated

@chris1984 chris1984 requested a review from ianballou July 23, 2024 19:00
Copy link
Member

@ianballou ianballou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works!

@evgeni
Copy link
Member

evgeni commented Jul 24, 2024

Out of curiosity, why don't you use the reset feature of the installer? It has all the same bells and whistles and is actually tested regularly to do the right thing?

@chris1984
Copy link
Member Author

chris1984 commented Jul 24, 2024

Out of curiosity, why don't you use the reset feature of the installer? It has all the same bells and whistles and is actually tested regularly to do the right thing?

@evgeni I can make a PR to update the katello developer guide on the foreman.org to use the installer instead. I still think we should keep this one as well, because there are times for example on 1 dev box I have where it's setup for provisioning and if I don't pass all the prov params, it does not remember them. I only see this with the katello-devel scenario not on production. I guess I could pass them all with the --reset-data param but still think it's valid to keep this one too.

@chris1984 chris1984 merged commit 8fed606 into Katello:master Jul 25, 2024
28 checks passed
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.

3 participants