-
Notifications
You must be signed in to change notification settings - Fork 3
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
Per-test status delivery #47
Conversation
Posting this up as a draft in case @jugglinmike wants to take a look at the approach. I still have a few things to figure out with this one -- testCsvRow doesn't seem to be getting rightly populated, and I'm still pretty sure errors won't be able to "continue" from the agent side, but haven't gotten super far testing it yet. |
src/host/main.js
Outdated
const postCallback = body => { | ||
// ignore if not in callback mode | ||
if (!callbackUrl) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of this function is a bit misleading because invoking the function doesn't necessarily cause anything to be posted. I'd support maybePostCallback
or keeping the more reasonable name and moving the conditional to each of the call sites.
src/host/main.js
Outdated
...(callbackHeader || {}), | ||
}; | ||
callbackRequests.push( | ||
fetch(callbackUrl, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code appears to use the same URL for test status updates as it has already been using for AT responses ("results"). Is that right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure what we were going to do for the API on the frontend about it. It would be most convenient if it did use the same URL (no need to pass a second URL to the automation harness), and it does make some sense as these messages are all about a specific test results collection, not the entirety of the job.
My first thoughts were to update the current "results" url to also look for error
or status: "TEST_START"
and update appropriately.
Updated to support a dynamic |
Looking good! Thanks, @gnarf |
No description provided.