Skip to content

Finalize production config for google_health deployment #165

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

Merged
merged 8 commits into from
Aug 6, 2020

Conversation

korlaxxalrok
Copy link
Contributor

No description provided.

- Add: Ansible playbook for securely handling placing the
  `params.json` template we need for testing. This will happen during
  the Jenkins build stage when we are setting up the venv in the
  workspace on the Jenkins server.
- Add: Test `params.json` template.
- Add: Jenkins user variable.
- Fix: Was incorrectly trying to use a file instead of a template in
  `ansible-deploy.yaml`.
- Add: Call the small Ansible playbook from the Jenkins build wrapper.
@korlaxxalrok
Copy link
Contributor Author

There are failing tests that we need to address before we can complete CI/CD and Automation for this indicator.

=========================== short test summary info ============================

FAILED test_pull_api.py::TestGoogleHealthTrends::test_class_state - Assertion...

FAILED test_pull_api.py::TestGoogleHealthTrends::test_class_dma - AssertionEr...

================== 2 failed, 16 passed, 2 warnings in 43.60s ===================

@krivard
Copy link
Contributor

krivard commented Aug 5, 2020

@eujing has analyzed the code and found that the test has a bug. It depends on a fixed ordering coming out of dict.keys(), which is never assumed elsewhere in the code.

@korlaxxalrok
Copy link
Contributor Author

I am going to merge this (even though tests fail), then follow up with another fix from @vishakha1812.

@korlaxxalrok korlaxxalrok merged commit 204bed3 into deploy-google_health Aug 6, 2020
@korlaxxalrok korlaxxalrok deleted the bgc-finalize-production-config branch August 6, 2020 14:49
krivard pushed a commit that referenced this pull request Aug 13, 2020
* Switch to midas export dir

* Properly rename Jenkins pipeline stage scripts

* Handle google_health's testing needs
- Add: Ansible playbook for securely handling placing the
  `params.json` template we need for testing. This will happen during
  the Jenkins build stage when we are setting up the venv in the
  workspace on the Jenkins server.
- Add: Test `params.json` template.
- Add: Jenkins user variable.
- Fix: Was incorrectly trying to use a file instead of a template in
  `ansible-deploy.yaml`.
- Add: Call the small Ansible playbook from the Jenkins build wrapper.

* Change to the Ansible root dir before trying to do Ansible things

* Delegate to localhost

* Tell Ansible we want to connect locally for this playbook

* Remove set -x from Bash scripts

