Remove charmhub config from charmcraft.yaml spec#2499
Conversation
- Add CHARMHUB_ALLOWED_BASES constant for ubuntu@24.04 and lower (including almalinux@9) - Add validators to BasesCharm and PlatformCharm to check charmhub field usage - Update charmhub field to be excluded from JSON schema using SkipJsonSchema - Regenerate schema to remove charmhub from charmcraft.json - Add comprehensive tests for allowed and disallowed charmhub usage Co-authored-by: lengau <4305943+lengau@users.noreply.github.com>
Co-authored-by: lengau <4305943+lengau@users.noreply.github.com>
|
Type checking with Command output |
1 similar comment
|
Type checking with Command output |
|
@copilot please do the thing |
Added back the deprecation message to the charmhub field while still excluding it from the JSON schema. Co-authored-by: lengau <4305943+lengau@users.noreply.github.com>
|
Type checking with Command output |
|
Type checking with Command output |
|
|
||
| # Check all run-on bases across all base configurations | ||
| invalid_bases = set() | ||
| for base_config in self.bases: |
There was a problem hiding this comment.
@copilot This is not relevant for charms that use the bases keyword.
This kind of thing is only needed for charms that use the platforms keyword.
There was a problem hiding this comment.
Fixed in commit 3ad8b31. Removed the _validate_charmhub_with_bases validator from BasesCharm since it's unnecessary - BasesCharm can only use LEGACY_BASES (enforced by _validate_base), and all LEGACY_BASES are in CHARMHUB_ALLOWED_BASES. The validation is only needed for PlatformCharm which can use newer bases that aren't allowed with charmhub.
The _validate_charmhub_with_bases validator is not needed for BasesCharm because: - BasesCharm can only use LEGACY_BASES (enforced by _validate_base) - All LEGACY_BASES are in CHARMHUB_ALLOWED_BASES - The validation is only relevant for PlatformCharm which can use newer bases Co-authored-by: lengau <4305943+lengau@users.noreply.github.com>
| return {name: process_part_config(part) for name, part in parts.items()} | ||
|
|
||
| @pydantic.model_validator(mode="after") | ||
| def _warn_charmhub_deprecated(self) -> Self: |
There was a problem hiding this comment.
Restored in commit 06c3179. The _warn_charmhub_deprecated method is now back in the CharmcraftProject class to properly display deprecation warnings when the charmhub field is used.
Added back the _warn_charmhub_deprecated validator to CharmcraftProject to ensure deprecation warnings are properly displayed when charmhub field is used. Co-authored-by: lengau <4305943+lengau@users.noreply.github.com>
|
Type checking with Command output |
1 similar comment
|
Type checking with Command output |
|
@copilot fix the linting issues |
Removed unused craft_cli.pytest_plugin import from test_project.py Co-authored-by: lengau <4305943+lengau@users.noreply.github.com>
Fixed in commit 7ab4f1e. Removed the unused Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
Type checking with Command output |
1 similar comment
|
Type checking with Command output |
|
Type checking with Command output |
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.