-
Notifications
You must be signed in to change notification settings - Fork 112
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
Use cifmw_dlrn_report_promote_source to set proper dlrn reporting target #2170
Conversation
Skipping CI for Draft Pull Request. |
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/378cda2dc4fb4df4820787a5bb87db93 ✔️ noop SUCCESS in 0s |
{{ | ||
(cifmw_dlrn_report_promote_source | length > 0) | | ||
ternary(cifmw_dlrn_report_promote_source, cifmw_repo_setup_promotion) | ||
}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pablintino Hello, I am not sure why I am hitting following error, Need help here.
Error was a <class 'ansible.errors.AnsibleError'>, original message: recursive loop detected in template string: {{
(cifmw_dlrn_report_promote_source | length > 0) |
ternary(cifmw_dlrn_report_promote_source, cifmw_repo_setup_promotion)
}}. maximum recursion depth exceeded while calling a Python object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ternary(cifmw_dlrn_report_promote_source, cifmw_repo_setup_promotion) is causing recursive loop
instead of ternary we should just replace with value cifmw_repo_setup_promotion when cifmw_repo_setup_promotion | length > 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @ciecierski , I have changed to simpler set_fact. The task will also look much simpler now.
In update job, we deploy the system using cifmw_repo_setup_promotion: current-podified var and update it to podified-ci-testing via different update vars. dlrn_report role works on repo-setup vars. In this case, dlrn will report the job status against current-podified. But we want to report the status against podified-ci-testing. In this case, current dlrn-report does not work. In order to fix that we are adding a new var `cifmw_dlrn_report_promote_source` to set the proper dlrn target against which job should report. It will not affect existing job. As it's value depends on cifmw_repo_setup_promotion case. Signed-off-by: Chandan Kumar <[email protected]>
3e33d80
to
8a7e2e1
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rebtoor 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 |
/lgtm |
In update job, we deploy the system using cifmw_repo_setup_promotion: current-podified var and update it to podified-ci-testing via different update vars.
dlrn_report role works on repo-setup vars. In this case, dlrn will report the job status against current-podified. But we want to report the status against podified-ci-testing. In this case, current dlrn-report does not work.
In order to fix that we are adding a new var
cifmw_dlrn_report_promote_source
to set the proper dlrn target against which job should report. It will not affect existing job. As it's value depends on cifmw_repo_setup_promotion case.As a pull request owner and reviewers, I checked that: