fix: fixes for release 7.1.1 - #1159
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aggregates small fixes intended for the 7.1.1 release, primarily updating documentation URL expectations in tests, adjusting lint/tooling configuration, and refining CI/spread environment setup.
Changes:
- Update unit/integration tests to expect versioned documentation URLs to use the major version (e.g.,
/3instead of/3.14159). - Adjust spread configuration to install an HWE kernel on Ubuntu 20.04 multipass runs with a reboot.
- Tooling/doc tweaks: bump
ruff-pre-commit, add a ruff ignore for many positional args in tests, add “monorepo” to the custom docs wordlist, and update an SPDX reference link.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/test_application.py | Updates expected docs URLs in unit tests to major-version form. |
| tests/unit/models/test_project.py | Removes ty-related ignores/comments around shorthand platforms inputs. |
| tests/integration/test_application.py | Updates expected docs URLs in integration tests to major-version form. |
| spread.yaml | Adds Ubuntu 20.04 kernel preparation (HWE + reboot) for multipass backend. |
| pyproject.toml | Adds ruff ignore PLR0917 for tests (many positional args). |
| docs/.custom_wordlist.txt | Adds “monorepo” to the custom spelling wordlist. |
| craft_application/models/project.py | Updates SPDX spec reference link in the license field docstring. |
| .pre-commit-config.yaml | Bumps ruff-pre-commit hook version. |
Suppressed comments (7)
tests/unit/models/test_project.py:356
- Same as above:
platforms={"arm64": None}is incompatible with the static type ofPlatformsDict(Platformvalues) and will be flagged bytywithout an ignore/cast.
project = FakeBuildBaseProject(
name="project-name",
version="1.0",
parts={},
platforms={"arm64": None},
base="ubuntu@22.04",
build_base="ubuntu@24.04",
tests/unit/models/test_project.py:370
- Same type-checking issue:
platforms={"arm64": None}will be rejected bytyas it doesn't matchPlatformsDict's value type.
project = FakeBuildBaseProject(
name="project-name",
version="1.0",
parts={},
platforms={"arm64": None},
base=None,
build_base=None,
)
tests/unit/models/test_project.py:388
- Same type-checking issue: shorthand
Noneplatform entries need atyignore (or acast) to keepty checkgreen.
_ = FakeBuildBaseProject(
name="project-name",
version="1.0",
parts={},
platforms={"arm64": None},
base=f"ubuntu@{DEVEL_BASE_INFOS[0].current_devel_base.value}",
build_base=f"ubuntu@{DEVEL_BASE_INFOS[0].devel_base.value}",
)
tests/unit/models/test_project.py:406
- Same type-checking issue:
platforms={"arm64": None}does not satisfy the staticPlatformsDicttype without an ignore/cast.
FakeBuildBaseProject(
name="project-name",
version="1.0",
parts={},
platforms={"arm64": None},
base=f"ubuntu@{DEVEL_BASE_INFOS[0].current_devel_base.value}",
build_base=f"ubuntu@{DEVEL_BASE_INFOS[0].current_devel_base.value}",
)
tests/unit/models/test_project.py:416
- Same type-checking issue:
platforms={"arm64": None}will triggertyunless suppressed (or rewritten to the expanded dict form).
_ = FakeBuildBaseProject(
name="project-name",
version="1.0",
parts={},
platforms={"arm64": None},
)
tests/unit/models/test_project.py:431
- Same type-checking issue: passing
Nonefor aPlatformsDictvalue is a static type mismatch fortywithout an ignore/cast.
_ = FakeBuildBaseProject(
name="project-name",
version="1.0",
parts={},
platforms={"arm64": None},
)
tests/unit/models/test_project.py:446
- Same type-checking issue:
platforms={"arm64": None}is incompatible with the annotated value type (Platform) and will be flagged byty.
FakeBuildBaseProject(
name="project-name",
version="1.0",
parts={},
platforms={"arm64": None},
base=f"ubuntu@{DEVEL_BASE_INFOS[0].current_devel_base.value}",
build_base=None,
)
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| return Project( | ||
| name="project-name", | ||
| version="1.0", | ||
| platforms={"arm64": None}, # ty: ignore[invalid-argument-type] | ||
| platforms={"arm64": None}, | ||
| parts=PARTS_DICT, |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Alex Lowe <alex.lowe@canonical.com>
make lint-ruff was failing with PLR0917 (too many positional arguments) errors across several test files that use many fixtures and parametrize decorators. Extend the existing test per-file-ignore for PLR0913 to also cover PLR0917, for the same reasoning. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace hardcoded external hyperlink targets for Craft Archives, Craft Parts, Craft Providers, and Craft Store with intersphinx :external+<project>:doc: roles, adding craft-archives and craft-store to intersphinx_mapping and fixing the craft-providers URL to drop the now-removed /en path segment. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: point cryptography links to explanation/cryptography pages Update the intersphinx links added for Craft Archives, Craft Parts, Craft Providers, and Craft Store to point directly to each project's cryptography explanation page instead of their doc index. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Alex Lowe <alex.lowe@canonical.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Alex Lowe <alex.lowe@canonical.com> * docs: address PR feedback for intersphinx cryptography links - Use :ref: instead of :doc: for the cryptography page links, since file paths aren't necessarily stable across the referenced projects' docs. - Format the craft-providers and craft-store intersphinx_mapping entries consistently with the other entries (trailing comma). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Signed-off-by: Alex Lowe <alex.lowe@canonical.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Michael DuBelko <michael.dubelko@canonical.com>
…6.2 (#1147) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* fix(project): handle devel/unknown bases in is_effective_base_eol() is_effective_base_eol() did not handle a devel series or a base unrecognized by distro-support, causing an unhandled UnknownVersionError crash (e.g. build-base: devel with --ignore=unmaintained). Give it the same treatment as check_base_is_supported()/base_eol_soon_date(): treat devel as never EOL, and assume unknown bases are supported. Fixes #1152 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(project): treat devel base as never EOL in is_effective_base_eol() Simplify is_effective_base_eol() to special-case a devel series the same way check_base_is_supported() does, rather than broadly catching UnknownDistributionError/UnknownVersionError for any unrecognized base. This more precisely fixes the crash on build-base: devel without silently treating other unrecognized bases as non-EOL. Also add a spread test that packs a project with build-base: devel and --ignore=unmaintained, and update/split the unit tests to cover the devel special-case versus genuinely unknown bases (which now correctly propagate the underlying distro-support error). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test(spread): add ubuntu-26.04-64 to multipass backend Adds the newly-available Ubuntu 26.04 LTS multipass image as a spread test system, matching the existing openstack backend coverage. Verified locally by running the pack-devel-build-base regression test on multipass:ubuntu-26.04-64. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
5e8d393 to
a3553ac
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated no new comments.
Suppressed comments (1)
docs/reference/changelog.rst:26
- Correct “wtih” and close the inline-literal markup for
UnknownVersionError; the unmatched backtick can produce a Sphinx/reStructuredText warning in the release notes.
``is_effective_base_eol()`` crashes wtih ``UnknownVersionError` when effective
base is ``devel``
c76958f to
0a8601d
Compare
make lint && make test?docs/reference/changelog.rst)?