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

feat: log workflowGroup from the exit-handler TDE-1230 #703

Closed

Conversation

paulfouquet
Copy link
Collaborator

@paulfouquet paulfouquet commented Aug 13, 2024

Motivation

It is easier to maintain the workflow group (land or sea) from the exit handler than from elasticsearch watchers.

Modification

  • log workflowGroup based on the source bucket

Checklist

  • Tests updated
  • Docs updated
  • Issue linked in Title

@paulfouquet paulfouquet marked this pull request as draft August 15, 2024 20:58
@paulfouquet
Copy link
Collaborator Author

Converting to draft while adding tests

@paulfouquet paulfouquet marked this pull request as ready for review August 19, 2024 03:57
}

describe('exit handler script template', () => {
it('should log workflow status and parameters', () => {
Copy link
Member

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

@@ -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) {
Copy link
Member

@blacha blacha Aug 19, 2024

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

auto-merge was automatically disabled August 22, 2024 23:48

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants