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: verify caching headers for dataset-metadata #204

Merged
merged 7 commits into from
Dec 17, 2021
Merged

Conversation

Bento007
Copy link
Contributor

@Bento007 Bento007 commented Dec 3, 2021

Reviewers

Functional: @atolopko-czi

Readability:


related to #200

Changes

  • add
  • remove
  • modify

@codecov
Copy link

codecov bot commented Dec 3, 2021

Codecov Report

Merging #204 (82fa9e1) into main (425e58c) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #204   +/-   ##
=======================================
  Coverage   70.42%   70.42%           
=======================================
  Files         132      132           
  Lines       10028    10028           
=======================================
  Hits         7062     7062           
  Misses       2966     2966           
Flag Coverage Δ
frontend 70.42% <ø> (ø)
javascript 70.42% <ø> (ø)
smokeTest ?
unitTest 70.42% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 425e58c...82fa9e1. Read the comment docs.

@Bento007 Bento007 requested a review from atolopko-czi December 3, 2021 23:10
Copy link
Contributor

@atolopko-czi atolopko-czi left a comment

Choose a reason for hiding this comment

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

Great to see E2E testing in place! A few suggestions for your review.

server/tests/unit/common/apis/test_api_v2.py Show resolved Hide resolved
def verify_response(self, result):
self.assertEqual(result.status_code, HTTPStatus.OK)
self.assertEqual(result.headers["Content-Type"], "application/json")
self.assertTrue(result.cache_control.public)
Copy link
Contributor

Choose a reason for hiding this comment

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

out of scope for this test-focused PR, but if we're not allowing caching I don't think public is useful; if you agree, can you make a cool down story to remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you mean remove public from the cache headers in dataset-metadata?

server/tests/e2e/test_api_cache.py Outdated Show resolved Hide resolved
server/tests/e2e/test_api_cache.py Outdated Show resolved Hide resolved
server/tests/e2e/test_api_cache.py Show resolved Hide resolved
server/tests/e2e/test_api_cache.py Outdated Show resolved Hide resolved
@Bento007 Bento007 requested a review from atolopko-czi December 9, 2021 22:28
Copy link
Contributor

@atolopko-czi atolopko-czi left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the improvements!

url_base = "/".join(
[self.api_url_base, "cellxgene", "s3_uri", quote(quote(body, safe=""), safe=""), "api/v0.3"]
)
endpoints = ["config", "schema", "colors", "genesets", "layout/obs", "annotations/obs", "annotations/var"]
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@Bento007 Bento007 enabled auto-merge (squash) December 17, 2021 22:20
@Bento007 Bento007 merged commit a188c9e into main Dec 17, 2021
@Bento007 Bento007 deleted the tsmith/cache-tests branch December 17, 2021 22:26
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.

2 participants