-
Notifications
You must be signed in to change notification settings - Fork 913
Container Node selection | L0 tests #5450
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
base: master
Are you sure you want to change the base?
Conversation
…ner support - Added CanHandleInContainer methods to Node24Strategy, Node20Strategy, and Node16Strategy for container-specific logic - Updated NodeVersionOrchestrator with dual selection paths: SelectNodeVersionForHostAsync() and SelectNodeVersionForContainer() - Integrated container support in ContainerOperationProvider with proper node path detection - Removed node --version dependency for container command in ContainerOperationProvider. - Enhanced NodeRunnerInfo with ContainerDefaultNode support for cross-platform scenarios - Restructured test infrastructure for container tests with comprehensive container test scenarios and improved organization
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| private BaseNodeHandlerData GetJobContainerHandlerData(IExecutionContext executionContext, ContainerInfo container) | ||
| { | ||
| // Custom node takes highest priority | ||
| if (!string.IsNullOrEmpty(container.CustomNodePath)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if label in dockerfile considered as customnode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, label is considered as custom node
| ), | ||
|
|
||
| new TestScenario( | ||
| name: "Container_GlobalNode24Knob_OverridesContainerDefaults", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a test case if knobs for node24/20 is enabled still custom node will be used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is updated.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
|
||
| // Skip container tests on macOS since they always use cross-platform logic | ||
| // This is expected behavior - macOS agent binaries cannot run in typical Linux containers | ||
| if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skip macOS logic can we move it to start of this method like this?
[Trait("SkipOn", "darwin")]
This approach skips the entire method for macOS, and I believe this aligns with the pattern we follow in the agent.
Context
This PR addresses Azure Pipelines Agent container node selection process and implements a comprehensive strategy pattern for Node.js version selection in container environments.
AB#2343104
AB#2343431
AB#2345319
AB#2345320
AB#2345321
Description
SelectNodeVersionForHostAsync()andSelectNodeVersionForContainer()ContainerOperationProviderwith proper node path detectionContainerOperationProvider.Risk Assessment (Low / Medium / High)
Medium Risk - This change affects the core node selection logic for container execution. However, risk is mitigated by:
AGENT_USE_NODE_STRATEGY)Unit Tests Added or Updated (Yes / No)
Additional Testing Performed
List manual or automated tests performed beyond unit tests (e.g., integration, scenario, regression).
Change Behind Feature Flag (Yes / No)
Yes - The change can be controlled via existing feature mechanisms:
AGENT_USE_NODE_STRATEGYcontrols strategy vs legacy behaviorTech Design / Approach
Documentation Changes Required (Yes/No)
Indicate whether related documentation needs to be updated.
Logging Added/Updated (Yes/No)
Telemetry Added/Updated (Yes/No)
Rollback Scenario and Process (Yes/No)
Dependency Impact Assessed and Regression Tested (Yes/No)