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

--warnandignoreononetimescriptchanges #31

Closed
erikbra opened this issue Sep 22, 2021 · 3 comments · Fixed by #51
Closed

--warnandignoreononetimescriptchanges #31

erikbra opened this issue Sep 22, 2021 · 3 comments · Fixed by #51
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@erikbra
Copy link
Owner

erikbra commented Sep 22, 2021

Warn on one time script changes, bug ignore them, do not run the changed script.

Do we want/need this?

@erikbra erikbra added the enhancement New feature or request label Sep 22, 2021
@wokket
Copy link
Collaborator

wokket commented Sep 22, 2021

I read this as effectively providing --baseline but for the OneTime scripts only.... I can see why you might need this if restoring a db from another environment, which had tokens in a one-time script and so the db hash will never match your current files, but because you're in a downlevel environment (restored db) you have changes to run and can't use --baseline.

I may have used this in the distant past whern I was using restores more, but the distant past is hazy...

@erikbra
Copy link
Owner Author

erikbra commented Sep 22, 2021

I have never used this one.

BTW (maybe unrelated), what's your take on this? Should we store the scripts before replacing tokens, or after?

chucknorris/roundhouse#419

@wokket
Copy link
Collaborator

wokket commented Sep 23, 2021

I completely understand why storing scripts before tokens are replaced makes sense, esp in that "restore downlevel" scenario. If I was starting a dbase migration project from scratch with no concern for back compat that's prob what I'd try.

A couple of thoughts against though:

  • Back compat with existing hashes/text/dbases... could be managed with (not yet avail) --baseline or this issues --warnandignoreononetimescriptchanges ?
  • Would you apply the hash checks before or after replacement? You'd really want to check the before if you're storing the before in the dbase, and for the restore scenario (or build(deps): bump xunit from 2.6.3 to 2.6.5 #419) to make sense. You really want to check after replacement to detect changes in token values in the same environment where it's already run...
  • Per-token values like suggested in Tokenized scripts to be persisted as is chucknorris/roundhouse#419 feels like a hiding to nowhere right now while we're still ticking off basic stuff but it's a legit feature request...

@wokket wokket self-assigned this Sep 23, 2021
@erikbra erikbra changed the title warnandignoreononetimescriptchanges --warnandignoreononetimescriptchanges Sep 23, 2021
@wokket wokket linked a pull request Sep 23, 2021 that will close this issue
erikbra pushed a commit that referenced this issue Sep 26, 2021
* feat #31: First cut at --ignoreandwarnononetimescriptchanges

* build: Compile warning
@erikbra erikbra added this to the 0.9.3 (MVP) milestone Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants