Skip to content

[test_operator] Automatic sync of README.md#3589

Open
sauragar wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
sauragar:OSPRH-19423
Open

[test_operator] Automatic sync of README.md#3589
sauragar wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
sauragar:OSPRH-19423

Conversation

@sauragar
Copy link

@sauragar sauragar commented Jan 7, 2026

This commit will ensure to have the proper auto-sync of README.md with the defaults/main.yml file and also added the post-commit file so whenever someone commits in the defaults/main.yml file the script can be auto-run

Ticket: OSPRH-19423

This PR #3327 is closed since I am not able to reopen the PR

Signed-off-by: Saurabh Agarwal sauragar@redhat.com

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 7, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign rebtoor for approval. For more information see the Code Review Process.

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

Details 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

Copy link
Contributor

@kstrenkova kstrenkova left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! I have tested it locally and found a small issue with updating the defaults. It is explained in the comments, the fix should be rather simple. Other than that I saw the README sync was working nicely, so I think you're close to the finish 🎉 I like that the parameters will be in alphabetical order now :D Maybe there could be a mention of the script somewhere in the README so that people know they can use the sync when creating new variables or updating the old ones.

@softwarefactory-project-zuul
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/4de28a813ea54e73883c28ab7ff35c81

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 18m 29s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 20m 49s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 41m 18s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 2h 04m 04s
✔️ cifmw-multinode-tempest SUCCESS in 1h 45m 54s
✔️ cifmw-pod-zuul-files SUCCESS in 4m 23s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 48s
cifmw-pod-pre-commit FAILURE in 7m 42s
✔️ cifmw-molecule-test_operator SUCCESS in 3m 29s

Copy link
Contributor

@kstrenkova kstrenkova left a comment

Choose a reason for hiding this comment

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

What is left are just a few transformations from defaults to to Default value: where it is possible. Other than that lgtm.

* `cifmw_test_operator_default_groups`: (List) List of groups in the include list to search for tests to be executed. Default value: See defaults in [main.yml](defaults/main.yml)
* `cifmw_test_operator_default_image_tag`: (String) Default tag for all the supported test frameworks (tempest, tobiko, horizontest and ansibletest) to pull their container images. It can be overridden at test framework level. Defaults to `current-podified`
* `cifmw_test_operator_default_jobs`: (List) List of jobs in the exclude list to search for tests to be excluded. Default value: See defaults in [main.yml](defaults/main.yml)
* `cifmw_test_operator_default_namespace`: (String) Default registry's namespace for all the supported test frameworks (tempest, tobiko, horizontest and ansibletest) to pull their container images. It can be overridden at test framework level. Defaults to `podified-antelope-centos9`
Copy link
Contributor

Choose a reason for hiding this comment

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

Here it can be changed to Default value:.

* `cifmw_test_operator_default_image_tag`: (String) Default tag for all the supported test frameworks (tempest, tobiko, horizontest and ansibletest) to pull their container images. It can be overridden at test framework level. Defaults to `current-podified`
* `cifmw_test_operator_default_jobs`: (List) List of jobs in the exclude list to search for tests to be excluded. Default value: See defaults in [main.yml](defaults/main.yml)
* `cifmw_test_operator_default_namespace`: (String) Default registry's namespace for all the supported test frameworks (tempest, tobiko, horizontest and ansibletest) to pull their container images. It can be overridden at test framework level. Defaults to `podified-antelope-centos9`
* `cifmw_test_operator_default_registry`: (String) Default registry for all the supported test frameworks (tempest, tobiko, horizontest and ansibletest) to pull their container images. It can be overridden at test framework level. Defaults to `quay.io`
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

* `cifmw_test_operator_tobiko_namespace`: (String) Registry's namespace where to pull tobiko container. Default value: `{{ cifmw_test_operator_default_namespace }}`
* `cifmw_test_operator_tobiko_cleanup`: (Boolean) Cleanup all resources created by tobiko. Default value: `false`
<!-- START TOBIKO_SPECIFIC_PARAMETERS -->
* `cifmw_test_operator_tobiko_advanced_image_url`: (String) Tobiko will download images from this URL that will be used to create advance VM instances. By default, the provided image will include all the customizations required by the tobiko tests. Defaults to `https://github.com/openstack-k8s-operators/openstack-k8s-operators-ci/releases/download/v1.0.0/tobiko-custom-v1.0.0.qcow2`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

