Skip to content

Switch to gcp from gce #2488

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

Merged
merged 7 commits into from
Jan 19, 2023
Merged

Switch to gcp from gce #2488

merged 7 commits into from
Jan 19, 2023

Conversation

hughesjj
Copy link
Contributor

@hughesjj hughesjj commented Jan 18, 2023

as specified in breaking changes, need to convert these

I'm sure there's some cleaner ways to organize the code and am receptive to any suggestions if you have some.

)

func TestNormalizeGcp(t *testing.T) {
expectedCfgMap, err := confmaptest.LoadConf("testdata/normalize_gcp/upstream_agent_config_post_migration.yaml")
Copy link
Contributor

Choose a reason for hiding this comment

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

imo it greatly improves readability and lessens maintenance requirements to use confmap.NewFromStringMap() directly instead of having separate files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like the file approach to make it easier to copy a troublesome or relevant customer/upstream config as-is into the test folders, and prefer to have the "logic" separated from the test data to reduce visual scope, but I don't have a strong opinion and could be swayed if you're invested enough to make a counter argument on this.

As-is I'd say "if someone else on the team agrees with your take I'll treat that as consensus and make the change, otherwise plan to keep the same".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

One argument that would convince me would be "You can reduce the copy-pasta in your configs if you generate it in code", since that would reduce the size of our test suite.

@@ -0,0 +1,35 @@
receivers:
Copy link
Contributor

Choose a reason for hiding this comment

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

is this file used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not anymore... thank you 😔

Copy link
Contributor

Choose a reason for hiding this comment

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

fwiw I think its more expansive checks could be helpful in testing

@hughesjj hughesjj marked this pull request as ready for review January 18, 2023 23:57
@hughesjj hughesjj requested review from a team as code owners January 18, 2023 23:57
@hughesjj hughesjj merged commit e7f0204 into main Jan 19, 2023
@delete-merged-branch delete-merged-branch bot deleted the gce_to_gcp branch January 19, 2023 00:20
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.

3 participants