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

refactor: migrate run commands to use oclif/core v2 #2880

Merged
merged 6 commits into from
May 14, 2024

Conversation

k80bowman
Copy link
Contributor

@k80bowman k80bowman commented May 13, 2024

Work item

This command migrates the run commands (run, run:detached, and run:inside) to oclif/core v2 (they were previously using v1) and deletes the run-v5 package.

Notes

Migrating these commands to oclif/core v2 means that users will need to add additional flags that they wish to run inside their dynos after a double dash (--). So, for example, where a user could have previously run the command heroku run bash --norc -a APP_NAME, they will now need to run heroku run bash -a APP_NAME -- --norc with the additional commands both at the end of the command and after a double dash.

There was also a report that when this update was made previously a user was having the order of their additional commands reversed. This was apparently fixed by downgrading the command to use oclif/core v1. I was unable to reproduce this error in the oclif/core v2 version, but it is an issue that may come up.

Testing

  • Prep
    • Checkout this branch and run yarn and yarn build
    • Find/create an app with at least one dyno. In order to test run:inside you'll need to use an app that exists inside a private space.
  • run
    • ./bin/run run bash --norc -a APP_NAME
      • You should get a message that says "Error: Nonexistent flag: --norc"
    • ./bin/run run bash -a APP_NAME -- --norc
      • Should open up a bash terminal.
    • ./bin/run run bash -a APP_NAME -- --norc --verbose
      • Should get a message that says "Running bash --norc --verbose on..." with the additional flags in the correct order
      • Should open a bash terminal
  • run:detached
    • ./bin/run run:detached ls -a APP_NAME
    • You should get a message that ls is running on your app with a logs command to view the output
  • run:inside
    • This feature only works inside of a private space for now. I created an app using the node-js-getting-started project in my own test space. I then had to use sudo to enable dyno-run-inside.
    • ./bin/run run:inside -a APP_NAME web.1 bash
      • A bash prompt should open in your terminal.

@k80bowman k80bowman marked this pull request as ready for review May 14, 2024 13:52
@k80bowman k80bowman requested a review from a team as a code owner May 14, 2024 13:52
Copy link
Contributor

@justinwilaby justinwilaby left a comment

Choose a reason for hiding this comment

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

LGTM! Instructions are great and everything worked as described!

@k80bowman k80bowman merged commit 2074b60 into prerelease/9.0.0-alpha May 14, 2024
7 checks passed
@k80bowman k80bowman deleted the k80/run-core-v2 branch May 14, 2024 14:25
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

Successfully merging this pull request may close these issues.

None yet

2 participants