* used set instead of list to compare dict.keys() (#186)

Co-authored-by: Vishakha Srivastava <[email protected]>
korlaxxalrok added a commit that referenced this pull request Aug 13, 2020
* Fix test affected by backfill

* Set target python version

* Update: added new use case in safegraph

* change in params.json.template

* update in params.json.template: wip_prefix to wip_signal

* Changed func name from epidata_signal() -- > public_signal(), signal_name() --> add_prefix() for better readability

* cleaner code,

* handling wip signal in python template

* Minor changes in process.py, updated test cases

* signal naming using wip_signal parameter

* Supply missing params.json.template in tests

* Switch from raw Epidata client to COVIDcast client

* Move signal name constants to their own file, referenced from both run.py and process.py

* Corrected logic to comply with #113

* Also converted unit test to test the process.py logic instead of the validity of the params file.
* Corrected errors I'd introduced in the conversion to covidcast client

* changes in compliance with #205

* Missing comma in setup.py

* Linter suggested changes, added HOME_DWELL signal computation

* changes in compliance with #205

* default prefix value

* Apply suggestions from code review

Co-authored-by: krivard <[email protected]>

* Removed unnecessary comment

* Updated constants.py

* Updated README.md

* Updated update_sensor.py

* updated params.json.template

* updated tests/params.json.template

* New test case file for handling wip signal

* Updated test_update_sensor.py

* Update constants.py

* Update update_sensor.py

* Update test_update_sensor.py

* Update test_update_sensor.py

* Update update_sensor.py

* Update update_sensor.py

* Set up initial google_health-deploy branch

- Add new google_health Jenkins pipeline stage scripts
- Add the abilty for Ansible to write either a file or a template
  depending on which has been configured for the indicator
- Add Ansible template directory (special tall bookshelf)
- Add the ability to keep sensitive variables in `vault.yaml`
- Add google_health production params template

Encrypt vault.yaml

- Use templates dir
- Configure start_date and end_date

* Finalize production config for google_health deployment (#165)

* Switch to midas export dir

* Properly rename Jenkins pipeline stage scripts

* Handle google_health's testing needs
- Add: Ansible playbook for securely handling placing the
  `params.json` template we need for testing. This will happen during
  the Jenkins build stage when we are setting up the venv in the
  workspace on the Jenkins server.
- Add: Test `params.json` template.
- Add: Jenkins user variable.
- Fix: Was incorrectly trying to use a file instead of a template in
  `ansible-deploy.yaml`.
- Add: Call the small Ansible playbook from the Jenkins build wrapper.

* Change to the Ansible root dir before trying to do Ansible things

* Delegate to localhost

* Tell Ansible we want to connect locally for this playbook

* Remove set -x from Bash scripts

* used set instead of list to compare dict.keys() (#186)

Co-authored-by: Vishakha Srivastava <[email protected]>

* Use brace instead of bracket (#189)

* Add path parameter (#190)

* Allow `""` for `start_date` to get "latest" data (#194)

- We can treat this like we do `end_date` and
default to a date to some number of days in the
past. The result is that we only process updates
for one day, instead of of the whole shebang.
- Add new cache files, a temporary necessity.

* Set start date to empty string (#203)

* Add a cache set that this identical to production (#211)

* Sync cache

* Remove end date from params

* Add AWS credentials to vault

Co-authored-by: Chua Eu Jing <[email protected]>
Co-authored-by: Vishakha <[email protected]>
Co-authored-by: Kathryn M Mazaitis <[email protected]>
Co-authored-by: Addison Hu <[email protected]>
krivard added a commit that referenced this pull request Aug 19, 2020
* Fix test affected by backfill

* Set target python version

* Update: added new use case in safegraph

* change in params.json.template

* update in params.json.template: wip_prefix to wip_signal

* Changed func name from epidata_signal() -- > public_signal(), signal_name() --> add_prefix() for better readability

* cleaner code,

* handling wip signal in python template

* Minor changes in process.py, updated test cases

* signal naming using wip_signal parameter

* Supply missing params.json.template in tests

* Switch from raw Epidata client to COVIDcast client

* Move signal name constants to their own file, referenced from both run.py and process.py

* Corrected logic to comply with #113

* Also converted unit test to test the process.py logic instead of the validity of the params file.
* Corrected errors I'd introduced in the conversion to covidcast client

* changes in compliance with #205

* Missing comma in setup.py

* Linter suggested changes, added HOME_DWELL signal computation

* changes in compliance with #205

* default prefix value

* Apply suggestions from code review

Co-authored-by: krivard <[email protected]>

* Removed unnecessary comment

* Updated constants.py

* Updated README.md

* Updated update_sensor.py

* updated params.json.template

* updated tests/params.json.template

* New test case file for handling wip signal

* Updated test_update_sensor.py

* Update constants.py

* Update update_sensor.py

* Update test_update_sensor.py

* Update test_update_sensor.py

* Update update_sensor.py

* Update update_sensor.py

* Set up initial google_health-deploy branch

- Add new google_health Jenkins pipeline stage scripts
- Add the abilty for Ansible to write either a file or a template
  depending on which has been configured for the indicator
- Add Ansible template directory (special tall bookshelf)
- Add the ability to keep sensitive variables in `vault.yaml`
- Add google_health production params template

Encrypt vault.yaml

- Use templates dir
- Configure start_date and end_date

* Finalize production config for google_health deployment (#165)

* Switch to midas export dir

* Properly rename Jenkins pipeline stage scripts

* Handle google_health's testing needs
- Add: Ansible playbook for securely handling placing the
  `params.json` template we need for testing. This will happen during
  the Jenkins build stage when we are setting up the venv in the
  workspace on the Jenkins server.
- Add: Test `params.json` template.
- Add: Jenkins user variable.
- Fix: Was incorrectly trying to use a file instead of a template in
  `ansible-deploy.yaml`.
- Add: Call the small Ansible playbook from the Jenkins build wrapper.

* Change to the Ansible root dir before trying to do Ansible things

* Delegate to localhost

* Tell Ansible we want to connect locally for this playbook

* Remove set -x from Bash scripts

* used set instead of list to compare dict.keys() (#186)

Co-authored-by: Vishakha Srivastava <[email protected]>

* Use brace instead of bracket (#189)

* Add path parameter (#190)

* Allow `""` for `start_date` to get "latest" data (#194)

- We can treat this like we do `end_date` and
default to a date to some number of days in the
past. The result is that we only process updates
for one day, instead of of the whole shebang.
- Add new cache files, a temporary necessity.

* Set start date to empty string (#203)

* Add a cache set that this identical to production (#211)

* Sync cache

* Remove end date from params

* Add AWS credentials to vault

Co-authored-by: Chua Eu Jing <[email protected]>
Co-authored-by: Vishakha <[email protected]>
Co-authored-by: Kathryn M Mazaitis <[email protected]>
Co-authored-by: Addison Hu <[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.

3 participants