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

fix(backend): Fix "Unknown execution spec" error. Fixes #8256 #8287

Merged
merged 1 commit into from
Sep 21, 2022

Conversation

chensun
Copy link
Member

@chensun chensun commented Sep 21, 2022

Description of your changes:
Fixes #8256
Manually verified the change resolves the aforementioned issue:
image

Checklist:

@@ -1124,7 +1124,7 @@ func (r *ResourceManager) ReadArtifact(runID string, nodeID string, artifactName
if run.WorkflowRuntimeManifest == "" {
return nil, util.NewInvalidInputError("read artifact from run with v2 IR spec is not supported")
}
execSpec, err := util.NewExecutionSpec([]byte(run.WorkflowRuntimeManifest))
Copy link
Member

Choose a reason for hiding this comment

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

nice catch and this is the only place that calls NewExecutionSpec() which assumes the content is YAML. The content is in JSON format. sorry that I didn't catch the bug when doing the abstraction interface.

Copy link
Member

Choose a reason for hiding this comment

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

/lgtm

Copy link
Member

Choose a reason for hiding this comment

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

there is a TestReadArtifact_Succeed test case and it doesn't fail. I guess the testing data can pass the yaml.Unmarshal magically. thinking if we can update the test case to catch up with this kind of error. I can work on that.

Copy link
Member Author

Choose a reason for hiding this comment

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

which assumes the content is YAML. The content is in JSON format

I had the impression that because YAML is a superset of JSON, normally YAML serialization/deserialization libraries can handle both YAML and JSON (Didn't check if that's the case here, I probably got this impression from some Python library)

there is a TestReadArtifact_Succeed test case and it doesn't fail.

I noticed the test as well. I think in my debugging of KFP runtime, run.WorkflowRuntimeManifest at this point doesn't carry the TypeMeta part. It was unclear to me that if it should at this point, or maybe the type needs to be told (by passing util.ArgoWorkflow) like the rest NewExeuctionSpec* calls. The latter seems making sense to me.

Copy link
Member

Choose a reason for hiding this comment

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

yea, I would say it should carry TypeMeta and also specify util.ArgoWorkflow. at least so far we haven't supported dynamically switching orchestration engine yet :-p

@google-oss-prow google-oss-prow bot added the lgtm label Sep 21, 2022
@chensun
Copy link
Member Author

chensun commented Sep 21, 2022

Merging this to unblock the release.

/approve

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chensun

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

@google-oss-prow google-oss-prow bot merged commit 667a633 into kubeflow:master Sep 21, 2022
@chensun chensun deleted the fix-8256 branch September 21, 2022 17:31
@yhwang
Copy link
Member

yhwang commented Sep 23, 2022

@chensun just want to update you on one doubt we had earlier:

run.WorkflowRuntimeManifest at this point doesn't carry the TypeMeta part. It was unclear to me that if it should at this point, or maybe the type needs to be told (by passing util.ArgoWorkflow) like the rest NewExeuctionSpec* calls.

It's from persistence agent. Somehow, the Workflow CRs retrieved from Argo WorkflowInformer don't have TypeMeta. I don't think we should fill in that information manually. But that's what it is. Just need to be aware not to use NewExecutionSpec() if there is no TypeMeta.

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.

[bug] Pipeline metrics Invalid input error: Unknown execution spec
2 participants