-
Notifications
You must be signed in to change notification settings - Fork 47
tools: add script to upgrade operator-sdk #4816
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
Open
ezekiel-alexrod
wants to merge
12
commits into
development/133.0
Choose a base branch
from
improvement/tool-upgrade-operator-sdk
base: development/133.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
1aeb5ab
scripts: add upgrade-operator-sdk.py
ezekiel-alexrod 7121a7d
scripts: fetch last patch for k8s go libraries
ezekiel-alexrod 669c94c
scripts: constants for regexp
ezekiel-alexrod 7e6dd52
scripts: update target python version to 3.10
ezekiel-alexrod 9569a9d
scripts: use scaffold Dockerfile and .golangci.yml instead of backup
ezekiel-alexrod 521bae0
scripts: corrected regex for Dockerfile
ezekiel-alexrod 800dc94
scripts: change strategy for GNU patch files
ezekiel-alexrod 17afab5
scripts: rewrite upgrade-operator-sdk as generic YAML-driven tool
ezekiel-alexrod 3db697e
scripts: detect latest Go/k8s patches and check operator-sdk release
ezekiel-alexrod 05260c0
scripts: address review round 4 -- operator_dir as CLI arg, raw_copy,…
ezekiel-alexrod 432380b
scripts,tools: move upgrade-operator-sdk to tools/ directory
ezekiel-alexrod ecda27e
scripts: address review round 5
ezekiel-alexrod File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Linting and formatting configuration for scripts/upgrade-operator-sdk.py | ||
| # Run from the scripts/ directory: | ||
| # python3 -m black upgrade-operator-sdk.py | ||
| # python3 -m ruff check upgrade-operator-sdk.py | ||
| # python3 -m mypy upgrade-operator-sdk.py | ||
|
|
||
| [tool.black] | ||
| line-length = 88 | ||
| target-version = ["py39"] | ||
|
|
||
| [tool.ruff] | ||
| line-length = 88 | ||
| target-version = "py39" | ||
|
|
||
| [tool.ruff.lint] | ||
| select = [ | ||
| "E", # pycodestyle errors | ||
| "W", # pycodestyle warnings | ||
| "F", # pyflakes (undefined names, unused imports, …) | ||
| "I", # isort (import ordering) | ||
| "N", # pep8-naming conventions | ||
| "UP", # pyupgrade (modernise Python syntax) | ||
| "B", # flake8-bugbear (likely bugs and design issues) | ||
| "C4", # flake8-comprehensions (better list/dict/set comprehensions) | ||
| "SIM", # flake8-simplify (simplifiable code patterns) | ||
| "RET", # flake8-return (return statement issues) | ||
| "PTH", # flake8-use-pathlib (prefer pathlib over os.path) | ||
| "TRY", # tryceratops (exception handling anti-patterns) | ||
| ] | ||
| ignore = [ | ||
| "RET504", # allow x = ...; return x (readability) | ||
| "TRY003", # allow long messages in raise/die() calls | ||
| "TRY300", # allow return inside try block | ||
| ] | ||
|
|
||
| [tool.mypy] | ||
| strict = true | ||
| ignore_missing_imports = true | ||
| python_version = "3.9" | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.