DevOps pipeline execution trouble shooting. .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } } 📋 Overview This comprehensive guide helps you debug pipeline execution issues when: Pipeline execution is not persisted on ServiceNowPipeline execution is partially persistedSub-events are not linked correctly Quick Reference: See Known Errors and Solutions for common issues, Best Practices for preventive measures, and Common Pitfalls to avoid frequent mistakes. âś… Step 1: Verify Basic Configuration Before debugging inbound events, verify these basic prerequisites: 1. Verify Tool Connection Status 📍 Table: sn_devops_tool Checks: Navigate to DevOps Workspace → ToolsFind the orchestration toolVerify Connection State = ConnectedVerify Overall Status = Connected (not Disconnected, Needs Attention, or Throttled)Check Valid Credentials = trueVerify Last Permission Check Result = Full permissions ⚠️ Issue: If tool is not connected or has issues, refer to Scenario A: No Inbound Events Received section below to fix tool configuration. 2. Verify Pipeline is Discovered and Tracked 📍 Table: sn_devops_pipeline Checks: Navigate to DevOps Workspace → PipelinesSearch for your pipeline using pipeline name or native IDVerify pipeline record exists (discovered)Check Track for Change field = trueVerify Tool reference points to correct orchestration toolCheck Active = true ⚠️ Issue: If pipeline is not discovered, trigger a discovery from tool configuration or check if pipeline tracking is disabled. � Note: Ensure there are no duplicate pipeline records for the same pipeline. Duplicates can cause processing issues (see Known Errors section). �🔍 Step 2: Check Inbound Events 📍 Table: sn_devops_inbound_event Action: Verify if inbound events are received for the build Filters to apply: Tool (orchestration tool name)Original payload column (to uniquely identify the build)Timestamp range ⚠️ Scenario A: No Inbound Events Received Problem: No inbound events found in sn_devops_inbound_event table for the build. ⚠️ Important: Verify in sn_devops_processed_inbound_event table also as processed events are moved to this table hourly. Debugging Steps: Verify Webhook Configuration: Navigate to orchestration tool and check webhook sectionVerify webhook to ensure it's configured as per documentCheck if webhook is active/enabled Verify Token: Verify if the token set to webhook is correctTo verify this, you can use test webhook feature or check delivery history Check Delivery History: In orchestration tool, navigate to webhook section and select the webhook and check delivery historyCheck for failed deliveries or HTTP errorsVerify response codes (look for 200/201 success codes)If response is 401: It means token is invalid - please reconfigure or update token manually âś… Resolution: It's a configuration issue, reconfigure webhook automatically or manually by following the steps mentioned in official document. âś… Scenario B: Inbound Events Are Present, but not all 🔍 B.1: Verify All Events Received Expected Events: Event TypeExpected CountPipeline Started1Pipeline Completed1 (if build completed)Stage Started1 per stageStage Completed1 per stage ⚠️ Important: Processed events are moved to sn_devops_processed_inbound_event table hourly. Check both tables! 📌 Note: If import-based evidence collection is enabled, you will only receive the pipeline completion event. In this case, check the processing details field and navigate to the mentioned Import Request (IR) record in the sn_devops_import_request table to verify evidence collection status. For more details, please refer official documentation. If Events Are Missing: Verify all required webhooks are created on orchestration toolSome webhook types might be missing (e.g., stage events vs pipeline events)Reconfigure webhooks to include all event types ⏸️ B.2: Events in Deferred State Problem: Inbound events are stuck in deferred state. Root Cause: Rate limit has occurred for the orchestration tool. Events will remain deferred until rate limit is cleared. Prevention Steps: To avoid more API calls, follow below steps: Avoid unnecessary configurations: Unconfigure projects/repos that don't need trackingUntrack unused pipelines: Don't track pipelines that customer doesn't want in SN 💡 Tip: Events will automatically process once rate limit period expires How to Identify Rate Limiting: Check Tool Overall Status: Navigate to DevOps Workspace → ToolsLook at the Overall Status column for the orchestration toolIf status shows Throttled, the tool is under rate limiting Check Tool Connection Status Table: Table: sn_devops_tool_connection_statusFilter by the specific toolCheck if throttle_active field = trueReview throttle_reset_time field to see when rate limit will be clearedCheck throttle_start_time to see when throttling began 🔍 Details: When rate limiting occurs, the system automatically sets the tool's overall_status to throttled and creates/updates a record in sn_devops_tool_connection_status with throttle_active=true. This prevents new events from being processed until the rate limit window expires. ❌ B.3: Events in Errored State Debugging Checklist: Check Processing Details: Open the errored inbound event recordReview "Processing Details" field Check Error Logs: Table: sn_devops_logUse "Show Error Log" related link on IB record page Check Flow Designer Execution: Flow: DevOps Integration - Orchestration NotificationFilter by errored IB sys_idReview flow execution logs Verify Permissions: Ensure sn_devops.tool_owner role has read access on: sys_connection tablehttp_connection table âś… Resolution: Once issue is identified and fixed, use the "Retry" option on IB record page ⏳ B.4: Events in Waiting State 📊 Waiting Reason Tracking: All waiting reasons are tracked in the sn_devops_waiting_reason_tracking table. This table stores the relationship between inbound events and their waiting dependencies. Each record contains: reference_table: Table containing the waiting record (sn_devops_inbound_event)related_record: Sys_id of the waiting inbound eventwaiting_code: Type of wait conditionwaiting_reason: Specific reason/dependency causing the wait 🔄 Automatic Waiting Cleanup: A scheduled job "Bulk Event Processor - Monitor" runs every 1 minute and calls the WaitingEventReconcileHandler script. This job: Checks waiting events that have been in waiting state for more than 10 minutesValidates if the dependency has been resolvedAutomatically removes waiting reasons from sn_devops_waiting_reason_tracking table if conditions are metMoves events from waiting to processing state when unblocked 💡 Best Practice: If an event is in waiting state and you believe the dependency is resolved, wait 10 minutes for the scheduled job to reconcile before manual intervention. Waiting Reasons & Solutions: ▶️ Waiting for Started Event Waiting Reason: waiting_for_started_event Issue: Completed event is processing but started event hasn't been processed yet. Actions: Verify if started event was receivedIf received, check its state (errored/waiting)Review processing details of started event Resolution: If started event was errored, debug as mentioned in error section and retry. 🔗 Waiting for Execution Dependencies Waiting Reasons: waiting_for_upstream_task_execution_creationwaiting_for_previous_task_execution_creationwaiting_for_child_executionwaiting_for_parent_execution Action: Check inbound events for the specific stage mentioned in waiting reason (upstream/previous/child/parent). 💡 Tip: If multiple events are waiting, find the topmost/source stage causing the cascade. Example: For a pipeline with 5 stages s1, s2, s3, s4, s5 and if Stage 2 fails, Stages 3, 4, 5 will wait in hierarchy: s5:  completed → waiting_for_started_event  started → waiting_for_upstream_task_execution_creation of s4s4:  completed → waiting_for_started_event  started → waiting_for_upstream_task_execution_creation of s3s3:  completed → waiting_for_started_event  started → waiting_for_upstream_task_execution_creation of s2s2:  completed → waiting_for_started_event  started → Faileds1:  started → execution_created 💡 Resolution: In this case, fix on s2 started event only will resolve all the other waitings. Action: To debug errored IB, please refer error section and retry. 📊 Waiting for Evidence Sub-Events Waiting Reasons: waiting_for_test_executionwaiting_for_security_scan_executionwaiting_for_security_scan_summary_data Explanation: When a stage has any of these sub-events configured, the completed event of that stage waits for sub-event processing. Debugging Steps: SituationActionSub-event is processedRace condition might have occurred. Wait 10 minutes - a scheduled job will remove the waiting reason.Sub-event is errored/waitingRefer to "Sub-Events Debugging" section belowNo sub-event IB receivedSome configuration issue in pipeline. Check configuration of sub-event task on pipeline. Review build logs for that stage in orchestration tool. Verify the format, variables and secrets. 📝 Waiting for Commits/Branches/Pull Request Waiting Reasons: waiting_for_commitswaiting_for_branchwaiting_for_pull_requests Issue: Build has commits or branches that haven't been persisted yet. If pipeline is PR type, it will wait for PR persistence. Resolution Steps: Check processing details of waiting IB to see which commits/branches are missing Wait 10 minutes: A scheduled job will create IB to fetch missing commits/branches, verify this newly created event and processing detailIf new IB is created and errored, check the processing details and error logs If still not fetched after 10 minutes: Verify commit exists on coding tool (GitHub/GitLab/etc.)If not available on coding tool, contact customer and coding tool team Prevention: Ensure repository from which pipeline belongs is configured.Verify webhook is created for coding events, if not we will not receive the event of commit and branchesIf customer doesn't want to configure repo or commits from this repo, untrack itNote: If repo is tracked, make sure it's configured correctly. For very first time execution, there are more chances for this to happen because when user connected tool and configured, few commits were already done and events for these will not come. 🧩 Step 3: Sub-Events Debugging Sub-events are categorized into two types: Evidence Sub-Events: Tests, Security Scans, Software Quality resultsCode Sub-Events: Commits, Branches, Pull Requests 📊 Evidence Sub-Events (Tests, Security, Quality) 🔗 Waiting for Task Execution Relation Waiting Reason: waiting_for_task_execution_relation Issue: These sub events waits until task execution of particular stage is not created which happens as part of started event processing. So this will happen when started event of stage having this sub-event is not processed yet. Debugging Steps: Check waiting reason and processing details of IBSearch for started event of stage in both: sn_devops_inbound_eventsn_devops_processed_inbound_event Refer to "Debug Pipeline Execution" section above to debug the started event ❌ Sub-Event in Errored State Debugging Checklist: Check Processing Details: Review the processing detail field on IB recordCheck DevOps Error Logs: Table: sn_devops_logCheck Flow Designer Execution: DevOps Integration - NotificationDevOps Integration - Test Notification Verify Task Configuration: Check configuration and payload of task in pipeline on orchestration toolEnsure configuration is correct per documentation, re-verify the variables, payload and naming conventions Verify Version Compatibility: Check DCV (DevOps Change Velocity) version installed in ServiceNow and extension installed on orchestration tool side, make sure they are compatibleNote: Azure DevOps extension has backward compatibility handled as it will always be the latest version ⚠️ No Sub-Event Inbound Event Available Investigation Steps: Check Pipeline on Orchestration Tool: Verify the sub-event task configuration for the stage in pipelineCheck if the task is configured correctly in pipeline Verify Custom Task Version: Ensure you're using a compatible versionIncompatible versions might create issues Verify Variables: Check all required variables are set correctlyReview variable values in pipeline configuration Review Build Logs: Check build logs for the stage in orchestration toolLook for errors or warnings related to the task Refer to Documentation: Review official documentation for the specific taskVerify all prerequisites are met 📝 Code Sub-Events (Commits, Branches, Pull Requests) 🔍 Debugging Commits, Branches, and Pull Requests Overview: These sub-events are related to source code management (SCM) tools and require proper webhook configuration on coding tools (GitHub, GitLab, Bitbucket, Azure Repos, etc.) 📌 Key Information: Commit & Branch: A code capability type inbound event is created for commit/branchPull Request: Check code capability type inbound eventsSearch Tip: For commits/branches, search by SHA/ID in the original_payload column of sn_devops_inbound_event table Scenario 1: No Inbound Event Received Steps to Debug: Identify Missing IB: For Commit/Branch: Search sn_devops_inbound_event table by SHA or commit ID in original_payload columnFor Pull Request: Filter by capability_type = code and search for PR identifier in original_payloadCheck both sn_devops_inbound_event and sn_devops_processed_inbound_event tables Verify Webhook Configuration on Coding Tool: Navigate to coding tool (GitHub/GitLab/Azure Repos/Bitbucket) webhook sectionVerify webhook is configured for repository events (push, pull request, branch events)Check if webhook is active/enabled Check Webhook Delivery History: In coding tool, navigate to webhook settings → delivery historyLook for the specific event (commit push, branch creation, PR opened, etc.)Check response codes and error messagesIf no delivery found: Event was not triggered by coding tool (check event type subscriptions) Verify Token/Authentication: Check if the token configured in webhook is validUse test webhook feature if available to validate connectivityReconfigure token if authentication fails Scenario 2: Inbound Event in Errored State Steps to Debug: Identify the Errored IB: Search sn_devops_inbound_event table by commit SHA, branch name, or PR identifier in original_payloadFilter by state = error and capability_type = code Check Processing Details: Open the errored inbound event recordReview processing_details field for specific error informationCheck error field for error message Review Error Logs: Navigate to System Logs → System Log → AllFilter by source related to DevOps (e.g., sn_devops)Look for errors corresponding to the inbound event timestamp Verify Data Availability on Coding Tool: Verify commit/branch/PR exists on the coding tool using SHA, branch name, or PR identifierIf data is missing, investigate with tool administrator or customer Check Flow Executions: Navigate to Flow Designer → Flow Executions and search for the errored inbound eventCheck if any subflow failed during processing Review Known Errors: Check the Known Errors and Solutions section below for common issues like subflow timeouts, missing permissions, or configuration problems Retry After Fix: Once root cause is identified and fixed, use Retry option on the errored inbound eventMonitor the processing to ensure it completes successfully ⚠️ Important: If you don't want to track certain repositories or their commits, explicitly untrack them to avoid unnecessary processing and API calls. 📚 Quick Reference Tables Important ServiceNow Tables Table NamePurposesn_devops_inbound_eventActive inbound events (not yet processed or processing)sn_devops_processed_inbound_eventSuccessfully processed events (moved hourly)sn_devops_logDevOps error and debug logssys_connectionConnection configurationshttp_connectionHTTP connection details Flow Designer Flows to Check Flow NamePurposeDevOps Integration - Orchestration NotificationProcesses orchestration tool events (pipeline/stage)DevOps Integration - Test NotificationProcesses test execution eventsDevOps Integration - NotificationProcesses sub events 🔧 Known Errors and Solutions 💡 Tip: Common errors with verified solutions. ⏱️ Error 1: Subflow Timeout Issue: Subflow fails due to timeout during processing. Solution: Navigate to sn_devops_integration_capability table, find the capability record, and increase timeout value (e.g., 60 to 120 seconds). Then retry the failed inbound event. 🔄 Error 2: Duplicate Pipelines Issue: Multiple pipeline records cause incorrect mapping and processing failures. Solution: In sn_devops_pipeline table, search for duplicates with same native_id/name. Verify the correct active pipeline, then deactivate/delete duplicates. Prevent future duplicates by running Health Scan Suite regularly. 🔍 General: Check Upgrade History When: If nothing resolves your issue, especially after recent upgrade. Solution: Check sys_upgrade_history table for skipped/errored files. If critical files were skipped, contact ServiceNow support for guidance on resolution. 💡 Best Practices Always check both sn_devops_inbound_event and sn_devops_processed_inbound_event tablesUse the "Retry" option after fixing issues with errored eventsWait at least 10 minutes for scheduled jobs to resolve waiting states before manual interventionVerify version compatibility between ServiceNow DCV and orchestration tool pluginsOnly track pipelines and repositories that are actually neededDocument any custom configurations for future referenceAlways run Health Scan Suite to proactively identify potential issues with tool configuration, permissions, and data integrity ⚠️ Common Pitfalls to Avoid Not checking processed inbound events table and flow executionsFixing downstream issues instead of finding the root cause (topmost failing stage)Not verifying webhook delivery history on orchestration tool sideTracking unnecessary pipelines/repos leading to rate limitsMissing role permissions on connection tables code { background-color: #f4f4f4; padding: 2px 6px; border-radius: 3px; font-family: 'Courier New', monospace; font-size: 0.9em; }