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

fix: skip key validation if endpoint is different #265

Merged
merged 2 commits into from
Oct 3, 2023

Conversation

JamieDanielson
Copy link
Contributor

Which problem is this PR solving?

Short description of the changes

  • Check endpoint and if it differs from our default, skip the api key validation
  • Move the Config Validate below the logging of config values; that way, if there is something wrong, the config values are printed out first for easier troubleshooting if it fails.

I'd considered some refactoring to pull out defaults and use a variable instead of hardcoding here, but wasn't sure it was worth the extra cleanup for this rare use case.

How to verify that this has the expected result

Set an incorrect API Key. With no change to endpoint, or endpoint set to "https://api.honeycomb.io", agent pod should fail to start because of invalid key - and should log the config options followed by the fatal error. With a different endpoint, agent should start with no failure.

@JamieDanielson JamieDanielson requested a review from a team October 3, 2023 18:55
@JamieDanielson JamieDanielson self-assigned this Oct 3, 2023
@JamieDanielson JamieDanielson added the type: bug Something isn't working label Oct 3, 2023
@JamieDanielson JamieDanielson merged commit 589abb8 into main Oct 3, 2023
@JamieDanielson JamieDanielson deleted the jamie.skip-validation-for-alt-endpoint branch October 3, 2023 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Agent vails validation and cannot start if an alternative API endpoint is used
2 participants