-
Notifications
You must be signed in to change notification settings - Fork 902
Enhancing logging around containers #5313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
MantavyaDh
commented
Sep 8, 2025
MantavyaDh
commented
Sep 8, 2025
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
tarunramsinghani
requested changes
Oct 29, 2025
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
tarunramsinghani
approved these changes
Nov 6, 2025
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
tarunramsinghani
approved these changes
Nov 7, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Container-related issues in Azure DevOps pipelines can be difficult to diagnose due to limited visibility into the container operations. Users often encounter authentication failures, image pull issues, and platform compatibility problems without sufficient diagnostic information to resolve them effectively, enhanced logging is added to relevant functions, which will help in identifying the core issues.
ADO work item - AB#2296204
Description
This PR enhances the logging capabilities of the Azure Pipelines Agent's container operations to provide better visibility into container lifecycle management, authentication flows, and troubleshooting information. Around the Initialize Container logic, this PR mainly covers enhanced logging around the container Operations during initialization and starting of containers for a Job. The main functions it covers are StartContainersAsync , PullContainer and StopContainersAsync . The PR handles logging and exception handling around various authentications we support like: Managed Identity, WIF, Registry Login around those functions.
Risk Assessment (Low / Medium / High)
Low
Unit Tests Added or Updated (Yes / No)
No
Additional Testing Performed
Locally validated on Private test Org
Change Behind Feature Flag (Yes / No)
TBD
Tech Design / Approach
Documentation Changes Required (Yes/No)
No
Logging Added/Updated (Yes/No)
Yes
Rollback Scenario and Process (Yes/No)
TBD
Dependency Impact Assessed and Regression Tested (Yes/No)
N/A, no functional changes
Pipeline Debug Logs (system.debug: true)
Complete Trace Log Flow
1. Container Initialization Start
2. Cleanup Stale Containers
3. Container Pull - Entering PullContainerAsync
4. Registry Authentication Discovery
5. WIF Authentication Flow
6. ACR Token Exchange
7. Docker Login
8. Docker Image Pull
9. Container OS Detection
10. Docker Logout
11. Container Network Creation
12. Container Creation
13. Container Start
14. Container Health Check (for service containers)
15. Container Mapping
Auth Failure Before
Auth Failure After (no behavior change)