10000 Merge pull request #1609 from yliaog/automated-release-of-20.11.0a1-u… · iff/python@d3b71ba · GitHub
[go: up one dir, main page]

Skip to content

Commit d3b71ba

Browse files
authored
Merge pull request kubernetes-client#1609 from yliaog/automated-release-of-20.11.0a1-upstream-release-20.0-1635352326
Automated release of 20.11.0a1 upstream release 20.0 1635352326
2 parents 549482d + 334b16f commit d3b71ba

File tree

13 files changed

+132
-53
lines changed

13 files changed

+132
-53
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# v20.0.0-snapshot
1+
# v20.11.0a1
22

33
Kubernetes API Version: v1.20.11
44

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ supported versions of Kubernetes clusters.
8989
- [client 17.y.z](https://pypi.org/project/kubernetes/17.17.0/): Kubernetes 1.16 or below (+-), Kubernetes 1.17 (✓), Kubernetes 1.18 or above (+-)
9090
- [client 18.y.z](https://pypi.org/project/kubernetes/18.20.0/): Kubernetes 1.17 or below (+-), Kubernetes 1.18 (✓), Kubernetes 1.19 or above (+-)
9191
- [client 19.y.z](https://pypi.org/project/kubernetes/19.15.0/): Kubernetes 1.18 or below (+-), Kubernetes 1.19 (✓), Kubernetes 1.20 or above (+-)
92+
- [client 20.y.z](https://pypi.org/project/kubernetes/20.11.0/): Kubernetes 1.19 or below (+-), Kubernetes 1.20 (✓), Kubernetes 1.21 or above (+-)
9293

9394
> See [here](#homogenizing-the-kubernetes-python-client-versions) for an explaination of why there is no v13-v16 release.
9495
@@ -131,6 +132,7 @@ between client-python versions.
131132
| 18.0 | Kubernetes main repo, 1.18 branch ||
132133
| 19.0 Alpha/Beta | Kubernetes main repo, 1.19 branch ||
133134
| 19.0 | Kubernetes main repo, 1.19 branch ||
135+
| 20.0 Alpha/Beta | Kubernetes main repo, 1.20 branch ||
134136

135137
> See [here](#homogenizing-the-kubernetes-python-client-versions) for an explaination of why there is no v13-v16 release.
136138

devel/release.md

Lines changed: 60 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,64 @@ report issues. Typically, there is a single alpha or beta release, but if there
1515
are a higher than expected number of issues there can be multiple releases
1616
(e.g, a2 or b2).
1717

18-
## 1. Update submodules
18+
## Automated release
19+
20+
### 1. (Optional) Update submodules
21+
22+
Update submodules by referring to this [link](https://github.com/kubernetes-client/python/blob/master/devel/submodules.md#update-submodule). Commit the changes and open a pull request.
23+
24+
### 2. Run the release script and send a PR
25+
Generate a Github personal access token following instruction
26+
[link](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
27+
28+
```
29+
export GITHUB_TOKEN=t # github-personal-access-token
30+
export MINOR_VERSION=x
31+
export PATCH_VERSION=y # The latest patch version for the minor version. Not required for snapshot.
32+
```
33+
To create a snapshot:
34+
```
35+
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.0.0-snapshot DEVELOPMENT_STATUS="3 - Alpha" scripts/release.sh
36+
```
37+
To create an a1 release:
38+
```
39+
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.${PATCH_VERSION}.0a1 DEVELOPMENT_STATUS="3 - Alpha" scripts/release.sh
40+
```
41+
To create a b1 release:
42+
```
43+
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.${PATCH_VERSION}.0b1 DEVELOPMENT_STATUS="4 - Beta" scripts/release.sh
44+
```
45+
To create a stable release:
46+
```
47+
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.${PATCH_VERSION}.0 DEVELOPMENT_STATUS="5 - Production/Stable" scripts/release.sh
48+
```
49+
Checkout the generated local branch (named "automated-release-of-xxx") to
50+
continue with the remaining steps.
51+
52+
### 3. README (not required for snapshots)
53+
54+
Update the compatibility matrix and maintenance status in the README file.
55+
56+
### 4. Submit pull request
57+
58+
For snapshots, create a PR against the master repo.
59+
60+
For actual releases, create:
61+
- a PR against the release branch
62+
- a second PR against the master branch to cherrypick the CHANGELOG and README
63+
changes.
64+
65+
### 5. (Repo admin) Create release branch
66+
67+
After merging a new snapshot, create a release branch from the master branch.
68+
69+
## (Deprecated) Manual release
70+
71+
### 1. Update submodules
1972

2073
Update submodules by referring to this [link](https://github.com/kubernetes-client/python/blob/master/devel/submodules.md#update-submodule). Commit the changes and open a pull request.
2174

22-
## 2. Create or update release branch
75+
### 2. Create or update release branch
2376

2477
The release branch name should have release-x.x format. All minor and pre-releases
2578
should be on the same branch. To update an existing branch with master (only for
@@ -36,7 +89,7 @@ git pull -X theirs upstream master
3689
You may need to fix some conflicts. For auto-generated files, you can commit
37 10000 90
either version. They will be updated to the current version in the next step.
3891

39-
## 3. Update release tags
92+
### 3. Update release tags
4093

4194
Release tags are in the "scripts/constants.py" file. These are the constants you
4295
may need to update:
@@ -73,7 +126,7 @@ apply the manual fixes.***
73126
git push upstream $RELEASE_BRANCH
74127
```
75128

76-
## 4. Hot issues
129+
### 4. Hot issues
77130

78131
Use the `scripts/apply-hotfixes.sh` script to apply the fixes below in one step.
79132
**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.**
@@ -99,19 +152,19 @@ For more details, see [#974](https://github.com/kubernetes-client/python/issues/
99152

100153
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.
101154

102-
## 5. CHANGELOG
155+
### 5. CHANGELOG
103156

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

108161
Then based on the release, follow one of next two steps.
109162

110-
## 6. README
163+
### 6. README
111164

112165
Update the compatibility matrix and maintenance status in the README file.
113166

114-
## Submit pull request
167+
### Submit pull request
115168

116169
Typically after the you've completed steps 2-6 above you can push your changes
117170
open a pull request against `kubernetes-client:release-x.y`
@@ -220,6 +273,4 @@ deactivate
220273
rm -rf .release
221274
```
222275

223-
TODO: Convert steps in this document to an (semi-) automated script.
224-
225276
ref: https://packaging.python.org/distributing/

kubernetes/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

66
- API version: release-1.20
7-
- Package version: 20.0.0-snapshot
7+
- Package version: 20.11.0a1
88
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
99

1010
## Requirements.

kubernetes/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
__project__ = 'kubernetes'
1616
# The version is auto-updated. Please do not edit.
17-
__version__ = "20.0.0-snapshot"
17+
__version__ = "20.11.0a1"
1818

1919
import kubernetes.client
2020
import kubernetes.config

kubernetes/client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from __future__ import absolute_import
1616

17-
__version__ = "20.0.0-snapshot"
17+
__version__ = "20.11.0a1"
1818

1919
# import apis into sdk package
2020
from kubernetes.client.api.well_known_api import WellKnownApi

kubernetes/client/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7878
self.default_headers[header_name] = header_value
7979
self.cookie = cookie
8080
# Set default User-Agent.
81-
self.user_agent = 'OpenAPI-Generator/20.0.0-snapshot/python'
81+
self.user_agent = 'OpenAPI-Generator/20.11.0a1/python'
8282
self.client_side_validation = configuration.client_side_validation
8383

8484
def __enter__(self):

kubernetes/client/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def to_debug_report(self):
350350
"OS: {env}\n"\
351351
"Python Version: {pyversion}\n"\
352352
"Version of the API: release-1.20\n"\
353-
"SDK Package Version: 20.0.0-snapshot".\
353+
"SDK Package Version: 20.11.0a1".\
354354
format(env=sys.platform, pyversion=sys.version)
355355

356356
def get_host_settings(self):

scripts/apply-hotfixes.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,18 @@ else
6464
exit 1
6565
fi;
6666

67+
# Patching commit for no_proxy support
68+
# UPDATE: The commit being cherry-picked is updated kubernetes/client/ unless OpenAPI generator v5.3.1 involved (offinical support of no_proxy feature).
69+
# Ref: https://github.com/kubernetes-client/python/pull/1579/commits/95a893cd1c34de11a4e3893dd1dfde4a0ca30bdc and conversations in the PR.
70+
git cherry-pick -n 95a893cd1c34de11a4e3893dd1dfde4a0ca30bdc
71+
if [ $? -eq 0 ]
72+
then
73+
echo Succesfully patched changes for no_proxy support
74+
else
75+
echo Failed to patch changes for no_proxy support
76+
git restore --staged .
77+
exit 1
78+
fi;
79+
80+
6781
git commit -m "Apply hotfixes"

scripts/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
KUBERNETES_BRANCH = "release-1.20"
1919

2020
# client version for packaging and releasing.
21-
CLIENT_VERSION = "20.0.0-snapshot"
21+
CLIENT_VERSION = "20.11.0a1"
2222

2323
# Name of the release package
2424
PACKAGE_NAME = "kubernetes"

0 commit comments

Comments
 (0)
0