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

Convert .format() to f-strings #6035

Merged
merged 1 commit into from
Mar 8, 2024
Merged

Convert .format() to f-strings #6035

merged 1 commit into from
Mar 8, 2024

Conversation

martinpitt
Copy link
Member

@martinpitt martinpitt commented Mar 7, 2024

ruff 0.3.1 (which we will get with the next tasks container refresh) starts complaining about some .format() usages.


See this test run, which was running against a locally (in the workflow) refreshed tasks container.

Our integration test already exercises PRs, image refresh etc., but I still triggered two tests for good measure.

ruff 0.3.1 (which we will get with the next tasks container refresh)
starts complaining about some .format() usages.
Copy link
Member

@allisonkarlitskaya allisonkarlitskaya left a comment

Choose a reason for hiding this comment

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

This particular failure is extremely well-timed and I'd like to avoid wasting the opportunity it presents.

How do you feel about:

  • separate PR introducing the .cockpit-ci/container file to pin us back to the old version (making things green again)
  • a lock-step single commit to update to the new version while fixing the issues here?

Just to prove the concept, basically...

The thing is, I guess this wouldn't actually work properly currently, since the failing test is a workflow. We'd need to up our game a bit there.

If you'd prefer to take the "omg main is red we need to fix this now" tack, I'm not going to insist.

@martinpitt
Copy link
Member Author

@allisonkarlitskaya you probably meant that commit for cockpit-project/cockpit#20149 ? that might also fail with a new tasks container, but it wouldn't help us here indeed. And in cockpit it's the "tox" workflow, which isn't pinnned. A bit "meh".. But I'll think about it at some later time (this day has been long enough)

@martinpitt
Copy link
Member Author

@allisonkarlitskaya TBH I'd like to wait with introducing .cockpit-ci/container until we have an update-ci-container bot. That shouldn't be super hard, a little bit of skopeo and our tasks API. It would be nice to use dependabot for that, but it only supports k8s yaml files. It may be worth checking if we can support .cockpit-ci/container.yml with a three-line mock yaml, see dependabot/dependabot-core#5819 (comment)

@martinpitt
Copy link
Member Author

martinpitt commented Mar 8, 2024

@allisonkarlitskaya : c-machines is a perfect example to start that. It fails with ruff 0.3.1, so how about we test-drive it there, and use that as a first opportunity to automate container updates?

See cockpit-project/cockpit-machines#1484

Copy link
Member

@allisonkarlitskaya allisonkarlitskaya left a comment

Choose a reason for hiding this comment

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

@allisonkarlitskaya : c-machines is a perfect example to start that. It fails with ruff 0.3.1, so how about we test-drive it there, and use that as a first opportunity to automate container updates?

See cockpit-project/cockpit-machines#1484

Deal.

@martinpitt martinpitt merged commit a0223ff into main Mar 8, 2024
8 checks passed
@martinpitt martinpitt deleted the ruff branch March 8, 2024 07:35
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.

2 participants