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

projects: warn on "global" assign of plugs and slots #4097

Merged
merged 2 commits into from
Apr 18, 2023

Conversation

tigarmo
Copy link
Contributor

@tigarmo tigarmo commented Apr 13, 2023

This commit adds a warning (via emit.message()) when a snapcraft.yaml project has top-level plugs and/or slots that are used for assignment and not per-plug/slot configuration. Thanks to lucyllewy for suggested wording of the warning.

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run make lint?
  • Have you successfully run pytest tests/unit?

@codecov-commenter
Copy link

codecov-commenter commented Apr 13, 2023

Codecov Report

Merging #4097 (1c9214f) into main (38f6594) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main    #4097      +/-   ##
==========================================
- Coverage   94.62%   94.61%   -0.01%     
==========================================
  Files         643      643              
  Lines       52037    52036       -1     
==========================================
- Hits        49238    49235       -3     
- Misses       2799     2801       +2     
Impacted Files Coverage Δ
snapcraft/projects.py 96.81% <100.00%> (+0.16%) ⬆️
tests/unit/test_projects.py 100.00% <100.00%> (ø)

... and 18 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@tigarmo tigarmo force-pushed the CRAFT-1692-warn-toplevel-plug branch from 3f3ce77 to f11d2f9 Compare April 17, 2023 17:17
@tigarmo tigarmo marked this pull request as ready for review April 17, 2023 17:23
@tigarmo tigarmo requested a review from mr-cal April 17, 2023 17:23
This commit adds a warning (via emit.message()) when a snapcraft.yaml
project has top-level plugs and/or slots that are used for assignment
and not per-plug/slot configuration. Thanks to lucyllewy for suggested
wording of the warning.
@tigarmo tigarmo force-pushed the CRAFT-1692-warn-toplevel-plug branch from f11d2f9 to acd2eb0 Compare April 17, 2023 17:31
@rpjday
Copy link
Contributor

rpjday commented Apr 17, 2023

Reword "Plugs should be assigned to the app that they apply ..." to "Plugs should be assigned to the app to which they apply ..."

Copy link
Collaborator

@mr-cal mr-cal left a comment

Choose a reason for hiding this comment

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

Excellent work!

snapcraft/projects.py Outdated Show resolved Hide resolved
tests/spread/core22/plugs-warn/expected_output.txt Outdated Show resolved Hide resolved
@sergiusens sergiusens merged commit 61d519e into canonical:main Apr 18, 2023
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.

5 participants