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: Reduce dependencies and binary size, add circle ci detector #26522

Merged
merged 7 commits into from
Apr 17, 2023

Conversation

mjhenkes
Copy link
Member

  • Closes

Additional details

This cleans up our open telemetry dependencies (which i should have done before the last pr) it also reduces the size of the open telemetry modules included in the binary from 9.7 mb to 2.4 mb

Steps to test

How has the user experience changed?

n/a

PR Tasks

@@ -493,7 +493,6 @@ commands:
# internal PR
CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY \
CYPRESS_INTERNAL_ENABLE_TELEMETRY="true" \
OTEL_RESOURCE_ATTRIBUTES="ci.branch=$CIRCLE_BRANCH,ci.job=$CIRCLE_JOB,ci.node-index=$CIRCLE_NODE_INDEX,ci.circle=$CIRCLECI,ci.build-url=$CIRCLE_BUILD_URL,ci.build-number=$CIRCLE_BUILD_NUM" \
Copy link
Member Author

Choose a reason for hiding this comment

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

the circle ci detector replaces the need for this line

@@ -16,13 +16,14 @@
},
"dependencies": {
"@opentelemetry/api": "1.4.1",
"@opentelemetry/auto-instrumentations-node": "0.36.4",
Copy link
Member Author

Choose a reason for hiding this comment

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

specifically we don't need this dep

@@ -16,13 +16,14 @@
},
"dependencies": {
"@opentelemetry/api": "1.4.1",
"@opentelemetry/auto-instrumentations-node": "0.36.4",
"@opentelemetry/exporter-trace-otlp-http": "0.36.1",
"@opentelemetry/instrumentation": "0.36.1",
Copy link
Member Author

Choose a reason for hiding this comment

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

or this one

Comment on lines +204 to +205
path.join(buildAppDir, '**', '@openTelemetry', '**', 'esm'),
path.join(buildAppDir, '**', '@openTelemetry', '**', 'esnext'),
Copy link
Member Author

Choose a reason for hiding this comment

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

these lines remove the esm and esnext folders from open telemetry, we don't use them.


afterEach(() => {
// Replace values
process.env.CIRCLECI = processValues.CIRCLECI
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this condition need to be reversed so we delete the circle process variables so they don't leak out to other tests in the process?

Copy link
Member Author

Choose a reason for hiding this comment

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

this is the reversing, we cache the values, delete them, then reset them to the cache

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah that makes a lot of sense now 😅

Co-authored-by: Bill Glesias <bglesias@gmail.com>
@cypress
Copy link

cypress bot commented Apr 17, 2023

28 flaky tests on run #45595 ↗︎

0 27260 1307 0 Flakiness 28

Details:

Apply suggestions from code review
Project: cypress Commit: 5d2688828e
Status: Passed Duration: 20:26 💡
Started: Apr 17, 2023 7:34 PM Ended: Apr 17, 2023 7:55 PM
Flakiness  commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-firefox

View Output Video

Test Artifacts
network stubbing > intercepting request > can delay and throttle a StaticResponse Output
Flakiness  e2e/origin/commands/assertions.cy.ts • 1 flaky test • 5x-driver-firefox

View Output Video

Test Artifacts
cy.origin assertions > #consoleProps > .should() and .and() Output
Flakiness  cypress/cypress.cy.js • 3 flaky tests • 5x-driver-firefox

View Output Video

Test Artifacts
... > correctly returns currentRetry Output
... > correctly returns currentRetry Output
... > correctly returns currentRetry Output
Flakiness  e2e/origin/navigation.cy.ts • 1 flaky test • 5x-driver-electron

View Output Video

Test Artifacts
... > establishes foobar spec bridge Output Video
Flakiness  cypress/cypress.cy.js • 3 flaky tests • 5x-driver-electron

View Output Video

Test Artifacts
... > correctly returns currentRetry Output Video
... > correctly returns currentRetry Output Video
... > correctly returns currentRetry Output Video

The first 5 flaky specs are shown, see all 16 specs in Cypress Cloud.

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@mjhenkes mjhenkes merged commit 2a8d078 into develop Apr 17, 2023
@mjhenkes mjhenkes deleted the matth/chore/add-circle-ci-detector branch April 17, 2023 20:44
astone123 pushed a commit to kgroat/cypress that referenced this pull request Apr 19, 2023
…ypress-io#26522)

* chore: add circle ci detector

* update deps

* adjust deps and cleanup binary?

* Add Tests

* fix tests, keep artifact

* Apply suggestions from code review

Co-authored-by: Bill Glesias <bglesias@gmail.com>

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
tgriesser added a commit that referenced this pull request Apr 25, 2023
* feat/protocol: (45 commits)
  chore: adding support for url:changed (#26519)
  chore: adding viewport:changed to protocol (#26508)
  chore: Reduce dependencies and binary size, add circle ci detector (#26522)
  chore: 12.10.0 release (#26517)
  test: fix flaky tests (#26505)
  chore: Check project dependencies for CT compatibility (#26497)
  chore: update vm2 to 3.9.16 (#26489)
  chore: enable builds on feat/protocol branch (#26506)
  chore: [skip ci] update to labels looked at by stalebot (#26496)
  chore: connecting to electron browser (#26471)
  chore: [skip ci] turning on stale bot (#26488)
  chore: fix issue with logs without wallClockUpdatedAt (#26473)
  Update triage_add_to_project.yml
  chore: Update Chrome (stable) to 112.0.5615.49 and Chrome (beta) to 113.0.5672.24 (#26434)
  feat: display framework definition errors (#26183)
  fix: correctly resolve dependencies for CT onboarding when using Yarn Plug n Play (#26452)
  fix: Subscribe to framework detection changes in wizard (#26437)
  fix: make clicks on type('{enter}') composed (#26395)
  chore: update add-to-project workflow (#26439)
  chore: Pass telemetry resources from the node process to the browser (#26468)
  ...
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.

None yet

3 participants