- Notifications
You must be signed in to change notification settings - Fork 72
feat: add archive module #422
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
Conversation
90f7dbd
to 34eca10
Compare There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been testing this out locally.
Nice work! Left some comments down below (none blocking).
LMK when this is ready for a more in-depth review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Just a couple of nits below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change adds a new archive module to the Coder registry. It can be used to archive user-data from pre-defined locations and restore it as well.
Where do these locations live? I see in examples that they are archived in /tmp which is not persistent in our example templates. Should we add examples on how we can archive and upload to an external storage like a s2 bucket and then restore from that?
The 2nd suggestion is to move this to coder-labs
namespace.
That's up to the author currently. They can store the archive in a place that's persisted or upload it. Ideally this module can be kept focused on archiving, and uploading/downloading could be handled by another module or scripted by template author. I can add an example how upload/download could be implemented.
Didn't realize we have this, that works 👍🏻 |
I am pulling this to test and then we can get this merged. @mafredri can you move this to the coder-labs namespace please? |
b086f29
to 2a555a9
Compare @DevelopmentCats done 👍🏻 |
I was testing this out, can you make it so that when It would probably be better if we just log something like: "Archive not found in backup path. (this is expected with new workspaces.)" and then continue on in the script instead of failing out as it currently does. |
9e3b67c
to b8acd89
Compare @DevelopmentCats I believe what you're seeing is due to a long-standing issue in coder/terraform, not this module. This ticket has instructions on how to configure some providers to support Whereas this ticket tracks a feature request to handle it in coder in an agnostic way: coder/coder#6175 We could improve the documentation in this module to mention that |
Yeah that's what I was referring to. My bad im sometimes bad at explaining things 😸 I think it might at least be worth having a warning GFM alert at least until This might not happen on most workspace architectures, but when it does I imagine it would be super confusing to troubleshoot for the end user |
509e284
to 7d63409
Compare @DevelopmentCats no worries. And thanks, I see you also found the bug, it was actually broken due to rename. 😅 WDYT about the warning in |
Looks good to me 😀 |
@mafredri If we address the icon stuff we are good to merge this |
Co-authored-by: Cian Johnston <cian@coder.com>
Co-authored-by: Cian Johnston <cian@coder.com>
583829f
to 4029d9f
Compare @DevelopmentCats I copied over |
It'd be nice to add an icon linter, we could fairly easily verify that the referenced files exist in registry and/or coder. |
100% agree with this |
This change adds a new
archive
module to the Coder registry. It can be used to archive user-data from pre-defined locations and restore it as well.Here we also explore: