question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(Python packaging): Dependabot overrun trying to resolve all versions

See original GitHub issue

General Issue

Dependabot is unable to determine most recent package versions, resulting in timeout

The Question

To reproduce:

  1. Create a GitHub repo.
  2. Install a few Python AWS CDK packages (17 in this case).
  3. Configure Dependabot for pip.
  4. Wait for Dependabot to do its thing.

What should happen: Dependabot should run successfully within a reasonable amount of time.

What happens: Dependabot did 664 HTTP GETs of https://pypi.org:443/pypi/aws-cdk.[…]/[…]/json) before giving up after 45 minutes of runtime. This seems to be the GitHub timeout for Dependabot jobs.

This means that users who have configured Dependabot on GitHub and are using Python AWS CDK packages are in danger of not getting automatic package update PRs, which is the sole purpose of Dependabot. Since Dependabot also fails silently (you have to go to https://github.com/$USER/$PROJECT/network/updates to see any indication of failure) this means projects are in danger of running vulnerable software.

I think this happens because of missing package metadata, resulting in Dependabot having to download every single version in order to determine which is the latest. But I don’t know wheels and other packaging features well enough to say for sure.

Workaround: Manually run poetry update after merging all the PRs Dependabot was able to create.

Untested workarounds:

  • Lock dependency versions in pyproject.toml?
  • Configure a separate job to run Dependabot? GitHub Actions should have a longer timeout than the built-in Dependabot configuration.

Other places this could be fixed:

  • Dependabot could use the version number in the URL rather than fetching each version to (presumably) check its version number. I expect this wasn’t done because the URL doesn’t necessarily contain the full version number (as in the case of private repos).
  • GitHub could bump their timeout.

CDK CLI Version

N/A

Framework Version

No response

Node.js Version

No response

OS

No response

Language

Python

Language Version

No response

Other information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
l0b0commented, Jan 18, 2022

Oh, I see. You’ve got aws-cdk 1.139, while the Geostore project still lingers at 1.92, presumably because of version incompatibilities with other packages. So this should be fixed once we’re able to upgrade somewhere between 1.93 and 1.139. We can probably close this; I’ll just create a new issue if this comes up with newer versions.

0reactions
github-actions[bot]commented, Jan 18, 2022

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't update private dependencies with dependabot
So, I am trying to use dependabot to update these dependencies on my projects but every time dependabot do the check it fails...
Read more >
Keep all your packages up to date with Dependabot
Today, we're taking the next step and announcing Dependabot version updates, which keep all of your packages updated on a regular basis.
Read more >
Python - CVE - Search Results
This issue has been resolved in version 5.4.0 and all users should upgrade to ... CVE-2020-26222, Dependabot is a set of packages for...
Read more >
February 2021 (version 1.54) - Visual Studio Code
Troubleshooting extensions blog post - Learn to troubleshoot extensions using ... You can download the nightly Insiders build and try the latest updates...
Read more >
(PDF) Empirical Analysis of Security Vulnerabilities in Python ...
version 1.0.0. We also aim to investigate the time it takes to fix a. package vulnerability once the vulnerability is discovered.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found