-
Notifications
You must be signed in to change notification settings - Fork 8
Terminate git pull on error #565
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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #565 +/- ##
==========================================
- Coverage 25.85% 25.80% -0.06%
==========================================
Files 19 19
Lines 2738 2744 +6
==========================================
Hits 708 708
- Misses 2030 2036 +6 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Should also fix #342 if the pull is done using the terminateOnError argument |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ultimately these are two distinct issues.
The terminate from #545 is a reference to $System.Process.Terminate, as used here (for example): https://github.com/intersystems/ipm/blob/master/src/%25ZPM/PackageManager.cls#L432 - this is for use from CI/CD scripts/pipelines/etc.
We don't want to use this in a CSP context, ever. Terminating the process with an OS-level error is too heavy-handed. From other contexts, there is a possible improvement to error reporting/logging, but it's possible that other changes over the summer have made the original requirement/issue moot. Try testing out with a bad SSH key on an SSH remote and see what pull does now.
Pravin tested and closed #342 because it no longer applies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last thing - can you explicitly test that terminateOnError has the desired effect if an error occurs in the pull event handler? e.g., something fails to compile
@isc-etamarch I can answer this through code inspection: We should have it return an error code in this case. Note, this is a higher risk change and we'll need to ensure other callers do the right thing. Alternatively we could do something hacky with a % variable we intentionally leak. |
SourceControl.Git.Utils:Pull checks the output of errStream for error / fatal. Should we also check for an ERROR, and would that grab the issue? |
Yes, that would do it... as long as you're running in English. |
@isc-etamarch on this: just check for ERROR and call it a day. |
fixes #545