Skip to content
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

Update Dependabot for python virtual envs #2322

Merged
merged 1 commit into from
Jan 11, 2022

Conversation

jalaziz
Copy link
Contributor

@jalaziz jalaziz commented Jan 11, 2022

Proposed Changes

  1. Simplify virtualenv installation to use multiple requirements files in
    a single directory. This eliminates the packages.txt file and provides
    an easier path to adding new tools in the future. It also allows us to
    simplify the dependenabot configuration as all requirements files are
    in a single directory.
  2. Update dependabot.yml to point to the new Python dependencies folder.

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request

Reviewing Maintainer

  • Label as breaking if this is a large fundamental change
  • Label as either automation, bug, documentation, enhancement, infrastructure, or performance

* Simplify virtualenv installation to use multiple requirements files in
  a single directory. This eliminates the packages.txt file and provides
  an easier path to adding new tools in the future. It also allows us to
  simplify the dependenabot configuration as all requirements files are
  in a single directory.
* Update dependabot.yml to point to the new Python dependencies folder.
@jalaziz
Copy link
Contributor Author

jalaziz commented Jan 11, 2022

@lindluni I did some testing with Dependabot and it seems like Dependabot is not smart enough to handle conflicting dependencies (seems like it expects a build failure to catch that), but it is smart enough to handle multiple files in the same directory.

What this gets us is a slightly simplified Dependabot configuration. Since it recognizes any .txt file as a python requirements file, we can have one per tool. Also, since Dependabot doesn't actually try to figure out if the versions conflict across files, it will go ahead and put up PRs to update any single dependency across all files that list it.

The only downside I can see here is it may eagerly update dependencies with versions that don't meet the transitive requirements, but that would fail on installation (which should fail the PR checks). We'd then have to update each the requirements independently if we want to unblock an upgrade, but the tradeoff seems worth it for fewer Dependabot PRs and config entries.

Copy link
Collaborator

@admiralAwkbar admiralAwkbar left a comment

Choose a reason for hiding this comment

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

Seems like a solid update

@admiralAwkbar
Copy link
Collaborator

@lindluni Any issues?

@lindluni
Copy link
Contributor

LGTM: I see now, dependabot doesn't support recursive wildcards for the directory to scan 😢

@lindluni lindluni merged commit 7e16834 into super-linter:main Jan 11, 2022
@jalaziz jalaziz deleted the fix-python-dependabot branch January 11, 2022 22:40
@jalaziz
Copy link
Contributor Author

jalaziz commented Jan 11, 2022

LGTM: I see now, dependabot doesn't support recursive wildcards for the directory to scan 😢

Yeah, sorry, I could've clarified that more on the original PR. One of the more annoying dependabot limitations.

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.

None yet

3 participants