Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Fix tunnel creation for expired anonymous tunnels #1758

Merged
merged 4 commits into from
Nov 17, 2021
Merged

Conversation

gonzaloriestra
Copy link
Contributor

@gonzaloriestra gonzaloriestra commented Nov 16, 2021

WHY are these changes introduced?

Fixes #1747
Fixes #952
Fixes #1742

When starting a new tunnel (used from app serve), we were reading from the ngrok log the remaining time of the tunnel in order to re-create it when expired. And for some reason now ngrok is not returning that duration, but always 0, making the CLI to think that they are always expired. We have already asked ngrok about that.

WHAT is this pull request doing?

For anonymous tunnels, always restart them when calling start. The disadvantage is that a new URL will be generated each time (before, the URL only changed every 2h).

This is a hotfix to prevent the current problems, but the tunnel management in general should be reviewed.

How to test your changes?

shopify app tunnel start, without having a ngrok authtoken (which it's stored in ~/.ngrok2/ngrok.yml)

Update checklist

  • I've added a CHANGELOG entry for this PR (if the change is public-facing)
  • I've considered possible cross-platform impacts (Mac, Linux, Windows).
  • I've left the version number as is (we'll handle incrementing this when releasing).
  • I've included any post-release steps in the section above.

@gonzaloriestra gonzaloriestra requested review from a team, jesalerno84 and amcaplan and removed request for a team November 16, 2021 14:01
Copy link
Contributor

@pepicrft pepicrft left a comment

Choose a reason for hiding this comment

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

Solid work @gonzaloriestra 👏🏼 . I left some minor comments.

lib/shopify_cli/tunnel.rb Outdated Show resolved Hide resolved
lib/shopify_cli/tunnel.rb Show resolved Hide resolved
lib/shopify_cli/tunnel.rb Show resolved Hide resolved
lib/shopify_cli/tunnel.rb Outdated Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants