FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add flag for toggling permessage-deflate by code-asher · Pull Request #3286 · coder/code-server · GitHub

Add flag for toggling permessage-deflate - #3286

Merged
code-asher merged 5 commits into
coder:mainfrom
code-asher:permessage-deflate
May 5, 2021
Merged

Add flag for toggling permessage-deflate#3286
code-asher merged 5 commits into
coder:mainfrom
code-asher:permessage-deflate

Conversation

code-asher commented May 4, 2021
edited
Loading

Copy link
Copy Markdown
Member

This is a workaround for #3014 until we figure it out (if it is indeed related which it might not be; the zlib errors could merely be side effects of a connection issue).

codecov Bot commented May 4, 2021
edited
Loading

Copy link
Copy Markdown

Codecov Report

Merging #3286 (9afefcb) into main (75e9e24) will increase coverage by 2.76%.
The diff coverage is 37.23%.

❗ Current head 9afefcb differs from pull request most recent head a882be5. Consider uploading reports for the commit a882be5 to get more accurate results

@@            Coverage Diff             @@
##             main    #3286      +/-   ##
==========================================
+ Coverage   54.78%   57.54%   +2.76%     
==========================================
  Files          23       24       +1     
  Lines        1265     1279      +14     
  Branches      286      290       +4     
==========================================
+ Hits          693      736      +43     
+ Misses        460      441      -19     
+ Partials      112      102      -10     
Impacted Files Coverage Δ
src/node/entry.ts 0.00% <0.00%> (ø)
src/node/main.ts 36.78% <36.78%> (ø)
src/node/cli.ts 77.87% <100.00%> (+0.18%) ⬆️
src/node/constants.ts 100.00% <100.00%> (ø)
src/node/util.ts 48.97% <0.00%> (+2.04%) ⬆️
src/node/coder_cloud.ts 28.57% <0.00%> (+28.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 75e9e24...a882be5. Read the comment docs.

code-asher marked this pull request as ready for review May 4, 2021 21:57
code-asher requested a review from a team as a code owner May 4, 2021 21:57

jsjoeio commented May 4, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

increase coverage by 0.12%

👏 You + Codecov helping us build a habit of increasing code coverage!

jsjoeio added the enhancement Some improvement that isn't a feature label May 4, 2021
jsjoeio added this to the v3.9.4 milestone May 4, 2021

jsjoeio left a comment
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Overall, great work! 🎉 Just a couple nits about functions being pure

Comment thread src/node/cli.ts Outdated
Comment thread src/node/feature.ts Outdated
code-asher force-pushed the permessage-deflate branch from 2889725 to 6ff495e Compare May 5, 2021 15:33
code-asher marked this pull request as draft May 5, 2021 15:40
code-asher force-pushed the permessage-deflate branch 3 times, most recently from 1da4d67 to fd4b784 Compare May 5, 2021 16:57
code-asher added 4 commits May 5, 2021 12:24
This is so they can be unit tested.
All it does is log and exit which is what the caller will be doing on an
error anyway (see entry).
code-asher force-pushed the permessage-deflate branch from e06725d to a882be5 Compare May 5, 2021 17:24

Copy link
Copy Markdown
Member Author

Refactored; it's not any more pure but it's simpler. I think we could have an interesting discussion on whether we should pass args (and other variables) around instead of using a global access pattern at some point.

Coverage went down because of the code added in entry so I split some of those functions out in order to test them. One of them is now used for all the integration tests so those should reflect reality more closely now.

code-asher marked this pull request as ready for review May 5, 2021 17:43
code-asher requested a review from jsjoeio May 5, 2021 17:43

jsjoeio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Great work 👏

Comment thread test/unit/health.test.ts

it("/healthz", async () => {
;[, , codeServer] = await integration.setup(["--auth=none"], "")
codeServer = await integration.setup(["--auth=none"], "")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

this looks way cleaner/easier to read 👏

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

👍 yea, the code before was 🤨 kinda inscrutable, but then again, I'm not a JavaScript/TypeScript person

jsjoeio commented May 5, 2021

Copy link
Copy Markdown
Contributor

I think we could have an interesting discussion on whether we should pass args (and other variables) around instead of using a global access pattern at some point

Agreed! I prefer passing args because it's easier to mock/test things. But global access does come in handy when writing code. It would be a good discussion though.

jsjoeio commented May 5, 2021

Copy link
Copy Markdown
Contributor

I'm going to fix the trivy scan in a PR soon so you can ignore for now

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Some improvement that isn't a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL