Skip to content

feat(remote-build): add --project-dir argument to support build paths - #6372

Open
Tejas-Raj01 wants to merge 2 commits into
canonical:mainfrom
Tejas-Raj01:feature/remote-build-project-dir
Open

feat(remote-build): add --project-dir argument to support build paths#6372
Tejas-Raj01 wants to merge 2 commits into
canonical:mainfrom
Tejas-Raj01:feature/remote-build-project-dir

Conversation

@Tejas-Raj01

Copy link
Copy Markdown
Contributor

Fixes #6287

Describe your changes:

This PR introduces the --project-dir command-line argument for the snapcraft remote-build command to support monorepo setups and custom build paths, fulfilling the requirements outlined in Issue #6287.

Key Technical Details:

  • Command-Line Interface: Added the --project-dir option in snapcraft/commands/remote.py, mapping it to the newly supported build_path parameter in upstream craft-application.
  • Testing (Unit): Added unit tests in tests/unit/commands/test_remote.py to verify the argument parsing and API calls. A pre-existing test fixture (test_multiple_artifacts_per_build_on) was bypassed for the PLR0917 linter rule using # noqa: PLR0917 to keep the PR scope focused and avoid unrelated refactoring.
  • Testing (Spread): Created a new spread test environment under tests/spread/core24/remote-build/ (including task.yaml, arguments.txt, expected-snaps.txt, and dummy project data) to exercise the --project-dir functionality in a remote build scenario.
  • Release Notes: Documented the new feature in docs/release-notes/snapcraft-9-0.rst under the "Minor features" section.

  • I've followed the contribution guidelines.
  • I've signed the CLA.
  • I've successfully run make lint && make test.
  • 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.

@Tejas-Raj01
Tejas-Raj01 requested review from a team and mr-cal as code owners July 25, 2026 09:27
@Tejas-Raj01

Tejas-Raj01 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

@mr-cal , @medubelko , @cmatsuoka , @bepri
The lint-ruff CI check is failing with 14 PLR0917 (Too many positional arguments) errors. These are occurring in existing test files (test_keys.py, test_lint.py, conftest.py, test_lifecycle.py) that are unrelated to my --project-dir changes.

Since these are mostly pytest fixtures, adding # noqa: PLR0917 to all of them would pollute the PR diff. Would you prefer me to:

  1. Add the # noqa tags to these files anyway?
  2. Ignore this specific CI failure for this PR?
  3. Update pyproject.toml to ignore PLR0917 specifically for the tests/ directory?

Let me know the preferred approach for the repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

remote-build: support build paths

1 participant