remote-build: error when --user is required
Metadata
Current evaluation
Merged PR #2690 (04a0d9331), restoring fail-fast remote-build validation when neither --user nor a configured username is available.
Resolution: closed resolved
Reason: PR #2690 was merged and implemented the fix in commit 04a0d9331. It reuses the configured username and reports an error early when remote-build has no user information.
Evaluated by: mr-cal-bot
No scores available.
Issue body
When initializing LaunchpadClient, lookup user information from
snapcraft config. If not present, and user not passed in, raise
error to inform user --user is required. I effectively broke
this behavior in 4253354cf3f995da19f1a568ffcaaa3a1c3359d3 because
this was done in login(), but not consistent with push_source_tree().
- Rename self.user -> self._user for consistency.
- Modify login() and push_source_tree() to use saved username.
- Move launchpad init up before worktree preparation so it fails
soonest if --user was required.
- Shuffle config handling bits into _load_snapcraft_config() and
_update_snapcraft_config().
Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2690 (04a0d9331), restoring fail-fast remote-build validation when neither --user nor a configured username is available. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2690, restoring fail-fast validation that remote-build requires --user or a configured user. It also reuses the saved username and refactors Snapcraft config handling. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. Fixes a remote-build regression where the --user flag was not enforced during LaunchpadClient initialization. Refactors config handling, moves init earlier to fail fast, and updates login/push methods to use saved credentials. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix for a remote-build regression where the --user flag was required but unvalidated. Now checks snapcraft config, raises an error if missing, and refactors Launchpad client initialization to fail early. |
Update history
No update history recorded yet.
Related work
-
Related To:
snapcraft#2825
(confidence 95%)
Later removed the need to specify a user by adding automatic Launchpad login.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2825 remote-build: remove need to specify user | snapcraft | merged | Merged #2825, removing the remote-build user requirement and adding automatic Launchpad login; it also fixed public-upload handling and cleaned up LaunchpadClient. | |
| #3553 cli: make remote-build more user-friendly | snapcraft | merged | Merged in #3553 via 8649cedd6: --recover now reports when no build exists, the public-data prompt only appears for new builds, and tests cover the behavior. |