Design & media

Alibabacloud Yunxiao Flow Analysis

Try it

Yunxiao Flow Pipeline Troubleshooting and Solutions. Used to diagnose pipeline execution failures and provide fix recommendations. Trigger scenarios: Pipelin...

What it does

Yunxiao Flow Pipeline Troubleshooting and Solutions. Used to diagnose pipeline execution failures and provide fix recommendations. Trigger scenarios: Pipeline build errors, pipeline run failures, host deployment failures, k8s deployment failures, java build errors, python build errors, node build errors, unit test failures, image build failures, docker deployment failures, pipeline variable substitution errors, pipeline variables replaced with empty values.

The skill document

Yunxiao Flow Pipeline Troubleshooting

Scenario Description

This skill provides comprehensive troubleshooting and analysis capabilities for Yunxiao Flow pipeline failures. It helps diagnose issues across various pipeline stages, including:

Covered Pipeline Types:

  • Image Build (Docker)
  • Docker Deployment
  • Kubernetes Deployment
  • VM Deployment
  • Function Compute Deployment
  • Unit Testing (Python, Maven/Java, Node.js, Golang, PHP)

Architecture: Python Scripts → Yunxiao Flow API → Pipeline Execution Logs → Failure Analysis → Solution Recommendations.

Installation

The websocket-client library is required.

Environment Variables

Environment VariableDescriptionRequired
YUNXIAO_ACCESS_TOKENYunxiao Personal Access Token (format: pt-xxx)Yes

Authentication

Before executing any commands, ensure you have a valid Yunxiao Personal Access Token configured via environment variable.

export YUNXIAO_ACCESS_TOKEN="pt-xxxxxxxxxxxxx"

