This repository has been archived by the owner on Jun 25, 2024. It is now read-only.
generated from JupiterOne-Archives/integration-template
-
Notifications
You must be signed in to change notification settings - Fork 14
fix(INT-6706): check service account key in validateInvocationConfig #571
Merged
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
gastonyelmini
force-pushed
the
INT-6706-integration-key-test
branch
2 times, most recently
from
January 25, 2023 13:50
2128ab0
to
8ee5695
Compare
ndowmon
reviewed
Jan 26, 2023
ndowmon
reviewed
Jan 26, 2023
gastonyelmini
force-pushed
the
INT-6706-integration-key-test
branch
5 times, most recently
from
January 30, 2023 22:38
01d723b
to
03dde84
Compare
ndowmon
reviewed
Jan 31, 2023
ndowmon
reviewed
Jan 31, 2023
gastonyelmini
force-pushed
the
INT-6706-integration-key-test
branch
from
February 2, 2023 14:15
03dde84
to
d641a81
Compare
gastonyelmini
commented
Feb 2, 2023
gastonyelmini
force-pushed
the
INT-6706-integration-key-test
branch
3 times, most recently
from
February 10, 2023 11:41
f4371ca
to
8fc031b
Compare
gastonyelmini
force-pushed
the
INT-6706-integration-key-test
branch
from
February 10, 2023 13:32
8fc031b
to
f3cf829
Compare
ndowmon
reviewed
Feb 24, 2023
"encoding": "utf-8", | ||
"mimeType": "application/json; charset=UTF-8", | ||
"size": 181, | ||
"text": "{\"access_token\":\"[REDACTED]\",\"expires_in\":9999,\"token_type\":\"Bearer\"}" |
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.
I think this needs a re-record to persist the 400
response data.
ndowmon
reviewed
Feb 24, 2023
@@ -31,6 +32,7 @@ export const invocationConfig: IntegrationInvocationConfig<IntegrationConfig> = | |||
integrationSteps: steps, | |||
dependencyGraphOrder: ['last'], | |||
beforeAddEntity: maybeDefaultProjectIdOnEntity, | |||
validateInvocation, |
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.
💯
ndowmon
previously approved these changes
Feb 24, 2023
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.
This is awesome. Thanks!
I posted the comment about re-recording one API call. If it’s simple to re-record, please do so, but if it takes more than a few minutes, i would rather merge as-is.
🔥
ndowmon
approved these changes
Feb 24, 2023
🚀 PR was released in |
j1-internal-automation
added
the
released
This issue/pull request has been released.
label
Mar 31, 2023
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.
Check service account key in validateInvocationConfig
Context and motivation:
In some cases, despite the fact that service account key file is setup correctly, if is not valid, the integration might run anyways and generate a large amount of errors. To avoid this, a test API call with credentials to check if they are valid and throw an error if not:
Example error that could be present:
Expected outcome: