← Back to issue list

remote-build: error when --user is required

View original Github issue

Metadata

Project
snapcraft
Number
#2690
Type
pull request
State
merged
Author
cjp256
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action:

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
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.
qwen3.6-35b-a3b-mtp-q6 Merged. Fixed a remote-build regression where the --user flag was not enforced during LaunchpadClient initialization. Refactored config handling, moved initialization earlier, and updated login and push methods to use the saved username.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2825 remote-build: remove need to specify user snapcraft merged Merged after two approvals and CI. Removes remote build user specification, adds automatic login on init, fixes AcceptPublicUploadError, and deletes unused _waiting from LaunchpadClient across five files.
87%
#4821 remote build: hangs when logging into Launchpad snapcraft closed Resolved via craft-application#337 with improved Launchpad API retry logic. The CI-specific login hang was explicitly rejected since remote-build is unsupported in CI environments.
72%
#2837 remote-build: gpg-signing and usability fixes snapcraft merged Merged changes disabling GPG signing for git commits to fix remote-build failures. Improves error messaging and commit formatting. Approved by reviewer, passed CI, and integrated into the codebase.
71%