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

Make spot product description config #214

Merged
merged 5 commits into from
Feb 9, 2018
Merged

Make spot product description config #214

merged 5 commits into from
Feb 9, 2018

Conversation

russellballestrini
Copy link
Contributor

@russellballestrini russellballestrini commented Feb 8, 2018

Issue Type

  • Feature Pull Request
  • Documentation Pull Request

Summary

The Linux/UNIX product description does not have the price history for the most recent 2 instance type generations, as proved here: http://pad.yohdah.com/598/spot-product-no-history

As a result we have decided to change the default SpotProductDescription to Linux/UNIX (Amazon VPC) as well as make it configurable for backwards compatibility reasons (and so that we can support other operating systems like Windows, etc.)

  • Changes the default Spot Product Description from Linux/UNIX to Linux/UNIX (Amazon VPC)
  • Adds a flag to allow configuration of -spot_product_description
  • Updates CLI help text for readability
  • Derives flag defaults from constants

Code contribution checklist

  1. The contribution fixes a single existing github issue, and it is linked
    to it.

Might fix the following: #206 #213

  1. The code is as simple as possible, readable and follows the idiomatic Go
    guidelines.

  2. All new functionality is covered by automated test cases so the overall
    test coverage doesn't decrease.

  3. No issues are reported when running make full-test.

This doesn't work on Mac but I'm pretty but I ran go fmt and go test

  1. Functionality not applicable to all users should be configurable.
  2. Configurations should be exposed through Lambda function environment
    variables which are also passed as parameters to the
    CloudFormation
    and
    Terraform
    stacks defined as infrastructure code.
  3. Global configurations set from the infrastructure stack level should also
    support per-group overrides using tags.
  4. Tags names and expected values should be similar to the other existing
    configurations.
  5. Both global and tag-based configuration mechanisms should be tested and
    proven to work using log output from various test runs.
  6. The logs should be kept as clean as possible (use log levels as
    appropriate) and formatted consistently to the existing log output.
  7. The documentation is updated to cover the new behavior, as well as the
    new configuration options for both stack parameters and tag overrides.
  8. A code reviewer reproduced the problem and can confirm the code
    contribution actually resolves it.

	modified:   autospotting.go
	modified:   core/autoscaling.go
	modified:   core/config.go
	modified:   core/region.go
	modified:   autospotting.go
	modified:   core/autoscaling.go
Copy link
Member

@cristim cristim left a comment

Choose a reason for hiding this comment

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

LGTM, once exposed to Terraform and CloudFormation!

@xlr-8 do you have any comments?

	modified:   autospotting.go
	modified:   cloudformation/stacks/AutoSpotting/template.json
	modified:   terraform/autospotting.tf
	modified:   terraform/autospotting/lambda.tf
	modified:   terraform/variables.tf
@russellballestrini russellballestrini changed the title WIP: Make spot product description config Make spot product description config Feb 8, 2018
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 74.076% when pulling b152168 on russellballestrini:make-spot-product-description-config into 4894cb6 on cristim:master.

@cristim cristim merged commit 5a0af4c into LeanerCloud:master Feb 9, 2018
cristim pushed a commit that referenced this pull request Feb 9, 2018
#214 broke terraform deployments due to this missing variable.
@xlr-8
Copy link
Contributor

xlr-8 commented Feb 15, 2018

I would have simply added a small check as we have the "valid values" in order to ensure it's included, or fallback on the default one. I can open an issue if you think this is relevant

@russellballestrini russellballestrini deleted the make-spot-product-description-config branch April 6, 2018 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants