Skip to content

Support some commands offline #1237

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Support some commands offline #1237

wants to merge 2 commits into from

Conversation

lionello
Copy link
Member

@lionello lionello commented Jun 8, 2025

Description

When offline (on a plane), we should allow commands that don't require login, like defang compose config.

Linked Issues

See #1111

Checklist

  • I have performed a self-review of my code
  • I have added appropriate tests
  • I have updated the Defang CLI docs and/or README to reflect my changes, if necessary

@commit111 commit111 self-requested a review June 9, 2025 17:50
Copy link
Collaborator

@commit111 commit111 left a comment

Choose a reason for hiding this comment

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

I’ve left a comment, but feel free to decide whether you want to make any changes or not

@lionello lionello requested a review from commit111 June 23, 2025 23:13
@@ -68,6 +68,9 @@ func prettyError(err error) error {
term.Debug("Server error:", cerr)
err = errors.Unwrap(cerr)
}
if cli.IsNetworkError(err) {
return fmt.Errorf("%w; please check network settings and try again", err)
Copy link
Collaborator

@commit111 commit111 Jun 24, 2025

Choose a reason for hiding this comment

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

Right now it appears as:
Error: dial tcp: lookup fabric-prod1.defang.dev: no such host; please check network settings and try again

I'm a bit inclined to show the friendlier message unable to connect to Defang server %q; please check network settings and try again to the user instead of the raw error for simplicity, but this is just a matter of personal preference.

Otherwise, looks good to me.

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.

2 participants