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

Improve error handling and log output of {pre,post}_compile hooks #1667

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Oct 23, 2024

  • If the hooks fail, there is now an explicit error message (plus metrics event).
  • The build log step now references the full script location to aid with the understanding of what's happening.
  • Any output of the hooks is now indented to aid readability.
  • The hooks implementation has been refactored and moved to lib/ as part of the overall buildpack reorganisation/refactoring.
  • Test coverage has been added for the failing hooks cases (previously only the successful hooks scenario was tested).

(This is one step towards ensuring all buildpack failure cases have an explicit error message (rather than relying on the error message of the command that failed) and a metrics failure_reason.)

GUS-W-8059892.

@edmorley edmorley self-assigned this Oct 23, 2024
* If the hooks fail, there is now an explicit error message (plus metrics event).
* The build log step now references the full script location to aid.
  with understanding of what's happening.
* Any output of the hooks is now indented to aid readability.
* The hooks implementation has been refactored and moved to `lib/`
  as part of the overall buildpack reorganisation/refactoring.
* Test coverage has been added for the failing hooks cases (previously only
  the successful hooks scenario was tested).

(This is one step towards ensuring all buildpack failure cases have an explicit
error message and a metrics `failure_reason`.)

GUS-W-8059892.
@edmorley edmorley marked this pull request as ready for review October 23, 2024 17:20
@edmorley edmorley requested a review from a team as a code owner October 23, 2024 17:20
@edmorley edmorley enabled auto-merge (squash) October 23, 2024 17:20
@edmorley edmorley merged commit bf2ce13 into main Oct 24, 2024
7 checks passed
@edmorley edmorley deleted the handle-hook-errors branch October 24, 2024 08:59
@heroku-linguist heroku-linguist bot mentioned this pull request Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants