diff --git a/core b/core index e46bb79faf..5a7deafc2c 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit e46bb79fafe2e98982ce5f785dbe1974c0209307 +Subproject commit 5a7deafc2ccfef66a9171c2da7422bc738ec8b36 diff --git a/eng/pipelines/jobs/build-autorest-mgmt.yml b/eng/pipelines/jobs/build-autorest-mgmt.yml index 894d6ed29a..6153b4f3af 100644 --- a/eng/pipelines/jobs/build-autorest-mgmt.yml +++ b/eng/pipelines/jobs/build-autorest-mgmt.yml @@ -36,7 +36,7 @@ jobs: inputs: versionSpec: '$(NodeVersion)' - - script: npm install autorest -g + - script: npm install autorest@$(AutorestVersion) -g - template: /eng/pipelines/steps/cache-maven-repository.yml parameters: diff --git a/eng/pipelines/jobs/build-autorest.yml b/eng/pipelines/jobs/build-autorest.yml index 1327f7e92c..c9346e28ff 100644 --- a/eng/pipelines/jobs/build-autorest.yml +++ b/eng/pipelines/jobs/build-autorest.yml @@ -54,7 +54,7 @@ jobs: publishJUnitResults: false - script: | - npm install -g autorest + npm install -g autorest@$(AutorestVersion) npm ci displayName: 'Prepare Environment for Generation' diff --git a/eng/pipelines/variables/globals.yml b/eng/pipelines/variables/globals.yml index 1ac6949292..e03d00f765 100644 --- a/eng/pipelines/variables/globals.yml +++ b/eng/pipelines/variables/globals.yml @@ -1,6 +1,7 @@ variables: JavaVersion: '1.11' NodeVersion: '20.x' + AutorestVersion: '3.7.2' # Sets the Maven log level to either the LogLevel passed in the manual pipeline run or the default 'warn' MavenLogLevel: $[coalesce(variables['LogLevel'], 'warn')] diff --git a/eng/sdk/sync_sdk.py b/eng/sdk/sync_sdk.py index 7030f0cae7..2ad89d663b 100644 --- a/eng/sdk/sync_sdk.py +++ b/eng/sdk/sync_sdk.py @@ -172,7 +172,9 @@ def update_sdks(): cmd = ["git", "checkout", "src/test"] subprocess.check_call(cmd, cwd=module_path) - if not generated_samples_exists: + # For ARM module, we want to keep the generated samples code. + # For data-plane, if the generated samples/test code is not there before generation, we will delete the generated code after generation, to avoid unnecessary code check-in. + if not generated_samples_exists and not arm_module: shutil.rmtree(generated_samples_path, ignore_errors=True) if not generated_test_exists: shutil.rmtree(generated_test_path, ignore_errors=True)