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

Allow opting out of component upgrades via amphora settings #714

Closed
elgreg opened this issue Sep 16, 2024 · 2 comments · Fixed by #715
Closed

Allow opting out of component upgrades via amphora settings #714

elgreg opened this issue Sep 16, 2024 · 2 comments · Fixed by #715

Comments

@elgreg
Copy link
Contributor

elgreg commented Sep 16, 2024

Is your feature request related to a problem? Please describe.

Upgrades, while convenient, are a bit of an anti-pattern. They write back to the database on a read. We generally try to avoid this kind of behavior and would like to just upgrade our components manually using migration scripts.

Describe the solution you'd like

Allow for a config setting that will let us opt-out of using upgrades.

@james-owen
Copy link
Member

Using upgrade files is optional, but yes I get it--the pattern is a bit of a footgun. I think code-wise we'd just have to add a check here https://github.com/clay/amphora/blob/master/lib/services/models.js#L69. It's probably more important to update the documentation so the tradeoffs and pitfalls are clear.

@elgreg
Copy link
Contributor Author

elgreg commented Sep 18, 2024

Thanks @james-owen I was actually going to put it in the upgrade.init function if it's all the same. I can send up a PR today as I got it running locally.

Agreed re: documentation. We had a few issues - one was semver - that 1.11 is not higher than 1.9. I think there's also an issue where a 1.0 in yaml somehow gets turned into an integer and then doesn't match the version number that is stored (1.0) so the component always wants to upgrade. Having functionality to turn it off is kind of a cop-out for us b/c we already have so many upgrade files. Ån alternative for us would be to just go in and remove them all. :)

elgreg added a commit to slategroup/amphora that referenced this issue Sep 18, 2024
elgreg added a commit to slategroup/amphora that referenced this issue Sep 18, 2024
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 a pull request may close this issue.

2 participants