* `cifmw_test_operator_tobiko_name`: (String) Value used in the `Tobiko.Metadata.Name` field. The value specifies the name of some resources spawned by the test-operator role. Default value: `tobiko-tests`
* `cifmw_test_operator_tobiko_namespace`: (String) Registry's namespace where to pull tobiko container. Default value: `{{ cifmw_test_operator_default_namespace }}`
* `cifmw_test_operator_tobiko_network_attachments`: (List) List of network attachment definitions to attach to the tobiko pods spawned by test-operator. Default value: See defaults in [main.yml](defaults/main.yml)
* `cifmw_test_operator_tobiko_num_processes`: (Integer) Sets the value of the env variable `TOX_NUM_PROCESSES` that is used to run pytest with `--numprocesses $TOX_NUM_PROCESSES`. Defaults to `null`. In case of `null` value, `TOX_NUM_PROCESSES` is not set (tobiko internally uses the value `auto`, see pytest documentation about the `--numprocesses` option).
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

* `cifmw_test_operator_tobiko_openstack_cmd`: (String) Openstack command is used by tobiko to cleanup resources. Default value: `oc -n openstack exec openstackclient -- openstack`
* `cifmw_test_operator_tobiko_override_conf`: (Dict) Overrides the default configuration from `cifmw_test_operator_tobiko_default_conf` that is used to generate the tobiko.conf file. Default value: empty dictionary
* `cifmw_test_operator_tobiko_ssh_keytype`: (String) Type of ssh key that tobiko will use to connect to the VM instances it creates. Defaults to `cifmw_ssh_keytype` which default to `ecdsa`.
* `cifmw_test_operator_tobiko_pytest_addopts`: (String) `PYTEST_ADDOPTS` env variable with input pytest args. Example: `-m <markers> --maxfail <max-failed-tests> --skipregex <regex>`. Defaults to `null`. In case of `null` value, `PYTEST_ADDOPTS` is not set (tobiko tests are executed without any extra pytest options).
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

Copy link
Contributor

@kstrenkova kstrenkova left a comment

Choose a reason for hiding this comment

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

I am adding 2 comments about the same issue atop of my previous comments.

@softwarefactory-project-zuul
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/fe0fdd8386324989bd8ea335a95f52d6

openstack-k8s-operators-content-provider FAILURE in 4m 53s
⚠️ podified-multinode-edpm-deployment-crc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cifmw-crc-podified-edpm-baremetal SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cifmw-crc-podified-edpm-baremetal-minor-update SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cifmw-multinode-tempest SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
✔️ cifmw-pod-zuul-files SUCCESS in 4m 32s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 12m 50s
cifmw-pod-pre-commit FAILURE in 8m 07s
✔️ cifmw-molecule-test_operator SUCCESS in 3m 03s

@softwarefactory-project-zuul
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/5eac463796534f4b89b1f990b236fe22

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 29m 11s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 28m 37s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 39m 55s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 2h 10m 53s
✔️ cifmw-multinode-tempest SUCCESS in 1h 53m 13s
✔️ cifmw-pod-zuul-files SUCCESS in 4m 24s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 36s
cifmw-pod-pre-commit FAILURE in 8m 30s
✔️ cifmw-molecule-test_operator SUCCESS in 3m 00s

Copy link
Contributor

@kstrenkova kstrenkova left a comment

Choose a reason for hiding this comment

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

I am leaving a few very small comments. I think the PR is almost done, so it would be a good idea to ask someone else for a review to get more perspective. I am also not sure about editing the pre-commit and setup_molecule files, we need someone from ci-framework for that :D


