Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(remotebuild)!: filter build-plan with --build-for, drop --platform #5216

Merged
merged 8 commits into from
Jan 27, 2025

Conversation

mr-cal
Copy link
Collaborator

@mr-cal mr-cal commented Jan 23, 2025

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run tox run -m lint?
  • Have you successfully run tox run -e test-py310? (supported versions: py39, py310, py311, py312)

  • Allows using --build-for to filter entries in the architectures or platforms keys in a project file.
  • Drop the --platform argument. For more information, see this comment.
  • Catches Launchpad errors, which were percolating up as internal errors.

There are still ways for remote builds to fail due to Launchpad's limited processing of the platforms key. That is out of scope here.

The 🎉 passing 🎉 remote spread tests are here.

Fixes #4992
(CRAFT-3277)

@mr-cal mr-cal force-pushed the work/CRAFT-3277-remote-build-filter branch from 5743349 to 43ac71a Compare January 23, 2025 21:55
Allows using '--platform' or '--build-for' to filter entries in the
'architectures' or 'platforms' keys in a project file.

If the project file doesn't contain an 'architectures' or 'platforms'
entry, then '--platform' and '--build-for' define the architectures to
build for.

Signed-off-by: Callahan Kovacs <[email protected]>
@mr-cal mr-cal force-pushed the work/CRAFT-3277-remote-build-filter branch from 43ac71a to c8345bc Compare January 24, 2025 00:15
@mr-cal mr-cal requested review from tigarmo and lengau January 24, 2025 02:09
Signed-off-by: Callahan Kovacs <[email protected]>
@mr-cal
Copy link
Collaborator Author

mr-cal commented Jan 24, 2025

After discussing with @tigarmo and @lengau, we've agreed to remove --platform from the remote-build command until Launchpad fully supports platforms.

Rationale

Launchpad isn't using craft-platforms and there isn't an API to pick which platforms to build. Even though we have restrictions in place to prevent platforms definitions that are ambiguous to Launchpad ([1] [2]), we aren't comfortable translating --platform to a Launchpad recipe.

--platform presents a complicated UX and prone to corner cases. Finally, we don't want to create an interim solution and then change the behavior again after LP181 is implemented.

The good news is that --build-for will be retained and can be used instead.

Signed-off-by: Callahan Kovacs <[email protected]>
Signed-off-by: Callahan Kovacs <[email protected]>
@mr-cal mr-cal changed the title feat(remotebuild): filter build-plan with --platform or --build-for feat(remotebuild)!: filter build-plan with --build-for, drop --platform Jan 24, 2025
@mr-cal mr-cal requested review from lengau and tigarmo January 24, 2025 19:22
Signed-off-by: Callahan Kovacs <[email protected]>
Signed-off-by: Callahan Kovacs <[email protected]>
@mr-cal mr-cal added the squash label Jan 27, 2025
@mr-cal
Copy link
Collaborator Author

mr-cal commented Jan 27, 2025

Spread test failure unrelated, merging

@mr-cal mr-cal merged commit 359a364 into main Jan 27, 2025
11 of 13 checks passed
bepri pushed a commit that referenced this pull request Jan 30, 2025
…rm (#5216)

* Allows using `--build-for` to filter entries in the `architectures` or
`platforms` keys in a project file.
* Drops the `--platform` argument.
* Catches Launchpad errors, which were percolating up as internal
errors.

Signed-off-by: Callahan Kovacs <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remote build: filter build plan with --build-for, drop --platform
3 participants