Skip to content

Commit

Permalink
Assorted configuration updates
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bcspragu committed Nov 22, 2024
1 parent 4dc23b1 commit 3742481
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cmd/parser/configs/test.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions cmd/parser/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cmd/runner/configs/test.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 18 additions & 0 deletions taskrunner/taskrunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
})
}

Expand Down Expand Up @@ -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",
},
})
}

Expand Down

0 comments on commit 3742481

Please sign in to comment.