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

The compute init --from flag should support archives and use content-negotiation #428

Merged
merged 29 commits into from
Oct 19, 2021

Conversation

Integralist
Copy link
Collaborator

@Integralist Integralist commented Oct 6, 2021

This PR implements supporting .zip and .tar.gz with the --from flag value.

The URLs I've used for testing are:

I'm blocked validating the content negotiation with an endpoint (such as fiddle) until fiddle implements serving back a .zip or .tar.gz when the Accept request header sends an appropriate value.

Screenshots

Screenshot 2021-10-06 at 11 08 21

Below is a snapshot of the contents of the fastly.toml and the list of files in the specified --path directory. This shows the CLI extracted the files from the .zip file successfully and we updated the manifest with the values from the prompts...

Screenshot 2021-10-06 at 11 13 43

Extras

Also notice that the user is no longer prompted for a language when using the --from flag.

I also fixed a bug I discovered when using --from with --path.

@Integralist Integralist added the enhancement New feature or request label Oct 6, 2021
@Integralist Integralist requested review from a team and triblondon and removed request for a team October 6, 2021 10:16
pkg/commands/compute/init.go Outdated Show resolved Hide resolved
pkg/commands/compute/init.go Outdated Show resolved Hide resolved
@Integralist Integralist force-pushed the integralist/from-fiddle branch 2 times, most recently from 02e06b6 to 538486c Compare October 11, 2021 16:50
@Integralist Integralist force-pushed the integralist/from-fiddle branch from 538486c to 7389e6a Compare October 13, 2021 17:17
@Integralist Integralist force-pushed the integralist/from-fiddle branch from 7389e6a to a68c7dd Compare October 15, 2021 10:52
@Integralist Integralist force-pushed the integralist/from-fiddle branch 2 times, most recently from 58d0785 to 5b06fbb Compare October 18, 2021 10:51
@Integralist Integralist force-pushed the integralist/from-fiddle branch from 5b06fbb to 7181ae9 Compare October 18, 2021 12:09
@Integralist Integralist marked this pull request as ready for review October 18, 2021 12:19
@Integralist Integralist changed the title The compute init --from flag should support fiddles The compute init --from flag should support archives and use content-negotiation Oct 18, 2021
@Integralist Integralist merged commit c325b7f into main Oct 19, 2021
@Integralist Integralist deleted the integralist/from-fiddle branch October 19, 2021 13:16
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.

2 participants