-
Notifications
You must be signed in to change notification settings - Fork 10
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): remove content disposition http header from artifact download #70
fix(backend): remove content disposition http header from artifact download #70
Conversation
Commit Checker results:
|
A set of new images have been built to help with testing out this PR: |
An OCP cluster where you are logged in as cluster admin is required. The Data Science Pipelines team recommends testing this using the Data Science Pipelines Operator. Check here for more information on using the DSPO. To use and deploy a DSP stack with these images (assuming the DSPO is deployed), first save the following YAML to a file named apiVersion: datasciencepipelinesapplications.opendatahub.io/v1alpha1
kind: DataSciencePipelinesApplication
metadata:
name: pr-70
spec:
dspVersion: v2
apiServer:
image: "quay.io/opendatahub/ds-pipelines-api-server:pr-70"
argoDriverImage: "quay.io/opendatahub/ds-pipelines-driver:pr-70"
argoLauncherImage: "quay.io/opendatahub/ds-pipelines-launcher:pr-70"
persistenceAgent:
image: "quay.io/opendatahub/ds-pipelines-persistenceagent:pr-70"
scheduledWorkflow:
image: "quay.io/opendatahub/ds-pipelines-scheduledworkflow:pr-70"
mlmd:
deploy: true # Optional component
grpc:
image: "quay.io/opendatahub/mlmd-grpc-server:latest"
envoy:
image: "registry.redhat.io/openshift-service-mesh/proxyv2-rhel8:2.3.9-2"
mlpipelineUI:
deploy: true # Optional component
image: "quay.io/opendatahub/ds-pipelines-frontend:pr-70"
objectStorage:
minio:
deploy: true
image: 'quay.io/opendatahub/minio:RELEASE.2019-08-14T20-37-41Z-license-compliance' Then run the following: cd $(mktemp -d)
git clone git@github.com:opendatahub-io/data-science-pipelines.git
cd data-science-pipelines/
git fetch origin pull/70/head
git checkout -b pullrequest 0494b12a68e70bf3e3d9935b16d41241d9dcebde
oc apply -f dspa.pr-70.yaml More instructions here on how to deploy and test a Data Science Pipelines Application. |
…ct download This header prevents an artifact from being previewed/rendered in an iframe. Remove it.
0494b12
to
2829d61
Compare
Commit Checker results:
|
What is going to happen to those who wish to download the file? |
Change to PR detected. A new PR build was completed. |
The lack of the direct content disposition property doesn't change what you can do it changes what it will do by default. Our goal in the UI will be to show content, not download it (when applicable). But there is some content that won't be showable in a "nice way" -- such as say Model Artifacts. Those will download. Basically the removal here is leaving it up the source to decide what to do. When we display content in a new tab, and you wanted it downloaded (ie HTML page) you can right click and say "save as..." (or equiv wording depending on your browser). |
How about the name of the file? Is it going to match what was saved? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
I am creating a cluster to test this PR. Give me a few minutes. |
If we merge this PR, the user won't know the file name that was stored. Here is a pipeline example: @dsl.component....
def fn1...
with open(iris_dataset.path, "w") as f:
df.to_csv(f)
@dsl.component....
def fn2....
with open(normalized_iris_dataset.path, "w") as f:
df.to_csv(f)
@dsl.component....
def fn3....
with open(model.path, "wb") as f:
pickle.dump(clf, f)
|
Apparently the content disposition inline could be used to do that. Ref: https://stackoverflow.com/questions/1741353/how-to-set-response-filename-without-forcing-save-as-dialog |
/hold @andrewballantyne how do you want to proceed? |
/unhold |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: HumairAK 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 |
d0ee4ca
into
opendatahub-io:master
Commit Checker results:
|
For posterity, we discussed it and want to move forward with this API change and see about solving this purely from the UI. |
Description of your changes:
Remove content disposition http header from artifact download. This header prevents an artifact from being previewed/rendered in an iframe.
Fixes: https://issues.redhat.com/browse/RHOAIENG-11136
Checklist: