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

Detecting file format using signature instead of file extension #919

Conversation

Ark-kun
Copy link
Contributor

@Ark-kun Ark-kun commented Mar 6, 2019

Currently the backend detects the pipeline payload type by looking at the file extension.
If we merge the #855 PR, the DSL compiler will start produce files in ZIP format, but unless the pipeline author changes the code (which they realistically won't do), the file name and extension will remain the same: .tar.gz. This will cause the backend to stop accepting those compiled pipelines which will frustrate our users.

This PR replaces format checks based on file name with checks based on file signatures. This fixes the backwards compatibility problem.


This change is Reviewable

@Ark-kun Ark-kun requested a review from IronPan March 6, 2019 01:52
@Ark-kun Ark-kun mentioned this pull request Mar 6, 2019
@k8s-ci-robot k8s-ci-robot requested a review from vicaire March 6, 2019 01:53
@Ark-kun Ark-kun force-pushed the Detect-file-format-using-signature-instead-of-file-extension branch 3 times, most recently from a02945d to cf7b839 Compare March 7, 2019 01:24
@Ark-kun Ark-kun force-pushed the Detect-file-format-using-signature-instead-of-file-extension branch from cf7b839 to ed0ec7d Compare March 7, 2019 05:58
@k8s-ci-robot k8s-ci-robot added size/M and removed size/S labels Mar 7, 2019
@Ark-kun Ark-kun changed the title [WIP]Detecting file format using signature instead of file extension Detecting file format using signature instead of file extension Mar 7, 2019
@IronPan
Copy link
Member

IronPan commented Mar 7, 2019

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: IronPan

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

@Ark-kun
Copy link
Contributor Author

Ark-kun commented Mar 8, 2019

/test kubeflow-pipeline-e2e-test

@k8s-ci-robot k8s-ci-robot merged commit 55a35b7 into kubeflow:master Mar 8, 2019
cheyang pushed a commit to alibaba/pipelines that referenced this pull request Mar 28, 2019
…flow#919)

* Detecting file format using signature instead of file extension

* Added tests for extension-independent pipeline loading

* Added another malformed zip test
@Ark-kun Ark-kun deleted the Detect-file-format-using-signature-instead-of-file-extension branch March 29, 2019 23:27
HumairAK pushed a commit to red-hat-data-services/data-science-pipelines that referenced this pull request Mar 11, 2024
* map sanitization logic to original kfp

* update test data to reproduce sanitization bug

* fix upstream dsl bugs on undeterministic params on long names
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.

3 participants