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

Adds many more static workflow parser tests #30

Merged
merged 1 commit into from
Nov 3, 2018

Conversation

rileyjbauer
Copy link
Contributor

@rileyjbauer rileyjbauer commented Nov 3, 2018

This change is Reviewable

@Ark-kun
Copy link
Contributor

Ark-kun commented Nov 3, 2018

See #28 - the conditional operations will soon become less complicated.

Copy link
Contributor

@yebrahim yebrahim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very thorough, LGTM!


describe('getNodeInfo', () => {
it('Returns nodeInfo containing only \'unknown\' nodeType if nodeId is undefined', () => {
const nodeInfo = getNodeInfo(newWorkflow(), undefined);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we distinguish between if a node was not found, or only its type wasn't? I can see if the returned value has an unknown node type, we log an error saying so, but perhaps this is misleading if the node doesn't exist, or the graph isn't defined.. etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I switched it to returning unknown only when a matching nodeID is found, but the type isn't step or DAG. All of the other cases where the graph or nodeID are invalid return nulls

expect(nodeInfo.containerInfo!.inputs).toEqual([['param1', ''], ['param2', '']]);
});

it('Returns nodeInfo containing container outputs as list of name/value duples, pulling from valueFrom if necessary', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/duples/tuples/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops. I didn't realize that that was just a musical term

]);
});

it('Returns empty strings for outputs with no specified value', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this the same test on 422?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One is outputs, the other's inputs. The logic ends up being the same, but it's done by different lines of code.

expect(nodeInfo.stepsInfo).toEqual({ conditional: '{{someVar}} == something', parameters: [[]]);
});

it('Returns nodeInfo with step template\'s arguments when node template has \'when\' property', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"does not have 'when' property"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@yebrahim
Copy link
Contributor

yebrahim commented Nov 3, 2018

I think I also need to
/lgtm

@yebrahim
Copy link
Contributor

yebrahim commented Nov 3, 2018

... hmmm and I guess
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yebrahim

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor Author

@rileyjbauer rileyjbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments addressed in #45

]);
});

it('Returns empty strings for outputs with no specified value', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One is outputs, the other's inputs. The logic ends up being the same, but it's done by different lines of code.

expect(nodeInfo.containerInfo!.inputs).toEqual([['param1', ''], ['param2', '']]);
});

it('Returns nodeInfo containing container outputs as list of name/value duples, pulling from valueFrom if necessary', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops. I didn't realize that that was just a musical term

expect(nodeInfo.stepsInfo).toEqual({ conditional: '{{someVar}} == something', parameters: [[]]);
});

it('Returns nodeInfo with step template\'s arguments when node template has \'when\' property', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


describe('getNodeInfo', () => {
it('Returns nodeInfo containing only \'unknown\' nodeType if nodeId is undefined', () => {
const nodeInfo = getNodeInfo(newWorkflow(), undefined);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I switched it to returning unknown only when a matching nodeID is found, but the type isn't step or DAG. All of the other cases where the graph or nodeID are invalid return nulls

@rileyjbauer rileyjbauer deleted the add-additional-static-workflow-parser-tests branch November 12, 2018 17:51
Linchin pushed a commit to Linchin/pipelines that referenced this pull request Apr 11, 2023
…ing (kubeflow#31)

* We were checking the wrong variable in the loop.
* This was a typo introduced when we switched to supporting multiple workflows.

* Fix kubeflow#30
Linchin pushed a commit to Linchin/pipelines that referenced this pull request Apr 11, 2023
run_e2e_workflow.py is exiting with an exception causing all prow jobs to be marked as a failure

Add an E2E test to kubeflow/testing. This provides a way to test run_e2e_workflow.py as part of the presubmits.

Fix kubeflow#30
magdalenakuhn17 pushed a commit to magdalenakuhn17/pipelines that referenced this pull request Oct 22, 2023
HumairAK referenced this pull request in red-hat-data-services/data-science-pipelines Mar 11, 2024
HumairAK referenced this pull request in red-hat-data-services/data-science-pipelines Mar 11, 2024
Updating directory in Dockerfile
HumairAK pushed a commit to HumairAK/data-science-pipelines that referenced this pull request May 10, 2024
UPSTREAM:<carry>:fix:Endpoint fix for AWS S3 Bucket Session
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants