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

Decompose upsert method to be less complex #331

Merged
merged 40 commits into from Sep 22, 2018
Merged

Conversation

jeffb4
Copy link
Contributor

@jeffb4 jeffb4 commented Sep 16, 2018

Breaks UpsertStack into several methods, and attempts to share logic between update/create (but has to use reflection for that which is meh)

@jeffb4
Copy link
Contributor Author

jeffb4 commented Sep 19, 2018

This ended up going further and refactored everything over a CCM of 15. It also fixes spots where error returns weren't being checked and other stuff revealed by gometalinter

Copy link
Contributor

@cplee cplee left a comment

Choose a reason for hiding this comment

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

i see a couple things that ought to change and i also need to add unit test coverage for common/extension.go to validate the change there

common/strings.go Show resolved Hide resolved
workflows/database_upsert.go Show resolved Hide resolved
Copy link
Contributor

@cplee cplee left a comment

Choose a reason for hiding this comment

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

one more change...e2e testing failed

common.EnvProviderEc2: map[string]string{
"templateName": "env-ec2.yml",
"imagePattern": ec2ImagePattern,
"launchType": ""}}
Copy link
Contributor

Choose a reason for hiding this comment

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

this caused an error in the e2e testing since it tried to set the LaunchType stack parameter to empty string...but that param doesn't exist in the ec2 provider template. maybe update line 256 to only set the value iff launchType is in the map and not empty string?

@cplee cplee merged commit 912a74a into develop Sep 22, 2018
@cplee cplee deleted the refactor-upsert-function branch September 22, 2018 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants