Repository navigation
feat: Surface provisioning failures to user - #1002
Merged
Merged
Conversation
…ailure" This reverts commit 649bb76.
morgsmccauley
commented
Aug 8, 2024
| public readonly functionName: string, | ||
| public readonly schema: string | ||
| public readonly schema: string, | ||
| public readonly logLevel: LogLevel = LogLevel.INFO |
Contributor
Author
There was a problem hiding this comment.
Needed to move this from IndexerConfig to ProvisioningConfig so that IndexerMeta could be constructed with it. We only have access to the latter in Provisioning.
morgsmccauley
commented
Aug 8, 2024
| logger.info('Successfully provisioned Data Layer'); | ||
| }) | ||
| .catch((err) => { | ||
| logger.error('Failed to provision Data Layer', err); |
Contributor
Author
There was a problem hiding this comment.
Now logged within Provisioner
morgsmccauley
commented
Aug 8, 2024
| } | ||
|
|
||
| async function indexerLogsQuery(indexerSchemaName: string, graphqlClient: GraphQLClient): Promise<any> { | ||
| async function indexerLogsQuery (indexerSchemaName: string, graphqlClient: GraphQLClient): Promise<any> { |
Contributor
Author
There was a problem hiding this comment.
@darunrs I think our editors are fighting each other 😅
Contributor
There was a problem hiding this comment.
LMAO. I actually like the space after the function name for TS. I need to check my linting config.
darunrs
approved these changes
Aug 9, 2024
| } | ||
|
|
||
| async function indexerLogsQuery(indexerSchemaName: string, graphqlClient: GraphQLClient): Promise<any> { | ||
| async function indexerLogsQuery (indexerSchemaName: string, graphqlClient: GraphQLClient): Promise<any> { |
Contributor
There was a problem hiding this comment.
LMAO. I actually like the space after the function name for TS. I need to check my linting config.
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR updates provisioning such that user-related errors are written to the user-owned logs table, allowing them to debug issues with their schema.
Logging to the user table is tricky, since this table is created during the provisioning step itself. Therefore, I have split provisioning in to two phases:
This separation allows us to isolate the tasks which are likely to fail due to user error, and therefore only surface errors which are relevant.
The creation of the logs table should always succeed, if it doesn't there is something wrong with the system, i.e. some form of bug has been introduced. Errors thrown during the System portion of provisioning will be error logged to the machine, and I will tune the existing alert so that we are notified of these errors.
Additionally, I have converted all non-critical error logs to warnings, so that we don't get alerted on non-issues.
closes: #901