Skip to content

Fix parser comparison mismatches#4273

Merged
ericsciple merged 1 commit intomainfrom
users/ericsciple/26-03-container
Mar 3, 2026
Merged

Fix parser comparison mismatches#4273
ericsciple merged 1 commit intomainfrom
users/ericsciple/26-03-container

Conversation

@ericsciple
Copy link
Copy Markdown
Collaborator

@ericsciple ericsciple commented Mar 2, 2026

Fixes telemetry noise from parser comparison mismatches between legacy and new workflow parsers.

Fix: Port schema and converter changes from actions-workflow-parser PR 577. Relaxes container-mapping.image and services-container from non-empty-string to string so expressions that evaluate to empty at runtime return null (no container) instead of a validation error.

@ericsciple ericsciple force-pushed the users/ericsciple/26-03-container branch from f57da0c to 2136a36 Compare March 2, 2026 23:48
@ericsciple ericsciple marked this pull request as ready for review March 2, 2026 23:56
@ericsciple ericsciple requested a review from a team as a code owner March 2, 2026 23:56
Copilot AI review requested due to automatic review settings March 2, 2026 23:56
@ericsciple ericsciple changed the title Relax container image schema to allow empty string at runtime Fix parser comparison mismatches Mar 2, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aligns the runner’s workflow schema + conversion logic to treat empty container image strings as “no container” (null) at runtime, avoiding validation failures when expressions evaluate to empty. It also expands L0 coverage to ensure the legacy and new workflow parsers remain behaviorally consistent for these edge cases.

Changes:

  • Relaxed container-mapping.image and services-container schema types from non-empty-string to string.
  • Updated WorkflowTemplateConverter.ConvertToJobContainer to handle empty strings (including docker:// prefix-only) by returning null, while preserving parse-time validation for specific invalid cases.
  • Added L0 tests covering empty images and docker:// prefix-only scenarios for both job containers and service containers, ensuring both parsers agree.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/Test/L0/Worker/PipelineTemplateEvaluatorWrapperL0.cs Adds parity tests for empty / docker://-only container images for job + services.
src/Sdk/WorkflowParser/workflow-v1.0.json Relaxes schema to allow empty-string container image values.
src/Sdk/WorkflowParser/Conversion/WorkflowTemplateConverter.cs Implements the new conversion behavior (empty image ⇒ null container) and trims docker:// consistently.

@ericsciple ericsciple enabled auto-merge (squash) March 3, 2026 05:34
Port missing schema and converter changes from actions-workflow-parser PR #577.
Relaxes container-mapping.image and services-container from non-empty-string
to string so expressions that evaluate to empty at runtime return null
(no container) instead of a validation error.
@ericsciple ericsciple force-pushed the users/ericsciple/26-03-container branch from 2136a36 to 1e60897 Compare March 3, 2026 05:34
@ericsciple ericsciple merged commit 8a73bcc into main Mar 3, 2026
11 checks passed
@ericsciple ericsciple deleted the users/ericsciple/26-03-container branch March 3, 2026 05:38
dawidmalina pushed a commit to dawidmalina/github-runner that referenced this pull request Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants