Skip to content

Commit 3d1fc27

Browse files
committed
Retire post-generation hotfixes
The modern generation path owns the behaviors that release.sh previously reconstructed by cherry-picking old commits and applying transport patches. Remove that second mutation phase and its patch scripts so update-client.sh leaves the canonical generated tree intact. Ignore new generator support files that this package does not ship, and remove the obsolete hot-issues release instructions.
1 parent 83c30c6 commit 3d1fc27

9 files changed

Lines changed: 7 additions & 286 deletions

devel/release.md

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -104,62 +104,29 @@ command:
104104
scripts/update-client.sh
105105
```
106106

107-
**NOTE**: If you see a lot of new or modified files under the `kubernetes/test/`
108-
directory, delete everything except `kubernetes/test/test_api_client.py` and
109-
`kubernetes/test/test_configuration.py`.
110-
111107
Commit changes (should be only version number changes) to the release branch.
112108
Name the commit something like "Update version constants for XXX release".
113109

114-
***After you finished the steps above, refer to the section, "Hot issues", and
115-
apply the manual fixes.***
116-
117110
```bash
118111
git push upstream $RELEASE_BRANCH
119112
```
120113

121-
### 3. Hot issues
122-
123-
Use the `scripts/apply-hotfixes.sh` script to apply the fixes below in one step.
124-
**As mentioned above, the script should be run after finishing the section "Update release tags". Also, ensure a clean working directory before applying the script.**
125-
126-
Commit the manual changes like this [PR](https://github.com/kubernetes-client/python/pull/995/commits) does.
127-
128-
There are some hot issues with the client generation that require manual fixes.
129-
**The steps below are deprecated and only exist for documentation purposess. They should be performed using the `scripts/apply-hotfixes.sh` script mentioned above.**
130-
131-
1. Restore custom object patch behavior. You should apply [this commit](https://github.com/kubernetes-client/python/pull/995/commits/9959273625b999ae9a8f0679c4def2ee7d699ede)
132-
to ensure custom object patch behavior is backwards compatible. For more
133-
details, see [#866](https://github.com/kubernetes-client/python/issues/866) and
134-
[#959](https://github.com/kubernetes-client/python/pull/959).
135-
136-
2. Add alias package kubernetes.client.apis with deprecation warning. You need
137-
to add [this file](https://github.com/kubernetes-client/python/blob/0976d59d6ff206f2f428cabc7a6b7b1144843b2a/kubernetes/client/apis/__init__.py)
138-
under `kubernetes/client/apis/` to ensure the package is backwards compatible.
139-
For more details, see [#974](https://github.com/kubernetes-client/python/issues/974)
140-
141-
3. Add ability to the client to be used as Context Manager [kubernetes-client/python#1073](https://github.com/kubernetes-client/python/pull/1073)
142-
143-
4. Remove the tests directory (ref: https://github.com/kubernetes-client/python/commit/ec9c944f076999543cd2122aff2d86f969d82548). See the [upstream issue](https://github.com/OpenAPITools/openapi-generator/issues/5377) for more information.
144-
145-
5. Add tests for the default `Configuration` behavior (ref: https://github.com/kubernetes-client/python/pull/1303 and https://github.com/kubernetes-client/python/pull/1285). The commit [1ffa61d0650e4c93e0d7f0becd2c54797eafd407](https://github.com/kubernetes-client/python/pull/1285/commits/1ffa61d0650e4c93e0d7f0becd2c54797eafd407) should be cherry-picked.
146-
147-
### 4. CHANGELOG
114+
### 3. CHANGELOG
148115

149116
Make sure the change logs are up to date [here](https://github.com/kubernetes-client/python/blob/master/CHANGELOG.md).
150117
If they are not, follow commits added after the last release and update/commit
151118
the change logs to master.
152119

153120
Then based on the release, follow one of next two steps.
154121

155-
### 5. README
122+
### 4. README
156123

157124
Update the compatibility matrix and maintenance status in the README file.
158125

159126
### Submit pull request
160127

161-
Typically after the you've completed steps 2-6 above you can push your changes
162-
open a pull request against `kubernetes-client:release-x.y`
128+
After completing the steps above, push your changes and open a pull request
129+
against `kubernetes-client:release-x.y`.
163130

164131
## Patch a release branch
165132

kubernetes/.openapi-generator-ignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
.gitignore
2+
.github/
3+
.gitlab-ci.yml
24
git_push.sh
5+
pyproject.toml
36
requirements.txt
47
test-requirements.txt
58
setup.py

scripts/api_client_patch.diff

Lines changed: 0 additions & 13 deletions
This file was deleted.

scripts/apply-hotfixes.sh

Lines changed: 0 additions & 103 deletions
This file was deleted.

scripts/insert_proxy_config.sh

Lines changed: 0 additions & 82 deletions
This file was deleted.

scripts/release.sh

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,6 @@ scripts/update-client.sh
211211
# Re-generate the asyncio client
212212
scripts/update-client-asyncio.sh
213213

214-
# Apply hotfixes
215-
rm -r kubernetes/test/
216-
git add .
217-
git commit -m "temporary generated commit"
218-
scripts/apply-hotfixes.sh
219-
git reset HEAD~2
220-
# Apply proxy config after hotfixes
221-
scripts/insert_proxy_config.sh
222-
223214
# Custom object API is hosted in gen repo. Commit custom object API change
224215
# separately for easier review
225216
if [[ -n "$(git diff kubernetes/client/api/custom_objects_api.py)" ]]; then

scripts/rest_client_patch.diff

Lines changed: 0 additions & 18 deletions
This file was deleted.

scripts/rest_urllib_headers.diff

Lines changed: 0 additions & 13 deletions
This file was deleted.

scripts/update-client.sh

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,4 @@ sed -i'' "s/^CLIENT_VERSION = .*/CLIENT_VERSION = \\\"${CLIENT_VERSION}\\\"/" "$
6767
sed -i'' "s/^PACKAGE_NAME = .*/PACKAGE_NAME = \\\"${PACKAGE_NAME}\\\"/" "${SCRIPT_ROOT}/../setup-release.py"
6868
sed -i'' "s,^DEVELOPMENT_STATUS = .*,DEVELOPMENT_STATUS = \\\"${DEVELOPMENT_STATUS}\\\"," "${SCRIPT_ROOT}/../setup-release.py"
6969

70-
# This is a terrible hack:
71-
# first, this must be in gen repo not here
72-
# second, this should be ported to swagger-codegen
73-
echo ">>> patching client..."
74-
git apply "${SCRIPT_ROOT}/rest_client_patch.diff"
75-
git apply "${SCRIPT_ROOT}/api_client_patch.diff"
76-
# The following is commented out due to:
77-
# AttributeError: 'RESTResponse' object has no attribute 'headers'
78-
# OpenAPI client generator prior to 6.4.0 uses deprecated urllib3 APIs.
79-
# git apply "${SCRIPT_ROOT}/rest_urllib_headers.diff"
80-
8170
echo ">>> Done."

0 commit comments

Comments
 (0)