Skip to content

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

Merged
AustinAbro321 merged 8 commits intomainfrom
error-on-no-components
Feb 3, 2025
Merged

feat: error when building a package with zero components#3403
AustinAbro321 merged 8 commits intomainfrom
error-on-no-components

Conversation

@AustinAbro321
Copy link
Member

Related Issue

Fixes #3307

Checklist before merging

Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
@AustinAbro321 AustinAbro321 requested review from a team as code owners January 14, 2025 14:39
@netlify
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 <AustinAbro321@gmail.com>
@codecov
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
Member 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 <AustinAbro321@gmail.com>
@AustinAbro321
Copy link
Member 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
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
@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
nevinaragam pushed a commit to nevinaragam/zarf that referenced this pull request May 20, 2025
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
Signed-off-by: NevinAragam <nevin.aragam@gmail.com>
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