Commit 76a5796
ACR SDK dist: Minor fix and add more tests (#2899)
* 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
* add tests
---------
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: Sarath Chandra Bussa <bussasarath2@gmail.com>1 parent 397be11 commit 76a5796
4 files changed
Lines changed: 477 additions & 7 deletions
File tree
- src/BuildScriptGenerator/DotNetCore
- tests/BuildScriptGenerator.Tests
Lines changed: 16 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
331 | | - | |
| 330 | + | |
332 | 331 | | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
338 | 347 | | |
339 | 348 | | |
340 | 349 | | |
| |||
Lines changed: 60 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
Lines changed: 192 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
0 commit comments