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 support for file based module in bundle #348

Merged
merged 10 commits into from
Mar 2, 2024

Conversation

b4nst
Copy link
Contributor

@b4nst b4nst commented Feb 19, 2024

Hey folks! This PR brings local module support to Bundles. Since it's quite a refactor, I'd really appreciate your input before I go any further. Hence why it's lacking tests, documentation and such.

Important

Heads up, this PR involves some hefty changes to the module fetcher.

While putting together the changes we discussed privately and in #268, I realized it's going to bulk up the current Fetcher module quite a bit. So, I've gone ahead and created a new fetcher package within the engine. This should make things more manageable and set the stage for adding new fetcher types down the road (like an HTTPS fetcher). What do you think, @stefanprodan?

At the moment, the Local fetcher only handles directories (think timoni apply). I didn't want to cram too much into one PR, so I've held off on adding .tar.gz file support for now. I'll tackle that in a separate PR.

I've given it a test spin with a modified version of podinfo, which I've linked here for you to try out (it uses the local redis). If this approach aligns with our goals, it could be a winner.

Before I mark this PR as ready, I'll beef up the testing (especially in the new fetcher package), flesh out the documentation, and tidy up the BundleBuilder for easier maintenance. I'd love to hear your thoughts on these next steps!

@b4nst b4nst marked this pull request as draft February 19, 2024 22:11
Copy link
Owner

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

This looks great @b4nst just a couple of comments from me

@b4nst b4nst marked this pull request as ready for review February 21, 2024 18:16
@b4nst
Copy link
Contributor Author

b4nst commented Feb 21, 2024

Okay I added a decent amount of tests, few lines of doc and refactored part of the code that I was not happy with. @stefanprodan it's ready for review.

@stefanprodan stefanprodan added enhancement New feature or request area/engine CUE engine related issues and pull requests area/bundles Timoni's Bundle related issues and pull requests labels Mar 2, 2024
Copy link
Owner

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @b4nst this is an awesome feature 🏅

PS. Going to add e2e tests in CI for local bundles in a followup PR.

@stefanprodan stefanprodan merged commit ddf5383 into stefanprodan:main Mar 2, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/bundles Timoni's Bundle related issues and pull requests area/engine CUE engine related issues and pull requests enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants