Commit 91f0b91
authored
Retry WolframScript activation (#677)
## Changes
* Try WolframScript activation up to 3 times before failing.
## Comments
* WolframScript activation [keeps
failing](https://app.circleci.com/pipelines/github/maxitg/SetReplace/2125/workflows/a937820e-d49c-4bfe-b3fe-21fe60fb4aec/jobs/5523)
intermittently because it "could not connect to
https://www.wolframcloud.com/". We cannot avoid doing it, however, we
can decrease the probability of failure by retrying a few times.
## Examples
* Passing wrong `WOLFRAM_ID` and `WOLFRAM_PASSWORD`:
```console
$ export WOLFRAM_ID="test@test.test"
$ export WOLFRAM_PASSWORD="123"
$ ./scripts/activateWolframScript.sh
Attempt 1...
Incorrect username or password
Activation failed on attempt 1. Retrying...
Attempt 2...
Incorrect username or password
Activation failed on attempt 2. Retrying...
Attempt 3...
Incorrect username or password
Activation failed on attempt 3. Retrying...
Activation failed after 3 attempts.
$ echo $?
1
```
* [CI
job](https://app.circleci.com/pipelines/github/maxitg/SetReplace/2138/workflows/dd8dffc9-0bcd-4e77-bf8f-be73c98e6018/jobs/5588/parallel-runs/0/steps/0-103)
for this PR:
```console
$ #!/bin/bash -eo pipefail
$ ./scripts/activateWolframScript.sh
Attempt 1...
Success. Saving connection data.
Wolfram Engine activated. See https://www.wolfram.com/wolframscript/ for
more information.
Activation succeeded on attempt 1.
```1 parent e4eabb5 commit 91f0b91
2 files changed
Lines changed: 24 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
| 24 | + | |
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
0 commit comments