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

Managed runs with empty build plans should fail #225

Closed
tigarmo opened this issue Feb 22, 2024 · 1 comment · Fixed by #437
Closed

Managed runs with empty build plans should fail #225

tigarmo opened this issue Feb 22, 2024 · 1 comment · Fixed by #437
Labels
Bug Something isn't working

Comments

@tigarmo
Copy link
Contributor

tigarmo commented Feb 22, 2024

Bug Description

The current code that loops over the build plan to launch managed runs just no-ops if the plan is empty (like if all build infos were filtered out). I can't think of a case where that shouldn't be an error instead, specially since we've decided that trying to build an empty plan in destructive mode is an error.

To Reproduce

Create a project with a build plan that will get totally filtered out (eg only builds on arm64 and you're on amd64)

part yaml

.

Relevant log output

.
@tigarmo tigarmo added the Bug Something isn't working label Feb 22, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-2523.

This message was autogenerated

lengau pushed a commit that referenced this issue Jul 16, 2024
Signed-off-by: Callahan Kovacs <callahankovacs@gmail.com>
tigarmo added a commit that referenced this issue Sep 2, 2024
This fix addresses cases like, for example, a project that only builds on `amd64`
being built on `riscv64`. Previously the call to run_managed() would loop over
the (empty) build plan and then finish "successfully". This new version will
raise an EmptyBuildPlanError indicating to the user that they should check the
project's 'platforms' declaration and the command-line parameters.

Fixes #225
@tigarmo tigarmo closed this as completed in 5e7560e Sep 4, 2024
lengau pushed a commit that referenced this issue Sep 5, 2024
This fix addresses cases like, for example, a project that only builds on `amd64`
being built on `riscv64`. Previously the call to run_managed() would loop over
the (empty) build plan and then finish "successfully". This new version will
raise an EmptyBuildPlanError indicating to the user that they should check the
project's 'platforms' declaration and the command-line parameters.

Fixes #225
lengau pushed a commit that referenced this issue Sep 5, 2024
This fix addresses cases like, for example, a project that only builds on `amd64`
being built on `riscv64`. Previously the call to run_managed() would loop over
the (empty) build plan and then finish "successfully". This new version will
raise an EmptyBuildPlanError indicating to the user that they should check the
project's 'platforms' declaration and the command-line parameters.

Fixes #225
thorfour added a commit to parca-dev/parca-agent that referenced this issue Sep 19, 2024
…2987)

The primary reason for this PR is to address the [failing snap release
job](https://github.com/parca-dev/parca-agent/actions/runs/10943881277/job/30384811867).

This job fails because there is no `arm64` build to upload, despite the
build artifacts being fetched from the previous steps in the process.

Further investigation showed that the `snapcraft pack` for the `arm64`
snap [finished
abruptly](https://github.com/parca-dev/parca-agent/actions/runs/10943881277/job/30384611839#step:6:48)
having not actually generated an artefact. This turns out to be a [known
bug](canonical/craft-application#225), which
should be addressed in the next snapcraft release. In the mean time, we
can work around by just explicitly stating that the `arm64` snap can be
`built-on` an `amd64` machine.

As a drive-by,
a3fefff
ensures that when there is a tag present in the goreleaser
`metadata.json,` it's used to set the version of the snap accordingly.
linostar pushed a commit to linostar/craft-application that referenced this issue Dec 4, 2024
This fix addresses cases like, for example, a project that only builds on `amd64`
being built on `riscv64`. Previously the call to run_managed() would loop over
the (empty) build plan and then finish "successfully". This new version will
raise an EmptyBuildPlanError indicating to the user that they should check the
project's 'platforms' declaration and the command-line parameters.

Fixes canonical#225
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant