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

Implement persistant storing of checksums #33

Closed
danylkaaa opened this issue Mar 5, 2020 · 3 comments
Closed

Implement persistant storing of checksums #33

danylkaaa opened this issue Mar 5, 2020 · 3 comments

Comments

@danylkaaa
Copy link

We need to store checksum persistent, if we want to be able to start working on #32

@kindermax
Copy link
Collaborator

My view of functionality:

  1. add new option to command in yaml called persist_checksum - it is a boolean
  2. create a folder called .lets in the project directory (where lets.yaml exists)
  3. in .lets folder there will be a checksum folder
  4. each checksum will be stored into a separate file called {command}_{checksum_name_if_exists}
  5. when a command runs for the first time we write down new checksum into a file
  6. when a command runs the second time we reading an old checksum from a file, calculating the new checksum, compare them and expose new environ variable LETS_CHECKSUM_{NAME_OF_CHEKSUM_IF_EXISTS}_CHANGED - a boolean
  7. the most important thing - we replacing old checksum with a new checksum only if a command exits with status 0. That is a command using a checksum persist must be as deterministic as possible - for example, docker build or npm install. That gives a guarantee that we replacing a checksum only if we make sure our command is completed successfully.

@danylkaaa
Copy link
Author

Maybe we should creeate GitHub project board? And use it for releases?

@kindermax
Copy link
Collaborator

kindermax commented Mar 24, 2020

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

No branches or pull requests

2 participants