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

Standardize command execution and display #762

Open
5 tasks
schneems opened this issue Dec 12, 2024 · 0 comments
Open
5 tasks

Standardize command execution and display #762

schneems opened this issue Dec 12, 2024 · 0 comments

Comments

@schneems
Copy link
Contributor

schneems commented Dec 12, 2024

In #745 I started to critique the command execution, which isn't the primary intent of that PR. I'm pulling out the comments to save for future work.

The goals are to:

  • Ensure all errors stemming from running commands contain maximum information available to assist with debugging. This should help both buildpack users and maintainers.
  • Reduce/remove debugging errors stemming from a difference in what is displayed versus what was executed.

Command execution checklist

Here's a checklist of requirements for running commands:

  • An exact representation of the command being run should appear in logs, or the error, or both
  • Make non-zero status an error
  • If a command representation is output to the logs, changes to the command should be visible in the output (the display and command being run should come from a single point of truth).
  • Stdout and Stderr from the command should appear in logs, or the error, but NOT both (if it runs).
  • Stream output or print a progress indicator for commands that may take awhile or that access the network

You don't HAVE to use it but...you get a lot of these more-or-less out of the box when using fun_run. The current state of command execution leaves a lot of subtle gotchas. The goal in making these shared libs is so that we learn from our own experiences, translate that into tooling to make the most common cases easier, and push those best practices out to the community through that tooling.

Prior comments

Here are prior comments extracted from a previous review, it's more or less a re-hash of the checklist from above but commented on specific command invocations:

Requested

  • Go through all places where commands are being invoked
  • Fill out the checklist for each
  • Modify the implementation until all items are complete
  • Open a PR focused on command execution and display

Optional:

  • Suggest changes to the checklist: Additions, modifications, etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant