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

Add init package downloader #506

Merged
merged 7 commits into from
Jun 9, 2022
Merged

Conversation

jeff-mccoy
Copy link
Contributor

@jeff-mccoy jeff-mccoy commented Jun 7, 2022

Description

Enhanced the quick start process for testing Zarf by prompting users to download the init package if it can't be found locally.

Related Issue

Closes #502

Type of change

  • New feature (non-breaking change which adds functionality)

@jeff-mccoy
Copy link
Contributor Author

So there's an interesting issue with some envs (like use a debug, go run and CI), the version is either "unset" or "UnknownVersion". It probably wasn't necessary but I went ahead and added the ability on invalid cli version to get the latest release's init tarball. Bonus this will later make it trivial to check for the latest version of Zarf if online.

Standard download message with "yes" chosen:

Screen Shot 2022-06-07 at 11 03 50 AM

Error message with "no" chosen:

Screen Shot 2022-06-07 at 11 04 25 AM

Automatica release lookup from github:

Screen Shot 2022-06-07 at 11 32 30 AM

@jeff-mccoy jeff-mccoy added enhancement ✨ New feature or request packager needs-tests PR Label - Tests required to merge labels Jun 7, 2022
@jeff-mccoy
Copy link
Contributor Author

actually with our lack of interactive cli testing, I don't think there's a good way to test this in CI right now, now that I think about it. If we do --confirm, needed to confirm the download it would also start to init the wrong version of zarf in a cluster, which wouldn't be great. Not to mention forcing hundreds of megs in extra downloads per pipeline run. Hmmm.....

@jeff-mccoy jeff-mccoy requested a review from YrrepNoj June 7, 2022 20:06
src/cmd/initialize.go Outdated Show resolved Hide resolved
YrrepNoj
YrrepNoj previously approved these changes Jun 8, 2022
Copy link
Contributor

@YrrepNoj YrrepNoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating the PR. This update will be a nice QoL change and reduce friction to getting started with Zarf.

@jeff-mccoy jeff-mccoy removed the needs-tests PR Label - Tests required to merge label Jun 8, 2022
@jeff-mccoy jeff-mccoy merged commit ffa6b71 into master Jun 9, 2022
@jeff-mccoy jeff-mccoy deleted the feat/init-package-download-fallback branch June 9, 2022 01:39
Noxsios pushed a commit that referenced this pull request Mar 8, 2023
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 this pull request may close these issues.

Attempt multiple locations for init package
2 participants