Skip to content

Conversation

gunzip
Copy link
Contributor

@gunzip gunzip commented Sep 12, 2025

Introduce a structured approach to the Azure Opex Dashboard with improved configuration validation, streamlined CLI commands, and enhanced testing. I

Update documentation and contributing guidelines to reflect the new structure and features.

…ation utilities and implementing Zod schemas for improved type safety and validation
…to utils, and update references in resolver and endpoint-parser
…edundant comments and streamline resource group naming
… consolidate dashboard generation to use AzureDashboardCdkBuilder
…amline command handling and improve error reporting
…orts to use module syntax and improve error handling
…emove unused cdktf.json, and enhance error handling in OA3Resolver
…ons; enhance tsup configuration for better output
…dency for opex-dashboard-ts and upgrade cdktf provider version
…ted imports; remove unused azure-opex-cdk.ts file
- Created metadata.json for the Opex Dashboard stack, defining various availability and response time alerts.
- Implemented addAzureDashboard function to initialize the AzureOpexStack with validated configuration and parsed endpoints.
- Integrated OpenAPI spec resolution and endpoint parsing for dynamic dashboard generation.
- Separate domain, application, and infrastructure layers
- Implement ports & adapters pattern
- Move business logic to domain services
- Create adapters for external dependencies
- Update tests and documentation
- All tests passing
…orAdapter; refactor related services and update exports
Copy link

changeset-bot bot commented Sep 12, 2025

⚠️ No Changeset found

Latest commit: 34061c5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment on lines +126 to +127
path
.replace(/\{[^}]+\}/g, "[^/]+") // Replace {param} with [^/]+

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on
library input
may run slow on strings starting with '{' and with many repetitions of '{'.
This
regular expression
that depends on
library input
may run slow on strings starting with '{' and with many repetitions of '{'.
This
regular expression
that depends on
library input
may run slow on strings starting with '{' and with many repetitions of '{'.
This
regular expression
that depends on
library input
may run slow on strings starting with '{' and with many repetitions of '{'.
This
regular expression
that depends on
library input
may run slow on strings starting with '{' and with many repetitions of '{'.
This
regular expression
that depends on
library input
may run slow on strings starting with '{' and with many repetitions of '{'.

/* Convert placeholders like {serviceId} or {ServiceID} to {service_id} for display */
export function normalizePathPlaceholders(path: string): string {
return path.replace(/\{([^}]+)\}/g, (_, name) => `{${toSnakeCase(name)}}`);

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on
library input
may run slow on strings starting with '{' and with many repetitions of '{|'.
This
regular expression
that depends on
library input
may run slow on strings starting with '{' and with many repetitions of '{|'.
This
regular expression
that depends on
library input
may run slow on strings starting with '{' and with many repetitions of '{|'.
Comment on lines +176 to +185
input
.trim()
// remove leading slashes to avoid leading underscores later
.replace(/^\/+/, "")
// normalize spaces and unsupported chars
.replace(/\s+/g, "-")
.replace(/[{}]/g, "")
.replace(/[^a-zA-Z0-9-_/]/g, "-")
// drop trailing slashes first
.replace(/\/+$/g, "")

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on
library input
may run slow on strings with many repetitions of '/'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of '/'.

- name: Get terraform version from .terraform-version file
id: get-version
uses: pagopa/dx/.github/actions/get-terraform-version@main

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'infra_plan_opex.yaml' step
Uses Step: get-version
uses 'pagopa/dx/.github/actions/get-terraform-version' with ref 'main', not a pinned commit hash
done

- name: Azure Login
uses: pagopa/dx/.github/actions/azure-login@main

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'infra_plan_opex.yaml' step
Uses Step
uses 'pagopa/dx/.github/actions/azure-login' with ref 'main', not a pinned commit hash

- name: Terraform Setup
id: set-terraform-version
uses: pagopa/dx/.github/actions/terraform-setup@main

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'infra_plan_opex.yaml' step
Uses Step: set-terraform-version
uses 'pagopa/dx/.github/actions/terraform-setup' with ref 'main', not a pinned commit hash
- name: Post Plan on PR
id: comment
if: always() && github.event_name == 'pull_request'
uses: pagopa/dx/actions/pr-comment@main

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'infra_plan_opex.yaml' step
Uses Step: comment
uses 'pagopa/dx/actions/pr-comment' with ref 'main', not a pinned commit hash
Copy link
Contributor

This PR exceeds the recommended size of 800 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link
Contributor

Tip

✅ All Terraform module locks are up to date

No module changes detected - everything is in sync!

📋 Pre-commit Output Log
[INFO] Initializing environment for https://github.com/antonbabenko/pre-commit-terraform.
[INFO] Initializing environment for https://github.com/pagopa/dx.
Lock Terraform Registry modules..........................................Passed

Generated on Sun Sep 14 10:38:17 UTC 2025
Run lock_modules on folder: infra/resources/dev/

Copy link
Contributor

📋 Pre-commit Output Log
[INFO] Initializing environment for https://github.com/antonbabenko/pre-commit-terraform.
[INFO] Initializing environment for https://github.com/pagopa/dx.
Lock Terraform Registry modules......................(no files to check)Skipped

Generated on Sun Sep 14 10:40:17 UTC 2025
Run lock_modules on folder: test-opex-api/stacks/opex-dashboard/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant