Skip to content

Conversation

jessehouwing
Copy link
Contributor

@jessehouwing jessehouwing commented Aug 7, 2025

This pull request refactors and improves the validation process for task.json files associated with build task contributions in the extension merger. The validation is now more targeted, robust, and supports backwards compatibility checks across multiple versions of tasks. Additionally, it updates dependencies and increments the package version.

Task.json validation improvements

  • Refactored the validation process to collect all build task contributions from partial manifests and validate their associated task.json files after all partials are processed, rather than during asset processing. This enables more accurate and comprehensive validation. [1] [2]
  • Replaced the previous validateTaskJson method with a new validateBuildTaskContributions method, which finds and validates task.json files for each build task contribution, including checks for backwards compatibility with previous task versions.
  • Enhanced the validate and validateRunner functions in jsonvalidate.ts to support passing all matched task.json paths for backwards compatibility detection, and improved runner deprecation warnings to include the task version. [1] [2] [3]

Dependency and version updates

  • Updated the tmp package dependency to version ^0.2.4 in package.json.
  • Bumped the package version from 0.21.2 to 0.21.3 in package.json.

Related to

@jessehouwing jessehouwing requested review from a team as code owners August 7, 2025 10:29
…ormation

Print ? when a version is missing from the manifest.
Only log a warning is none of the packaged task versions support a non-deprecated runner.
Changes the way task.json files are looked up. This fixes a number of scenarios where a task.json would not be detected.

This also improves performance since it significantly reduces the number of folders to scan from all child folders to just the contribution folder and its direct children.

This enabled checking for supported runner versions across all versions of a task, not logging a warning if an older task version, included for on-premise backwards compatibility, doesn't support a non-deprecated runner when a later version does.
@jessehouwing
Copy link
Contributor Author

@tarunramsinghani could you have a look at these changes? They'd remove a bunch of warnings from the release of the Azure DevOps Extension Tasks.

@tarunramsinghani
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tarunramsinghani
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tarunramsinghani tarunramsinghani merged commit 78b358b into microsoft:master Aug 8, 2025
4 checks passed
@jessehouwing jessehouwing deleted the fix/jsonValidation branch August 8, 2025 08:05
@jessehouwing
Copy link
Contributor Author

Thanks @tarunramsinghani !

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.

Task validation doesn't take into account multi-version extensions
2 participants