sandstorm / synco

Synco - an Database and File Dump Downloader for synchronizing production, staging, and local development. Batteries included, but removable.
https://sandstorm.github.io/synco
MIT License
26 stars 2 forks source link

UX improvement: Better example for base URL in wizard #12

Closed kdambekalns closed 2 years ago

kdambekalns commented 2 years ago

The example

Please specify the base URL of the production server (f.e. github.com).

should be

Please specify the base URL of the production server (f.e. https://github.com).

For me giving a base without the protocol failed, since the server does a redirect (that seems not to be followd by synco).

$ synco receive ts-xxxxxxx xxxxxxxxxxxxx-yyyyyyyyyyyyyyy
 INFO  Please specify the base URL of the production server (f.e. github.com).
Base URL: www.acme.com
 WARNING  We could not find the file www.acme.com/ts-xxxxxxx/meta.json.enc. Please supply a new base URL.

Base URL: https://www.acme.com
 SUCCESS  Found correct base URL at https://www.acme.com.
skurfuerst commented 2 years ago

@kdambekalns hey,

could you please run synco again with "--debug" on the client side and post the logs here? There is functionality included which should automatically try with and without https:// and http:// etc prefixes - see here https://github.com/sandstorm/synco/blob/main/pkg/receive/cmd/receive-cmd.go#L140-L160

Seems this does not work properly - so I'd love to fix this for your particular case :)

We currently do not follow redirects, in order to find the best-matching URL: https://github.com/sandstorm/synco/blob/17f6ac439f11db1d7be260513f83fa09d24933c5/pkg/receive/receive-session.go#L50-L53 But maybe this should be changed...

All the best, Sebastian

kdambekalns commented 2 years ago

Did the exact same steps again, using --debug and without it to make sure, and now it just worked. 🤔🤷‍♂️

skurfuerst commented 2 years ago

weirdo. OK. If it happens again, please re-open :)