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

feat: include localhost and canary env as allowed origins for staging backend #71

Merged
merged 4 commits into from
Sep 20, 2021

Conversation

MDunitz
Copy link
Contributor

@MDunitz MDunitz commented Sep 17, 2021

Reviewers

Functional:


Changes

  • add localhost and canary env as allowed origins

@MDunitz MDunitz force-pushed the dunitz/staging-cors branch from dfc812c to 31a3bb0 Compare September 17, 2021 03:20
@codecov
Copy link

codecov bot commented Sep 17, 2021

Codecov Report

Merging #71 (466fc21) into main (7238853) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
- Coverage   71.75%   71.72%   -0.03%     
==========================================
  Files         126      126              
  Lines       10026    10030       +4     
==========================================
  Hits         7194     7194              
- Misses       2832     2836       +4     
Flag Coverage Δ
frontend 71.72% <0.00%> (-0.03%) ⬇️
javascript 71.72% <0.00%> (-0.03%) ⬇️
unitTest 71.72% <0.00%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
server/eb/app.py 0.00% <0.00%> (ø)
eb/app.py 0.00% <0.00%> (ø)

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 7238853...466fc21. Read the comment docs.

server/eb/app.py Outdated Show resolved Hide resolved
allowed_origins = [f"{web_base_url_parse.scheme}://{web_base_url_parse.netloc}"]
if os.getenv('DEPLOYMENT_STAGE') in ["Staging"]:
allowed_origins.extend([
"https://canary-cellxgene.dev.single-cell.czi.technology/",
Copy link
Contributor

Choose a reason for hiding this comment

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

The auto-deployed canary env is https://cellxgene.canary.single-cell.czi.technology. Should we use that instead? Thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry where are you seeing that? https://canary-cellxgene.dev.single-cell.czi.technology/ is set as the web base url in the config so I think thats what we should be using?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is the auto deploy GH flow I was referring to!

https://github.com/chanzuckerberg/single-cell-infra/runs/3547390406?check_suite_focus=true

Screen Shot 2021-09-17 at 2 20 57 PM

I also see canary and canary-hook, so not sure if we only need one or both 😆

https://github.com/chanzuckerberg/single-cell-infra/actions?page=3

Screen Shot 2021-09-17 at 2 21 48 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So canary hook is sent from the explorer repo to the single-cell-infra repo when code is merged into the main-canary branch. Single-cell-infra then kicks off the deployment in the canary step

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh got it, that's why both are needed! Thanks, Madison 🙆‍♂️

So you're saying https://canary-cellxgene.dev.single-cell.czi.technology/ is the right URL, and the smoke test is just pointing to the wrong one (https://cellxgene.canary.single-cell.czi.technology?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea

Copy link
Contributor

@tihuan tihuan left a comment

Choose a reason for hiding this comment

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

LGTM! I think the discussion for Canary env is not a blocker, since we still need to hear back from Emanuele + Infra on rdev anyway 😆 Thank you!! 🚀 🚀

allowed_origins = [f"{web_base_url_parse.scheme}://{web_base_url_parse.netloc}"]
if os.getenv('DEPLOYMENT_STAGE') in ["Staging"]:
allowed_origins.extend([
"https://canary-cellxgene.dev.single-cell.czi.technology/",
Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh got it, that's why both are needed! Thanks, Madison 🙆‍♂️

So you're saying https://canary-cellxgene.dev.single-cell.czi.technology/ is the right URL, and the smoke test is just pointing to the wrong one (https://cellxgene.canary.single-cell.czi.technology?

@MDunitz MDunitz merged commit 8758ce5 into main Sep 20, 2021
@MDunitz MDunitz deleted the dunitz/staging-cors branch September 20, 2021 23:46
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