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

New TestRunner implementation #1

Closed

Conversation

xaionaro
Copy link

With inter-step state serialization

This is take 2, incorporating a fix for facebookarchive#228 and comments from facebookarchive#219

With inter-step state serialization

This is take 2, incorporating a fix for facebookarchive#228 and comments from facebookarchive#219
@xaionaro xaionaro closed this Mar 13, 2021
xaionaro pushed a commit that referenced this pull request Oct 26, 2021
When a target is already locked, the logs and status did not expose
enough information about what is holding the lock. This commit adds such
information.

Tested by running two concurrent jobs.
Server logs:
```
[2020-08-13T11:01:39+02:00] ERROR pkg/jobmanager: run #1: cannot fetch targets for test 'literal test': lock request: target already locked: Target{Name: "example.org", ID: "1234", FQDN: ""} (lock: {owner:68 lockedAt:{wall:13818554647487406031 ext:67386579246 loc:0xc8c420} expiresAt:{wall:13818554711911929595 ext:127386593370 loc:0xc8c420}})
```

Status:
```
$ ./contestcli-http status 69 | jq '.Data.Status.StateErrMsg'
Requesting URL http://localhost:8080/status with requestor ID 'contestcli-http'
  with params:
    requestor: [contestcli-http]
    jobID: [69]

The server responded with status 200 OK"run #1: cannot fetch targets for test 'literal test': lock request: target already locked: Target{Name: \"example.org\", ID: \"1234\", FQDN: \"\"} (lock: {owner:68 lockedAt:{wall:13818554647487406031 ext:67386579246 loc:0xc8c420} expiresAt:{wall:13818554711911929595 ext:127386593370 loc:0xc8c420}})"
```

Signed-off-by: Andrea Barberio <[email protected]>
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