Skip to content

Conversation

@braydonk
Copy link
Contributor

Description

This PR creates a new Set[T comparable] type that we can use to replace some confusing map usage. The new Set type may end up being useful in other places.

There were a couple other spots nearby that I thought would benefit from using generics instead which I also adjusted.

I also ran make addlicense which found a couple unrelated files missing license headers.

Related issue

How has this been tested?

make test_confgenerator, since the unit tests already covered this code.

Checklist:

  • Unit tests
    • Unit tests do not apply.
    • Unit tests have been added/modified and passed for this PR.
  • Integration tests
    • Integration tests do not apply.
    • Integration tests have been added/modified and passed for this PR.
  • Documentation
    • This PR introduces no user visible changes.
    • This PR introduces user visible changes and the corresponding documentation change has been made.
  • Minor version bump
    • This PR introduces no new features.
    • This PR introduces new features, and there is a separate PR to bump the minor version since the last release already.
    • This PR bumps the version.

@braydonk braydonk requested review from a team, hsmatulis and jkschulz and removed request for a team and jkschulz October 13, 2022 14:34
@braydonk braydonk force-pushed the braydonk-generic-set branch from 99f4aea to f175f82 Compare October 14, 2022 13:25
@braydonk braydonk requested a review from quentinmit October 17, 2022 12:02
@qingling128
Copy link
Contributor

Sync'd offline @martijnvans will take this one as the primary reviewer.

@braydonk braydonk requested a review from martijnvans November 9, 2022 14:16
@braydonk braydonk force-pushed the braydonk-generic-set branch from 8c8978f to 6fc6a92 Compare November 18, 2022 13:10
@braydonk braydonk added the kokoro:force-run Forces kokoro to run integration tests on a CL label Nov 18, 2022
@braydonk braydonk force-pushed the braydonk-generic-set branch from 0aa237b to c846efc Compare November 18, 2022 16:02
@stackdriver-instrumentation-release stackdriver-instrumentation-release removed the kokoro:force-run Forces kokoro to run integration tests on a CL label Nov 18, 2022
This PR creates a new `Set[T comparable]` type that we can use to
replace some confusing `map` usage. The new `Set` type may end up being
useful in other places.

This PR also ran `make addlicense` which found a couple unrelated files
missing license headers.
Added unit tests for the Set[T] type, as well as a couple missing pieces
of functionality to make it a properly usable set type.
* Change exported members to `set.FromSlice` and `set.FromMapKeys` for
  readability
* Add additional check in set_test.TestRemove that ensures the set does
  not contain key after delete
* Remove Makefile target to test the set package

Signed-off-by: braydonk <braydonk@google.com>
go-yaml dependency upgrade included a fix I made to error messages that
changed a bunch of our golden files.

Signed-off-by: braydonk <braydonk@google.com>
This should probably be a separate PR

Signed-off-by: braydonk <braydonk@google.com>
@braydonk braydonk force-pushed the braydonk-generic-set branch from c846efc to 0930b22 Compare November 25, 2022 20:04
@braydonk braydonk merged commit 083cdcf into master Nov 28, 2022
@igorpeshansky igorpeshansky deleted the braydonk-generic-set branch July 10, 2023 21:56
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.

7 participants