-
Notifications
You must be signed in to change notification settings - Fork 205
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
Include sensitive flag in yaml/json output of porter explain for outputs and parameters #2228
Comments
Hi @carolynvs, I'm interested to contribute to this issue. I request you to assign me the same. I had requested to issue #2324 too. I'm fine with any issue. |
Hi @MadhuMPandurangi , thank you for taking on this issue! If you have any questions, feel free to reach out to us! |
@MadhuMPandurangi We encourage contributors to only work on a single issue at a time, so that issues stay "available" for others to pick up until someone is actively working on them. How about you test out Porter with Artifactory first, and then when that's complete, then start on this one. |
Thank you @carolynvs @VinozzZ I'm going through the project and I'm happy to be on your team. |
Built a sample bundle that prints the name is done. I looked at the file https://github.com/getporter/porter/blob/release/v1/pkg/porter/explain.go but I didn't get how to make changes or what to edit in this file. Can anyone please help? |
You need to add the sensitive flag to PrintableParameter, in Lines 85 to 93 in f72fc6e
Then populate that field using the result of Lines 247 to 253 in f72fc6e
The yaml/json output of the explain command will automatically pick up your change so you don't need to do anything to get the new sensitive field to print out. Since we are not updating the human readable output of the explain command, there are no associated documentation changes to make this time. When you run the unit tests with |
Do I proceed with PR? |
Looks good! Yes please create a pull request. We have a template that you will be prompted to fill out when you open it that explains the information we are looking for. 👍 |
Hi @carolynvs @VinozzZ, please review the PR(#2440). Thank You |
This issue started off as a discussion at #2193. When someone is automating retrieving values to run a bundle from porter explain, it is helpful to know if a parameter or output is sensitive. For example, they would know that sensitive values always should be retrieved from a secret store.
I don't want to add more information to the human readable display for the explain command, as we want to limit the info displayed to actionable data and I think this case is really about automation.
So lets add the sensitive flag (boolean) to both the json and yaml parameters and outputs sections in the output of
porter explain
.For example, here is a bundle that has sensitive parameters and outputs:
After the change, the output should include the sensitive field:
The change should be made in the following file: https://github.com/getporter/porter/blob/release/v1/pkg/porter/explain.go and the testdata used in the associated test file updated to match the new expected output. You can either update the testdata files by hand, or you can call
mage UpdateTestfiles
after changing the code, and that will update the testdata files to match the new output.See our Contributing Tutorial and New Contributor Guide for help getting started contributing to Porter.
The text was updated successfully, but these errors were encountered: