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

Decaff driver (final) #7430

Merged
merged 3 commits into from
May 27, 2020
Merged

Conversation

sainthkh
Copy link
Contributor

Part of #2690

Final decaff of the driver package.

NEVER SQUASH THIS PR.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 20, 2020

Thanks for the contribution! Below are some guidelines Cypress uses when doing PR reviews.

  • Please write [WIP] in the title of your Pull Request if your PR is not ready for review - someone will review your PR as soon as the [WIP] is removed.
  • Please familiarize yourself with the PR Review Checklist and feel free to make updates on your PR based on these guidelines.

PR Review Checklist

If any of the following requirements can't be met, leave a comment in the review selecting 'Request changes', otherwise 'Approve'.

User Experience

  • The feature/bugfix is self-documenting from within the product.
  • The change provides the end user with a way to fix their problem (no dead ends).

Functionality

  • The code works and performs its intended function with the correct logic.
  • Performance has been factored in (for example, the code cleans up after itself to not cause memory leaks).
  • The code guards against edge cases and invalid input and has tests to cover it.

Maintainability

  • The code is readable (too many nested 'if's are a bad sign).
  • Names used for variables, methods, etc, clearly describe their function.
  • The code is easy to understood and there are relevant comments explaining.
  • New algorithms are documented in the code with link(s) to external docs (flowcharts, w3c, chrome, firefox).
  • There are comments containing link(s) to the addressed issue (in tests and code).

Quality

  • The change does not reimplement code.
  • There's not a module from the ecosystem that should be used instead.
  • There is no redundant or duplicate code.
  • There are no irrelevant comments left in the code.
  • Tests are testing the code’s intended functionality in the best way possible.

Internal

  • The original issue has been tagged with a release in ZenHub.

@sainthkh sainthkh marked this pull request as ready for review May 20, 2020 08:34
@sainthkh
Copy link
Contributor Author

It seems that flaky test happened.

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

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

Thanks again for doing this! We're almost there. 😄

@@ -374,6 +373,7 @@ Body: <!DOCTYPE html>
</body>
</html>


Copy link
Member

Choose a reason for hiding this comment

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

but this same error adds a newline to the snapshot snapshot due to an update in error_messages, shouldn't be double newlines here I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This problem needs a research.

When I reverted the change and run the tests on my local Ubuntu, it works. But when I pushed it, it fails.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I still don't know why it happened. But the fix was easy.

@@ -246,7 +246,6 @@ Headers: {
}
Body: Service Unavailable


Copy link
Member

Choose a reason for hiding this comment

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

This appears to be remove a newline from the error message due to an update in error_messages.

docsUrl: 'https://on.cypress.io/request',
}
},
status_invalid (obj) {
Copy link
Member

Choose a reason for hiding this comment

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

There's something about the cyStripIndent function that's not the same as previous spacing. Something about it changes the error message in the snapshotted values.

packages/driver/src/cypress/error_messages.js Show resolved Hide resolved
@sainthkh sainthkh marked this pull request as draft May 25, 2020 09:00
@sainthkh sainthkh marked this pull request as ready for review May 25, 2020 10:07
@jennifer-shehane jennifer-shehane self-requested a review May 26, 2020 08:56
@sainthkh
Copy link
Contributor Author

Another flaky failure.

@jennifer-shehane
Copy link
Member

jennifer-shehane commented May 26, 2020

I think we may need to look closer at these failures. They are failing within some tests that were decaffeinated, although I don't understand why that would affect anything. But, I've rerun these a lot and they keep failing.

I haven't seen this specific error in other PRs.

Screen Shot 2020-05-26 at 8 05 40 PM

@sainthkh
Copy link
Contributor Author

sainthkh commented May 27, 2020

  • Fixed conflicts and rebased. Interestingly, socket fail didn't happen!
  • I ran all tests locally with Firefox. But there was no problem.

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

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

Perfect! If this is all the coffeescript out, I'm not sure if we had any code around transpiling that could be removed, but this could be removed now if so.

@jennifer-shehane jennifer-shehane merged commit 891c759 into cypress-io:develop May 27, 2020
@sainthkh
Copy link
Contributor Author

@jennifer-shehane Unfortunately, there are a lot of coffeescript codes in packages/server. We can remove coffeescript-related tools after they're converted.

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

2 participants