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

[enhancement] clear out stages before re-render #1049

Closed
viniciusdc opened this issue Feb 11, 2022 · 5 comments · Fixed by #1073
Closed

[enhancement] clear out stages before re-render #1049

viniciusdc opened this issue Feb 11, 2022 · 5 comments · Fixed by #1073
Labels
area: user experience 👩🏻‍💻 needs: discussion 💬 Needs discussion with the rest of the team type: enhancement 💅🏼 New feature or request

Comments

@viniciusdc
Copy link
Contributor

viniciusdc commented Feb 11, 2022

As pointed out by @danlester, we should remove some files from the stages directory before re-attempting a qhub deploy (redeploy), as it would be more secure for the user as well as would decrease the chance of terraform complaining or erroring during deployment. e.g.

for example if an existing .tfstate file exists in stage 01 from before changing the project name, qhub deploy will error because it wants to refresh the older version of the state (if that old bucket was deleted).

As per #1010, currently, we have a way to discern which files exist only in the user space (now, untracked), so we can add a filter to remove some target files like the state ones.

Enhancements

  • Removal of .tfstate files from stages in each re-render
  • Add ability to the user to opt for removal, maybe a target arg? e.g qhub render --remove [01-terraform-state/<untracked-file>]
  • Notify user when creating and modifying/removing files (skip it with --disable-prompt as well)
@viniciusdc viniciusdc changed the title [enhancment] clear out stages before re-render [enhancement] clear out stages before re-render Feb 11, 2022
@viniciusdc
Copy link
Contributor Author

c.c @costrouc @danlester

@danlester
Copy link
Contributor

Really tf files need to be removed in case any were deleted between old and newer versions of QHub. I have run into this in development just now, but the same could happen between full versions.

@danlester
Copy link
Contributor

Closes #1062

@costrouc
Copy link
Member

We've had two meetings this week that discuss this issue. I'm against deleting anything that is encountered within these directories and instead having a "deprecated filenames/directories" list. We've talked about having a deprication approach. I'll have a PR that addresses this issue and up for review by end of day.

@viniciusdc
Copy link
Contributor Author

We've had two meetings this week that discuss this issue. I'm against deleting anything that is encountered within these directories and instead having a "deprecated filenames/directories" list. We've talked about having a deprication approach. I'll have a PR that addresses this issue and up for review by end of day.

Cool, I will gladly review it

costrouc added a commit that referenced this issue Feb 18, 2022
Closes #1049

This is to provide a simple mechanism for deprication of files and
allowing for targeted deletion of files. Later this functionality can
be extented to provide qhub extensions the ability to depricate files
within a stage. For how this is just a single list that is populated.
costrouc added a commit that referenced this issue Feb 18, 2022
…1073)

* Adds the ability on render to deleted targeted files or directories

Closes #1049

This is to provide a simple mechanism for deprication of files and
allowing for targeted deletion of files. Later this functionality can
be extented to provide qhub extensions the ability to depricate files
within a stage. For how this is just a single list that is populated.

* Black formatting

* Adding qhub/depricate.py to address explicit deprication of files

* Black formatting

* Need to learn to spell 😄
tylerpotts pushed a commit that referenced this issue Feb 21, 2022
…1073)

* Adds the ability on render to deleted targeted files or directories

Closes #1049

This is to provide a simple mechanism for deprication of files and
allowing for targeted deletion of files. Later this functionality can
be extented to provide qhub extensions the ability to depricate files
within a stage. For how this is just a single list that is populated.

* Black formatting

* Adding qhub/depricate.py to address explicit deprication of files

* Black formatting

* Need to learn to spell 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: user experience 👩🏻‍💻 needs: discussion 💬 Needs discussion with the rest of the team type: enhancement 💅🏼 New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants