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

Disable Renovate's pip_requirements Manager #764

Merged
merged 2 commits into from
Mar 1, 2022

Conversation

NimJay
Copy link
Collaborator

@NimJay NimJay commented Mar 1, 2022

Background

Fixes

N/A

Change Summary

  • Let's temporarily disable Renovate for Python — until we get through most of the non-Python Renovate Bot pending updates listed in Dependency Dashboard #728.

Additional Notes

  • After this PR is merged, my plan is to close the aforementioned Renovate Bot pull-requests.
  • I am totally open to exploring other options to this Python Renovate Bot issue, so feel free to reject this PR. 😄
    • For instance, we could just merge all the PRs that only contain requirement.txt bumps, and hope nothing goes wrong. I might be overthinking this.

Testing Procedure

  • We'll have to merge this pull-request and

Related PRs or Issues

N/A

@NimJay NimJay requested a review from a team as a code owner March 1, 2022 17:44
@github-actions
Copy link

github-actions bot commented Mar 1, 2022

🚲 PR staged at http://34.133.220.217

@xtineskim
Copy link
Contributor

xtineskim commented Mar 1, 2022

They all update transitive Python dependencies by modifying only the requirements.txt file, instead of updating the requirements.txt file first.

Do you mean "instead of updating the requirements.txt file first"?
I'm good with this, maybe there can be a way for renovate-bot to exclusively look at the modules in the requirements.in file (I wonder why that pip-compile field is not enough to specify that 🤔 )

LGTM!

@github-actions
Copy link

github-actions bot commented Mar 1, 2022

🚲 PR staged at http://34.133.220.217

@NimJay
Copy link
Collaborator Author

NimJay commented Mar 1, 2022

... maybe there can be a way for renovate-bot to exclusively look at the modules in the requirements.in file
(I wonder why that pip-compile field is not enough to specify that 🤔 )

Good question.

Christine and I just did some digging and decided to keep pip-compile enabled and disable pip_requirements.
I have updated this pull-request accordingly — instead of disabling python, we now only disable pip_requirements.

Background Info

  • pip-compile and pip_requirements are Renovate Bot managers.
  • pip-compile is considered to be in "alpha" stage, so it's not enabled by default.
  • pip-compile targets the requirements.in file.
  • pip-compile will still create PRs that only update the requirements.txt file because of lock file maintenance, but these PRs are good.
  • pip_requirements doesn't look at or touch requirements.in files and only ever updates the requirements.txt file.

@NimJay NimJay merged commit 0151655 into main Mar 1, 2022
@NimJay NimJay deleted the nimjay/disable-python-renovate branch March 1, 2022 19:33
@NimJay NimJay restored the nimjay/disable-python-renovate branch March 1, 2022 19:33
@NimJay NimJay deleted the nimjay/disable-python-renovate branch March 1, 2022 19:33
@NimJay NimJay restored the nimjay/disable-python-renovate branch March 1, 2022 19:33
@NimJay NimJay changed the title Temporarily Disable Renovate for Python Disable Renovate's pip_requirements Mar 1, 2022
@NimJay NimJay changed the title Disable Renovate's pip_requirements Disable Renovate's pip_requirements Manager Mar 1, 2022
@NimJay NimJay deleted the nimjay/disable-python-renovate branch March 1, 2022 19:38
@xtineskim
Copy link
Contributor

Looks like this is not behaving as expected, for example in the PRs opened this morning

The requirements.in files are being updated, but now the requirements.txt files are not getting updated

@xtineskim
Copy link
Contributor

xtineskim commented Mar 2, 2022

I think we should try this renovatebot/renovate#10407 (comment)
and https://docs.renovatebot.com/configuration-options/#lockfilemaintenance
Maybe something like this?

...
  "pip-compile": {
    "enabled": true,
    "fileMatch": ["(^|/)requirements\\.in$"],
    "lockFileMaintenance": {
      "enabled": true
    }
  },
  "pip_requirements": {
    "enabled": false
  }

@NimJay
Copy link
Collaborator Author

NimJay commented Mar 2, 2022

The requirements.in files are being updated, but now the requirements.txt files are not getting updated

Oh no. This is a fun game of whack-a-mole. 😄

Thanks for sharing those links and bringing this to our attention, Christine.
From your link:

lockFileMaintenance ... This feature is disabled by default.

I see. Let's try your suggestion of adding:

    "lockFileMaintenance": {
      "enabled": true
    }

🤞

sitaramkm pushed a commit to sitaramkm/microservices-demo that referenced this pull request Mar 27, 2022
* Disable Renovate for Python, temporarily

* Disable pip_requirements & enable pip-compile
ca-scribner added a commit to ca-scribner/test-charm that referenced this pull request Dec 8, 2022
Follows the advice of [here](GoogleCloudPlatform/microservices-demo#764) to disable pip_requirements and explicitly mark pip-compile to do lockFileMaintenance (which I think was on by default, but ...)
@ca-scribner
Copy link

ty folks for these good writeups! I faced the same thing this week and randomly found this very helpful conversation :)

D-Mwanth pushed a commit to D-Mwanth/microservices-demo that referenced this pull request Mar 6, 2024
* Disable Renovate for Python, temporarily

* Disable pip_requirements & enable pip-compile
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.

3 participants