Skip to content

Release v18.17.0a1 #1411

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

Merged
merged 18 commits into from
Apr 12, 2021
Merged

Conversation

roycaihw
Copy link
Member

I found it quite hard to resolve the conflicts when pulling master into the release branch. The conflict was caused by we generating v17 and v18 snapshots in parallel. As a workaround I cherrypicked important changes in the master branch into the release branch.

roycaihw and others added 11 commits April 11, 2021 14:57
…ed 'kubernetes.leaderelection' error

To reproduce: Make sure to create a file outside of checked out python repo directory.
$ cat hello_k8s.py
import kubernetes

kubernetes.config.load_kube_config()

k8s = kubernetes.client.CoreV1Api()
print("Listing pods with their IPs:")
ret = k8s.list_pod_for_all_namespaces(watch=False)
for i in ret.items:
    print("%s\t%s\t%s" % (i.status.pod_ip, i.metadata.namespace, i.metadata.name))

python hello_k8s.py
Traceback (most recent call last):
  File "hello_k8s.py", line 1, in <module>
    import kubernetes
  File "<frozen zipimport>", line 259, in load_module
  File "anaconda3/lib/python3.8/site-packages/kubernetes-17.0.0_snapshot-py3.8.egg/kubernetes/__init__.py", line 25, in <module>
ModuleNotFoundError: No module named 'kubernetes.leaderelection'
- move regex compilation to the top of the module to enable caching.
Use get_default_copy() API with configuration.
kubernetes 1.18 is no longer maintained. 1.18.17 was the last patch release.
@roycaihw roycaihw requested review from palnabarun and yliaog April 11, 2021 23:21
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: roycaihw

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 11, 2021
@@ -42,6 +42,9 @@ SETTING_FILE="${TEMP_FOLDER}/settings"
echo "export KUBERNETES_BRANCH=\"$(python ${SCRIPT_ROOT}/constants.py KUBERNETES_BRANCH)\"" > $SETTING_FILE
echo "export CLIENT_VERSION=\"$(python ${SCRIPT_ROOT}/constants.py CLIENT_VERSION)\"" >> $SETTING_FILE
echo "export PACKAGE_NAME=\"client\"" >> $SETTING_FILE
# Workaround for https://github.com/kubernetes-client/gen/pull/183.
# The env is required by not used by python client.
echo "export LIBRARY=\"undefined\"" >> $SETTING_FILE
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be added to 'master' branch?

Copy link
Member Author

Choose a reason for hiding this comment

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

hopefully not once kubernetes-client/gen#187 is merged. I filed #1412 to track documenting the issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

s/The env is required by not used by python client/The env is required but not used by python client/

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@yliaog
Copy link
Contributor

yliaog commented Apr 12, 2021

v17 and v18 snapshots are in different branches, why would that cause conflicts when pulling from master into release branch?

@roycaihw
Copy link
Member Author

why would that cause conflicts when pulling from master into release branch

I think it's because the 18.0 snapshot is not in the master branch, and the master branch has the 17.0 snapshot.

Pulling master from upstream/release-18.0:

$ git log
commit 7a0e799a028dc5581c18fa399d45ff7af7c9d02e (HEAD -> release-18.0-bak, upstream/release-18.0)
$ git fetch upstream
$ git pull upstream master

An example conflict:

$ git diff scripts/constants.py
diff --cc scripts/constants.py
index 6e30bd0c6,084911e92..000000000
--- a/scripts/constants.py
+++ b/scripts/constants.py
@@@ -15,10 -15,10 +15,17 @@@
  import sys

  # Kubernetes branch to get the OpenAPI spec from.
++<<<<<<< HEAD
 +KUBERNETES_BRANCH = "release-1.18"
 +
 +# client version for packaging and releasing.
 +CLIENT_VERSION = "18.0.0-snapshot"
++=======
+ KUBERNETES_BRANCH = "release-1.17"
+
+ # client version for packaging and releasing.
+ CLIENT_VERSION = "17.0.0-snapshot"
++>>>>>>> b839eee939455d17b99f1335f6318732c6bea77c
...

git thinks a lot of files are modified by both branches:

$ git status
On branch release-18.0-bak
You have unmerged paths.
  (fix conflicts and run "git commit")
  (use "git merge --abort" to abort the merge)

Changes to be committed:
	modified:   .github/workflows/test.yaml
	modified:   .travis.yml
	modified:   examples/pod_exec.py
	modified:   examples/remote_cluster.py
	modified:   kubernetes/base
	new file:   kubernetes/e2e_test/port_server.py
	modified:   kubernetes/e2e_test/test_client.py
	modified:   kubernetes/e2e_test/test_watch.py
	new file:   kubernetes/leaderelection
	modified:   kubernetes/utils/create_from_yaml.py
	modified:   tox.ini

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   CHANGELOG.md
	both modified:   kubernetes/.openapi-generator/swagger.json.sha256
	both modified:   kubernetes/README.md
	both modified:   kubernetes/__init__.py
	both modified:   kubernetes/client/__init__.py
	both modified:   kubernetes/client/api/admissionregistration_api.py
	both modified:   kubernetes/client/api/admissionregistration_v1_api.py
	both modified:   kubernetes/client/api/admissionregistration_v1beta1_api.py
	both modified:   kubernetes/client/api/apiextensions_api.py
	both modified:   kubernetes/client/api/apiextensions_v1_api.py
	both modified:   kubernetes/client/api/apiextensions_v1beta1_api.py
	both modified:   kubernetes/client/api/apiregistration_api.py
	both modified:   kubernetes/client/api/apiregistration_v1_api.py
	both modified:   kubernetes/client/api/apiregistration_v1beta1_api.py
	both modified:   kubernetes/client/api/apis_api.py
	both modified:   kubernetes/client/api/apps_api.py
	both modified:   kubernetes/client/api/apps_v1_api.py
	deleted by us:   kubernetes/client/api/apps_v1beta1_api.py
	deleted by us:   kubernetes/client/api/apps_v1beta2_api.py
	both modified:   kubernetes/client/api/auditregistration_api.py
	both modified:   kubernetes/client/api/auditregistration_v1alpha1_api.py
	both modified:   kubernetes/client/api/authentication_api.py
	both modified:   kubernetes/client/api/authentication_v1_api.py
	both modified:   kubernetes/client/api/authentication_v1beta1_api.py
	both modified:   kubernetes/client/api/authorization_api.py
	both modified:   kubernetes/client/api/authorization_v1_api.py
	both modified:   kubernetes/client/api/authorization_v1beta1_api.py
	both modified:   kubernetes/client/api/autoscaling_api.py
	both modified:   kubernetes/client/api/autoscaling_v1_api.py
	both modified:   kubernetes/client/api/autoscaling_v2beta1_api.py
	both modified:   kubernetes/client/api/autoscaling_v2beta2_api.py
	both modified:   kubernetes/client/api/batch_api.py
	both modified:   kubernetes/client/api/batch_v1_api.py
	both modified:   kubernetes/client/api/batch_v1beta1_api.py
	both modified:   kubernetes/client/api/batch_v2alpha1_api.py
	both modified:   kubernetes/client/api/certificates_api.py
	both modified:   kubernetes/client/api/certificates_v1beta1_api.py
	both modified:   kubernetes/client/api/coordination_api.py
	both modified:   kubernetes/client/api/coordination_v1_api.py
	both modified:   kubernetes/client/api/coordination_v1beta1_api.py
	both modified:   kubernetes/client/api/core_api.py
	both modified:   kubernetes/client/api/core_v1_api.py
	both modified:   kubernetes/client/api/custom_objects_api.py
	both modified:   kubernetes/client/api/discovery_api.py
	both modified:   kubernetes/client/api/discovery_v1beta1_api.py
	both modified:   kubernetes/client/api/events_api.py
	both modified:   kubernetes/client/api/events_v1beta1_api.py
	both modified:   kubernetes/client/api/extensions_api.py
	both modified:   kubernetes/client/api/extensions_v1beta1_api.py
	both added:      kubernetes/client/api/flowcontrol_apiserver_api.py
	both added:      kubernetes/client/api/flowcontrol_apiserver_v1alpha1_api.py
	both modified:   kubernetes/client/api/logs_api.py
	both modified:   kubernetes/client/api/networking_api.py
	both modified:   kubernetes/client/api/networking_v1_api.py
	both modified:   kubernetes/client/api/networking_v1beta1_api.py
	both modified:   kubernetes/client/api/node_api.py
	both modified:   kubernetes/client/api/node_v1alpha1_api.py
	both modified:   kubernetes/client/api/node_v1beta1_api.py
	both modified:   kubernetes/client/api/policy_api.py
	both modified:   kubernetes/client/api/policy_v1beta1_api.py
	both modified:   kubernetes/client/api/rbac_authorization_api.py
	both modified:   kubernetes/client/api/rbac_authorization_v1_api.py
	both modified:   kubernetes/client/api/rbac_authorization_v1alpha1_api.py
	both modified:   kubernetes/client/api/rbac_authorization_v1beta1_api.py
	both modified:   kubernetes/client/api/scheduling_api.py
	both modified:   kubernetes/client/api/scheduling_v1_api.py
	both modified:   kubernetes/client/api/scheduling_v1alpha1_api.py
	both modified:   kubernetes/client/api/scheduling_v1beta1_api.py
	both modified:   kubernetes/client/api/settings_api.py
	both modified:   kubernetes/client/api/settings_v1alpha1_api.py
	both modified:   kubernetes/client/api/storage_api.py
	both modified:   kubernetes/client/api/storage_v1_api.py
	both modified:   kubernetes/client/api/storage_v1alpha1_api.py
	both modified:   kubernetes/client/api/storage_v1beta1_api.py
...

@yliaog
Copy link
Contributor

yliaog commented Apr 12, 2021

the current release process does not support multiple parallel releasing well, better to document your release process for v18, so v19 and v20 can follow the same steps.

@yliaog
Copy link
Contributor

yliaog commented Apr 12, 2021

/lgtm
/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 12, 2021
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 12, 2021
@roycaihw
Copy link
Member Author

Filed #1414 to track documenting the release process. I will try getting to it today or tomorrow.

the env is not used by the python client.
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 12, 2021
@yliaog
Copy link
Contributor

yliaog commented Apr 12, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 12, 2021
@roycaihw
Copy link
Member Author

/hold cancel

the documentation tasks don't block this PR

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 12, 2021
@k8s-ci-robot k8s-ci-robot merged commit f0ff60f into kubernetes-client:release-18.0 Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.