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

trivial doc: replace 2.5.0 with 3.0.0 #831

Conversation

yurnov
Copy link
Contributor

@yurnov yurnov commented Dec 17, 2024

SUMMARY

Some parameters were added to the master in time where the latest version was 2.4.0 with version_added: 2.5.0, however the next version after 2.4.0 was a 3.0.0.

So, with this trivial doc PR (that most probably doesn't require a changelog fragment and including to changelog) I replacing version_added: 2.5.0 to version_added: 3.0.0 for:

  • reuse_values in kubernetes.core.helm module
  • reset_values in kubernetes.core.helm module
  • delete_all in kubernetes.core.k8s module
  • hidden_fields in kubernetes.core.k8s module
  • hidden_fields in kubernetes.core.k8s_info module

All of them are introduced in kubernetes.core 3.0.0

ISSUE TYPE
  • Docs Pull Request
COMPONENT NAME
  • helm
  • k8s
  • 8s_info
ADDITIONAL INFORMATION

PR to be backported to stable-3 and stable-5

Copy link

Copy link

Copy link

@yurnov yurnov mentioned this pull request Dec 26, 2024
32 tasks
@yurnov
Copy link
Contributor Author

yurnov commented Jan 16, 2025

Hi @gravesm, could you please review this PR and add labels skip-changelog, backport-3 and backport-5? It's really trivial one

@yurnov yurnov force-pushed the 20141217-replace-2.5.0-with-3.0.0 branch from 970d9c5 to 141c2f0 Compare January 16, 2025 20:19
@yurnov
Copy link
Contributor Author

yurnov commented Jan 16, 2025

rebased to retrigger CI

Copy link

@yurnov
Copy link
Contributor Author

yurnov commented Jan 17, 2025

It's unclear why integration test failed with:

TASK [k8s_drain : Drain node using ignore_daemonsets, force, and delete_emptydir_data options] ***
task path: /home/runner/collections/ansible_collections/kubernetes/core/tests/integration/targets/k8s_drain/tasks/main.yml:224
Thursday 16 January 2025  20:23:41 +0000 (0:00:00.017)       0:00:51.643 ****** 
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: runner
<127.0.0.1> EXEC /bin/sh -c 'echo ~runner && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/runner/.ansible/tmp `"&& mkdir "` echo /home/runner/.ansible/tmp/ansible-tmp-1737059021.4150467-17646-171470735716085 `" && echo ansible-tmp-1737059021.4150467-17646-171470735716085="` echo /home/runner/.ansible/tmp/ansible-tmp-1737059021.4150467-17646-171470735716085 `" ) && sleep 0'
Using module file /home/runner/collections/ansible_collections/kubernetes/core/plugins/modules/k8s_drain.py
<127.0.0.1> PUT /home/runner/.ansible/tmp/ansible-local-15635jut_mlix/tmpzpf8kbts TO /home/runner/.ansible/tmp/ansible-tmp-1737059021.4150467-17646-171470735716085/AnsiballZ_k8s_drain.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/runner/.ansible/tmp/ansible-tmp-1737059021.4150467-17646-171470735716085/ /home/runner/.ansible/tmp/ansible-tmp-1737059021.4150467-17646-171470735716085/AnsiballZ_k8s_drain.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/opt/hostedtoolcache/Python/3.12.8/x64/bin/python3 /home/runner/.ansible/tmp/ansible-tmp-1737059021.4150467-17646-171470735716085/AnsiballZ_k8s_drain.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/runner/.ansible/tmp/ansible-tmp-1737059021.4150467-17646-171470735716085/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
  File "/tmp/ansible_k8s_drain_payload_0a3t6o6n/ansible_k8s_drain_payload.zip/ansible_collections/kubernetes/core/plugins/modules/k8s_drain.py", line 346, in evict_pods
    self._api_instance.create_namespaced_pod_eviction(
  File "/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/kubernetes/client/api/core_v1_api.py", line 7652, in create_namespaced_pod_eviction
    return self.create_namespaced_pod_eviction_with_http_info(name, namespace, body, **kwargs)  # noqa: E501
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/kubernetes/client/api/core_v1_api.py", line 7759, in create_namespaced_pod_eviction_with_http_info
    return self.api_client.call_api(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/kubernetes/client/api_client.py", line 348, in call_api
    return self.__call_api(resource_path, method,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/kubernetes/client/api_client.py", line 180, in __call_api
    response_data = self.request(
                    ^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/kubernetes/client/api_client.py", line 391, in request
    return self.rest_client.POST(url,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/kubernetes/client/rest.py", line 279, in POST
    return self.request("POST", url,
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.8/x64/lib/python3.12/site-packages/kubernetes/client/rest.py", line 238, in request
    raise ApiException(http_resp=r)
fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "api_key": null,
            "ca_cert": null,
            "client_cert": null,
            "client_key": null,
            "context": null,
            "delete_options": {
                "delete_emptydir_data": true,
                "disable_eviction": false,
                "force": true,
                "ignore_daemonsets": true,
                "terminate_grace_period": null,
                "wait_sleep": 5,
                "wait_timeout": 0
            },
            "host": null,
            "impersonate_groups": null,
            "impersonate_user": null,
            "kubeconfig": null,
            "name": "chart-testing-control-plane",
            "no_proxy": null,
            "password": null,
            "persist_config": null,
            "pod_selectors": null,
            "proxy": null,
            "proxy_headers": null,
            "state": "drain",
            "username": null,
            "validate_certs": null
        }
    },
    "msg": "Failed to delete pod helm-set-values/test-apache-7d4f6fd598-mtsxj due to: Cannot evict pod as it would violate the pod's disruption budget."
}

Changes in k8s_drain.py is cosmetic, I replaced

DOCUMENTATION = r"""
module: k8s_info

short_description: Describe Kubernetes (K8s) objects
.....
options:
.......
  hidden_fields:
    description:
      - Hide fields matching any of the field definitions in the result
      - An example might be C(hidden_fields=[metadata.managedFields])
      - Only field definitions that don't reference list items are supported (so V(spec.containers[0]) would not work)
    type: list
    elements: str
    version_added: 2.5.0
.....
"""

with:

DOCUMENTATION = r"""
module: k8s_info

short_description: Describe Kubernetes (K8s) objects
.....
options:
.......
  hidden_fields:
    description:
      - Hide fields matching any of the field definitions in the result
      - An example might be C(hidden_fields=[metadata.managedFields])
      - Only field definitions that don't reference list items are supported (so V(spec.containers[0]) would not work)
    type: list
    elements: str
    version_added: 3.0.0
.....
"""

So, no code changed. 

@gravesm
Copy link
Member

gravesm commented Jan 17, 2025

#852 should fix it I think

Rationale: Version 2.5.0 does not exist, the next one after 2.4.0 was 3.0.0 and the parameters appeared in 3.0.0

Trivial doc change, no changelog fragment requried
@yurnov yurnov force-pushed the 20141217-replace-2.5.0-with-3.0.0 branch from 141c2f0 to 25eca37 Compare January 17, 2025 14:59
@yurnov
Copy link
Contributor Author

yurnov commented Jan 17, 2025

PR rebased

Copy link

@yurnov
Copy link
Contributor Author

yurnov commented Jan 17, 2025

Thanks @gravesm, your fix to CI helps

Copy link

Build succeeded (gate pipeline).
https://ansible.softwarefactory-project.io/zuul/buildset/46c2074604514f03b3ecacd597e3ce32

✔️ ansible-galaxy-importer SUCCESS in 4m 35s
✔️ build-ansible-collection SUCCESS in 5m 33s

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit bc0de24 into ansible-collections:main Jan 17, 2025
74 of 75 checks passed
Copy link

patchback bot commented Jan 17, 2025

Backport to stable-3: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-3/bc0de24cba4a46c2aaf9416b0adeedc29f1e46ff/pr-831

Backported as #855

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jan 17, 2025
SUMMARY
Some parameters were added to the master in time where the latest version was 2.4.0 with version_added: 2.5.0, however the next version after 2.4.0 was a 3.0.0.
So, with this trivial doc PR (that most probably doesn't require a changelog fragment and including to changelog) I replacing  version_added: 2.5.0 to  version_added: 3.0.0 for:

reuse_values in kubernetes.core.helm module
reset_values in kubernetes.core.helm module
delete_all in  kubernetes.core.k8s module
hidden_fields  in  kubernetes.core.k8s module
hidden_fields   in  kubernetes.core.k8s_info module

All of them are introduced in kubernetes.core 3.0.0
ISSUE TYPE

Docs Pull Request

COMPONENT NAME

helm
k8s
8s_info

ADDITIONAL INFORMATION
PR to be backported to stable-3 and stable-5

Reviewed-by: Mike Graves <mgraves@redhat.com>
(cherry picked from commit bc0de24)
Copy link

patchback bot commented Jan 17, 2025

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/bc0de24cba4a46c2aaf9416b0adeedc29f1e46ff/pr-831

Backported as #856

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jan 17, 2025
SUMMARY
Some parameters were added to the master in time where the latest version was 2.4.0 with version_added: 2.5.0, however the next version after 2.4.0 was a 3.0.0.
So, with this trivial doc PR (that most probably doesn't require a changelog fragment and including to changelog) I replacing  version_added: 2.5.0 to  version_added: 3.0.0 for:

reuse_values in kubernetes.core.helm module
reset_values in kubernetes.core.helm module
delete_all in  kubernetes.core.k8s module
hidden_fields  in  kubernetes.core.k8s module
hidden_fields   in  kubernetes.core.k8s_info module

All of them are introduced in kubernetes.core 3.0.0
ISSUE TYPE

Docs Pull Request

COMPONENT NAME

helm
k8s
8s_info

ADDITIONAL INFORMATION
PR to be backported to stable-3 and stable-5

Reviewed-by: Mike Graves <mgraves@redhat.com>
(cherry picked from commit bc0de24)
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Jan 17, 2025
This is a backport of PR #831 as merged into main (bc0de24).
SUMMARY
Some parameters were added to the master in time where the latest version was 2.4.0 with version_added: 2.5.0, however the next version after 2.4.0 was a 3.0.0.
So, with this trivial doc PR (that most probably doesn't require a changelog fragment and including to changelog) I replacing  version_added: 2.5.0 to  version_added: 3.0.0 for:

reuse_values in kubernetes.core.helm module
reset_values in kubernetes.core.helm module
delete_all in  kubernetes.core.k8s module
hidden_fields  in  kubernetes.core.k8s module
hidden_fields   in  kubernetes.core.k8s_info module

All of them are introduced in kubernetes.core 3.0.0
ISSUE TYPE

Docs Pull Request

COMPONENT NAME

helm
k8s
8s_info


ADDITIONAL INFORMATION
PR to be backported to stable-3 and stable-5
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Jan 17, 2025
This is a backport of PR #831 as merged into main (bc0de24).
SUMMARY
Some parameters were added to the master in time where the latest version was 2.4.0 with version_added: 2.5.0, however the next version after 2.4.0 was a 3.0.0.
So, with this trivial doc PR (that most probably doesn't require a changelog fragment and including to changelog) I replacing  version_added: 2.5.0 to  version_added: 3.0.0 for:

reuse_values in kubernetes.core.helm module
reset_values in kubernetes.core.helm module
delete_all in  kubernetes.core.k8s module
hidden_fields  in  kubernetes.core.k8s module
hidden_fields   in  kubernetes.core.k8s_info module

All of them are introduced in kubernetes.core 3.0.0
ISSUE TYPE

Docs Pull Request

COMPONENT NAME

helm
k8s
8s_info


ADDITIONAL INFORMATION
PR to be backported to stable-3 and stable-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants