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

force hammer cache reload when enabling puppet #1453

Merged
merged 1 commit into from Jan 11, 2022

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Jan 11, 2022

no idea why/how this worked before, but you need to drop the hammer apidoc cache if you change the apidoc

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

I'm ok with a workaround, but could we open an issue in the installer/hammer to document this workaround?

I can imagine that in some conditions hammer could check if its cache is still fresh, for example if a command is not found.

@evgeni
Copy link
Member Author

evgeni commented Jan 11, 2022

In theory, Apipie "knows" the cache expired and loads a new apidoc, but it might be not enough to signal Hammer "hey, rebuild your commands".

https://github.com/Apipie/apipie-bindings/blob/f7c10b0ea1c794ca6d9754885218d2f2bc2f15c4/lib/apipie_bindings/api.rb#L260-L266

@ekohl
Copy link
Member

ekohl commented Jan 11, 2022

Sounds like we should have something in Hammer's bug tracker, unless @ofedoren can enlighten us.

@ekohl
Copy link
Member

ekohl commented Jan 11, 2022

@ofedoren
Copy link
Member

ofedoren commented Jan 11, 2022

For a workaround that should do this. When I was spinning up a new instance and then manually installed Puppet, I've noticed that the API docs are updated, but hammer needs to download a new version explicitly with -r option :/

Nitpick: you don't have to have additional command such as ping to reload the cache, simple --reload-cache will do and you'll save some time by not pinging all the services unless you need to.

@evgeni
Copy link
Member Author

evgeni commented Jan 11, 2022

Added a reference to https://projects.theforeman.org/issues/28283

And I like the ping, it's not that expensive, and ensures the app is actually up and running after the installer run.

@ekohl ekohl merged commit 3415064 into theforeman:master Jan 11, 2022
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.

None yet

3 participants