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

Use cifmw_dlrn_report_promote_source to set proper dlrn reporting target #2170

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

raukadah
Copy link
Contributor

@raukadah raukadah commented Jul 29, 2024

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:

  • Appropriate testing is done and actually running
  • Appropriate documentation exists and/or is up-to-date:
    • README in the role
    • Content of the docs/source is reflecting the changes

Copy link
Contributor

openshift-ci bot commented Jul 29, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

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/378cda2dc4fb4df4820787a5bb87db93

✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 09s
cifmw-pod-pre-commit FAILURE in 7m 49s
✔️ cifmw-molecule-dlrn_report SUCCESS in 4m 17s

{{
(cifmw_dlrn_report_promote_source | length > 0) |
ternary(cifmw_dlrn_report_promote_source, cifmw_repo_setup_promotion)
}}
Copy link
Contributor Author

@raukadah raukadah Jul 29, 2024

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

Copy link
Contributor

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

Copy link
Contributor Author

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]>
@raukadah raukadah force-pushed the dlrn_reporting_update branch from 3e33d80 to 8a7e2e1 Compare July 29, 2024 07:36
@raukadah raukadah marked this pull request as ready for review July 29, 2024 07:47
@rebtoor
Copy link
Contributor

rebtoor commented Jul 29, 2024

/approve

Copy link
Contributor

openshift-ci bot commented Jul 29, 2024

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@frenzyfriday
Copy link
Collaborator

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jul 29, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit ce58d98 into main Jul 29, 2024
10 of 11 checks passed
@openshift-merge-bot openshift-merge-bot bot deleted the dlrn_reporting_update branch July 29, 2024 07:57
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.

4 participants