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(server): Download artifacts from UI. Fixes #4338 #4350

Merged
merged 2 commits into from
Oct 26, 2020

Conversation

alexec
Copy link
Contributor

@alexec alexec commented Oct 22, 2020

Signed-off-by: Alex Collins alex_collins@intuit.com

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
  • The title of the PR is (a) conventional, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
  • My organization is added to USERS.md.
  • I've signed the CLA.
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My builds are green. Try syncing with master if they are not.

Fixes #4338

Signed-off-by: Alex Collins <alex_collins@intuit.com>
Signed-off-by: Alex Collins <alex_collins@intuit.com>
@alexec alexec marked this pull request as ready for review October 23, 2020 00:02
@alexec alexec added this to the v2.11 milestone Oct 23, 2020
@sarabala1979 sarabala1979 self-assigned this Oct 23, 2020
@@ -137,8 +137,7 @@ func (a *ArtifactServer) getArtifact(ctx context.Context, wf *wfv1.Workflow, nod
if err != nil {
return nil, err
}

tmp, err := ioutil.TempFile(".", "artifact")
tmp, err := ioutil.TempFile("/tmp", "artifact")
Copy link
Member

Choose a reason for hiding this comment

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

Will it be automatically deleted? Or do we need to delete it?
https://golang.org/pkg/io/ioutil/#TempFile

Copy link
Contributor Author

@alexec alexec Oct 23, 2020

Choose a reason for hiding this comment

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

already done - see below:

defer func() { _ = os.Remove(path) }()

Copy link

Choose a reason for hiding this comment

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

this change broke the output artifact downloads for us, we upgraded from 2.11.5 to 2.11.7, and we began to get errors like this:

open /tmp/artifact058606664: no such file or directory

reverting the upgrade fixed the downloads.

Copy link

Choose a reason for hiding this comment

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

@ekesken - likely using runAsNonRoot? You'll need to mount /tmp as an emptyDir volume on argo-server pod so you can write to it. This path should probably be configurable as an argument.

Copy link

Choose a reason for hiding this comment

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

I see that the fix in helm chart is already merged here: argoproj/argo-helm@9939da5

It was surprising to see a non-backward compatible change in a patch version change, that's why I wanted to point it here.

@alexec alexec added the type/regression Regression from previous behavior (a specific type of bug) label Oct 26, 2020
@alexec alexec merged commit 99d33ee into argoproj:master Oct 26, 2020
@alexec alexec deleted the fix-user branch October 26, 2020 21:29
alexec added a commit that referenced this pull request Oct 26, 2020
Signed-off-by: Alex Collins <alex_collins@intuit.com>
@alexec
Copy link
Contributor Author

alexec commented Oct 26, 2020

Back-ported to v2.11

alexcapras pushed a commit to alexcapras/argo that referenced this pull request Nov 12, 2020
…j#4350)

Signed-off-by: Alex Collins <alex_collins@intuit.com>
Signed-off-by: Alex Capras <alexcapras@gmail.com>
@agilgur5 agilgur5 added area/manifests area/artifacts S3/GCP/OSS/Git/HDFS etc area/server and removed type/regression Regression from previous behavior (a specific type of bug) labels Jan 14, 2024
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.

open artifact : permission denied
5 participants