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

Avoid loading config files when executing the liveness probe check #369

Merged
merged 1 commit into from
May 30, 2024

Conversation

bestie
Copy link
Contributor

@bestie bestie commented Mar 27, 2024

Proposed change

Add a new configuration option that prevents the liveness probe command from loading config files.

Why?

It's possible, even common to end up Rails specific logic Racecar config files.

Racecar.config.logger = Rails.logger for example.

In these cases it's not desirable for the liveness probe to use the same configuration mechanism. A new option,RACECAR_LIVENESS_PROBE_SKIP_CONFIG_FILES ensures this doesn't happen.

@bestie bestie force-pushed the liveness-probe-avoids-loading-config-files branch from 15ccad4 to 9656d53 Compare March 27, 2024 18:41
@bestie bestie force-pushed the liveness-probe-avoids-loading-config-files branch from 9656d53 to fc5d2ef Compare April 9, 2024 15:38
@bestie bestie marked this pull request as ready for review April 9, 2024 15:40
Copy link
Collaborator

@deepredsky deepredsky left a comment

Choose a reason for hiding this comment

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

I think we need a note in the readme about this. Also can you add an entry in changelog 🙏

It's possible, even common to end up Rails specific logic Racecar config files.

`Racecar.config.logger = Rails.logger` for example.

In these cases it's not desirable for the liveness probe to use the same
configuration mechanism. A new option,
`RACECAR_LIVENESS_PROBE_SKIP_CONFIG_FILES` ensures this doesn't happen.

Use a new configuration value to avoid confusion
@bestie bestie force-pushed the liveness-probe-avoids-loading-config-files branch from fc5d2ef to 25d02ca Compare April 15, 2024 06:59
@bestie
Copy link
Contributor Author

bestie commented Apr 15, 2024

@deepredsky I've changed approach on this a little, updated the readme and added to the changelog.

@deepredsky deepredsky merged commit 164921f into master May 30, 2024
5 checks passed
@deepredsky deepredsky deleted the liveness-probe-avoids-loading-config-files branch May 30, 2024 07:40
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