Skip to content

Deploy Failure: deploy_app.py - 2026-05-19 04:30:01 UTC #53

Description

@hocokahu

RESPONSE FROM KAHU

SUMMARY:
The CI/CD run github_26076208973 for hoc_cicd_wyd6u1 ultimately failed due to an issue in the user_account.provision step, which was unable to create a user account. Additionally, there were two successful deployments with critical warnings: one where a Kusto table (MetricAggregates) was not created, and another with security and compliance concerns regarding an overly permissive Azure SQL firewall rule and disabled audit logging. The immediate next steps should focus on debugging the user account provisioning failure, investigating the missing Kusto table, and addressing the Azure SQL security and compliance warnings.


Trace ID: ad376b86acd1a77b0823bfffdcde9a2c

  • user_account.provision: failed
    • Root Cause Analysis: The user_account.provision step failed with the error message "User account creation failed". The data.output event for this span confirms an error_code: "error". This indicates a problem during the attempt to provision a new user account. This could be due to incorrect credentials, insufficient permissions for the service principal performing the action, a malformed user principal name (UPN), or a conflict with an existing user.
    • Recommendations to Fix:
      1. Verify the credentials and permissions of the service principal used for user provisioning in Azure Active Directory. Ensure it has the necessary roles (e.g., "User Administrator") to create new users.
      2. Check the input parameters for the user_account.provision step (e.g., svc-pipeline-runner, svc-pipeline-runner@okahu.onmicrosoft.com, User Administrator) for any typos or incorrect values.
      3. Investigate Azure Active Directory audit logs for more specific error messages related to the failed user creation attempt.
      4. Ensure there isn't an existing user with the same UPN (svc-pipeline-runner@okahu.onmicrosoft.com) that might be causing a conflict.
    • Files/Configurations to Check:
      • deploy_app.py (line 83) for the user_account.provision call and its parameters.
      • Azure Active Directory configuration for the service principal's permissions.
      • Azure Active Directory audit logs.

Trace ID: a8f9ab18c870bb0d83aadb6b3e4a559e

  • kusto.deploy_tables: warning
    • Root Cause Analysis: The kusto.deploy_tables step reported a "partial" status, indicating that while the script executed, not all intended tables were created. Specifically, the MetricAggregates table was missing. The log suggests a "Possible cause: Kusto script execution is asynchronous. The '.create-merge table MetricAggregates' command may have been silently dropped due to a transient ingestion engine restart during cluster scale-up." This implies a race condition or an issue with the asynchronous nature of Kusto script execution where not all commands within a script are guaranteed to complete if the underlying service experiences transient issues.
    • Recommendations to Fix:
      1. Implement retry logic for Kusto script execution, especially for table creation commands, to account for transient failures.
      2. Add explicit verification steps after script execution to confirm the existence of all expected tables. If a table is missing, attempt to create it again.
      3. Consider breaking down large Kusto scripts into smaller, idempotent operations that can be retried individually.
      4. Review Azure Data Explorer cluster health and logs for any signs of instability or frequent restarts during deployment windows.
    • Files/Configurations to Check:
      • deploy_app.py (line 75) for the kusto.deploy_tables call.
      • The Kusto script content that defines the tables (specifically the .create-merge table MetricAggregates command).
      • Azure Data Explorer cluster logs and monitoring.

Trace ID: 20d5c973fc36e8eddd4aaf9cf727f385

  • azure_sql.deploy: warning
    • Root Cause Analysis: The azure_sql.deploy step completed successfully but with two significant warnings:
      1. Overly Permissive Firewall Rule: A firewall rule named temp-debug-access allows access from all IP addresses (0.0.0.0 - 255.255.255.255). This is a critical security vulnerability for a production database.
      2. Disabled Audit Logging: Audit logging is disabled on the okahu-traces-db database, which violates compliance requirements for production databases.
    • Recommendations to Fix:
      1. Firewall Rule: Immediately remove or restrict the temp-debug-access firewall rule. Only allow access from known and necessary IP ranges or virtual networks.
      2. Audit Logging: Enable audit logging for the okahu-traces-db database and configure it to send logs to a secure and compliant storage location (e.g., Azure Storage Account, Log Analytics Workspace).
      3. Implement automated checks in the CI/CD pipeline to flag or fail deployments that introduce such security and compliance issues.
    • Files/Configurations to Check:
      • deploy_app.py (line 70) for the azure_sql.deploy call and its parameters.
      • Azure SQL Server firewall rules configuration.
      • Azure SQL Database audit settings for okahu-traces-db.
      • CI/CD pipeline definition for security and compliance checks.

Trace ID: 1c706dc0ce7a3348b0da093c1ac9d6e6

  • azure_blob.deploy: succeeded

  • Workflow Run ID: 26076208973
  • GitHub Actor: hocokahu

Response from Okahu SRE Agent

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions