Skip to content

Force-build SDK versions: VERSIONS_TO_BUILD_OVERRIDE support#2897

Merged
CodingIsBliss merged 1 commit intofeature/oryx-sdk-acr-distributionfrom
feature/force-build-sdk-versions
Apr 8, 2026
Merged

Force-build SDK versions: VERSIONS_TO_BUILD_OVERRIDE support#2897
CodingIsBliss merged 1 commit intofeature/oryx-sdk-acr-distributionfrom
feature/force-build-sdk-versions

Conversation

@CodingIsBliss
Copy link
Copy Markdown
Collaborator

Merges force-build SDK versions work into the SDK ACR distribution feature branch.

Changes

  • VERSIONS_TO_BUILD_OVERRIDE mechanism for force-building specific SDK versions
  • Auto-resolve from constants.yml

- Modify buildPlatform() in __common.sh: when VERSIONS_TO_BUILD_OVERRIDE is set,
  filter versionsToBuild.txt to only matching versions and set OVERWRITE_EXISTING_SDKS=true
  to bypass blob existence checks
- Add ARG/ENV VERSIONS_TO_BUILD_OVERRIDE to nodejs, python, php, and php-composer Dockerfiles
  so the env var reaches build containers via --build-arg
@CodingIsBliss CodingIsBliss requested a review from a team as a code owner April 8, 2026 07:52
@CodingIsBliss CodingIsBliss merged commit 52bc0e2 into feature/oryx-sdk-acr-distribution Apr 8, 2026
1 check passed
@CodingIsBliss CodingIsBliss deleted the feature/force-build-sdk-versions branch April 8, 2026 07:54
sarsharma added a commit that referenced this pull request Apr 8, 2026
* feat: Oryx SDK regional distribution — pull SDKs from ACR

* feat: Add ACR-based SDK distribution with feature flag

Add two separate ACR SDK providers behind ORYX_ENABLE_ACR_SDK_PROVIDER:

1. ExternalAcrSdkProvider - communicates with LWASv2 via Unix socket
   to pull SDK images from WAWS Images ACR
2. AcrSdkProvider (direct) - downloads SDKs from Oryx ACR
   (oryxsdks.azurecr.io) using OCI Distribution API

New files:
- IExternalAcrSdkProvider.cs / ExternalAcrSdkProvider.cs
- OciRegistryClient.cs - HTTP client for OCI Distribution API
- AcrVersionProviderBase.cs - base class for ACR version discovery
- Per-platform ACR version providers (Node, Python, PHP, DotNetCore)
- publishSdkImageToAcr.sh / publishSdkToAcr.yml - ACR publish pipeline

Modified files:
- Platform install decisions (NodePlatform, PythonPlatform, PhpPlatform,
  DotNetCorePlatform) with ACR branch before existing DynamicInstall
- Version provider orchestrators with ACR provider chain
- PlatformInstallerBase with GetAcrInstallerScriptSnippet()
- Go startup script generator with ACR download path
- DI registrations for all new providers
- Constants, options, settings keys for ACR configuration

All changes are additive and behind feature flags.
Existing blob storage code paths are completely untouched.

* refactor: Simplify ExternalAcrSdkProvider - let LWASv2 handle image resolution

Remove ACR repository/tag construction from ExternalAcrSdkProvider.
Now sends only platform, version, and debianFlavor to LWASv2.
LWASv2 resolves the SDK companion image from LinuxAssets and
handles pinning, containerd pull, mount, and extraction.

* refactor: Remove script-based ACR publish (moved to AAPT-Antares-Oryx OneBranch pipeline)

Remove publishSdkImageToAcr.sh and publishSdkToAcr.yml since SDK images
are now built and pushed using onebranch.pipeline.imagebuildinfo in
the AAPT-Antares-Oryx pipeline, not via custom scripts.

* fix: Default ACR SDK registry to oryxacr.azurecr.io

Use the same ACR that AAPT-Antares-Oryx publishes SDK images to.
Updated both C# constant and Go constant.

* fix: Resolve StyleCop analyzer errors in ACR SDK provider files

- SA1204: Move static GetFirstLayerDigest before instance members (OciRegistryClient.cs)
- SA1124: Remove #region/#endregion around OCI JSON models (OciRegistryClient.cs)
- SA1202: Move protected GetAcrInstallerScriptSnippet before private methods (PlatformInstallerBase.cs)
- SA1116/SA1117: Place multi-line parameters each on own line (ExternalAcrSdkProvider.cs)
- SA1515: Add blank line before single-line comment (DotNetCoreAcrVersionProvider.cs)

* fix: Resolve StyleCop analyzer errors in ACR SDK provider files

- SA1204: Move static GetFirstLayerDigest before instance members (OciRegistryClient.cs)
- SA1124: Remove #region/#endregion around OCI JSON models (OciRegistryClient.cs)
- SA1202: Move protected GetAcrInstallerScriptSnippet before private methods (PlatformInstallerBase.cs)
- SA1116/SA1117: Place multi-line parameters each on own line (ExternalAcrSdkProvider.cs)
- SA1515: Add blank line before single-line comment (DotNetCoreAcrVersionProvider.cs)

* Feature/oryx sdk acr distribution sdks resolver (#2842)

* fix: Resolve StyleCop analyzer errors in ACR SDK provider files

- SA1204: Move static GetFirstLayerDigest before instance members (OciRegistryClient.cs)
- SA1124: Remove #region/#endregion around OCI JSON models (OciRegistryClient.cs)
- SA1202: Move protected GetAcrInstallerScriptSnippet before private methods (PlatformInstallerBase.cs)
- SA1116/SA1117: Place multi-line parameters each on own line (ExternalAcrSdkProvider.cs)
- SA1515: Add blank line before single-line comment (DotNetCoreAcrVersionProvider.cs)

* fix sdk providers logic

* refactor pythonPlatform

* refctor for dotnet,php and node

---------

Co-authored-by: Sarath chandra Bussa <sbussa@microsoft.com>

* fix build and tests (#2843)

* fix to fetch from acr (#2844)

* Update version providers (#2845)

* Refactor version providers (#2846)

* Fix acr version info (#2848)

* Changes for php composer (#2849)

* Clean dead code (#2850)

* Fix priroity in sdk resolver (#2851)

* Fix Uts and version providers (#2852)

* ACR Sdk provider refactor (#2854)

* registryclient improvements

* fix build issue

* Add changes foe external ACR provider (#2855)

* Change flag name for external acr case (#2856)

* Handle multiplatform (#2857)

* Revert "Handle multiplatform (#2857)" (#2858)

This reverts commit 77d9f99.

* Disable external ACR for multiplatform (#2859)

* Fix test case (#2860)

* Refactor external acr provider (#2862)

* update externalacrsdkprovider contract

* Align ExternalAcrSdkProvider and ExternalAcrVersionProviderBase with LWASv2 socket contract

- Fix socket path to /var/sdk-image-sockets/oryx-pull-sdk-image.socket (ACR socket)
- Add ExternalAcrSdksStorageDir constant (/var/OryxAcrSdks) for ACR SDK cache
- Add top-level Action field (pull-sdk / get-version) to request DTOs
- Remove BlobName and UrlParameters from ExternalAcrSdkProvider request
- Accept server-returned filename as success response instead of expecting 'Success$'

* update logic for dotnet and default versions

* update logic for dotnet and default versions (#2864)

* Refactor code for new acr way (#2863)

* nit fix (#2865)

* Refactor ACR SDK provider to return tarball path

* ACR SDK distribution: Refactor direct acr sdk fetching logic (#2866)

* update logic for dotnet and default versions

* Refactor ACR SDK provider to return tarball path

* Cleanup startupscriptgen and refactor ACR SDK distribution constants

* ACR Sdk distribution: Cleanup startupscriptgenerator and fix image repo constants (#2867)

* update logic for dotnet and default versions

* Refactor ACR SDK provider to return tarball path

* Cleanup startupscriptgen and refactor ACR SDK distribution constants

* Refactor ACR SDK provider methods to return boolean status and update related logic across platforms

* Update version provider logic to check for external SDK provider option

* ACR Sdk distribution: Fix failure path for acr sdk fetching (#2868)

* update logic for dotnet and default versions

* Refactor ACR SDK provider to return tarball path

* Cleanup startupscriptgen and refactor ACR SDK distribution constants

* Refactor ACR SDK provider methods to return boolean status and update related logic across platforms

* Update version provider logic to check for external SDK provider option

* Update version provider fallback (#2872)

* Update fallback logic for sdks (#2873)

* version map fix

* fix externalacrprovider for dotnet

* ACR Sdk distribution: fix external ACR sdk provider for dotnet (#2874)

* update logic for dotnet and default versions

* Refactor ACR SDK provider to return tarball path

* Cleanup startupscriptgen and refactor ACR SDK distribution constants

* Refactor ACR SDK provider methods to return boolean status and update related logic across platforms

* Update version provider logic to check for external SDK provider option

* version map fix

* fix externalacrprovider for dotnet

* Feature/oryx sdk acr distribution fix phpand composer (#2875)

* Update PHP and PHP-Composer Platform

* update php and composer

* Enhance OciRegistryClient to support anonymous token acquisition for public repositories

* add logging

* Acr SDK Distribution: Add token for listing sdk images (#2876)

* update logic for dotnet and default versions

* Refactor ACR SDK provider to return tarball path

* Cleanup startupscriptgen and refactor ACR SDK distribution constants

* Refactor ACR SDK provider methods to return boolean status and update related logic across platforms

* Update version provider logic to check for external SDK provider option

* version map fix

* fix externalacrprovider for dotnet

* Enhance OciRegistryClient to support anonymous token acquisition for public repositories

* add logging

* fix build

* suppress auth header from logs

* fix socket paths

* Add a method to fetch all versions for a platform (#2877)

* fix fallback flow

* logging fixes

* logging fixes (#2878)

* fix tar extraction and add more logging

* fix dotnet image pull

* handle gzip stream

* fix php installationscript duplication

* ACR Sdk dist: Enhancements for cache management (#2889)

* add fallback for no versions returned

* improve image caching logic

* handle mcr repo

* Feature/oryx sdk acr distribution pr review 1 (#2888)

* nit fixes in pr review

* nit fixes 2.0

* refactor

* Fix UTs

* ACR SDK dist: Add tests, refactoring and some fixes (#2892)

* Fix composer logic (#2893)

* Fix composer logic

* nit

* fix build (#2894)

* Add .NET SDK versions and composerVersion to constants.yml

Add DOTNET_SDK_80, DOTNET_SDK_90, DOTNET_SDK_100 variables to pair with
existing runtime version variables. Add composerVersion for PHP Composer.
These are consumed by the Official and Buddy pipelines for SDK ACR publishing.

* ACR SDK dist: Refactor version provider and bump up dependencies (#2895)

* fix node logic and some other bugs

* more fixes

* socket helper refactor

* more fixes

* add tests

* refactor version provider

* fix build

* bump version

* ACR SDK dist: Additional test cases (#2896)

* fix node logic and some other bugs

* more fixes

* socket helper refactor

* more fixes

* add tests

* refactor version provider

* fix build

* bump version

* add tests

* follow existing pattern for php composer, add more tests

* Revert "Add .NET SDK versions and composerVersion to constants.yml"

This reverts commit 2f2b67d.

* update comment

* Add VERSIONS_TO_BUILD_OVERRIDE to force-build specific SDK versions (#2897)

- Modify buildPlatform() in __common.sh: when VERSIONS_TO_BUILD_OVERRIDE is set,
  filter versionsToBuild.txt to only matching versions and set OVERWRITE_EXISTING_SDKS=true
  to bypass blob existence checks
- Add ARG/ENV VERSIONS_TO_BUILD_OVERRIDE to nodejs, python, php, and php-composer Dockerfiles
  so the env var reaches build containers via --build-arg

Co-authored-by: Sarath chandra Bussa <sbussa@microsoft.com>

* resolve comments

* nit

* fix comment

---------

Co-authored-by: Sarath chandra Bussa <sbussa@microsoft.com>
Co-authored-by: Akshay Kumar <kumaraksh@microsoft.com>
Co-authored-by: Akshay Kumar <112485097+kumaraksh1@users.noreply.github.com>
Co-authored-by: sartsharma <sartsharma@microsoft.com>
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.

1 participant