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

Update modules #65

Merged
merged 8 commits into from
Oct 29, 2021
Merged

Update modules #65

merged 8 commits into from
Oct 29, 2021

Conversation

aknysh
Copy link
Member

@aknysh aknysh commented Oct 29, 2021

what

  • Update modules

why

@aknysh aknysh requested a review from a team as a code owner October 29, 2021 20:45
@aknysh aknysh self-assigned this Oct 29, 2021
@aknysh aknysh requested a review from a team as a code owner October 29, 2021 20:45
@aknysh aknysh added the patch A minor, backward compatible change label Oct 29, 2021
}

if len(c.Config.Stacks.NamePattern) < 1 {
return nil, errors.New("stack name pattern must be provided in 'stacks.name_pattern' config or 'ATMOS_STACKS_NAME_PATTERN' ENV variable")
Copy link
Member

Choose a reason for hiding this comment

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

line 50 is the same as this line

It would be nice to have an errors.go module that housed each of these error messages so could call upon them using errors.stack_pattern_mismatch or similar to keep it DRY

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, common modules would be nice

Copy link
Member Author

Choose a reason for hiding this comment

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

those are the same since the functions are used at diff times, and they both need NamePattern so they check if it exists

}
} else if part == "{stage}" {
if len(stage) == 0 {
return nil, errors.New(fmt.Sprintf("stack name pattern '%s' includes '{stage}', but stage is not provided", c.Config.Stacks.NamePattern))
Copy link
Member

Choose a reason for hiding this comment

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

dupe line from 159

@aknysh aknysh merged commit 538a5d7 into master Oct 29, 2021
@aknysh aknysh deleted the update-stacks-and-spacelift branch October 29, 2021 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch A minor, backward compatible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants