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

Add required env variables for e2e telemetry tests to README #8341

Merged
merged 16 commits into from
Apr 25, 2024

Conversation

mnholtz
Copy link
Collaborator

@mnholtz mnholtz commented Apr 24, 2024

What does this PR do?

Checklist

  • Add jest or playwright tests and/or storybook stories
  • Designate a primary reviewer @fungairino

Copy link

codecov bot commented Apr 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.50%. Comparing base (44a3b1a) to head (7aeb911).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8341   +/-   ##
=======================================
  Coverage   73.49%   73.50%           
=======================================
  Files        1330     1330           
  Lines       41142    41142           
  Branches     7657     7657           
=======================================
+ Hits        30239    30242    +3     
+ Misses      10903    10900    -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fungairino
Copy link
Collaborator

fungairino commented Apr 25, 2024

Is it worth at all considering just removing the DEBUG check in getDNT? That way we don't have to require the need to define DEV_EVENT_TELEMETRY in the env

return boolean((await dntConfig.get()) ?? process.env.DEBUG);

We wouldn't emit metrics anyways if people don't set up their local datadog client token in the env.

.github/workflows/ci.yml Show resolved Hide resolved
end-to-end-tests/README.md Show resolved Hide resolved
@mnholtz
Copy link
Collaborator Author

mnholtz commented Apr 25, 2024

Is it worth at all considering just removing the DEBUG check in getDNT?

I suppose so? I don't see any reason to keep it, but I'm hesitant because I don't know why it's there.

@mnholtz mnholtz requested a review from fungairino April 25, 2024 16:03
@fungairino
Copy link
Collaborator

Is it worth at all considering just removing the DEBUG check in getDNT?

I suppose so? I don't see any reason to keep it, but I'm hesitant because I don't know why it's there.

Here's the relevant change:
#511

I guess it's to prevent error telemetry in the production pixiebrix app server being polluted by local dev errors, though I'd argue that we should be distinguishing dev errors some other way but still recording them by default.

In the interest of not blowing up the scope of this change, I guess we can leave in this check for now (maybe adding a comment in the relevant line in getDNT on why the check is made.

@mnholtz
Copy link
Collaborator Author

mnholtz commented Apr 25, 2024

though I'd argue that we should be distinguishing dev errors some other way but still recording them by default.

It already sort of is with the version added to logs (local builds have local in the version name)

end-to-end-tests/env.ts Outdated Show resolved Hide resolved
};

export const test = mergeTests(
envSetup,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This file is unchanged except for wrapping this extend in mergeTests and adding the additionalRequiredEnvVariables override below.

Comment on lines 38 to 40
// A call to `use` is required to continue the test, but the resolved value isn't used for anything in our case.
// Typescript requires that we have it match the type of expectRequiredEnvVariables.
await use(() => {});
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you can avoid this by defining the value as void for the fixture

Copy link

No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack.

Do not edit this comment manually.

@mnholtz mnholtz merged commit 6608569 into main Apr 25, 2024
19 checks passed
@mnholtz mnholtz deleted the feature/update_playwright_readme branch April 25, 2024 22:28
@twschiller twschiller added this to the 1.8.13 milestone Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants