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

chore: Disable diagnostic events when running contract tests. #292

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

kinyoklion
Copy link
Member

I have done some investigation and found that the intermittent issues with contract tests seem to be related to how the test harness handles them. We do not actually test them using the test harness, so I am disabling them now to improve CI and release robustness.

I've basically been running the contract tests in a loop. Usually they fail in a few hours, but with diagnostic opt out they ran overnight.

I was testing them in combination with some other robustness improvements, but I am re-testing now with just this change. Those changes can be independent.

Once we know what is going on the test harness side we should be able to re-enable these, but it likely isn't worth doing unless there are some tests for them.

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #219494: Disable diagnostic events for contract tests for node..

@kinyoklion kinyoklion marked this pull request as ready for review October 3, 2023 16:11
@@ -9,6 +9,7 @@ export { badCommandError };
export function makeSdkConfig(options, tag) {
const cf = {
logger: sdkLogger(tag),
diagnosticOptOut: true
};
const maybeTime = (seconds) =>
seconds === undefined || seconds === null ? undefined : seconds / 1000;
Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated, but this can be simplified:

Suggested change
seconds === undefined || seconds === null ? undefined : seconds / 1000;
!seconds ? undefined : seconds / 1000;

Copy link
Member Author

@kinyoklion kinyoklion Oct 3, 2023

Choose a reason for hiding this comment

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

0 seconds is falsy.

Copy link
Member Author

Choose a reason for hiding this comment

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

> let seconds = 0;
undefined
> !seconds ? undefined : seconds/1000
undefined
> seconds === undefined || seconds === null ? undefined : seconds/1000
0

I do not know if our test execution does any tests where it sets to 0, but if it does, then the results would be substantially different. As undefined will get default times, and 0 may or may not depending on the check.

Copy link
Member Author

Choose a reason for hiding this comment

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

Now that we are post 8.0 I should convert this to typescript and I could make things like this at least look a little cleaner. This is still the original implementation from Eli, because I wanted to validate compatibility originally.

@kinyoklion kinyoklion merged commit 8675058 into main Oct 3, 2023
13 checks passed
@kinyoklion kinyoklion deleted the rlamb/sc-219494/disable-diagnostic-contract-tests branch October 3, 2023 17:26
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.

2 participants