def normalize_default_text(block, value):
# Normalize "Defaults to `x`" → "Default value: `x`"
block = re.sub(
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this substitution is needed. If someone wanted to, they could also do Default: and this code wouldn't help to keep consistency. So I don't think it's necessary to normalize it, as you can never catch all cases.

Copy link
Contributor

@michburk michburk left a comment

Choose a reason for hiding this comment

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

A handful of comments and suggestions.

Overall, I understand the motivation to keep the readme up to date by using a script. We've done a pretty poor job of enforcing that the docs be updated with every change to the defaults, but I don't love the idea of designing and maintaining a script specifically for just one role's readme. I'd be curious to see what other cifmw folks have to say.

@softwarefactory-project-zuul
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/e6bd5c4155b14750817cdc542eae5cdb

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 25m 36s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 22m 26s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 35m 10s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 2h 11m 29s
✔️ cifmw-multinode-tempest SUCCESS in 1h 54m 56s
✔️ cifmw-pod-zuul-files SUCCESS in 4m 28s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 38s
cifmw-pod-pre-commit FAILURE in 8m 24s
✔️ cifmw-molecule-test_operator SUCCESS in 3m 01s

@softwarefactory-project-zuul
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/f84c25fe639c4a2eaf5b977d149e5a2f

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 21m 51s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 25m 05s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 38m 31s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 2h 08m 14s
✔️ cifmw-multinode-tempest SUCCESS in 1h 51m 49s
✔️ cifmw-pod-zuul-files SUCCESS in 6m 07s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 32s
cifmw-pod-pre-commit FAILURE in 8m 20s
✔️ cifmw-molecule-test_operator SUCCESS in 3m 23s

@softwarefactory-project-zuul
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/5e37469eb30e4f58babd13c526c9336d

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 43m 11s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 25m 10s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 45m 03s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 2h 06m 54s
✔️ cifmw-multinode-tempest SUCCESS in 1h 48m 37s
✔️ cifmw-pod-zuul-files SUCCESS in 5m 23s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 9m 23s
cifmw-pod-pre-commit FAILURE in 8m 56s
✔️ cifmw-molecule-test_operator SUCCESS in 3m 00s

@sauragar sauragar force-pushed the OSPRH-19423 branch 2 times, most recently from 8ec6c0d to 17a9248 Compare February 16, 2026 09:37
@softwarefactory-project-zuul
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/9f0e30fc2e7744ea9397e32491a751b8

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 07m 46s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 31m 51s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 40m 17s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 1h 53m 54s
✔️ cifmw-multinode-tempest SUCCESS in 1h 47m 21s
✔️ cifmw-pod-zuul-files SUCCESS in 5m 12s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 9m 08s
cifmw-pod-pre-commit FAILURE in 8m 01s
✔️ cifmw-molecule-test_operator SUCCESS in 3m 07s

Add automatic sync script to keep README.md in sync with defaults/main.yml:
- Create sync_test_operator_var_readme.py for automated documentation updates
- Generate GitHub URLs with line anchors for direct navigation to variable definitions
- Display inline default values for simple/single-line variables
- Redirect complex values (lists, dicts, multiline) to defaults/main.yml
- Preserve existing default text variations (e.g., "Defaults to", "defaults to")
- Only add "Default value:" when completely missing from documentation
- Reorganize parameter documentation in alphabetical order
- Add auto-sync note at the top of README.md
- Fix pre-commit ansible-lint compatibility

Signed-off-by: Saurabh Agarwal <sauragar@redhat.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: sauragar <sauragar@redhat.com>
@softwarefactory-project-zuul
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/72129788e2904a1483acf4f9149c5de7

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 17m 16s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 18m 51s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 35m 06s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 2h 05m 08s
cifmw-multinode-tempest FAILURE in 25m 25s
✔️ cifmw-pod-zuul-files SUCCESS in 4m 40s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 51s
cifmw-pod-pre-commit FAILURE in 7m 41s
✔️ cifmw-molecule-test_operator SUCCESS in 3m 00s

* `cifmw_test_operator_controller_priv_key_file_path`: (String) Specifies the path to the CIFMW private key file. Note: Please ensure this file is available in the environment where the ci-framework test-operator role is executed. Default value: `~/.ssh/id_cifw`
* `cifmw_test_operator_crs_path`: (String) The path into which the tests CRs file will be created in. Default value: `{{ cifmw_basedir }}/artifacts/test-operator-crs`
* `cifmw_test_operator_default_groups`: (List) List of groups in the include list to search for tests to be executed. Default value: See defaults in [main.yml](https://github.com/openstack-k8s-operators/ci-framework/blob/main/roles/test_operator/defaults/main.yml#L35)
* `cifmw_test_operator_default_image_tag`: (String) Default tag for all the supported test frameworks (tempest, tobiko, horizontest and ansibletest) to pull their container images. It can be overridden at test framework level. Defaults to `current-podified`
Copy link
Contributor

Choose a reason for hiding this comment

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

I would manually change the Defaults to to Default value: here. No change in script needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants