GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — [SEMVER-MAJOR] condition support to module params by davidcheung · Pull Request #350 · commitdev/zero Conversation
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Go convention - can you please add comments on public functions starting with the name of the function? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| }) | ||
| } | ||
|
|
||
| func getParameterDefinition(modConfig moduleconfig.ModuleConfig, field string) moduleconfig.Parameter { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Is this function not actually used anywhere?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Yeah looks like it, will remove
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Can you add a new file in docs to capture the schema and usage of the module.yml now that it's getting more complex? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| SecretAccessKey string `yaml:"secretAccessKey,omitempty" env:"AWS_SECRET_ACCESS_KEY,omitempty"` | ||
| } | ||
|
|
||
| var GetAWSCredsPath = awsCredsPath |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Why assign here rather than calling the function directly?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
In the tests i'm overwriting the function so it fetches the mock path, it only lets me do it if its a variable
what's the proper way to
I guess I should just have the function receive the credentials path as well?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Yeah how about you accept an optional base path, and if it's not supplied we default to the home dir?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
|
||
| func AwsCredsPath() string { | ||
| type AWSResourceConfig struct { | ||
| AccessKeyID string `yaml:"accessKeyId,omitempty" env:"AWS_ACCESS_KEY_ID,omitempty"` |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Why "yaml"? If this annotation is just to be used by the ReflectStructValueIntoMap function we might as well use our own identifier so it's clear that it's not supposed to be used in some other way to generate yaml.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
No particular reason, mostly just because I reused the struct from before (global creds)
what should we change it to, should we just call it zero?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
How about just key or something? If we control this struct entirely in code and don't need to worry about parsing it to/from a file it might be a bit overkill to even use an annotation for this.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| | `data` | list(string) | Supply extra data for condition to run | | ||
|
|
||
|
|
||
| ### Validation |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Missing info on some of the other things like the contitions and template fields related to templating.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
definitely good call to add this documentation, I looked at conditions and thought oh its there, but theres actually 2 types
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Yeah the naming might be a bit confusing..
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @@ -126,9 +133,11 @@ func (p PromptHandler) GetParam(projectParams map[string]string) string { | |||
| exit.Fatal("Exiting prompt: %v\n", err) | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Mind adding a bit more info here? Maybe say that it's related to the module properties, and if possible, say which module the problem is with? I'm thinking for CustomPromptHandler for example, if the module specifies an invalid string, it's gonna be hard for a user to understand what's going on.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Bill Monkman <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.