← Back to issue list

extensions: allow part names to use '.' separator for bases that disallow slashes

View original Github issue

Metadata

Project
rockcraft
Number
#1345
Type
pull request
State
merged
Author
alithethird
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #1345 (approved by 2 reviewers) adds Extension.get_part_name()/ExtensionPart so extension part names use '.' instead of '/' on bases like ubuntu@26.04; applied across expressjs, fastapi, go, flask/django and springboot extensions plus tests.

Resolution: closed resolved

Reason: The pull request itself was merged into rockcraft (12 files, +165/-99) after review approval, with CI largely green. It introduces a shared Extension.get_part_name() helper that selects the separator based on craft-application's BASES_ALLOW_SLASH_IN_PART_NAME list, and a companion test-spread failure unrelated to the change.

Evaluated by: mr-cal-bot

No scores available.

Issue body

## Summary Extension part names generated by the framework extensions historically used a `/` separator (e.g. `flask-framework/install-app`). Newer bases (e.g. `ubuntu@26.04`) don't allow slashes in part names, so this PR introduces a shared `Extension.get_part_name()` helper that picks `/` or `.` as the separator depending on whether the project's base is listed in craft-application's `BASES_ALLOW_SLASH_IN_PART_NAME`. Pulled in from https://github.com/canon-cat/rockcraft/pull/3 and extended to cover all the framework extensions (that PR only updated `expressjs-framework`). ## Changes - `Extension` now takes an `extension_name` argument and exposes `get_part_name(ExtensionPart)` / `ExtensionPart` enum for building part names consistently. - `_FrameworkFactory` and `apply_extensions()` pass `extension_name` through to extension constructors; `Extension.validate()` no longer takes `extension_name` as an argument (it's read from `self`). - Applied `get_part_name()` to all part-name usages in: - `expressjs.py` - `fastapi.py` - `go.py` - `gunicorn.py` (flask-framework, django-framework) - `springboot.py` - Updated the corresponding unit tests, including new expectations for the `.`-separated part names on `ubuntu@26.04`. ## Checklist - [x] I've followed the [contribution guidelines](https://github.com/canonical/rockcraft/blob/main/CONTRIBUTING.md). - [ ] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/). - [x] I've successfully run `make lint && make test` (extensions-related tests; two pre-existing, unrelated `apt` backend failures in `test_lifecycle.py` were observed on both `main` and this branch in this sandboxed environment). - [ ] I've added or updated any relevant documentation. - [ ] In documents I changed, I added a meta description if one was missing. - [ ] I've updated the relevant release notes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #1345 (approved by 2 reviewers) adds Extension.get_part_name()/ExtensionPart so extension part names use '.' instead of '/' on bases like ubuntu@26.04; applied across expressjs, fastapi, go, flask/django and springboot extensions plus tests.
stealth/space-bunny-alpha — closed resolved PR #1345 merged: adds Extension.get_part_name() helper (with ExtensionPart enum) so framework extension part names use '.' instead of '/' on bases like ubuntu@26.04 that disallow slashes; applied across expressjs, fastapi, go, gunicorn, springboot.
stealth/space-bunny-alpha — closed resolved Merged support for dot-separated extension part names, allowing bases such as ubuntu@26.04 that reject slashes; all framework extensions use a shared naming helper.
qwen/qwen3.6-35b-a3b — — Merged. Adds Extension.get_part_name() helper to use dot separators for bases like ubuntu@26.04 that disallow slashes. Applied across all framework extensions with updated tests. Approved by two reviewers and passed CI checks.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 35
Confidence: 90
needs review Refactors extension part naming to use dots instead of slashes for bases that disallow them. Adds a shared helper, updates multiple framework extensions and tests. Currently approved by one reviewer with passing CI.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 40
Confidence: 90
needs review Introduces Extension.get_part_name() to use '.' instead of '/' for bases that disallow slashes in part names. Updates framework extensions and tests. Currently awaiting maintainer review with no CI results yet.

Update history

Date Change
updated
updated
updated
updated
updated
created

Related work

  • Related To: canon-cat/rockcraft#3 (confidence 55%)

    Original fork PR by the same author that added '.'-separated part names for expressjs-framework; PR #1345 pulls it in and extends it to all framework extensions.

  • Related To: canonical/craft-parts (confidence 45%)

    Part-name validity for slashes is decided by craft-application's BASES_ALLOW_SLASH_IN_PART_NAME, which this change keys off.

Related issues

Issue Project State Summary Similarity
#1367 docs: document base-specific extension part names rockcraft closed Merged in canonical/rockcraft#1367 via f56e7f6e, documenting slash- versus dot-separated extension part names by Ubuntu base and aligning framework guides, generated comments, and snapshots.
71%