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

feat: key management support #496

Merged
merged 7 commits into from
Jul 17, 2024
Merged

feat: key management support #496

merged 7 commits into from
Jul 17, 2024

Conversation

jharley
Copy link
Collaborator

@jharley jharley commented Jul 10, 2024

Adds V2 API client support and a new V2 API resource honeycombio_api_key to the provider. Includes docs updates for the new provider-level config. options as well as the new resource.

Left a few follow-up "TODOs" (and removed use of context.TODO() so I could find the actual TODOs more easily 🙃).

This is larger than I'd initially suspected: allowing the provider to work "v1+v2", "v1 only", or "v2 only" required a fair bit of initialization plumbing updates but I have tried to cover that off with test cases.


@jharley jharley force-pushed the jharley.api-keys-support branch 5 times, most recently from 6ed858a to 97e086b Compare July 16, 2024 20:18
@honeycombio honeycombio deleted a comment from codecov-commenter Jul 16, 2024
HONEYCOMB_DATASET: testacc
HONEYCOMB_ENVIRONMENT_ID: hcaen_01j1d7t02zf7wgw7q89z3t60vf # TODO: remove and do a lookup or create in tests
Copy link
Collaborator Author

@jharley jharley Jul 16, 2024

Choose a reason for hiding this comment

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

will drop these (here and below) when the v2client has Environments API support

@jharley jharley force-pushed the jharley.api-keys-support branch from 97e086b to 9bf24f0 Compare July 16, 2024 21:09
@codecov-commenter
Copy link

codecov-commenter commented Jul 16, 2024

Codecov Report

Attention: Patch coverage is 66.10577% with 282 lines in your changes missing coverage. Please review.

Project coverage is 80.36%. Comparing base (58def89) to head (22c2e50).

Files Patch % Lines
internal/provider/api_key_resource.go 77.61% 33 Missing and 14 partials ⚠️
internal/provider/provider.go 70.43% 27 Missing and 7 partials ⚠️
client/v2/client.go 76.04% 14 Missing and 9 partials ⚠️
client/v2/api_keys.go 66.10% 10 Missing and 10 partials ⚠️
client/v2/pagination.go 66.10% 10 Missing and 10 partials ⚠️
client/errors.go 69.23% 8 Missing and 4 partials ⚠️
honeycombio/resource_derived_column.go 33.33% 7 Missing and 3 partials ⚠️
honeycombio/resource_column.go 30.76% 6 Missing and 3 partials ⚠️
honeycombio/resource_marker_setting.go 30.76% 6 Missing and 3 partials ⚠️
honeycombio/resource_slo.go 30.76% 6 Missing and 3 partials ⚠️
... and 23 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #496      +/-   ##
==========================================
- Coverage   82.62%   80.36%   -2.27%     
==========================================
  Files          63       67       +4     
  Lines        4478     5174     +696     
==========================================
+ Hits         3700     4158     +458     
- Misses        607      753     +146     
- Partials      171      263      +92     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jharley jharley added feature This issue wants to add new functionality. breaking-change labels Jul 16, 2024
@jharley jharley marked this pull request as ready for review July 16, 2024 21:32
@jharley jharley requested a review from a team as a code owner July 16, 2024 21:32
docs/index.md Show resolved Hide resolved
docs/index.md Outdated Show resolved Hide resolved
docs/resources/api_key.md Outdated Show resolved Hide resolved
internal/provider/api_key_resource.go Outdated Show resolved Hide resolved
internal/provider/api_key_resource.go Show resolved Hide resolved
Copy link
Contributor

@cewkrupa cewkrupa left a comment

Choose a reason for hiding this comment

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

🎉 🎉 🎉

docs/index.md Outdated Show resolved Hide resolved
@jharley jharley merged commit 8466bb4 into main Jul 17, 2024
6 checks passed
@jharley jharley deleted the jharley.api-keys-support branch July 17, 2024 16:51
jharley added a commit that referenced this pull request Jul 19, 2024
…502)

A follow-up to #501 and #496, this cleans up the various
environment-related TODOs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue wants to add new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resource: api key
3 participants