Security Design:

  • Token is read exclusively from environment variable YUNXIAO_ACCESS_TOKEN — CLI arguments are not supported to prevent exposure in process listings (ps/top), shell history, and /proc/*/cmdline
  • Token format is validated (pt- prefix) before any network transmission to prevent accidental credential leakage
  • All API communication uses HTTPS with TLS encryption
  • Scripts have built-in token masking in output, showing only the first 6 and last 6 characters

Security Rules:

  • NEVER read, echo, or print the full token value
  • NEVER ask the user to input the token directly in the conversation
  • NEVER hardcode token values in scripts
  • NEVER pass token via command-line arguments (use environment variable only)
  • Tokens should be obtained from Yunxiao Console > Personal Settings > Personal Access Tokens

RAM Permissions

This skill uses token-based authentication for Yunxiao Flow API. Required permissions:

  • Flow Pipeline all modules: Read-only access

For detailed permission requirements and failure handling, see references/ram-policies.md.

[MUST] Permission Failure Handling: When any command or API call fails due to permission errors at any point during execution, follow this process:

  1. Read references/ram-policies.md to get the full list of permissions required by this SKILL
  2. Verify that the Yunxiao Personal Access Token has the necessary permissions
  3. Pause and wait until the user confirms that the required permissions have been granted

Parameter Confirmation

Important: Parameter Confirmation — Before executing any command or API call, all customizable parameters must be confirmed with the user. Never assume or use default values without explicit user approval.

ParameterRequired/OptionalDescriptionDefault
org-idRequiredOrganization ID (24 characters for central org, 32 characters for regional org)None
pipeline-idRequiredPipeline IDNone
pipeline-runidRequiredPipeline Run IDNone
YUNXIAO_ACCESS_TOKENRequired (environment variable)Personal Access Token (format: pt-xxx), set via export YUNXIAO_ACCESS_TOKEN="pt-xxx"None
domainOptionalAPI domain (default: openapi-rdc.aliyuncs.com)openapi-rdc.aliyuncs.com

Core Workflow

Step 1: Get Pipeline Run Status

Note: All scripts read the token from environment variable YUNXIAO_ACCESS_TOKEN. Ensure it is set before running any command.

python3 scripts/yunxiao_flow_get_pipeline_runs.py \
  --org-id  --pipeline-id  \
  --pipeline-runid  --domain 

Analyze the returned JSON:

  1. Check the status field (SUCCESS/FAIL/RUNNING/INIT)
  2. Traverse stages to find the failed stage
  3. Find the failed job within the failed stage
  4. Find the failed step within the failed job

Step 2: Get Failed Step Logs

python3 scripts/yunxiao_flow_get_job_step_log.py \
  --org-id  --pipeline-id  --pipeline-runid  \
  --job-id  --step-index  --build-id  \
  --domain  --full-log

Step 3: Get VM Deployment Logs (if applicable)

python3 scripts/yunxiao_flow_get_vm_deploy_machine_log.py \
  --org-id  --pipeline-id  --pipeline-runid  \
  --deploy-order-id  --machine-sn  \
  --domain 

Step 4: Consult Reference Documents for Analysis

Read the corresponding reference documents based on the failure scenario. For detailed guidance, see references/troubleshooting-guide.md.

Must read: yunxiao_base.md, yunxiao_flow_get_pipeline_runs.md

Step 5: Analyze and Provide Solutions

After confirming the build cluster and code clone information, output:

  1. Pipeline basic information, which must include: build cluster (build cluster name must NOT be obtained from params.buildNodeGroup. It MUST be obtained from the "Request Runtime Environment" step logs.), build environment, trigger time, status, failed job, failed step, downloaded code source, job workspace (can be viewed from the PROJECT_DIR in the Pipeline Cache step)
  2. Failed step information
  3. Error log summary
  4. Root cause analysis
  5. Solution recommendations (configuration changes, parameter adjustments, operational steps)

Success Verification Method

For verification steps, see references/verification-method.md

Cleanup

No resource cleanup required. This skill only performs read operations for analysis purposes.

Best Practices

  1. Always validate org-id length to determine organization type (24 chars = central org, 32 chars = regional org)
  2. Check build cluster type from "Request Runtime Environment" step logs, not from params.buildNodeGroup
  3. Read base reference documents first: Read yunxiao_base.md and yunxiao_flow_get_pipeline_runs.md before scenario-specific files
  4. Extract build cluster information from log patterns:
    • Default: [Build Cluster Info] >> Cluster Name : Yunxiao China Hong Kong Build Cluster
    • VPC: [Build Cluster Info] >> Cluster Name : Hangzhou VPC Build Cluster
    • Private: [Runner Group Info]: >> RunnerGroupName : xxxxx
  5. Verify code clone information: Check branch name and commit SHA before analysis
  6. Match failure scenarios to corresponding reference documents in the troubleshooting guide table
Reference DocumentDescription
troubleshooting-guide.mdComplete troubleshooting guide (org types, knowledge base selection, build cluster identification)
yunxiao_base.mdYunxiao fundamentals (org types, API versions, PAT, pipeline concepts)
yunxiao_flow_get_pipeline_runs.mdPipeline runs API field documentation
flow_git_clone.mdCode clone error troubleshooting
flow_build_docker.mdDocker image build troubleshooting
flow_build_nodeJs.mdNode.js build troubleshooting
flow_build_python.mdPython build troubleshooting
flow_customEnvironmentBuild.mdCustom environment build error troubleshooting
flow_build_java.mdJava build troubleshooting
flow_deploy_docker.mdDocker deployment troubleshooting
flow_deploy_kubectl.mdKubernetes deployment troubleshooting
flow_deploy_vm.mdVM deployment troubleshooting
flow_deploy_fc.mdFunction Compute deployment troubleshooting
flow_test_python.mdPython unit test troubleshooting
flow_test_maven.mdMaven/Java unit test troubleshooting
flow_test_nodeJS.mdNode.js unit test troubleshooting
flow_test_golang.mdGolang unit test troubleshooting
flow_test_php.mdPHP unit test troubleshooting
flow_variables.mdPipeline variable configuration
flow_workspace_runtime.mdWorkspace and runtime environment troubleshooting
ram-policies.mdRAM permission requirements and authentication guide
related-commands.mdComplete list of all script commands

Tools

ScriptFunction
yunxiao_flow_get_pipeline_runs.pyGet pipeline run information
yunxiao_flow_get_job_step_log.pyGet step execution logs
yunxiao_flow_get_vm_deploy_order.pyGet VM deployment order details
yunxiao_flow_get_vm_deploy_machine_log.pyGet VM deployment machine logs
webTerminal.pyConnect to container environment debug terminal

Related skills

Automate Alibaba Cloud Yunxiao DevOps tasks — create and run pipelines, manage code repositories and merge requests, track work items and sprints, create test cases, manage artifacts, and drive application release workflows across 8 Yunxiao products. Triggers: "Yunxiao", "DevOps", "pipeline", "code repository", "merge request", "work item", "sprint", "test case", "application delivery", "artifact repository", "Codeup", "Flow", "Projex", "AppStack", "Packages", "Testhub"

Use when managing Alibaba Cloud DevOps (Yunxiao 2020) via OpenAPI/SDK, including project/repository/pipeline resource discovery, read-only inspection, and sa...

12 installs

Alibaba Cloud OpenAPI troubleshooting skill. Use this skill when the user needs to diagnose API call failures using Request ID, error codes, or error message...

Alibaba Cloud SLS (Simple Log Service) log query & analysis skill. Use this skill to help users write, explain, optimize, execute, or troubleshoot SLS index...

17 installs

Read-only diagnostics for Alibaba Cloud CDN traffic and bandwidth anomalies. Use when CDN traffic or bandwidth suddenly spikes, the CDN bill jumps unexpectedly, traffic theft or hotlink abuse is suspected, or bps/flow/QPS trends need baseline comparison to locate anomalous time windows. Pulls usage data via aliyun CLI to locate anomalous windows, then forensically analyzes CDN offline access logs (four-dimension Top statistics, 13 theft rules, T1~T6 classification) and outputs an analysis report; never stops domains or changes any configuration. Triggers: "traffic spike", "bandwidth anomaly", "traffic theft", "unusual CDN traffic", "hotlink abuse", "CDN bill surge", "traffic suddenly increased", "bandwidth spike analysis".