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

http: remove useless ternary in test #48481

Merged

Conversation

LockingReal
Copy link
Contributor

The value of check depends on whether the value of headers [': method'] is equal to "GET". The first statement uses the Ternary operation to achieve this. My change uses a simple comparison expression.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Jun 17, 2023
@LockingReal
Copy link
Contributor Author

@JakobJingleheimer I saw that you have been performing a codereview operation recently. Can you help me check it ~ 😉

Copy link
Contributor

@JakobJingleheimer JakobJingleheimer left a comment

Choose a reason for hiding this comment

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

Nice simplification 🙌

@JakobJingleheimer
Copy link
Contributor

Note that your commit summary does not follow the required pattern. I think it should be http: remove useless ternary in test (or perhaps test: remove…). I'm not clear on the use of test: now that it's also a core module (previously it was used for changes solely affecting nodes own tests).

@LockingReal LockingReal changed the title fix(test): remove useless ternary operator test: remove useless ternary operator Jun 17, 2023
@LockingReal
Copy link
Contributor Author

Note that your commit summary does not follow the required pattern. I think it should be http: remove useless ternary in test (or perhaps test: remove…). I'm not clear on the use of test: now that it's also a core module (previously it was used for changes solely affecting nodes own tests).

I have corrected it, thank you for your guidance ❤️

@LockingReal LockingReal changed the title test: remove useless ternary operator test:remove useless ternary operator Jun 17, 2023
@LockingReal LockingReal changed the title test:remove useless ternary operator http: remove useless ternary in test Jun 17, 2023
@JakobJingleheimer
Copy link
Contributor

JakobJingleheimer commented Jun 17, 2023

It looks like you changed the PR title but not the commit message. The PR summary can be whatever you want, but the first commit is what CI checks (and prevents landing when invalid).

You'll need to run

git commit --amend -m "http: remove useless ternary in test"
git push --force

PS your change to the PR summary is missing a space character between the colon and the next word (test:remove …), which would fail the pattern check (so don't copy+paste your PR title—you don't need to correct the PR title, but you can if you want).

PPS A forced push will invalidate my approval; I'll re-approve after you push ;) I think it will send me a notification; if you do it in the next ~½ hour, I'm around. If I haven't re-approved in like 20 mins, feel free to re-request a review from me.

@LockingReal LockingReal force-pushed the fix-test-useless-ternaryoperator branch from c80dcf5 to ac5433e Compare June 17, 2023 15:52
@LockingReal
Copy link
Contributor Author

LockingReal commented Jun 17, 2023

It looks like you changed the PR title but not the commit message. The PR summary can be whatever you want, but the first commit is what CI checks (and prevents landing when invalid).

You'll need to run

git commit --amend -m "http: remove useless ternary in test"
git push --force

PS your change to the PR summary is missing a space character between the colon and the next word (test:remove …), which would fail the pattern check (so don't copy+paste your PR title—you don't need to correct the PR title, but you can if you want).

Thank you very much. I have learned a lot, and my foundation still needs to be strengthened 😢

@JakobJingleheimer
Copy link
Contributor

JakobJingleheimer commented Jun 17, 2023

Everyone starts somewhere 🙌

And thanks for the contribution!

@LockingReal LockingReal force-pushed the fix-test-useless-ternaryoperator branch from ac5433e to 260da3f Compare June 17, 2023 15:59
@LockingReal LockingReal requested a review from mscdex June 17, 2023 19:02
@LockingReal
Copy link
Contributor Author

@mscdex Here~~,Can you give me an approval 😉

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Jun 18, 2023
@JakobJingleheimer JakobJingleheimer added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Jun 20, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 20, 2023
@nodejs-github-bot
Copy link
Collaborator

@targos
Copy link
Member

targos commented Jun 21, 2023

Rebasing shouldn't be necessary. If you start a new CI run, Jenkins will rebase by default:
CleanShot 2023-06-21 at 10 19 16

@JakobJingleheimer JakobJingleheimer added request-ci Add this label to start a Jenkins CI on a PR. and removed needs-ci PRs that need a full CI run. commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Jun 21, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 21, 2023
@nodejs-github-bot
Copy link
Collaborator

@LockingReal LockingReal force-pushed the fix-test-useless-ternaryoperator branch from 260da3f to c2bcd0d Compare June 21, 2023 18:04
@JakobJingleheimer JakobJingleheimer added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 21, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 21, 2023
@nodejs-github-bot
Copy link
Collaborator

@LockingReal
Copy link
Contributor Author

I performed a rebase operation ~ 😉❤️

@JakobJingleheimer
Copy link
Contributor

I think you missed Michaël's comment that it's actually unnecessary (my mistake—I'm usually supplying the PRs, not landing them 😅). I restarted the landing process though 🙂

@LockingReal
Copy link
Contributor Author

LockingReal commented Jun 22, 2023

Commit Queue failed
🤔🤔,I have read some error logs and it doesn't feel like they were caused by changes 😕

again 😢 ... error msg like【tap2junit: error: argument --input/-i: can't open 'cctest.tap': [Errno 2] No such file or directory: 'cctest.tap'】,Should this be a problem with ci itself ?Can we skip them😢

@nodejs-github-bot
Copy link
Collaborator

@JakobJingleheimer
Copy link
Contributor

Commit Queue failed
🤔🤔,I have read some error logs and it doesn't feel like they were caused by changes 😕

again 😢 ... error msg like【tap2junit: error: argument --input/-i: can't open 'cctest.tap': [Errno 2] No such file or directory: 'cctest.tap'】,Should this be a problem with ci itself ?Can we skip them😢

Did this same error occur multiple runs?

It's very common to have to run CI half a dozen or more times to get a passing suite (we track this, and it's gotten better, but the ones that remain have proven difficult to squash). I checked another PR also currently going through CI, and I did not see this error there. We can't selectively skip tests, however unrelated the failures are :(

I resumed the failing tests, so 🤞

@JakobJingleheimer JakobJingleheimer added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 22, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 22, 2023
@nodejs-github-bot nodejs-github-bot merged commit 0d1dfe1 into nodejs:main Jun 22, 2023
55 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 0d1dfe1

RafaelGSS pushed a commit that referenced this pull request Jul 3, 2023
PR-URL: #48481
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
@RafaelGSS RafaelGSS mentioned this pull request Jul 3, 2023
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
PR-URL: nodejs#48481
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
PR-URL: nodejs#48481
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
ruyadorno pushed a commit that referenced this pull request Sep 10, 2023
PR-URL: #48481
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
@ruyadorno ruyadorno mentioned this pull request Sep 10, 2023
ruyadorno pushed a commit that referenced this pull request Sep 13, 2023
PR-URL: #48481
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet