-
Notifications
You must be signed in to change notification settings - Fork 49
render-config: delete and re-create config when output file already exists #771
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a mechanism to skip the render-config operation when the output file already exists, addressing issue #770. The change adds an early exit condition to prevent unnecessary processing when the target output file is already present.
- Adds file existence check before processing render-config
- Exits early with status 0 and informational message when output file exists
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this. My preference would be to delete the file if it exists and have it be re-rendered so that we know it is up-to-date (e.g. any external secrets / appservice registrations could change at any time). My understanding is that you should have permissions to do this as the permissions will come from the parent directory rather than the file itself (as this process should be running with the user id the owner). Does that sound like a way forward that would work for you?
I considered that but I think there is an edge case there that could cause a config to be applied that maybe shouldn't be:
I think it's slightly safer to assume immutability of the config and only have the pod change it's config with the hash labels update. |
Because of the check config hook the (chart provided) Synapse config won't be updated until that job has passed and the config is known valid. I think the likelihood of the the There is another case were the Given that we're left with at least one situation where the |
@benbz I have updated the PR to delete. I am testing this on my own cluster now. |
dyff of changes in rendered templates of CI manifestsNo changes in rendered templates |
Thanks for the PR! This will be part of next release through https://github.com/element-hq/ess-helm/pull/782/files |
See #770