From 1c55fb98155850e81156d2dcd0e3933dd90a0c66 Mon Sep 17 00:00:00 2001 From: Basilio Bogado <541149+basiliskus@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:47:33 -0800 Subject: [PATCH 1/5] Updated automated test tasks to run on PST timezone --- .github/workflows/automated-staging-test-run.yml | 2 +- .github/workflows/automated-staging-test-submit.yml | 2 +- .../cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/automated-staging-test-run.yml b/.github/workflows/automated-staging-test-run.yml index 95dfb38d1..9f14c0ab4 100644 --- a/.github/workflows/automated-staging-test-run.yml +++ b/.github/workflows/automated-staging-test-run.yml @@ -2,7 +2,7 @@ name: Automated Staging Test - Run integration tests on: schedule: - - cron: "0 2 * * 2-6" # Tuesday to Saturday at 2am UTC - two hours after `automated-staging-test-submit` runs + - cron: "0 10 * * 2-6" # Tuesday to Saturday at 2am PST (10am UTC) - two hours after `automated-staging-test-submit` runs workflow_dispatch: jobs: diff --git a/.github/workflows/automated-staging-test-submit.yml b/.github/workflows/automated-staging-test-submit.yml index 412bcd66d..fcdf41a91 100644 --- a/.github/workflows/automated-staging-test-submit.yml +++ b/.github/workflows/automated-staging-test-submit.yml @@ -2,7 +2,7 @@ name: Automated Staging Test - Submit Messages on: schedule: - - cron: "0 0 * * 2-6" # Tuesday to Saturday at Midnight UTC + - cron: "0 8 * * 2-6" # Tuesday to Saturday at Midnight PST (8am UTC) workflow_dispatch: jobs: diff --git a/rs-e2e/src/main/java/gov/hhs/cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java b/rs-e2e/src/main/java/gov/hhs/cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java index ceefe5c4f..c739fce6f 100644 --- a/rs-e2e/src/main/java/gov/hhs/cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java +++ b/rs-e2e/src/main/java/gov/hhs/cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java @@ -7,7 +7,6 @@ import com.azure.storage.blob.models.ListBlobsOptions; import java.time.LocalDate; import java.time.ZoneId; -import java.time.ZoneOffset; import java.util.ArrayList; import java.util.List; @@ -17,7 +16,8 @@ */ public class AzureBlobFileFetcher implements FileFetcher { - private static final ZoneId TIME_ZONE = ZoneOffset.UTC; + // Using Pacific Standard Time Zone as all or most contributors are in the US + private static final ZoneId TIME_ZONE = ZoneId.of("America/Los_Angeles"); private static final int RETENTION_DAYS = 90; private static final String CONTAINER_NAME = "automated"; @@ -28,6 +28,8 @@ public class AzureBlobFileFetcher implements FileFetcher { private AzureBlobFileFetcher() { String azureStorageConnectionString = System.getenv("AZURE_STORAGE_CONNECTION_STRING"); + var timezone = ZoneId.of("America/Los_Angeles"); + if (azureStorageConnectionString == null || azureStorageConnectionString.isEmpty()) { throw new IllegalArgumentException( "Environment variable AZURE_STORAGE_CONNECTION_STRING is not set"); From 525b456f571b69701c0b6134a10a21e13d70ed14 Mon Sep 17 00:00:00 2001 From: Basilio Bogado <541149+basiliskus@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:49:00 -0800 Subject: [PATCH 2/5] Cleanup --- .../hhs/cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/rs-e2e/src/main/java/gov/hhs/cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java b/rs-e2e/src/main/java/gov/hhs/cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java index c739fce6f..8f21f8808 100644 --- a/rs-e2e/src/main/java/gov/hhs/cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java +++ b/rs-e2e/src/main/java/gov/hhs/cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java @@ -28,8 +28,6 @@ public class AzureBlobFileFetcher implements FileFetcher { private AzureBlobFileFetcher() { String azureStorageConnectionString = System.getenv("AZURE_STORAGE_CONNECTION_STRING"); - var timezone = ZoneId.of("America/Los_Angeles"); - if (azureStorageConnectionString == null || azureStorageConnectionString.isEmpty()) { throw new IllegalArgumentException( "Environment variable AZURE_STORAGE_CONNECTION_STRING is not set"); From dc277118b850908593d5c25a03cf2afd21b79926 Mon Sep 17 00:00:00 2001 From: Basilio Bogado <541149+basiliskus@users.noreply.github.com> Date: Fri, 15 Nov 2024 15:04:49 -0800 Subject: [PATCH 3/5] Updated to use Central Standard Time --- .github/workflows/automated-staging-test-run.yml | 2 +- .github/workflows/automated-staging-test-submit.yml | 2 +- .../cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/automated-staging-test-run.yml b/.github/workflows/automated-staging-test-run.yml index 9f14c0ab4..6703a7b49 100644 --- a/.github/workflows/automated-staging-test-run.yml +++ b/.github/workflows/automated-staging-test-run.yml @@ -2,7 +2,7 @@ name: Automated Staging Test - Run integration tests on: schedule: - - cron: "0 10 * * 2-6" # Tuesday to Saturday at 2am PST (10am UTC) - two hours after `automated-staging-test-submit` runs + - cron: "0 8 * * 2-6" # Tuesday to Saturday at 2am CST (8am UTC) - two hours after `automated-staging-test-submit` runs workflow_dispatch: jobs: diff --git a/.github/workflows/automated-staging-test-submit.yml b/.github/workflows/automated-staging-test-submit.yml index fcdf41a91..f204fffa0 100644 --- a/.github/workflows/automated-staging-test-submit.yml +++ b/.github/workflows/automated-staging-test-submit.yml @@ -2,7 +2,7 @@ name: Automated Staging Test - Submit Messages on: schedule: - - cron: "0 8 * * 2-6" # Tuesday to Saturday at Midnight PST (8am UTC) + - cron: "0 6 * * 2-6" # Tuesday to Saturday at Midnight CST (6am UTC) workflow_dispatch: jobs: diff --git a/rs-e2e/src/main/java/gov/hhs/cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java b/rs-e2e/src/main/java/gov/hhs/cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java index 8f21f8808..0b167be1e 100644 --- a/rs-e2e/src/main/java/gov/hhs/cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java +++ b/rs-e2e/src/main/java/gov/hhs/cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java @@ -7,6 +7,7 @@ import com.azure.storage.blob.models.ListBlobsOptions; import java.time.LocalDate; import java.time.ZoneId; +import java.time.ZoneOffset; import java.util.ArrayList; import java.util.List; @@ -16,8 +17,8 @@ */ public class AzureBlobFileFetcher implements FileFetcher { - // Using Pacific Standard Time Zone as all or most contributors are in the US - private static final ZoneId TIME_ZONE = ZoneId.of("America/Los_Angeles"); + // Using Central Standard Time as all or most contributors are in the US + private static final ZoneId TIME_ZONE = ZoneOffset.of("-06:00"); private static final int RETENTION_DAYS = 90; private static final String CONTAINER_NAME = "automated"; From b7db2e59f2f67c10bd9ccd48cda97479e361c8ff Mon Sep 17 00:00:00 2001 From: Basilio Bogado <541149+basiliskus@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:45:30 -0800 Subject: [PATCH 4/5] Changed time zone to EST --- .github/workflows/automated-staging-test-run.yml | 2 +- .github/workflows/automated-staging-test-submit.yml | 2 +- .../cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/automated-staging-test-run.yml b/.github/workflows/automated-staging-test-run.yml index 6703a7b49..ba72161e4 100644 --- a/.github/workflows/automated-staging-test-run.yml +++ b/.github/workflows/automated-staging-test-run.yml @@ -2,7 +2,7 @@ name: Automated Staging Test - Run integration tests on: schedule: - - cron: "0 8 * * 2-6" # Tuesday to Saturday at 2am CST (8am UTC) - two hours after `automated-staging-test-submit` runs + - cron: "0 7 * * 2-6" # Tuesday to Saturday at 2am EST (7am UTC) - two hours after `automated-staging-test-submit` runs workflow_dispatch: jobs: diff --git a/.github/workflows/automated-staging-test-submit.yml b/.github/workflows/automated-staging-test-submit.yml index f204fffa0..0733accfa 100644 --- a/.github/workflows/automated-staging-test-submit.yml +++ b/.github/workflows/automated-staging-test-submit.yml @@ -2,7 +2,7 @@ name: Automated Staging Test - Submit Messages on: schedule: - - cron: "0 6 * * 2-6" # Tuesday to Saturday at Midnight CST (6am UTC) + - cron: "0 5 * * 2-6" # Tuesday to Saturday at Midnight EST (5am UTC) workflow_dispatch: jobs: diff --git a/rs-e2e/src/main/java/gov/hhs/cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java b/rs-e2e/src/main/java/gov/hhs/cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java index 0b167be1e..4d9a3a478 100644 --- a/rs-e2e/src/main/java/gov/hhs/cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java +++ b/rs-e2e/src/main/java/gov/hhs/cdc/trustedintermediary/rse2e/AzureBlobFileFetcher.java @@ -17,8 +17,8 @@ */ public class AzureBlobFileFetcher implements FileFetcher { - // Using Central Standard Time as all or most contributors are in the US - private static final ZoneId TIME_ZONE = ZoneOffset.of("-06:00"); + // Using Eastern Standard Time as all or most contributors are in the US + private static final ZoneId TIME_ZONE = ZoneOffset.of("-05:00"); private static final int RETENTION_DAYS = 90; private static final String CONTAINER_NAME = "automated"; From 37197477cc30c07f26cfd46377e4e8fd6ae2fedc Mon Sep 17 00:00:00 2001 From: Basilio Bogado <541149+basiliskus@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:55:17 -0800 Subject: [PATCH 5/5] Added a note in the readme calling out the timezone possible issue --- rs-e2e/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rs-e2e/README.md b/rs-e2e/README.md index 3037887a6..fa457a8cb 100644 --- a/rs-e2e/README.md +++ b/rs-e2e/README.md @@ -6,7 +6,10 @@ Intermediary and ReportStream. It's scheduled to run daily using the Information on how to set up the sample files evaluated by the tests can be found [here](/examples/Test/Automated/README.md) -**Note**: the output files generated by the framework are stored in an Azure blob storage container. Every time the tests are run, the files are moved to a folder with the year/month/day format for better organization. The files are retained in the container for 90 days before being deleted +## Important Notes + +- The output files generated by the framework are stored in an Azure blob storage container. Every time the tests are run, a cleanup task moves the files to a folder with the year/month/day format for better organization. The files are retained in the container for 90 days before being deleted +- The code that organizes the files is using EST time zone. This means that if you are in PST, you may run into an issue if you submit a run before 9 PM PST and then run the tests after 9pm. You'd need to make sure to run both tasks before or after 9pm so the files are where they are expected to be ## Running the tests