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

Set API timeout from ENV when credentials are specified in ENV #625

Conversation

kobajagi
Copy link
Contributor

@kobajagi kobajagi commented Aug 2, 2024

Description

Fixes bug with EXOSCALE_API_TIMEOUT being ignored when credentials are specified in ENV.

Checklist

(For exoscale contributors)

  • Changelog updated (under Unreleased block)
  • Testing

Testing

Before change:

$ EXOSCALE_API_KEY=xxx EXOSCALE_API_SECRET=xxx EXOSCALE_API_TIMEOUT=1 exo c i snapshot create myinstance -z ch-gva-2
 ✔ Creating snapshot of instance "myinstance"... 3m18s
┼───────────────┼────────────────────────────────────────┼
│   SNAPSHOT    │                                        │
┼───────────────┼────────────────────────────────────────┼
│ ID            │ b41413b9-58bc-4ccf-a498-7391bb603b91   │
│ Name          │ myinstance_ROOT-7380078_20240805161855 │
│ Creation Date │ 2024-08-05 16:18:55 +0000 UTC          │
│ State         │ exported                               │
│ Size (GB)     │ 50                                     │
│ Instance      │ myinstance                             │
│ Zone          │ ch-gva-2                               │
┼───────────────┼────────────────────────────────────────┼

After change:

$ EXOSCALE_API_KEY=xxx EXOSCALE_API_SECRET=xxx EXOSCALE_API_TIMEOUT=1 go run . c i snapshot create myinstance -z ch-gva-2
 ✔ Creating snapshot of instance "myinstance"... 1m0s
error: request timeout reached. Snapshot creation is not canceled and might still be running, check the status with: exo c i snapshot list
exit status 1

@elkezza elkezza self-requested a review August 8, 2024 08:33
@kobajagi kobajagi merged commit 5aa82b6 into master Aug 8, 2024
1 check passed
@kobajagi kobajagi deleted the predrag/sc-102451/exoscale-api-timeout-ignored-when-credentials branch August 8, 2024 08:37
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.

3 participants