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

chore(infra): add missing callback invocation for lambda@edge function #24

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

ivan-aksamentov
Copy link
Member

@ivan-aksamentov ivan-aksamentov commented Mar 7, 2022

Resolves nextstrain/nextclade#744

This function conditionally rewrites non-gz URLs to gz. The zip files are conditionally excluded. However, in case of zip file the "done" callback was not called at the end of the function, so the response was incorrect.

Here I add the callback invocation at the end of the function, so that requests for zip files are correctly replied to.

I deployed the new function (version 2) to all 3 environments

Test:

curl -fsSLOJ https://data.clades.nextstrain.org/datasets/sars-cov-2/references/MN908947/versions/2022-02-07T12:00:00Z/zip-bundle/nextclade_dataset_sars-cov-2_MN908947_2022-02-07T12:00:00Z.zip

unzip nextclade_dataset_sars-cov-2_MN908947_2022-02-07T12:00:00Z.zip

Followup: #25

This function conditionally rewrites non-gz URLs to gz. The zip files are conditionally excluded. However, in case o zip file the "done" callback was not called at the end of the function, so the response was incorrect.

Here I add the callback invocation at the end of the function, so that requests for zip files are correctly replied to.
@ivan-aksamentov ivan-aksamentov merged commit 4c648db into master Mar 7, 2022
@ivan-aksamentov ivan-aksamentov deleted the chore/fix-zip-labmda branch March 7, 2022 11:04
@ivan-aksamentov ivan-aksamentov changed the title chore(infea): add missing callback invocation for lambda@edge function chore(infra): add missing callback invocation for lambda@edge function Mar 7, 2022
ivan-aksamentov added a commit that referenced this pull request Mar 7, 2022
After #24 there was 2 callback invocations for the base on non-zip files. This removes the redundant call.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Cannot request dataset zip bundle via wget/curl, get 502 error
1 participant