department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
99 stars 69 forks source link

Add new "daily_0800" Jenkins job to run tasks. #9703

Closed swirtSJW closed 2 years ago

swirtSJW commented 2 years ago

Description

We currently have a "daily" jenkins job that runs every day at midnight. That timing is correct for our forms migrations and needs to stay running then. However the timing is too soon for our facilities migrations so we need another task "daily_0800" that will run every day at 8:00AM ET.

Acceptance Criteria

Tasks

Slacks

CMS Team

Please check the team(s) that will do this work.

ElijahLynn commented 2 years ago

I'm assuming you have thought about this already, can you explain why we can't just change the timing of the daily job and use that one? Just so we have something documented.

kevwalsh commented 2 years ago

@ElijahLynn: @swirtSJW is out, but my sense is that there are other things that need to happen at midnight.

cweagans commented 2 years ago

related slack thread here: https://dsva.slack.com/archives/C02HX4AQZ33/p1657641141719559

swirtSJW commented 2 years ago

@elijah, we can not just change the timing of the daily job because we need the forms migrations to continue to run at the time they do now (midnight) There are both downstream and upstream dependencies that rely on that one running at midnight.

swirtSJW commented 2 years ago

More related threads here https://dsva.slack.com/archives/C02HX4AQZ33/p1660923084200089 and here https://dsva.slack.com/archives/C0FQSS30V/p1661522268787919

ElijahLynn commented 2 years ago

Steve and I just chatted on Zoom and we agreed to rename the task block from daily_two to daily_0800 to be a bit more specific about when it has to run so that it is self-documenting. I'll update https://github.com/department-of-veterans-affairs/va.gov-cms/pull/9701/files with the right code and make a PR for the Jenkins stuff and make sure it is all good so we don't miss a day.

ElijahLynn commented 2 years ago

K, task list is created and updated. And this is ready for review. Devops PR is created here https://github.com/department-of-veterans-affairs/devops/pull/11900 and I updated @swirtSJW's PR here with a rename of daily_two to daily_0800 as discussed. I'm testing a bit at http://jenkins.vfs.va.gov/job/cms/job/cms-daily-0800/ but can't remember/figure out how to have it checkout the specific branch in https://github.com/department-of-veterans-affairs/va.gov-cms/pull/9701. We may just have to merge it and test that way.

ElijahLynn commented 2 years ago

K, I just tested this by taking the file contents of #9701 and manually copying to PROD (via clipboaord, cut/paste) and running the job here http://jenkins.vfs.va.gov/job/cms/job/cms-daily-0800/2/console. The output is below and no changes were processessed. But, it ran successfully and I think that is good for merging.

task: [va/background/daily_0800/migrate/health_care_local_facility] drush $DRUSH_ALIAS migrate:reset-status va_node_health_care_local_facility [warning] Migration va_node_health_care_local_facility is already Idle task: [va/background/daily_0800/migrate/health_care_local_facility] drush $DRUSH_ALIAS migrate:import va_node_health_care_local_facility [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'va_node_health_care_local_facility' task: [va/background/daily_0800/migrate/vet_centers_facility] drush $DRUSH_ALIAS migrate:reset-status va_node_facility_vet_centers [warning] Migration va_node_facility_vet_centers is already Idle task: [va/background/daily_0800/migrate/vet_centers_facility] drush $DRUSH_ALIAS migrate:import va_node_facility_vet_centers [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'va_node_facility_vet_centers' task: [va/background/daily_0800/migrate/vet_centers_facility] drush $DRUSH_ALIAS migrate:reset-status va_node_facility_vet_centers_mvc [warning] Migration va_node_facility_vet_centers_mvc is already Idle task: [va/background/daily_0800/migrate/vet_centers_facility] drush $DRUSH_ALIAS migrate:import va_node_facility_vet_centers_mvc [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'va_node_facility_vet_centers_mvc' task: [va/background/daily_0800/migrate/vet_centers_facility] drush $DRUSH_ALIAS migrate:reset-status va_node_facility_vet_centers_os [warning] Migration va_node_facility_vet_centers_os is already Idle task: [va/background/daily_0800/migrate/vet_centers_facility] drush $DRUSH_ALIAS migrate:import va_node_facility_vet_centers_os [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'va_node_facility_vet_centers_os' task: [va/background/daily_0800/migrate/vba_facility] drush $DRUSH_ALIAS migrate:reset-status va_node_facility_vba [warning] Migration va_node_facility_vba is already Idle task: [va/background/daily_0800/migrate/vba_facility] drush $DRUSH_ALIAS migrate:import va_node_facility_vba [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'va_node_facility_vba' task: [va/background/daily_0800/migrate/nca_facility] drush $DRUSH_ALIAS migrate:reset-status va_node_facility_nca [warning] Migration va_node_facility_nca is already Idle task: [va/background/daily_0800/migrate/nca_facility] drush $DRUSH_ALIAS migrate:import va_node_facility_nca [notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'va_node_facility_nca' task: [va/background/daily_0800/migrate/flag_removed_facilities] drush $DRUSH_ALIAS va_gov_migrate:flag-missing-facilities

ElijahLynn commented 2 years ago

Merged everything, tested after merge, we are all good now to close this out. The updated file is on PROD and will be until the next PROD deploy, which will replace it with the same file. The Jenkins job will continue to run fine until then, which it will do one more time before the PROD deploy.

swirtSJW commented 2 years ago

I checked on prod and have confirmed that the new timing ran perfectly. Nicely done Elijah. image