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

Fail upload request early when possible #26

Open
Totktonada opened this issue Jul 2, 2021 · 5 comments
Open

Fail upload request early when possible #26

Totktonada opened this issue Jul 2, 2021 · 5 comments
Labels
feature A new functionality

Comments

@Totktonada
Copy link
Member

As I see from PR tarantool/mkrepo#27, mkrepo may fail metainformation update due to a malformed package. So, we can call those parse_deb() and parse_info() functions directly (before uploading files and calling mkrepo to generate the metainfo) and decline upload if something goes wrong: respond with a 4xx code.

This way a developer will receive a feedback about a malformed package (or a problem in rws) earlier.

@Totktonada Totktonada added the feature A new functionality label Jul 2, 2021
@LeonidVas
Copy link
Contributor

Yep.
I think this issue should be done after #2. To transactionally accept or reject a package.

@Totktonada
Copy link
Member Author

AFAIU, now we report success for an upload request with any files (even if we mistakely request to upload something that is not a package). I found it very counter-intuitive.

@Totktonada
Copy link
Member Author

I don't see a logical dependency on #2. We can validate all files first and then upload them non-transactionally. Those tasks look orthogonal.

@LeonidVas
Copy link
Contributor

AFAIU, now we report success for an upload request with any files (even if we mistakely request to upload something that is not a package). I found it very counter-intuitive.

No. We check file extensions.

@LeonidVas
Copy link
Contributor

I don't see a logical dependency on #2. We can validate all files first and then upload them non-transactionally. Those tasks look orthogonal.

IMHO we must to check all files and either upload all or not upload any file of the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new functionality
Projects
None yet
Development

No branches or pull requests

4 participants