Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Ngcc better lockfile patch #35934

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

Conversation

petebacondarwin
Copy link
Contributor

This is a patch version of #35861

It does not include any AsyncLocker functionality but otherwise is the same.

Probably still needs a review though.

@petebacondarwin petebacondarwin added type: bug/fix action: review The PR is still awaiting reviews from at least one requested reviewer PR target: patch-only labels Mar 7, 2020
@ngbot ngbot bot modified the milestone: needsTriage Mar 7, 2020
Copy link
Member

@JoostK JoostK left a comment

Choose a reason for hiding this comment

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

I just scanned through most of this, given that it has already landed in master, but I do have one comment though. Also, the commit message of separate `SyncLocker` and `LockFile` refers to "Apart from avoiding the awkward base" but it doesn't look like that was the case in the patch branch.

@petebacondarwin petebacondarwin force-pushed the ngcc-better-lockfile-patch branch from 05fa819 to b25e7d2 Compare March 8, 2020 14:39
@petebacondarwin petebacondarwin requested a review from JoostK March 8, 2020 14:40
@petebacondarwin
Copy link
Contributor Author

@JoostK PTAL

The previous implementation mixed up the management
of locking a piece of code with the management of writing
and removing the lockFile that is used as the flag for
which process has locked the code.

This change splits these two concepts up, allowing the `LockFile`
implementation to be replaced cleanly.
This version of `LockFile` creates an "unlocker" child-process that monitors
the main ngcc process and deletes the lock file if it exits unexpectedly.

This resolves the issue where the main process could not be killed by pressing
Ctrl-C at the terminal.

Fixes angular#35761
@petebacondarwin petebacondarwin force-pushed the ngcc-better-lockfile-patch branch from b25e7d2 to fd231b9 Compare March 8, 2020 15:22
@petebacondarwin petebacondarwin requested a review from JoostK March 8, 2020 15:25
@petebacondarwin petebacondarwin added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 9, 2020
@ngbot
Copy link

ngbot bot commented Mar 9, 2020

I see that you just added the PR action: merge label, but the following checks are still failing:
    failure status "ci/angular: size" is failing

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@petebacondarwin petebacondarwin added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Mar 10, 2020
@petebacondarwin
Copy link
Contributor Author

Merge-assistance: I am told by the dev-infra team that the ci/angular: size failure is not valid: as can be seen by the fact that the size increase is the same as the entire file, which indicates that the expected file-size is 0 bytes!

Copy link
Contributor

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

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

lgtm - the CI failure is invalid, we should proceed with the merge and fix the infra separately.

AndrewKushnir pushed a commit that referenced this pull request Mar 11, 2020
The previous implementation mixed up the management
of locking a piece of code with the management of writing
and removing the lockFile that is used as the flag for
which process has locked the code.

This change splits these two concepts up, allowing the `LockFile`
implementation to be replaced cleanly.

PR Close #35934
AndrewKushnir pushed a commit that referenced this pull request Mar 11, 2020
…35934)

This version of `LockFile` creates an "unlocker" child-process that monitors
the main ngcc process and deletes the lock file if it exits unexpectedly.

This resolves the issue where the main process could not be killed by pressing
Ctrl-C at the terminal.

Fixes #35761

PR Close #35934
@AndrewKushnir
Copy link
Contributor

This PR is now merged into 9.0.x branch.

@petebacondarwin petebacondarwin deleted the ngcc-better-lockfile-patch branch March 12, 2020 09:08
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note type: bug/fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants