googleapis / googleapis/release-please
Using a jsonpath array filter with GenericToml extra-file config does not find the relevant version
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 588
- Avg merge
- 12h 16m
- Merged PRs (30d)
- 7
Description
I have a python project managed with uv where I specify a build system in the pyproject.toml file. When I do this, my application is "installed" into the environment and I receive a version number into the uv.lock file.
While updating a lock file generally is perhaps not my best idea, I decided to try it out anyway using the generic toml updater but it seems I am unable to use a jsonpath filter. I have verified that the jsonpath works when I convert the toml to json, but to my surprise the release-please cli and the release please github action both log out that nothing was found in the uv.lock file. (`No entries modified in $.package[?(@.name==="app")].version`)
I have tried specifying an absolute path from the root of the project ("/uv.lock"). I have tried escaping double quotes as well as using single quotes, I've tried == and === but no success.
Example minimum uv.lock file to reproduce:
```
version = 1
requires-python = ">=3.13"
[[package]]
name = "app"
version = "3.1.0"
source = { virtual = "." }
```
#### Environment details
- OS: happens on OSX 15 and also the github action (v4)
- Node.js version: 23.4.0
- npm version: 10.9.2
- `release-please` version: 16.15.0
#### Steps to reproduce
1. using a release please config similar to this one:
```
{
"release-type": "python",
"packages": {
".": {
"extra-files": [
{
"type": "toml",
"path": "uv.lock",
"jsonpath": "$.package[?(@.name==\"app\")].version"
}
]
}
}
}
```
Other attempted jsonpaths:
```
$.package[?(@.name==\"app\")].version
$.package[?(@.name=='app')].version
$.package[?(@.name===\"app\")].version
$.package[?(@.name==='app')].version
```
2. run release-please using cli or in a github action
I understand my problem could be avoided through various means and supporting updating a lock file like this makes no sense for release-please. However it seems that the generic toml updater might be broken because this file is a valid toml file and does not get updated.
Contributor guide
Assessment
This issue has not been assessed yet.