[reproducer] Replace all reproducer vars with zuul vars#3794
[reproducer] Replace all reproducer vars with zuul vars#3794danpawlik merged 5 commits intoopenstack-k8s-operators:mainfrom
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
6a1b430 to
68cd119
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/8560d523cce242b28ec457c07f18e35a ✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 50m 01s |
683a3b7 to
80a6737
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/f900364b37dd4a6d8490ab00684f63ec ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 10m 09s |
ecffa42 to
ed8a07c
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/671d3fe55c554034a1518d261c5555da ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 53m 41s |
ed8a07c to
8178e8d
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/deb20e7b1fac48a8b2edd1693aa055c0 ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 59m 39s |
8178e8d to
f557d26
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/5c655dbf833c4805aca3556d23c67655 ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 51m 28s |
5f4497d to
54bba3a
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/8afcb1210c2a44919fcf921951d8e34c ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 14m 09s |
54bba3a to
90edda7
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/a9f56aa474af4cff95ffb79f6de1ce51 ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 18m 56s |
90edda7 to
454ab8e
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/d0258052538a4d2c8191381efa454700 ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 25m 48s |
|
recheck |
454ab8e to
eb953a7
Compare
|
recheck |
evallesp
left a comment
There was a problem hiding this comment.
Just a blocking thing about a comment.
Rest are non-blocking.
In any case, despite we don't have this in our codebase, would be awesome to have docstring in the python code and python test file.
Example of docstring:
"""
Resum,e
:param1 str name1: description
:param2 int name2: description """
| - name: Slurp merged reproducer-variables.yml from hypervisor | ||
| ansible.builtin.slurp: | ||
| src: "{{ temp_merged_reproducer_var_path }}" | ||
| register: merged_reproducer_slurp | ||
| no_log: "{{ cifmw_nolog | default(true) | bool }}" | ||
|
|
||
| - name: Write back merged reproducer-variables.yml |
There was a problem hiding this comment.
(non-blocking) question: Could we merge this task with the following one? I'm unsure if in this one the backup as true is necessary, or if we should move in the following the backup to true.
There was a problem hiding this comment.
backup does not have extension yaml, might be helpful to compare vars during bootstrap vs before test execution. IMHO would be good to keep it.
There was a problem hiding this comment.
I mean that we have two tasks almost equal, just the dest path changes. One has backup and the other has no:
ansible.builtin.copy:
content: "{{ merged_reproducer_slurp.content | b64decode }}"
dest: "{{ cifmw_basedir }}/parameters/reproducer-variables.yml"
mode: '0664'
mode: "0664"
backup: true
no_log: "{{ cifmw_nolog | default(true) | bool }}"
delegate_to: controller-0
- name: Overwrite custom-params.yml
ansible.builtin.copy:
content: "{{ merged_reproducer_slurp.content | b64decode }}"
dest: "{{ cifmw_basedir }}/artifacts/parameters/custom-params.yml"
mode: "0664"
no_log: "{{ cifmw_nolog | default(true) | bool }}"
delegate_to: controller-0
to:
- name: backup reproducer and overwrite custom params
ansible.builtin.copy:
content: "{{ merged_reproducer_slurp.content | b64decode }}"
dest: "{{ item }}"
mode: "0664"
backup: true
no_log: "{{ cifmw_nolog | default(true) | bool }}"
delegate_to: controller-0
loop: ["{{ cifmw_basedir }}/parameters/reproducer-variables.yml", "{{ cifmw_basedir }}/artifacts/parameters/custom-params.yml"]
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/ad9f553a18bd470788a836141da968b2 ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 20m 53s |
eb953a7 to
3b804a4
Compare
Some variables are missing, especially related to the registry
credentials. That complicate the situation, where some keys
might not exists in reproducer file. Some of the variables
are jinja2 template, which are "translated" by Ansible.
Alternative way was to use yq command like:
yq eval-all -P 'select(fileIndex == 0) * select(fileIndex == 1)' \
/tmp/reproducer-variables.yml \
/home/zuul/configs/zuul_vars.yaml > merged.yaml
The yq is available in latest version available for current python3
version installed on hypervisor. In that case, we can not use
the yq tool, but use a python script.
Co-authored-by: Claude (AI Assistant) claude@anthropic.com
Signed-off-by: Daniel Pawlik <dpawlik@redhat.com>
Keep support for legacy workflow where controller host is created and actions are done not on hypervisor directly, but on controller. Signed-off-by: Daniel Pawlik <dpawlik@redhat.com>
On executing nested Ansible, some variables like: 'cifmw_registry_token' are not redirected, which is causing an issue in later tasks, which are operating on those variables and if it is undefine, it raise an issue. To satisfy nested Ansible execution, provide necessary variables. Also include hypervisor name as it can be a missing variable, due jobs already bootstrapped by ZIronic does not require to have that variable, which in some tasks is necessary. Signed-off-by: Daniel Pawlik <dpawlik@redhat.com>
The pull_secret.json might contain authentication to necessary registries for CI job, that are not available during the bootstrap process using PreMetal (earlier ZIronic).
Let's move all the tasks for pre job execution after PreMetal bootstrap. That would make reproducer playbook easier to read. Signed-off-by: Daniel Pawlik <dpawlik@redhat.com>
3b804a4 to
6bb3778
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/59d7c99e27e44ff6afa5702adb0c6115 ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 19m 28s |
|
Testproject pass without Premetal - 2159 - SUCCESS |
|
recheck |
Some variables are missing, especially related to the registry credentials. That complicate the situation, where some keys might not exists in reproducer file.