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

feat(template)!: introducing variables and sensitive configuration #672

Merged

Conversation

meganwolf0
Copy link
Collaborator

Description

Sample implementation for sensitive and non-sensitive configuration data to support templating

Related Issue

Relates to #641

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

Copy link
Member

@brandtkeller brandtkeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a fan of this direction - called out a few items we may want to think about but otherwise this meets our requirements.

I looked for any concerns or risks present with the nested brace replacement and did not find any issues.

A lot of commonality between our approaches made this an easy review.

src/internal/template/template.go Outdated Show resolved Hide resolved
src/cmd/tools/template.go Outdated Show resolved Hide resolved
@brandtkeller
Copy link
Member

Additionally can we update the go mod/sum files when preparing for next review?

@meganwolf0
Copy link
Collaborator Author

Additionally can we update the go mod/sum files when preparing for next review?

When you say update - is there a particular package you were looking at or just like a go mod tidy cleanup?

@meganwolf0
Copy link
Collaborator Author

meganwolf0 commented Sep 20, 2024

So I spent a little more time on this then I was initially planning and did some refactor of the internal/template package + the command. I was running into some issues when testing the cmd where the flags getting set were persisting across runs - which is not ideal. I refactored this so that we don't have external to the command flags (which sort of runs counter to what we do in all our other cmds, but I've seen this pattern in other cobra cli usage and tbh I like it better, seems to reduce side effects when testing.)

@meganwolf0 meganwolf0 changed the title feat(template)!: sample sensitive config feat(template)!: introducing variables and sensitive configuration Sep 20, 2024
@meganwolf0 meganwolf0 linked an issue Sep 20, 2024 that may be closed by this pull request
@meganwolf0 meganwolf0 marked this pull request as ready for review September 20, 2024 13:34
@meganwolf0 meganwolf0 requested a review from a team as a code owner September 20, 2024 13:34
@meganwolf0 meganwolf0 marked this pull request as draft September 24, 2024 10:22
@meganwolf0 meganwolf0 marked this pull request as ready for review September 24, 2024 13:19
Copy link
Member

@brandtkeller brandtkeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super minor inconsistency in the help command. quick modification and re-generation of the cli doc and I'm good!

@meganwolf0 meganwolf0 marked this pull request as draft September 25, 2024 17:25
@meganwolf0 meganwolf0 marked this pull request as ready for review September 25, 2024 18:03
@brandtkeller brandtkeller merged commit 5d1f232 into main Sep 25, 2024
5 checks passed
@brandtkeller brandtkeller deleted the 641-define-sensitive-configuration-and-prevent-templating branch September 25, 2024 22:30
This was referenced Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Define sensitive configuration and prevent templating
2 participants