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

Store deployments in a JSON file #44

Merged
merged 3 commits into from
Jun 9, 2024
Merged

Store deployments in a JSON file #44

merged 3 commits into from
Jun 9, 2024

Conversation

nlewo
Copy link
Owner

@nlewo nlewo commented May 25, 2024

This MR store previous deployment on the disk, in a JSON file. When, the JSON file is not existing or can't be unmarshaled, it is ignored and replaced.
Currently, we keep the last 10 testing deployments and last 10 main deployments.

Storing the previous deployments on disk will be used to add the following features:

  • rollback to previous deployments
  • manage gcroots
  • block non fast forward checkout (since the last deployed commit id is preserved across comin restart)

@nlewo nlewo force-pushed the storage-json-file branch from c88927e to b46f0ab Compare June 9, 2024 07:17
@nlewo nlewo merged commit ec05f86 into main Jun 9, 2024
3 checks passed
@zowoq
Copy link
Contributor

zowoq commented Jun 22, 2024

@nlewo Would you be open to having a stateless mode in comin that disables storing deployments and the features that would depend on it?

@nlewo
Copy link
Owner Author

nlewo commented Jun 22, 2024

@zowoq I would prefer to avoid optional feature because it would make more complex the codebase and the documentation.

However, my goal is to not make comin starting without any state file. If you delete the state file, comin starts correctly (and recreate it).

The size of this file is limited and pretty small (16KB) and it doesn't add any build dependencies (i actually started with a sqlite database but switched to a simple json file).

What is your issue with this file?

@zowoq
Copy link
Contributor

zowoq commented Jun 22, 2024

Storing state is really an anti-feature for my use case, basically I just want a more polished version of the autoupgrade module with git polling and prometheus metrics.

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.

2 participants