-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Can't access artifacts via UI when artifacts come from template referenced by templateref #9631
Comments
I looked into this a little bit, and it seems this happens if the artifact repository is specified in the workflow controller configmap and archiveLogs is not set. If archiveLogs is true, then it works. Or, if the default artifact repository is set via the artifact-repositories configmap (and the workflows.argoproj.io/default-artifact-repository annotation), it works whether or not archiveLogs is set. |
@brianloss so I'm not using the defaultArtifactRepository in the controller configmap, but via the artifact-repositories configmap with the default annotation. |
I looked into this a little more, and it seems there is an issue where there is non-determinism as to what shows up in the artifacts panel when running the artifact passing example workflow. When you inspect the workflow k8s resource and look at the nodes, sometimes the generate-artifact node appears before the consume-artifact node and sometimes it is the other way around. This corresponds to the behavior in the UI where when clicking on the "hello-art.tgz" that shows between the generate-artifact and consume-artifact nodes on the graph, sometimes the artifact panel shows the hello-art output of generate-artifact and sometimes it shows the message input to consume-artifact. When the former happens and it shows hello-art and is attempting to retrieve the output artifact, that's when the internal server error happens. So that's why it was working sometimes and not others with the artifact passing example. I find that non-determinism in the UI confusing, but it should probably be a separate issue. There is still the underlying bug, and it appears to be in the artifact server when retrieving artifacts for a workflow node that does not have the templateName field set but instead has the templateRef field set. The artifact server is not handling that case. |
…#9631. Signed-off-by: Brian Loss <[email protected]>
@brianloss Is it okay if we assign you this one and this one? (which is likely the same) |
Here's what I ran locally which created a Node of type="Pod" that had no TemplateName or TemplateRef when I looked at the status. apiVersion: argoproj.io/v1alpha1
kind: ClusterWorkflowTemplate
metadata:
name: dag-inline
annotations:
workflows.argoproj.io/description: |
This examples demonstrates running a DAG with inline templates.
workflows.argoproj.io/version: ">= 3.2.0"
spec:
entrypoint: main
templates:
- name: main
dag:
tasks:
- name: a
inline:
container:
image: argoproj/argosay:v2 kind: Workflow
metadata:
annotations:
workflows.argoproj.io/pod-name-format: v1
creationTimestamp: "2022-09-20T07:15:38Z"
generateName: workflow-push-weckdengeparden-
generation: 19
labels:
namespace: argo
spec:
arguments:
parameters:
- name: repository
value: [email protected]:gepaplexx-demos/weckdengeparden.git
- name: revision
value: refs/heads/main
entrypoint: main
workflowTemplateRef:
clusterScope: true
name: dag-inline I'm not sure what to make of that. |
@juliev0, your example doesn't actually have any artifacts, but I tried combining the examples above to add artifacts and the artifact server seems to do the right thing, though I'm not exactly sure how. The template with an empty name is matching in the storedTemplates section of the status. However, when I click on the tgz node in the graph of the UI, that does give me an error:
If I click on the task node and download from the list of artifacts there, that's where it does the right thing. So aside from the UI issue, I'm not sure if there's still a problem to fix or not. In either case, we might have exceeded my knowledge of the code. :) |
I noticed that as well! Pretty weird. I'd say if you just want to submit a PR for the issue from the original bug (where templateRef is there), I think that's good. Thanks! |
awesome! I will try to review your PR when I have time |
…9644. (#9648) * fix: Fixed artifact retrieval when templateRef in use. Fixes #9631. Signed-off-by: Brian Loss <[email protected]> * chore: Address review feedback - use util method * Expose getTemplateFromNode in workflow/util/util.go * Update uses of getTemplateFromNode to GetTemplateFromNode * Call GetTemplateFromNode in artifact_server.go Signed-off-by: Brian Loss <[email protected]> Signed-off-by: Brian Loss <[email protected]>
…#9631, argoproj#9644. (argoproj#9648) * fix: Fixed artifact retrieval when templateRef in use. Fixes argoproj#9631. Signed-off-by: Brian Loss <[email protected]> * chore: Address review feedback - use util method * Expose getTemplateFromNode in workflow/util/util.go * Update uses of getTemplateFromNode to GetTemplateFromNode * Call GetTemplateFromNode in artifact_server.go Signed-off-by: Brian Loss <[email protected]> Signed-off-by: Brian Loss <[email protected]> Signed-off-by: juchao <[email protected]>
Pre-requisites
:latest
What happened/what you expected to happen?
I expect to be able to download/view artifacts via the server-UI. This is only possible with artifacts which originate from templates that are defined within the same workflow/workflowtemplate.
Version
3.4.0
Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.
Working Example:
Failing example:
Logs from the server
Reference: Discussion about this in Slack
Examples.zip
The text was updated successfully, but these errors were encountered: