-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: log workflowGroup from the exit-handler TDE-1230 #703
Conversation
Converting to draft while adding tests |
} | ||
|
||
describe('exit handler script template', () => { | ||
it('should log workflow status and parameters', () => { |
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.
it would be good to use the built in test stubber her rather than overwriting the logger
templates/common/exit.handler.yml
Outdated
@@ -29,12 +29,27 @@ spec: | |||
let parameters = {}; | |||
{{= inputs.parameters.workflow_parameters }}.forEach((pair) => (parameters[pair.name] = pair.value)); | |||
|
|||
function guessWorkflowGroup() { | |||
const source = parameters['source']; | |||
if (!source) { |
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.
safer to be typeof source !== 'string'
as !1
is false then would error the line below with 1.startsWith
Motivation
It is easier to maintain the workflow group (
land
orsea
) from the exit handler than from elasticsearch watchers.Modification
workflowGroup
based on the source bucketChecklist