-
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
Dependabot fails to update same dependency in same pull request #6200
Comments
Looking at your dependency files, I think there's two issues here:
|
@deivid-rodriguez so, if I got you correctly, do I need to do this?: |
I think that's how it should work, yes. By default you should only get updates for dependencies explicitly defined in your But actually, you probably want But in any case, I don't think it's going to make a difference right now due to this bug, but feel free to leave feedback on whether the change had any effect on your repo. |
i'll go with |
I've merged that, but now it still updated only one file, requirements.txt this time: |
oh, wow, it created the second PR already so soon: |
I started looking at this in the debugger and it looks like it's possibly an issue in the resolver_type method which basically picks which package manager we think is being used. In my tests it keeps picking plain I'll keep pulling on this thread and see if I can come up with a solution. |
This is not the first time we've run into problems with trying to guess which package manager is being used within an ecosystem. From a product perspective IMO we should reconsider if it might be more straightforward for us to ask users to specify the specific manager for any ecosystem with more than one possible package manager. We probably could pick a default for every ecosystem. This would also pet users specify more than one package manager if they wanted to track updates multiple paths. Anyway, a discussion beyond the scope of this particular issue but wanted to mention as a recurring thread I've seen. (the other recurring thread I've seen is the confusion resulting from python treating |
Another example:
|
Yeah, our logic here is a little fuzzy and doesn't really work for transitive dependencies. Basically since I'm attempting to improve this logic to prefer pipenv over pip in the presence of a |
ok, so for me workaround is to just add all dependencies to both files. the requrements.txt is just a dump of pipfile.lock anyway in that project. EDIT: Added:
|
Workaround for: - dependabot/dependabot-core#6200
And now there's another problem: It updates other unrelated dependencies as well: The PR is about "Bump certifi from 2022.9.24 to 2022.12.7", which it happens to update Pipfile, Pipfile.lock, requirements.txt. so far so good. but it also updates |
I'm not seeing the |
it was in the previous push:
So see this commit: |
How do I add items with markers to Pipfile? i.e requirements has:
I'm trying to work around that dependabot updates Pipenv files as well files in this PR: |
Since there was already marker in Pipfile.lock: I only added line to Pipfile without markers |
For dependabot workardound - dependabot/dependabot-core#6200
This needed to be created because Dependabot only updates `requirements.txt` because of dependabot/dependabot-core#6200. Closes #22
This needed to be created because Dependabot only updates `requirements.txt` because of dependabot/dependabot-core#6200. Closes #22
- Upgraded to Ansible 8.2.0 - Changed from [pipenv][] to [pdm][] and `pyproject.toml` because of ongoing issues with Dependabot not detecting dependencies in `Pipfile.lock` as opposed to only in `requirements.txt` (the inverse of dependabot/dependabot-core#6200). After trying Poetry (predates the latest Python packaging PEPs), rye (experimental), and hatch (no lock file), [pdm][] seems to fit the bill best for the limited needs that we have with this project. - Experimentally removed the generated `requirements.txt` file. It isn't used, but it has been valuable in getting update notifications from Dependabot, although the update PRs are less useful. If required, we can add it back with `pdm export -f requirements > requirements.txt`.
- Upgraded to Ansible 8.2.0 - Changed from [pipenv][] to [pdm][] and `pyproject.toml` because of ongoing issues with Dependabot not detecting dependencies in `Pipfile.lock` as opposed to only in `requirements.txt` (the inverse of dependabot/dependabot-core#6200). After trying Poetry (predates the latest Python packaging PEPs), rye (experimental), and hatch (no lock file), [pdm][] seems to fit the bill best for the limited needs that we have with this project. - Experimentally removed the generated `requirements.txt` file. It isn't used, but it has been valuable in getting update notifications from Dependabot, although the update PRs are less useful. If required, we can add it back with `pdm export -f requirements > requirements.txt`.
- Upgraded to Ansible 8.2.0 - Changed from [pipenv][] to [pdm][] and `pyproject.toml` because of ongoing issues with Dependabot not detecting dependencies in `Pipfile.lock` as opposed to only in `requirements.txt` (the inverse of dependabot/dependabot-core#6200). After trying Poetry (predates the latest Python packaging PEPs), rye (experimental), and hatch (no lock file), [pdm][] seems to fit the bill best for the limited needs that we have with this project. - Experimentally removed the generated `requirements.txt` file. It isn't used, but it has been valuable in getting update notifications from Dependabot, although the update PRs are less useful. If required, we can add it back with `pdm export -f requirements > requirements.txt`.
Closing out as stale |
Some kind of problem still there. Need to add all packages to Pipenv to avoid some buggy behavior: |
Is there an existing issue for this?
Package ecosystem
pip, pipenv
Package manager version
No response
Language version
No response
Manifest location and content before the Dependabot update
No response
dependabot.yml content
No response
Updated dependency
No response
What you expected to see, versus what you actually saw
Dependabot created two PR's for same dependency update:
python_version < '4'
topython_version < '4.0'
changes already reported as Dependabot flip-flop with python_full_version/python_version #6091it used to manage this nicely and update both files in same pull request. sometimes it fails, i have not yet determined the pattern.
Native package manager behavior
No response
Images of the diff or a link to the PR, issue, or logs
No response
Smallest manifest that reproduces the issue
No response
The text was updated successfully, but these errors were encountered: