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

scm_revision on Started notification #14410

Open
3 of 9 tasks
fkuep opened this issue Sep 5, 2023 · 6 comments
Open
3 of 9 tasks

scm_revision on Started notification #14410

fkuep opened this issue Sep 5, 2023 · 6 comments

Comments

@fkuep
Copy link

fkuep commented Sep 5, 2023

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.

Feature type

Enhancement to Existing Feature

Feature Summary

When using a webhook notification with a custom "start message body" the job.scm_revision field is empty.

Select the relevant components

  • UI
  • API
  • Docs
  • Collection
  • CLI
  • Other

Steps to reproduce

set: "commit": "{{ job.scm_revision }}",
in the start message body and observe awx sending
commit: "",
in it´s webhook notification.

Current results

commit: "",

Sugested feature result

commit: "87c05830f0e045b55be00ff5e3649",

Additional information

@fosterseth
Would the feature mean that the notification would need to be delayed from pre-run to preparing playbook for the information to be available ?
https://youtu.be/RfQ_6gBHtBs?t=1963

Also - should this feature not be feasable - is there a handy postgres listen query that would give me the commit hash once it is ready ?

@fosterseth
Copy link
Member

@fkuep sounds more like a bug. "job.scm_revision" should work according to the docs https://docs.ansible.com/automation-controller/latest/html/userguide/notification_parameters_supported.html

@fkuep
Copy link
Author

fkuep commented Sep 6, 2023

Thanks for classifing it as bug.
the text in your link says:
scm_revision - (string) scm revision from the project used for this job, if available
Thats why I was not sure.

When I enable updating scm before running, I can see the play getting the lower job_id than the scm-update. Probably the event leading to the notification is to early.

I would like to post notifications to scm as build-status.

@fkuep
Copy link
Author

fkuep commented Oct 16, 2023

Anything I can do to further progress?

@fkuep
Copy link
Author

fkuep commented Jan 17, 2024

@fosterseth How would I approach to draw attention to this problem ?
Do You think I should give up ?

@dmzoneill
Copy link
Member

@fkuep I've created the following patch

#14847

@fkuep
Copy link
Author

fkuep commented Feb 6, 2024

Wow - Thanks @dmzoneill !!
Is there an easy way I could make a test install via the operator from your pull-request ?

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

No branches or pull requests

3 participants