Skip to content

[MISC] UV configuration for renovate - #38

Open
dragomirp wants to merge 2 commits into
mainfrom
uv-renovate
Open

[MISC] UV configuration for renovate#38
dragomirp wants to merge 2 commits into
mainfrom
uv-renovate

Conversation

@dragomirp

@dragomirp dragomirp commented May 9, 2025

Copy link
Copy Markdown
Contributor

UV presets, in case we switch permanently.

Tested on https://github.com/dragomirp/pgbouncer-operator/pull/9

Comment thread renovate_presets/charm.json5 Outdated
// Exclude Renovate PRs from auto-generated release notes
"labels": ["not bug or enhancement"],
"enabledManagers": ["poetry", "github-actions", "regex"],
"enabledManagers": ["poetry", "pep621", "github-actions", "regex"],

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The manager is pep621, lockFileMaintenance from line 11 will make renovate updated the uv.lock as well.

Comment thread renovate_presets/charm.json5 Outdated
{
"matchManagers": ["pep621"],
"matchDepNames": ["python"],
"matchDatasources": ["python-version"],

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can merge with the poetry rule above based on datasource.

"matchManagers": ["pep621"],
"rangeStrategy": "in-range-only",
"matchJsonata": [
"depType = 'dependency-groups' and managerData.depGroup = 'charm-libs'"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question. Will this mean that only the charm-libs dependency group gets updated? We're using more groups. Unclear to me if specific charms can extend or expand this Renovate config.

@carlcsaposs-canonical carlcsaposs-canonical left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dependabot vulnerability alerts—which Renovate uses to segment security updates from normal PRs (and to open security update PRs immediately, instead of waiting for the weekly schedule)—do not currently support uv.lock

@astrojuanlu

Copy link
Copy Markdown

This should now be fixed! Dependabot can now detect vulnerable dependencies from uv.lock files and create security updates for them.

dependabot/dependabot-core#11913

@taurus-forever

Copy link
Copy Markdown
Contributor

discussed in backlog grooming: waiting here for 26.04 *craft tools changes to test all of them and valuate complete migration to uv for all repos. There are several blockers right now here (c) @carlcsaposs-canonical .

@astrojuanlu

Copy link
Copy Markdown

I see several charms migrating to the uv plugin already, for example:

The last remaining blocker I was tracking (@carlcsaposs-canonical correct me if I'm wrong) is canonical/charmcraft#2461, which is addressed by canonical/craft-providers#900 and canonical/craft-parts#1452. That issue blocks canonical/charmcraftlocal#10, so effectively many of the DP charms cannot use the uv plugin as long as they're using the wrapper.

Given that dependabot now has full-fledged support for uv, maybe we can revisit this PR and add the configuration so that teams can adopt uv when it's ready?

@carlcsaposs-canonical

Copy link
Copy Markdown
Contributor

The last remaining blocker I was tracking (@carlcsaposs-canonical correct me if I'm wrong)

yes, exactly. technically it's not a blocker, but migrating to uv right now would mean slow builds or (for <26.04) not building from source, which I believe goes against Canonical's supply-chain vision/security concerns

@carlcsaposs-canonical

Copy link
Copy Markdown
Contributor

also canonical/charmcraft#2788 might be relevant, but haven't looked into it

@dragomirp

Copy link
Copy Markdown
Contributor Author

Merged main.

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.

4 participants