generated from canonical/starbase
-
Notifications
You must be signed in to change notification settings - Fork 12
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
chore(merge): 'main' into 'work/CRAFT-3154/craft-platforms' #486
Closed
dariuszd21
wants to merge
96
commits into
work/CRAFT-3154/craft-platforms
from
merge/main-into-work/CRAFT-3154/craft-platforms
Closed
chore(merge): 'main' into 'work/CRAFT-3154/craft-platforms' #486
dariuszd21
wants to merge
96
commits into
work/CRAFT-3154/craft-platforms
from
merge/main-into-work/CRAFT-3154/craft-platforms
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The 'loc' is empty in Pydantic v2 apparently. Also drop Project.transform_pydantic_error() because with the new model the messages are correctly generated by the field validator.
The problem is this: if `_populate_platforms()` returns a dict of Platform objects, it breaks field_validators() for BuildPlanner/Project subclasses (in applications) which expect the input to be the "raw" yaml data.
It's useful for downstream applications that have different regexes (e.g. rockcraft).
This is just a shortcut for when you want the yaml but not the file.
The benefits: - We can report errors in all parts, instead of raising an exception on the first error; - The error messages contain the name of the failing part.
This is dropped in format_pydantic_errors(), which means that it mostly affects CraftValidationErrors and from_yaml_data(). This restores the Pydantic v1 UX.
Signed-off-by: Callahan Kovacs <callahankovacs@gmail.com>
Added SpdxLicenseStr, ProprietaryLicenseStr and LicenseStr which is union of the previous two. Signed-off-by: Dariusz Duda <dariusz.duda@canonical.com>
If the app isn't running from a snap, default to using the stable channel for the snap store snap, with an option to change channels using the CRAFT_SNAP_CHANNEL environment variable.
Run using `ruff check --fix`
* feat: tell the user which platforms matched * fix: wrong quotes * tests: add unit test coverage for new error string * chore: formatting * chore: formatting * chore: use humanize_list, always end with period * refactor(tests): explicit result strings
docs(changelog): add release notes for 4.1.1
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
`--shell` and `--shell-after` are implemented for a) consistency with the other lifecycle commands, and b) because it makes sense to want to inspect the build environment at packing time, considering that there are packing-related steps, like writing the metadata file, that the users don't have a way to inspect otherwise (short of examining the final artefact). `--debug` is improved to actually shell into the build environment when the packing itself failed, as opposed to the previous behavior of only debugging failures that happen during the lifecycle steps. Fixes #430 --------- Co-authored-by: Alex Lowe <alex.lowe@canonical.com>
This is a fix for canonical/charmcraft#1874 The spec (ST105) allows <list-of-arch> | <arch> in both build-on and build-for on all craft apps. This change makes the Platform model accept a string value, but doesn't specify that in the schema. This means text editors using the schema will still suggest converting the build-on and build-for values to lists.
This allows applications to override the inner run logic, with the end goal of capturing application specific exceptions and raise appropriate ones for Craft Application to handle. Without the logic split, overriding run to capture exceptions is virtually impossible as the run method holds a generic Exception handler. Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
This allows applications to override the inner run logic, with the end goal of capturing application specific exceptions and raise appropriate ones for Craft Application to handle. Without the logic split, overriding run to capture exceptions is virtually impossible as the run method holds a generic Exception handler. Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
This new parameter to ProviderService.instance() defaults to False and, if True, will cause the service to clean a pre-existing instance and create a new one.
This is necessary because the fetch-service needs visibility on *all* assets downloaded during a build, so pre-existing instances that might already have existing items cannot be re-used. Fixes #40
Signed-off-by: Callahan Kovacs <callahankovacs@gmail.com>
Set it to shutdown after 5 minutes of no live sessions.
Previously, if a value was in the passed Namespace, it would return that. The correct behaviour however is to check the environment for the value and return that instead.
* feat: update partitions docs & fix autobuild path * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Michael DuBelko <michael.dubelko@gmail.com> * fix(docs): use Michael's suggested text Co-authored-by: Michael DuBelko <michael.dubelko@gmail.com> * Update docs/howto/partitions.rst Co-authored-by: Sergio Schvezov <sergio.schvezov@canonical.com> * docs: update other reference w/ Sergio's suggestion Co-authored-by: Sergio Schvezov <sergio.schvezov@canonical.com> --------- Co-authored-by: Michael DuBelko <michael.dubelko@gmail.com> Co-authored-by: Sergio Schvezov <sergio.schvezov@canonical.com>
Signed-off-by: Dariusz Duda <dariusz.duda@canonical.com>
Signed-off-by: Dariusz Duda <dariusz.duda@canonical.com>
Signed-off-by: Dariusz Duda <dariusz.duda@canonical.com>
Signed-off-by: Dariusz Duda <dariusz.duda@canonical.com>
Signed-off-by: Dariusz Duda <dariusz.duda@canonical.com>
Signed-off-by: Dariusz Duda <dariusz.duda@canonical.com>
Signed-off-by: Dariusz Duda <dariusz.duda@canonical.com>
Signed-off-by: Dariusz Duda <dariusz.duda@canonical.com>
dariuszd21
changed the title
chore(merge): 'main' into 'work/craft 3154/craft platforms'
chore(merge): 'main' into 'work/CRAFT-3154/craft-platforms'
Sep 20, 2024
Signed-off-by: Dariusz Duda <dariusz.duda@canonical.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tox
?Merge that covers
pydantic
v2 changes, fetch-service and config service introduction