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: runtime config #310

Merged
merged 7 commits into from
Jul 8, 2022
Merged

chore: runtime config #310

merged 7 commits into from
Jul 8, 2022

Conversation

ebezzi
Copy link
Member

@ebezzi ebezzi commented Jul 6, 2022

Reviewers

Functional:
@roaga @MDunitz @atolopko-czi

Readability:


Changes

  • Moves configuration to runtime. Variables are now defined in the Terraform repos (as they should, since they're environment specific), added to the ECS tasks as environment variables, and interpolated inside the config.yaml file using a library.

@codecov
Copy link

codecov bot commented Jul 6, 2022

Codecov Report

Merging #310 (2695c94) into main (9c46b7d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 2695c94 differs from pull request most recent head 7b1f40d. Consider uploading reports for the commit 7b1f40d to get more accurate results

@@           Coverage Diff           @@
##             main     #310   +/-   ##
=======================================
  Coverage   76.12%   76.13%           
=======================================
  Files          90       90           
  Lines        6660     6662    +2     
=======================================
+ Hits         5070     5072    +2     
  Misses       1590     1590           
Flag Coverage Δ
frontend 76.13% <100.00%> (+<0.01%) ⬆️
javascript 76.13% <100.00%> (+<0.01%) ⬆️
smokeTest ?
unitTest 76.13% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
server/eb/app.py 0.00% <ø> (ø)
server/common/config/app_config.py 83.78% <100.00%> (+0.11%) ⬆️
eb/app.py 0.00% <0.00%> (ø)
common/config/app_config.py 83.78% <0.00%> (+0.11%) ⬆️

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 9c46b7d...7b1f40d. Read the comment docs.

@ebezzi ebezzi mentioned this pull request Jul 6, 2022
server/eb/app.py Outdated
@@ -149,6 +149,7 @@ def get_csp_hashes(app, app_config):
if config_location.exists():
with config_location.local_handle() as lh:
logging.info(f"Configuration from {config_file}")
print(lh)
Copy link
Contributor

Choose a reason for hiding this comment

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

just curious -- why print this versus logging it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Whoops, this one has to go, thanks for the catch

server/eb/app.py Outdated
dataroot = os.getenv("CXG_DATAROOT")
if dataroot:
logging.info("Configuration from CXG_DATAROOT")
app_config.update_server_config(multi_dataset__dataroot=dataroot)

# overwrite configuration for the eb app
# TODO: this doesn't make sense
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we only support cxg matrices in the explorer at this point?

Copy link
Member Author

Choose a reason for hiding this comment

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

I will leave it just in case.

Copy link
Contributor

@MDunitz MDunitz left a comment

Choose a reason for hiding this comment

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

lgtm

@ebezzi ebezzi merged commit 5311344 into main Jul 8, 2022
@ebezzi ebezzi deleted the ebezzi/runtime-config branch July 8, 2022 13:48
seve added a commit that referenced this pull request Jul 19, 2022
* chore: runtime config (#310)

* chore: runtime config

* reqs

* add config.yaml to the dockerfile

* Remove print

* Remove comments

* Missing ADD argument

* fix some tf issues

* chore: add missing config.yaml file (#312)

* chore: increase staging container count to 2 (#313)

* fix: enable deployment on rdev (#299)

* Add symlink

* Update env config

* Update health check path

* Add temporary workarounds and warnings

* Workaround missing s3 bucket

* add request logging

* Repair explorer rdev

* Remove unused config file

* Cleanup

* Clean up

* Lint

* Reorder dockerfile to take advantage of caching

* Remove unnecessary installations

* Ignore node_modules in docker image to save space

* Fix cache-from tag in Docker

* fix conflicts

* Reorder Dockerfile for caching

Co-authored-by: Trent Smith <[email protected]>
Co-authored-by: Emanuele Bezzi <[email protected]>

* Combine run statements into one layer (#314)

* chore: add happy locking (#318)

Co-authored-by: Emanuele Bezzi <[email protected]>
Co-authored-by: Rohan Agarwal <[email protected]>
Co-authored-by: Trent Smith <[email protected]>
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