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

feat: error when building a package with zero components #3403

Merged
merged 8 commits into from
Feb 3, 2025

Conversation

AustinAbro321
Copy link
Contributor

Related Issue

Fixes #3307

Checklist before merging

Signed-off-by: Austin Abro <[email protected]>
@AustinAbro321 AustinAbro321 requested review from a team as code owners January 14, 2025 14:39
Copy link

netlify bot commented Jan 14, 2025

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 7991291
🔍 Latest deploy log https://app.netlify.com/sites/zarf-docs/deploys/679d13813e3cb1000874b376

Signed-off-by: Austin Abro <[email protected]>
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
src/pkg/lint/validate.go 92.00% <100.00%> (+0.13%) ⬆️

... and 3 files with indirect coverage changes

@phillebaba
Copy link
Contributor

The current tests do not cover a package with components that are filtered out due to flavor filtering, which a believe is what is described in the issue.

@AustinAbro321
Copy link
Contributor Author

@phillebaba Would you suggest that I move the logic to resolveImports, or add a test to loadPackage to test it out with flavors? I'm leaning towards the latter since lint.ValidatePackage is an exported function so having the logic there may come in handy for library or after create use cases.

@phillebaba
Copy link
Contributor

I dont have a problem with having the existing test, but I would probably not close the issue with this PR. Adding a test to loadPackage would probably be the best way to solve this.

Signed-off-by: Austin Abro <[email protected]>
@AustinAbro321
Copy link
Contributor Author

Updated with a test on loadPackage

phillebaba
phillebaba previously approved these changes Jan 24, 2025
@AustinAbro321 AustinAbro321 added this pull request to the merge queue Jan 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 24, 2025
@AustinAbro321 AustinAbro321 force-pushed the error-on-no-components branch from c2c5dbb to 0d681d0 Compare January 24, 2025 16:20
Copy link
Contributor

@mkcp mkcp left a comment

Choose a reason for hiding this comment

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

LGTM - nice and simple 👍

@AustinAbro321 AustinAbro321 added this pull request to the merge queue Feb 3, 2025
Merged via the queue into main with commit 33d8a2a Feb 3, 2025
26 checks passed
@AustinAbro321 AustinAbro321 deleted the error-on-no-components branch February 3, 2025 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when building package with zero components
3 participants