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

Credential id not sent to awx when set #790

Closed
delloos opened this issue Jun 20, 2024 · 7 comments
Closed

Credential id not sent to awx when set #790

delloos opened this issue Jun 20, 2024 · 7 comments

Comments

@delloos
Copy link

delloos commented Jun 20, 2024

Describe the bug
I have an operation with specific awx credentials with id "5", the id of my credentials. My awx job templates is set without credentials but with "ask credential on launch".
The field "Default credentials ids" in the operation page is not sent when launching the operation, AWX does not see any credentials provided. it is like the field is totally ignored. If i call my job template from awx and credentials set when asked, the credential appears well in the job but not when calling from SQuest.
My job templates are created with the AWX API automatically (i know there is some problems with this way, like some missing attributes in awx objects that can lead to bug, i have another example with min and max value from awx survey when not set for character field)

To Reproduce
Steps to reproduce the behavior:
Create a job templates with empty credentials in awx and the option ask credentials on launch, set credentials ids in the corresponding of an operation in SQuest,

Expected behavior
Send the credential id from the field in the operation detail when calling awx job templates

Screenshots
the field with its value
Capture d'écran 2024-06-20 104322

when calling from SQuest, no credential appears
Capture d'écran 2024-06-20 104438

when calling from awx:
Capture d'écran 2024-06-20 104845

  • Squest version or GIT commit number:
  • 2.6.0
  • Ansible Tower/AWX version:
  • 24.5.0
@delloos
Copy link
Author

delloos commented Jun 20, 2024

the credentials is a custom credential type not an awx native one

@Sispheor
Copy link
Contributor

Interesting. We'll take a look. Thanks for reporting !
As a workaround I guess you figured it out by yourself but you can create a clone of your Job template with different credentials set for each.

@jimmyyj
Copy link

jimmyyj commented Sep 4, 2024

I can confirm, I see this as well. Both adding the int directly like @delloos did and {{ request.instance.spec.cred }} (which I made during testing).

Squest: 2.6.0
RHAAP: 4.5.8

@Sispheor
Copy link
Contributor

Sispheor commented Nov 20, 2024

I'm not able to reproduce. I've set an ID in one of my operation
image

When I reach the approve page, I can see the credentials dropdown is well updated wit the value set in the operation
image

And on AWX side, the credentials are well set too
image

@Sispheor
Copy link
Contributor

Is your operation set to auto process ?

Sispheor added a commit to Sispheor/squest that referenced this issue Nov 20, 2024
@Sispheor
Copy link
Contributor

Seems to be only present when the operation is set to auto process.
I'll send a fix.

Sispheor added a commit to Sispheor/squest that referenced this issue Nov 20, 2024
Sispheor added a commit to Sispheor/squest that referenced this issue Nov 20, 2024
@Sispheor
Copy link
Contributor

Done and merged in dev branch

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

No branches or pull requests

3 participants