From 37424819fabe2069810c5e1b49b5f48b445cc28f Mon Sep 17 00:00:00 2001 From: Brandon Sprague Date: Thu, 21 Nov 2024 20:13:38 -0800 Subject: [PATCH] Assorted configuration updates Some are straggling fixes (centralus -> westeurope for the new deployment), and others are new configuration updates for the Azure file share mounts in the parser + runner. --- .github/workflows/deploy.yml | 2 +- cmd/parser/configs/test.conf | 2 +- cmd/parser/main.go | 8 ++++++++ cmd/runner/configs/test.conf | 2 +- taskrunner/taskrunner.go | 18 ++++++++++++++++++ 5 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8e408a5..09345c6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -69,7 +69,7 @@ jobs: containerAppEnvironment: pacta-test resourceGroup: RMI-SP-PACTA-WEU-PAT-DEV imageToDeploy: rmisppactaweupatdev.azurecr.io/pacta:test - location: centralus + location: westeurope - name: Deploy frontend uses: Azure/static-web-apps-deploy@v1 diff --git a/cmd/parser/configs/test.conf b/cmd/parser/configs/test.conf index c7c4b34..c416609 100644 --- a/cmd/parser/configs/test.conf +++ b/cmd/parser/configs/test.conf @@ -2,7 +2,7 @@ env test min_log_level warn azure_event_topic pacta-events-test -azure_topic_location centralus-1 +azure_topic_location westeurope-1 azure_storage_account rmipactatest azure_dest_portfolio_container parsedportfolios diff --git a/cmd/parser/main.go b/cmd/parser/main.go index bd2d91d..a7475e5 100644 --- a/cmd/parser/main.go +++ b/cmd/parser/main.go @@ -46,6 +46,10 @@ func run(args []string) error { azStorageAccount = fs.String("azure_storage_account", "", "The storage account to authenticate against for blob operations") azDestPortfolioContainer = fs.String("azure_dest_portfolio_container", "", "The container in the storage account where we write parsed portfolios") + // TODO(brandon): Pretty sure these aren't needed, but it's a larger refactoring to split parsing logic from report generation logic. + benchmarkDir = fs.String("benchmark_dir", "", "The path to the benchmark data for report generation") + pactaDataDir = fs.String("pacta_data_dir", "", "The path to the PACTA data for report generation") + minLogLevel zapcore.Level = zapcore.DebugLevel ) fs.Var(&minLogLevel, "min_log_level", "If set, retains logs at the given level and above. Options: 'debug', 'info', 'warn', 'error', 'dpanic', 'panic', 'fatal' - default warn.") @@ -103,6 +107,10 @@ func run(args []string) error { Blob: blobClient, PubSub: pubsubClient, Logger: logger, + + // TODO(brandon): Pretty sure these aren't needed, but it's a larger refactoring to split parsing logic from report generation logic. + BenchmarkDir: *benchmarkDir, + PACTADataDir: *pactaDataDir, }) if err != nil { return fmt.Errorf("failed to init async biz logic handler: %w", err) diff --git a/cmd/runner/configs/test.conf b/cmd/runner/configs/test.conf index 84eda68..7907224 100644 --- a/cmd/runner/configs/test.conf +++ b/cmd/runner/configs/test.conf @@ -2,7 +2,7 @@ env test min_log_level warn azure_event_topic pacta-events-test -azure_topic_location centralus-1 +azure_topic_location westeurope-1 azure_storage_account rmipactatest azure_report_container reports diff --git a/taskrunner/taskrunner.go b/taskrunner/taskrunner.go index 680ba6b..137d79e 100644 --- a/taskrunner/taskrunner.go +++ b/taskrunner/taskrunner.go @@ -123,6 +123,15 @@ func (tr *TaskRunner) ParsePortfolio(ctx context.Context, req *task.ParsePortfol Key: "PARSE_PORTFOLIO_REQUEST", Value: value, }, + // TODO(brandon): Unhardcode these + { + Key: "BENCHMARK_DIR", + Value: "/mnt/benchmark-data/65c1a416721b22a98c7925999ae03bc4", + }, + { + Key: "PACTA_DATA_DIR", + Value: "/mnt/pacta-data/2023Q4_20240718T150252Z", + }, }) } @@ -157,6 +166,15 @@ func (tr *TaskRunner) CreateReport(ctx context.Context, req *task.CreateReportRe Key: "CREATE_REPORT_REQUEST", Value: value, }, + // TODO(brandon): Unhardcode these + { + Key: "BENCHMARK_DIR", + Value: "/mnt/benchmark-data/65c1a416721b22a98c7925999ae03bc4", + }, + { + Key: "PACTA_DATA_DIR", + Value: "/mnt/pacta-data/2023Q4_20240718T150252Z", + }, }) }