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

Made CI checks during telemetry a bit more thorough. #1586

Merged
merged 2 commits into from
Nov 30, 2023
Merged

Conversation

Martinsos
Copy link
Member

No description provided.

unwords . filter (not . null)
<$> sequence
[ fromMaybe "" <$> ENV.lookupEnv "WASP_TELEMETRY_CONTEXT",
checkIfOnCi <&> \case True -> "CI"; False -> ""
checkIfOnCi <&> \case True -> "CI"; False -> "",
-- NOTE(martin): We are not 100% sure how correctly does `hIsTerminalDevice` detect
Copy link
Contributor

Choose a reason for hiding this comment

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

@Martinsos can this call fail for what ever reason? Do we need exception handling or smth here

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point -> so I didn't think this one is particularly likely to throw an error (but every IO operation can throw an error!), so I haven't taken special measures here.
We do have one big catch already for telemetry, so any fail in it can't crash the CLI but will just not send telemetry.

That said, this function is a bit of a mystery to us, and it would be a shame if it started failing our telemetry silently, so better to be safe than sorry I think, so now prompted by your comment I added an additional catch to it that will interpret any error as "True".

@Martinsos Martinsos merged commit 20769f6 into main Nov 30, 2023
4 checks passed
@Martinsos Martinsos deleted the better-ci-checks branch November 30, 2023 13:44
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