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

s/seedwriter: allow using snaps and components with improper file extensions with IgnoreOptionFileExtentions flag #14891

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

andrewphelpsj
Copy link
Member

No description provided.

@github-actions github-actions bot added the Needs Documentation -auto- Label automatically added which indicates the change needs documentation label Dec 20, 2024
…ensions with IgnoreOptionFileExtentions flag
@andrewphelpsj andrewphelpsj force-pushed the allow-missing-snap-suffix branch from 924178a to 2dc8887 Compare December 20, 2024 15:34
Copy link
Collaborator

@pedronis pedronis left a comment

Choose a reason for hiding this comment

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

question

daemon/api_sideload_n_try.go Show resolved Hide resolved
Copy link
Collaborator

@pedronis pedronis left a comment

Choose a reason for hiding this comment

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

thank you, unit tests question

overlord/devicestate/systems.go Show resolved Hide resolved
@andrewphelpsj andrewphelpsj force-pushed the allow-missing-snap-suffix branch from a40f99b to 33049b9 Compare December 20, 2024 17:46
Copy link
Member

@olivercalder olivercalder left a comment

Choose a reason for hiding this comment

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

Code LGTM!

If we're going to have exceptions for file extensions using this new flag, what use cases do we have for enforcing the file extension vs not enforcing it? Would it be undesirable to simply stop enforcing it everywhere, and have no flag?

@andrewphelpsj
Copy link
Member Author

@olivercalder those checks are to ensure consistency when creating seeds from the image package. Since we support things like snap prepare-image --snap snap-name or snap prepare-image --snap ./some-path-to-snap.snap, we want to make sure that we're parsing the args and then using them correctly as either snap names or paths.

@andrewphelpsj andrewphelpsj force-pushed the allow-missing-snap-suffix branch from 33049b9 to 94c6766 Compare December 20, 2024 18:30
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.08%. Comparing base (24a0034) to head (94c6766).
Report is 75 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #14891      +/-   ##
==========================================
- Coverage   78.20%   78.08%   -0.12%     
==========================================
  Files        1151     1130      -21     
  Lines      151396   151468      +72     
==========================================
- Hits       118402   118278     -124     
- Misses      25662    25894     +232     
+ Partials     7332     7296      -36     
Flag Coverage Δ
unittests 78.08% <100.00%> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Documentation -auto- Label automatically added which indicates the change needs documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants