You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The OPTIONS for job_templates is not self-consistent for the field webhook_service.
This breaks the tower-cli send command, assuming the data comes from the receive command. A hack is in progress for this, but it would be better to change behavior from API moving forward.
ENVIRONMENT
AWX version: 8.0.0
AWX install method: N/A
Ansible version: N/A
Operating System:
Web Browser:
STEPS TO REPRODUCE
Of particular interest here is the sequence of tower-cli receive, saving that to a file, and using it in tower-cli send.
EXPECTED RESULTS
Data given from the API is consistent with OPTIONS
ACTUAL RESULTS
OPTIONS for job_templates gives
"webhook_service": {
"type": "choice",
"label": "Webhook service",
"help_text": "Service that webhook requests will be accepted from",
"filterable": true,
"choices": [
[
"github",
"GitHub"
],
[
"gitlab",
"GitLab"
]
]
The receive command always gives webhook_credential in the asset data because it has no default. Without a default, it cannot be determined if the field has been set.
The send command gives
JOB TEMPLATE [SRtest] ***************************************************************************************************************************************************************
Value is not a valid choice for option webhook_service for job_template SRtest. Options: ['github', 'GitHub', 'gitlab', 'GitLab']
In terms of CLI design in general, @ryanpetrello I find the ability to determine if a field has a non-default value is a powerful tool. This is one of the things I most like about the send/receive commands. I would even prefer that for compact representations of resources for human consumption.
The text was updated successfully, but these errors were encountered:
Created both a job template and a workflow job template
For each resource created on 1, edited the webhook_service field to github, then gitlab and finally to "" (empty string). Everything succeeded as expected when using PUT requests.
Also did an OPTIONS request to both /api/v2/job_templates/ and /api/v2/workflow_job_templates and the information for the webhook_service displayed all the accepted options: github, gitlab and "" (emptry string)
With all that we can consider this issue as being verified.
ISSUE TYPE
SUMMARY
The OPTIONS for job_templates is not self-consistent for the field
webhook_service
.This breaks the
tower-cli send
command, assuming the data comes from the receive command. A hack is in progress for this, but it would be better to change behavior from API moving forward.ENVIRONMENT
STEPS TO REPRODUCE
Of particular interest here is the sequence of
tower-cli receive
, saving that to a file, and using it intower-cli send
.EXPECTED RESULTS
Data given from the API is consistent with OPTIONS
ACTUAL RESULTS
OPTIONS for job_templates gives
The receive command always gives
webhook_credential
in the asset data because it has no default. Without a default, it cannot be determined if the field has been set.The send command gives
ADDITIONAL INFORMATION
ansible/tower-cli#741
Ping @jbradberry, @john-westcott-iv
In terms of CLI design in general, @ryanpetrello I find the ability to determine if a field has a non-default value is a powerful tool. This is one of the things I most like about the send/receive commands. I would even prefer that for compact representations of resources for human consumption.
The text was updated successfully, but these errors were encountered: