Skip to content

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

Merged
edmorley merged 1 commit intomainfrom
handle-hook-errors
Oct 24, 2024
Merged

Improve error handling and log output of {pre,post}_compile hooks#1667
edmorley merged 1 commit intomainfrom
handle-hook-errors

Conversation

@edmorley
Copy link
Copy Markdown
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
@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