This repository has been archived by the owner on Jan 8, 2022. It is now read-only.
forked from Yelp/terraform-provider-signalform
-
Notifications
You must be signed in to change notification settings - Fork 5
Fix colorscale #21
Open
ChimeraCoder
wants to merge
12
commits into
stripe/master
Choose a base branch
from
aditya-colors
base: stripe/master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix colorscale #21
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This makes it possible to use red, light and dark green shades for heatmaps and other charts.
Every time you run make test the deps task runs as it is a dependency. If we stop this being a phony task, the deps task will only run if a deps file exists. Touching this file after installing deps should ensure this. This means its slightly faster to run make test. Running make clean removes this file and will redo the deps process, at any point you can remove the file and force the deps process to continue
This is useful to target specific tests and to allow passing the -i option to make test which installs the test dependencies and makes things run faster
goimports (https://godoc.org/golang.org/x/tools/cmd/goimports) formats it like this and I have this set as a pre save command in my editor
This test sometimes passes, but mostly fails. The reason is the iteration through the ChartColors map to find the palleteIndex - which is explained nicely in https://nathanleclaire.com/blog/2014/04/27/a-surprising-feature-of-golang-that-colored-me-impressed/ I did try creating my own *schema.ResourceData struct, but doing so seemed to require a lot of knowledge of terraform internals and couple the test to terraform internals. It seemed better and easier to test to decouple the terraform internals from our logic and split out into two functions - there may be a more idiomatic way of doing this.
To do this we change the datastructure from a map to a slice of structs, as the ordering of slices will be consistent. This does mean we need to loop through the slice to find the correct value where previously we used a map lookup, but the map is small so the overhead shouldnt be much
This reverts commit 2ec8654.
This matches the colors used at https://developers.signalfx.com/reference#section-color-palette I've had to make up names of the colors - where the existing names made sense and didnt clash with another color i've used them. I also used https://www.colorhexa.com to find an opinion on what the color was.
aditya-stripe
force-pushed
the
aditya-colors
branch
from
June 25, 2019 21:59
d8cc59b
to
29e5489
Compare
sjung-stripe
approved these changes
Jun 25, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code looks fine to me. be sure to build the provider and try a plan before merging
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull in Yelp#36
r? @sjung-stripe
cc @choo-stripe @stripe/observability