-
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
Fixes #37417 - OverriddenAnsibleVariablePresenter GraphQL scheme incorrect for hidden_value and override #716
base: master
Are you sure you want to change the base?
Conversation
500fe9e
to
b8a6df8
Compare
…rrect for hidden_value and override
b8a6df8
to
1b2ed8b
Compare
@stejskalleos can you please review this? |
I'm unclear on what exactly isn't working and what we're trying to fix with these changes. Additionally, I'm not sure where the new methods are being used. |
In the AnsibleVariable model, hidden_value returns a series of asterisks, while hidden_value? returns a boolean. The author's intention was to delegate hidden_value?, but this led to an illegal field name "hidden_value?" in the GraphQL query. Similarly, override? faced the same issue. This has been rectified by wrapping hidden_value? in a new method named hidden_value within the presenter. |
The |
You're right, right now neither |
Can we somehow continue this PR? We had the following issue, which we were able to fix by this PR. I don't see a reason why such a PR is not merged. If there is a request which should be adapted, please let us exactly know so that we can finish it. |
Hi @sbernhard, I thought this PR is needed for #717, which is not ready yet (see my comment here https://github.com/theforeman/foreman_ansible/pull/717/files#r1741039438). |
In the model AnsibleVariable, there is hidden_value, which returns "*****" and there is hidden_value**?**, which returns a boolean.
For GraphQL, the method name must be the same as the value entered in the gql-query. By delegating hidden_value**?**, the original author effectively named the gql-field "hidden_value?", which is not allowed and was therefore not working.
The same applies to override.
This is fixed by wrapping the value of hidden_value**?** in a new method hidden_value in the presenter.
Required by #717