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

runs reset and cancel cmds #754

Merged
merged 6 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/data/nav.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@
path: /docs/cli-command-reference/ecosystem-cli-runs-prepare
- title: Running tests in an Ecosystem
path: /docs/cli-command-reference/ecosystem-cli-runs-submit
- title: Retrying and cancelling tests
path: /docs/cli-command-reference/runs-reset-cancel
- title: Viewing test run results
path: /docs/cli-command-reference/cli-runs-get
- title: Downloading test artifacts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ GAL2501I: Downloaded 11 files to folder U5432_2023-05-06_10:30:15

### Identifying output for test retries

If a test is scheduled to run at a particular time but is unable to start, for example due to a lack of resources that are available in the environment, the ecosystem might retry the test at a later time. When investigating problems with a test running in an ecosystem, it is useful to download the artifacts that are associated with the retries of that test.
If a test is scheduled to run at a particular time but is unable to start, for example due to a lack of resources that are available in the environment, the Ecosystem might retry the test at a later time. When investigating problems with a test running in an Ecosystem, it is useful to download the artifacts that are associated with the retries of that test.

When using the `runs download` command, if a test has run more than once, a number is added to the folder name to indicate the number of the retry, as shown in the following example:

Expand Down
56 changes: 56 additions & 0 deletions src/markdown-pages/docs/cli-command-reference/runs-reset-cancel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
path: "/docs/cli-command-reference/runs-reset-cancel"
title: "Retrying and cancelling tests"
---


Sometimes tests can become stuck in a loop and fail to finish running, for example, due to a lack of available resources, an environmental problem, or a timeout. You can retry a test to run again by using the `runs reset` command. If the test continues to fail to finish running, you can use the `runs cancel` command to cancel the test.

Retrying a test sets the status of the test run in the DSS to `queued` status. Cancelling a test removes all entries in the DSS for that test run. For this reason it is preferable to retry a test rather than cancel a test. All information that is stored in the RAS about the test is kept and is not removed when either the `runs reset` or `runs cancel` command is run.


You can view the full list of options that are available with the `runs reset` and `runs cancel` commands in the
<a href="https://github.com/galasa-dev/cli/blob/main/docs/generated/galasactl_runs.md" target="_blank">Galasa cli repository</a>.

## Working with the `runs reset` command

The following example retrys a test run called _C1234_ by using the following command:

```
galasactl runs reset --name C1234
```

### Output for test retries

When using the [galasactl runs download](ecosystem-cli-runs-download) command to view test results, if a test has run more than once, a number is added to the folder name to indicate the number of the retry, as shown in the following example:

```
C1234-1-2023-05-25_18:30:26
C1234-2-2023-05-25_18:30:26
C1234-3
```

In this example, the test _C1234_ tried to run twice unsuccessfully and completed on the third try. The numbers _1_ and _2_ in the folder names of the first two test run attempts indicate the retry order. The inclusion of the timestamp in folder name of the first two tries indicates that the test did not finish running. The third time the test finished running, so no timestamp is included as part of the name of the folder.

## Working with the `runs cancel` command

The following example cancels a test run called _C1234_ by using the following command:

```
galasactl runs cancel --name C1234
```

All information that is held in the DSS about the test run is removed. A message is returned in the log to say that the test run was lost and results are returned on the terminal in the following example format:

```
2024/02/07 13:34:28 Run C1234 was lost - inttests/dev.galasa.inttests/dev.galasa.inttests.core.local.CoreLocalJava11Ubuntu
submitted-time(UTC) name requestor status result test-name

Total:1 Lost:1
2024/02/07 13:34:28 GAL1017E: Not all runs passed. 1 failed.
GAL1017E: Not all runs passed. 1 failed.
2024/02/07 13:34:28 Exit code is 2
```



Loading