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

[FEATURE REQUEST] compute pack --manifest #846

Open
jmoney opened this issue Feb 27, 2023 · 4 comments
Open

[FEATURE REQUEST] compute pack --manifest #846

jmoney opened this issue Feb 27, 2023 · 4 comments
Assignees

Comments

@jmoney
Copy link

jmoney commented Feb 27, 2023

Is your feature request related to a problem? Please describe.
I'm working in a monorepo for fastly compute services. All the fastly compute commands expect the manifest file to be fastly.toml in the CWD. Further more, the package expects the same but also the binary to be named bin/main.wasm. I've worked around most of the issues but packing the package has some hoops that need to be done.

Describe the solution you'd like
It'd be great is fastly compute pack in addition to taking the require parameter wasm-binary if it also took an optional --manifest parameter that was the location of the manifest file instead of assuming fastly.toml

Describe alternatives you've considered
Currently my work around is when building the various packages in the monorepo we copy the manifest and the wasm binary to /tmp before building the compressed tar file.

I'll gladly make the necessary changes to pack if this proposal is accepted so making the issue first to discuss and a way for me not to forget :D

@Integralist
Copy link
Collaborator

👋🏻 Hi @jmoney

Thanks for raising this issue.

I'll gladly make the necessary changes to pack if this proposal is accepted so making the issue first to discuss and a way for me not to forget :D

I'm always happy to see contributions 🙂 so thank you for offering!

Yes, that's fine to add to the pack subcommand. If you're happy to go ahead and implement that feature I'd happily review 👍🏻

@Integralist Integralist changed the title [FEATURE REQUEST] ... [FEATURE REQUEST] compute pack --manifest Jul 4, 2023
@andrebenedetti
Copy link

Hi! 👋
May I have this assigned to me? I'd like to work on this :)

@Integralist
Copy link
Collaborator

👋🏻 Hi @andrebenedetti

I've assigned this issue to you now. Many thanks for offering to help implement 🙂

@andrebenedetti
Copy link

The manifest file is loaded on cmd/fastly/main.go in alignment with the comment in that file

        // we parameterize all of the dependencies so we can
	// test it more easily. Here, we declare all of the dependencies, using
	// the "real" versions that pull e.g. actual commandline arguments, the
	// user's real environment, etc.

Would you rather accept a --manifest flag alongside with --verbose and --auto-yes to be parsed in the main file or is it preferred to have it as a flag inside the pack subcommand and load the manifest file somewhere around fastly compute is handled? I tend to prefer the latter approach 🤔
Also, if you see any other options, let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants