-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Poetry >=1.5.0 removes category from poetry.lock #7389
Comments
@landongrindheim I'm not so sure this is complete by simply updating Poetry, see #7418. EDIT - yeah same problem as now caught by #7418, this issue should be re-opened. |
This might still be an issue, because in greenbone/troubadix#578 Dependabot removed the
We were also able to reproduce this behavior in another private repository and notice it, because |
More information on potential resolution added at #7418 (comment). @esev @n-thumann - trying to figure out why this breaks in some flows but not in others. In all of my projects Dependabot distributes updates correctly. #7418 replicates the scenario in a test, but how does this work in practice? Is it that Dependabot breaks when only running with a |
I have both a poetry.lock and a pyproject.toml file. The only time I saw this error was for a Dependabot update via the Github Dependabot Vulnerability alerts under the Security tab. I continue to receive the normal PRs from Dependabot without any issues. |
Ah! Perhaps Dependabot security checks only operate in the context of a poetry.lock. Whenever I see one of these it does always mention that the problem was in poetry.lock, not pyproject.toml. Or maybe more likely - in the case of cryptography that usually comes in transitively, so maybe it was never managed in a pyproject.toml to begin with, and Dependabot only considers pyproject.toml if it needs to |
Interesting! I hadn't made that connection, but now that you mention it, I haven't gotten any PRs to update transitive dependencies recently |
That is a great observation. All of the dependencies for which Dependabot is failing me are transitive, while I keep getting updates for all my direct dependencies. There is one important outlier, though. The PR that did remove the categories from my poetry.lock file was also a transitive one. But that was the last transitive update to succeed. |
We noticed the same behavior: Even though the Additionally, I checked the latest output and it contains:
All of these 12 dependencies are transitive (checked with |
Dependabot has a compatibility issue with Poetry >= 1.5.0 due to removal of the `category` key from `poetry.lock`: dependabot/dependabot-core#7389 Regenerate the lock file with Poetry 1.4.2 as a temporary workaround.
Dependabot has a compatibility issue with Poetry >= 1.5.0 due to removal of the `category` key from `poetry.lock`: dependabot/dependabot-core#7389 Regenerate the lock file with Poetry 1.4.2 as a temporary workaround. This needs to be repeated for every PR generated by Dependabot.
Dependabot has a compatibility issue with Poetry >= 1.5.0 due to removal of the `category` key from `poetry.lock`: dependabot/dependabot-core#7389 Regenerate the lock file with Poetry 1.4.2 as a temporary workaround. This needs to be repeated for every PR generated by Dependabot.
Running |
@matthias-bach-by this outlier makes sense. Dependabot checked for updates when This is becoming more of a problem I got a recent CVE on grpcio and Dependabot could not generate a security update because of this transitive dependency issue (grpcio comes in for me transitively from otel). I am fairly confident that the solution will be in #7418 but I need more input from the Dependabot maintainers to proceed. |
Dependabot has a compatibility issue with Poetry >= 1.5.0 due to removal of the `category` key from `poetry.lock`: dependabot/dependabot-core#7389 Regenerate the lock file with Poetry 1.4.2 as a temporary workaround. This needs to be repeated for every PR generated by Dependabot.
Dependabot has a compatibility issue with Poetry >= 1.5.0 due to removal of the `category` key from `poetry.lock`: dependabot/dependabot-core#7389 Regenerate the lock file with Poetry 1.4.2 as a temporary workaround. This needs to be repeated for every PR generated by Dependabot.
Hello hello! We have been having this issue too with the category lines being removed in our dependabot PRs in our repo where we use poetry. I see that v0.228.0 of dependabot-core was released yesterday with the fix from #7834 in it. I just rebased an open dependabot PR we had, and I'm able to confirm that the new poetry.lock file was generated on v0.228.0 because it says poetry 1.6.1 was used. However, I'm still seeing that the category lines are removed. Is anyone else still having issues with this today? |
Hei! Unfortunately this is an existing issue, yes. We currently don't respect the poetry version your You can track resolution of this issue at #1556. |
@rachelwigell and just to be clear - the category key being removed is not a bug in and of itself, this is expected behavior when Poetry 1.5+ generates a lock file. |
Thanks both! I had misunderstood the issue. We can likely upgrade poetry in our repo to stop these huge diffs from being created. |
Is there an existing issue for this?
Package ecosystem
pip (poetry)
Package manager version
poetry >=1.5.0
Language version
python 3.11
Manifest location and content before the Dependabot update
https://github.com/pywemo/pywemo/blob/main/poetry.lock
Previous format:
Format after Poetry 1.5.0 (lacks a
category
): pywemo/pywemo@65969c9 (poetry.lock)dependabot.yml content
Updated dependency
cryptography
What you expected to see, versus what you actually saw
Expected to see dependabot update for cryptography.
What happened:
Logs: https://github.com/pywemo/pywemo/security/dependabot/6/update-logs/336414827
dependabot-core/python/lib/dependabot/python/update_checker/poetry_version_resolver.rb
Lines 300 to 304 in d097b11
I've also noticed dependabot adding the
category
to poetry.lock on PRs.category
should not have been added after updating Poetry to 1.5.0.Native package manager behavior
The
category
field is not present in poetry.lockSee python-poetry/poetry#7637 where
category
was removed.Images of the diff or a link to the PR, issue, or logs
Logs: https://github.com/pywemo/pywemo/security/dependabot/6/update-logs/336414827
Smallest manifest that reproduces the issue
No response
The text was updated successfully, but these errors were encountered: