Skip to content

Conversation

@mscdex
Copy link
Contributor

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)
  • build
Description of change

This change to the release process helps find conflict markers in files so that they don't make it into a release.

@mscdexmscdex added the build Issues and PRs related to build files or the CI. label Jul 8, 2016
@mscdexmscdexforce-pushed the build-conflict-marker-check branch from 0f4008d to 259d54cCompareJuly 8, 2016 23:29
@mscdex
Copy link
ContributorAuthor

/cc @nodejs/release

@evanlucas
Copy link
Contributor

should this also include an update to doc/releases.md?

@mscdex
Copy link
ContributorAuthor

mscdex commented Jul 8, 2016

@evanlucas Not that I'm aware of? I mean, it wouldn't hurt, but this automatic check should work too.

Makefile Outdated
Copy link
Member

Choose a reason for hiding this comment

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

I'd also check for ^<<<<<<< (but not ^======= because that's going to match a gazillion section markers in documentation.)

Copy link
ContributorAuthor

@mscdexmscdexJul 9, 2016

Choose a reason for hiding this comment

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

Why both? Wouldn't the current regexp match all instances anyway?

Copy link
Member

@bnoordhuisbnoordhuisJul 9, 2016

Choose a reason for hiding this comment

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

Would it? I'm thinking of situations where someone removes some of the conflict markers after manual resolution but not everything.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

If that's the case, it's possible they could leave the ======= behind too and we wouldn't have an easy way of checking for that.

Copy link
Member

Choose a reason for hiding this comment

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

Right. We'd need three checks if we wanted to be really thorough but the third one isn't practical. It's not perfect but two checks is still better than one.

@Fishrock123
Copy link
Contributor

Should this be run as a git pre-commit check?

@Fishrock123
Copy link
Contributor

(Or on the regular CI?)

@mscdex
Copy link
ContributorAuthor

@Fishrock123 I dunno, I just decided to put it on pre-release since it may take some time to scan all the files and someone leaving conflict markers does not happen often. shrug

@cjihrig
Copy link
Contributor

I think making this part of the CI would be good. I don't think it should hold up a release, or be on the release manager to resolve while trying to get a release out the door. If it might take a while to execute, would it be possible to include the check in the CI lint job, and not make it run on local machines?

@mscdexmscdexforce-pushed the build-conflict-marker-check branch from 259d54c to 3d681ddCompareJuly 9, 2016 20:48
@mscdex
Copy link
ContributorAuthor

@cjihrig You could probably say the same thing about holding up a release because "REPLACEME" was found in API docs (which is currently the case). I don't really have a strong opinion about when it happens, so long as we can ensure it gets caught early enough without noticeably impacting normal operations.

I've moved it to the lint-ci target now.

@mscdexmscdexforce-pushed the build-conflict-marker-check branch from 3d681dd to bc3708dCompareJuly 12, 2016 02:09
@mscdex
Copy link
ContributorAuthor

@bnoordhuis Added a check for the beginning marker

@mscdexmscdexforce-pushed the build-conflict-marker-check branch from bc3708d to 8655b94CompareJuly 12, 2016 02:10
@rvagg
Copy link
Member

@mscdexmscdexforce-pushed the build-conflict-marker-check branch from 8655b94 to 52e5594CompareJuly 12, 2016 06:22
@mscdex
Copy link
ContributorAuthor

I tweaked the grep args, apparently (Free)BSD does not support the Perl regexps option, but the Extended regexps option works just as well.

CI again: https://ci.nodejs.org/job/node-test-pull-request/3262/
Example conflict marker detection currently on v6.x: https://ci.nodejs.org/job/node-test-linter/3269/console

Makefile Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Can't this be simplified to if ! ( grep -EIqrs ... ) && ! ( find . -maxdepth 1 ... ); then? You could swap the clauses, replace && with || and drop the negation to shorten it even more.

You probably don't need to redirect stdio either if you are suppressing errors with -s.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Changed.

@Fishrock123
Copy link
Contributor

lgtm as a first step

@mscdexmscdexforce-pushed the build-conflict-marker-check branch from 52e5594 to be0062fCompareJuly 12, 2016 14:40
@mscdex
Copy link
ContributorAuthor

CI again after changes to conditional: https://ci.nodejs.org/job/node-test-pull-request/3268/
Example conflict marker detection currently on v6.x: https://ci.nodejs.org/job/node-test-linter/3278/console

@bnoordhuis
Copy link
Member

LGTM

PR-URL: nodejs#7625 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
@mscdexmscdexforce-pushed the build-conflict-marker-check branch from be0062f to 68b966bCompareJuly 20, 2016 23:07
@mscdex
Copy link
ContributorAuthor

One last CI before merging: https://ci.nodejs.org/job/node-test-pull-request/3357/

@mscdexmscdex merged commit 68b966b into nodejs:masterJul 20, 2016
@mscdexmscdex deleted the build-conflict-marker-check branch July 20, 2016 23:44
evanlucas pushed a commit that referenced this pull request Jul 21, 2016
PR-URL: #7625 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
@evanlucasevanlucas mentioned this pull request Jul 21, 2016
@MylesBorins
Copy link
Contributor

@mscdex should we backport to v4.x?

MylesBorins pushed a commit that referenced this pull request Oct 10, 2016
PR-URL: #7625 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
@MylesBorins
Copy link
Contributor

MylesBorins commented Oct 10, 2016

just finished backporting... the job found some markers that shouldn't have been there and has already saved v4.x from some pain

<3 @mscdex

MylesBorins pushed a commit that referenced this pull request Oct 10, 2016
PR-URL: #7625 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
rvagg pushed a commit that referenced this pull request Oct 18, 2016
PR-URL: #7625 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
MylesBorins pushed a commit that referenced this pull request Oct 26, 2016
PR-URL: #7625 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Oct 26, 2016
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

buildIssues and PRs related to build files or the CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@mscdex@evanlucas@Fishrock123@cjihrig@rvagg@bnoordhuis@MylesBorins