azure-rest-api-specs icon indicating copy to clipboard operation
azure-rest-api-specs copied to clipboard

tsp, loadtesting, add visibility=read to FileInfo.fileName

Open weidongxu-microsoft opened this issue 1 year ago • 6 comments

We've confirmed with TypeSpec dev, that @visibility without any value is not expected and should at least be a warning.

Mitesh confirmed from service team, that the change of readOnly=true is approparate.

model TestFileInfo is FileInfo;
model TestRunFileInfo is FileInfo;

TestFileInfo is used in op uploadTestFile as response.

TestFileInfo used in model inputArtifacts?: TestInputArtifacts;, which is a read-only property.

TestRunFileInfo is used in op getTestRunFile is StandardResourceOperations.ResourceRead<TestRunFileInfo>;.

TestRunFileInfo via reference used in testArtifacts?: TestRunArtifacts;, which is a read-only property.

There is no impact to SDK, as no model was generated for the previous Swagger based DPG lib.

Data Plane API Specification Update Pull Request

[!TIP] Overwhelmed by all this guidance? See the Getting help section at the bottom of this PR description.

PR review workflow diagram

Please understand this diagram before proceeding. It explains how to get your PR approved & merged.

spec_pr_review_workflow_diagram

API Info: The Basics

Most of the information about your service should be captured in the issue that serves as your API Spec engagement record.

  • Link to API Spec engagement record issue:

Is this review for (select one):

  • [ ] a private preview
  • [ ] a public preview
  • [ ] GA release

Change Scope

This section will help us focus on the specific parts of your API that are new or have been modified.
Please share a link to the design document for the new APIs, a link to the previous API Spec document (if applicable), and the root paths that have been updated.

  • Design Document:
  • Previous API Spec Doc:
  • Updated paths:

Viewing API changes

For convenient view of the API changes made by this PR, refer to the URLs provided in the table in the Generated ApiView comment added to this PR. You can use ApiView to show API versions diff.

Suppressing failures

If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the Swagger-Suppression-Process to get approval.

❔Got questions? Need additional info?? We are here to help!

Contact us!

The Azure API Review Board is dedicated to helping you create amazing APIs. You can read about our mission and learn more about our process on our wiki.

Click here for links to tools, specs, guidelines & other good stuff

Tooling

Guidelines & Specifications

Helpful Links

Getting help

  • First, please carefully read through this PR description, from top to bottom.
  • If you don't have permissions to remove or add labels to the PR, request write access per aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositories
  • To understand what you must do next to merge this PR, see the Next Steps to Merge comment. It will appear within few minutes of submitting this PR and will continue to be up-to-date with current PR state.
  • For guidance on fixing this PR CI check failures, see the hyperlinks provided in given failure and https://aka.ms/ci-fix.
  • If the PR CI checks appear to be stuck in queued state, please add a comment with contents /azp run. This should result in a new comment denoting a PR validation pipeline has started and the checks should be updated after few minutes.
  • If the help provided by the previous points is not enough, post to https://aka.ms/azsdk/support/specreview-channel and link to this PR.

weidongxu-microsoft avatar Jun 20 '24 06:06 weidongxu-microsoft

Next Steps to Merge

✅ All automated merging requirements have been met! To get your PR merged, see aka.ms/azsdk/specreview/merge.

Swagger Validation Report

️️✔️BreakingChange succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️CredScan succeeded [Detail] [Expand]
There is no credential detected.
️️✔️LintDiff succeeded [Detail] [Expand]
Validation passes for LintDiff.
️️✔️Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️SwaggerAPIView succeeded [Detail] [Expand]
️️✔️TypeSpecAPIView succeeded [Detail] [Expand]
️️✔️ModelValidation succeeded [Detail] [Expand]
Validation passes for ModelValidation.
️️✔️SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️PoliCheck succeeded [Detail] [Expand]
Validation passed for PoliCheck.
️️✔️SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️Lint(RPaaS) succeeded [Detail] [Expand]
Validation passes for Lint(RPaaS).
️️✔️PR Summary succeeded [Detail] [Expand]
Validation passes for Summary.
️️✔️Automated merging requirements met succeeded [Detail] [Expand]
Posted by Swagger Pipeline | How to fix these errors?

Swagger Generation Artifacts

️️✔️ApiDocPreview succeeded [Detail] [Expand]
️⚠️ azure-sdk-for-python warning [Detail]
    For more instructions, please refer to the FAQ .
  • ⚠️Warning in generating from 2414f363bbd03d5bd75b1c2885df947c814ee65c. SDK Automation 14.0.0
    command	sh scripts/automation_init.sh ../azure-sdk-for-python_tmp/initInput.json ../azure-sdk-for-python_tmp/initOutput.json
    cmderr	[automation_init.sh] W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/azure-cli.list:1 and /etc/apt/sources.list.d/azure-cli.sources:1
    cmderr	[automation_init.sh] W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/azure-cli.list:1 and /etc/apt/sources.list.d/azure-cli.sources:1
    cmderr	[automation_init.sh] W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/azure-cli.list:1 and /etc/apt/sources.list.d/azure-cli.sources:1
    cmderr	[automation_init.sh] W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/azure-cli.list:1 and /etc/apt/sources.list.d/azure-cli.sources:1
    cmderr	[automation_init.sh] W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/azure-cli.list:1 and /etc/apt/sources.list.d/azure-cli.sources:1
    cmderr	[automation_init.sh] W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/azure-cli.list:1 and /etc/apt/sources.list.d/azure-cli.sources:1
    cmderr	[automation_init.sh] W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/azure-cli.list:1 and /etc/apt/sources.list.d/azure-cli.sources:1
    cmderr	[automation_init.sh] W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/azure-cli.list:1 and /etc/apt/sources.list.d/azure-cli.sources:1
    cmderr	[automation_init.sh] W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/azure-cli.list:1 and /etc/apt/sources.list.d/azure-cli.sources:1
    cmderr	[automation_init.sh] W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/azure-cli.list:1 and /etc/apt/sources.list.d/azure-cli.sources:1
    cmderr	[automation_init.sh] WARNING: Skipping azure-nspkg as it is not installed.
    cmderr	[automation_init.sh] npm notice
    cmderr	[automation_init.sh] npm notice New minor version of npm available! 10.7.0 -> 10.8.1
    cmderr	[automation_init.sh] npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1
    cmderr	[automation_init.sh] npm notice To update run: npm install -g [email protected]
    cmderr	[automation_init.sh] npm notice
    command	sh scripts/automation_generate.sh ../azure-sdk-for-python_tmp/generateInput.json ../azure-sdk-for-python_tmp/generateOutput.json
  • ️✔️azure-developer-loadtesting [Preview SDK Changes]
    info	[Changelog] data-plan skip changelog generation temporarily
️️✔️ azure-sdk-for-js succeeded [Detail] [Expand]
    For more instructions, please refer to the FAQ .
  • ️✔️Succeeded in generating from 2414f363bbd03d5bd75b1c2885df947c814ee65c. SDK Automation 14.0.0
    command	sh .scripts/automation_init.sh ../azure-sdk-for-js_tmp/initInput.json ../azure-sdk-for-js_tmp/initOutput.json
    warn	Warning: File azure-sdk-for-js_tmp/initOutput.json not found to read. Please re-run the pipeline if the error is transitient error or report this issue through https://aka.ms/azsdk/support/specreview-channel.
    command	sh .scripts/automation_generate.sh ../azure-sdk-for-js_tmp/generateInput.json ../azure-sdk-for-js_tmp/generateOutput.json
    cmderr	[automation_generate.sh] [ERROR] Generate changelog failed: ENOENT: no such file or directory, open '/mnt/vss/_work/1/s/azure-sdk-for-js/sdk/loadtesting/load-testing-rest/changelog-temp/package/review/rest/load-testing.api.md'
  • ️✔️@azure-rest/load-testing [Preview SDK Changes]
    info	[Changelog]
    error	breakingChangeTracking is enabled, but version or changelogItem is not found in output.
️❌ azure-sdk-for-net-track2 failed [Detail]
    For more instructions, please refer to the FAQ .
  • Failed in generating from 2414f363bbd03d5bd75b1c2885df947c814ee65c. SDK Automation 14.0.0
    command	pwsh ./eng/scripts/Automation-Sdk-Init.ps1 ../azure-sdk-for-net_tmp/initInput.json ../azure-sdk-for-net_tmp/initOutput.json
    command	pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1 ../azure-sdk-for-net_tmp/generateInput.json ../azure-sdk-for-net_tmp/generateOutput.json
    cmderr	[Invoke-GenerateAndBuildV2.ps1] npm notice
    cmderr	[Invoke-GenerateAndBuildV2.ps1] npm notice New minor version of npm available! 10.7.0 -> 10.8.1
    cmderr	[Invoke-GenerateAndBuildV2.ps1] npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1
    cmderr	[Invoke-GenerateAndBuildV2.ps1] npm notice To update run: npm install -g [email protected]
    cmderr	[Invoke-GenerateAndBuildV2.ps1] npm notice
    cmderr	[Invoke-GenerateAndBuildV2.ps1] GeneratePackage: /mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/Invoke-GenerateAndBuildV2.ps1:144
    cmderr	[Invoke-GenerateAndBuildV2.ps1] Line |
    cmderr	[Invoke-GenerateAndBuildV2.ps1]  144 |              GeneratePackage `
    cmderr	[Invoke-GenerateAndBuildV2.ps1]      |              ~~~~~~~~~~~~~~~~~
    cmderr	[Invoke-GenerateAndBuildV2.ps1]      | Failed to build project. exit code: False
  • Azure.Developer.LoadTesting [Preview SDK Changes]
    info	[Changelog]
️️✔️ azure-sdk-for-java succeeded [Detail] [Expand]
    For more instructions, please refer to the FAQ .
  • ️✔️Succeeded in generating from 2414f363bbd03d5bd75b1c2885df947c814ee65c. SDK Automation 14.0.0
    command	./eng/mgmt/automation/init.sh ../azure-sdk-for-java_tmp/initInput.json ../azure-sdk-for-java_tmp/initOutput.json
    command	./eng/mgmt/automation/generate.py ../azure-sdk-for-java_tmp/generateInput.json ../azure-sdk-for-java_tmp/generateOutput.json
    cmderr	[Java-Sdk-Automation] [COMPILE] Maven build fail.
  • ️✔️azure-developer-loadtesting [Preview SDK Changes] Breaking Change Detected
    Only showing 120 items here. Refer to log for details.
    info	[Changelog]
    info	[Changelog] * `models.ErrorDetails` was added
    info	[Changelog]
    info	[Changelog] * `models.MetricUnit` was added
    info	[Changelog]
    info	[Changelog] * `TestProfileRunClient` was added
    info	[Changelog]
    info	[Changelog] * `models.AggregationType` was added
    info	[Changelog]
    info	[Changelog] * `TestProfileRunAsyncClient` was added
    info	[Changelog]
    info	[Changelog] * `implementation.JsonMergePatchHelper$TestAccessor` was added
    info	[Changelog]
    info	[Changelog] * `models.PFMetrics` was added
    info	[Changelog]
    info	[Changelog] * `models.MetricNamespaceCollection` was added
    info	[Changelog]
    info	[Changelog] * `models.MetricValue` was added
    info	[Changelog]
    info	[Changelog] * `models.TargetResourceConfigurations` was added
    info	[Changelog]
    info	[Changelog] * `TestProfileAdministrationAsyncClient` was added
    info	[Changelog]
    info	[Changelog] * `models.TimeSeriesElement` was added
    info	[Changelog]
    info	[Changelog] * `models.PFAgFunc` was added
    info	[Changelog]
    info	[Changelog] * `implementation.JsonMergePatchHelper$TestProfileRunAccessor` was added
    info	[Changelog]
    info	[Changelog] * `implementation.LoadTestAdministrationClientImpl$LoadTestAdministrationClientService` was added
    info	[Changelog]
    info	[Changelog] * `implementation.TestProfileRunClientImpl$TestProfileRunClientService` was added
    info	[Changelog]
    info	[Changelog] * `models.DimensionFilter` was added
    info	[Changelog]
    info	[Changelog] * `models.TestAppComponents` was added
    info	[Changelog]
    info	[Changelog] * `implementation.JsonMergePatchHelper$TestServerMetricConfigAccessor` was added
    info	[Changelog]
    info	[Changelog] * `models.PassFailCriteria` was added
    info	[Changelog]
    info	[Changelog] #### `LoadTestAdministrationAsyncClient` was modified
    info	[Changelog]
    info	[Changelog] * `getServerMetricsConfig(java.lang.String)` was added
    info	[Changelog] * `listTestFiles(java.lang.String)` was added
    info	[Changelog] * `createOrUpdateServerMetricsConfig(java.lang.String,models.TestServerMetricConfig)` was added
    info	[Changelog] * `getAppComponents(java.lang.String)` was added
    info	[Changelog] * `listTests(java.lang.String,java.lang.String,java.time.OffsetDateTime,java.time.OffsetDateTime)` was added
    info	[Changelog] * `listTests()` was added
    info	[Changelog] * `uploadTestFile(java.lang.String,java.lang.String,com.azure.core.util.BinaryData,models.FileType)` was added
    info	[Changelog] * `createOrUpdateTest(java.lang.String,models.Test)` was added
    info	[Changelog] * `getTest(java.lang.String)` was added
    info	[Changelog] * `deleteTest(java.lang.String)` was added
    info	[Changelog] * `uploadTestFile(java.lang.String,java.lang.String,com.azure.core.util.BinaryData)` was added
    info	[Changelog] * `getTestFile(java.lang.String,java.lang.String)` was added
    info	[Changelog] * `deleteTestFile(java.lang.String,java.lang.String)` was added
    info	[Changelog] * `createOrUpdateAppComponents(java.lang.String,models.TestAppComponents)` was added
    info	[Changelog]
    info	[Changelog] #### `LoadTestRunAsyncClient` was modified
    info	[Changelog]
    info	[Changelog] * `createOrUpdateServerMetricsConfig(java.lang.String,models.TestRunServerMetricConfig)` was added
    info	[Changelog] * `listMetricDimensionValues(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was added
    info	[Changelog] * `getTestRun(java.lang.String)` was added
    info	[Changelog] * `listMetrics(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was added
    info	[Changelog] * `getTestRunFile(java.lang.String,java.lang.String)` was added
    info	[Changelog] * `listMetricDimensionValuesWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.http.rest.RequestOptions)` was added
    info	[Changelog] * `getServerMetricsConfig(java.lang.String)` was added
    info	[Changelog] * `listMetrics(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,models.TimeGrain,models.MetricRequestPayload)` was added
    info	[Changelog] * `getMetricNamespaces(java.lang.String)` was added
    info	[Changelog] * `createOrUpdateTestRun(java.lang.String,models.TestRun)` was added
    info	[Changelog] * `getMetricDefinitions(java.lang.String,java.lang.String)` was added
    info	[Changelog] * `stopTestRun(java.lang.String)` was added
    info	[Changelog] * `listTestRuns(java.lang.String,java.lang.String,java.lang.String,java.time.OffsetDateTime,java.time.OffsetDateTime,java.lang.String)` was added
    info	[Changelog] * `listMetricDimensionValues(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,models.TimeGrain)` was added
    info	[Changelog] * `createOrUpdateTestRun(java.lang.String,models.TestRun,java.lang.String)` was added
    info	[Changelog] * `listTestRuns()` was added
    info	[Changelog] * `deleteTestRun(java.lang.String)` was added
    info	[Changelog] * `createOrUpdateAppComponents(java.lang.String,models.TestRunAppComponents)` was added
    info	[Changelog] * `getAppComponents(java.lang.String)` was added
    info	[Changelog]
    info	[Changelog] #### `LoadTestRunClient` was modified
    info	[Changelog]
    info	[Changelog] * `getServerMetricsConfig(java.lang.String)` was added
    info	[Changelog] * `listTestRuns(java.lang.String,java.lang.String,java.lang.String,java.time.OffsetDateTime,java.time.OffsetDateTime,java.lang.String)` was added
    info	[Changelog] * `createOrUpdateServerMetricsConfig(java.lang.String,models.TestRunServerMetricConfig)` was added
    info	[Changelog] * `createOrUpdateTestRun(java.lang.String,models.TestRun,java.lang.String)` was added
    info	[Changelog] * `getTestRun(java.lang.String)` was added
    info	[Changelog] * `deleteTestRun(java.lang.String)` was added
    info	[Changelog] * `getMetricDefinitions(java.lang.String,java.lang.String)` was added
    info	[Changelog] * `listMetricDimensionValues(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was added
    info	[Changelog] * `stopTestRun(java.lang.String)` was added
    info	[Changelog] * `listMetrics(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was added
    info	[Changelog] * `createOrUpdateAppComponents(java.lang.String,models.TestRunAppComponents)` was added
    info	[Changelog] * `getAppComponents(java.lang.String)` was added
    info	[Changelog] * `listMetrics(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,models.TimeGrain,models.MetricRequestPayload)` was added
    info	[Changelog] * `getMetricNamespaces(java.lang.String)` was added
    info	[Changelog] * `listMetricDimensionValuesWithResponse(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.http.rest.RequestOptions)` was added
    info	[Changelog] * `createOrUpdateTestRun(java.lang.String,models.TestRun)` was added
    info	[Changelog] * `getTestRunFile(java.lang.String,java.lang.String)` was added
    info	[Changelog] * `listMetricDimensionValues(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,models.TimeGrain)` was added
    info	[Changelog] * `listTestRuns()` was added
    info	[Changelog]
    info	[Changelog] #### `LoadTestAdministrationClient` was modified
    info	[Changelog]
    info	[Changelog] * `getServerMetricsConfig(java.lang.String)` was added
    info	[Changelog] * `uploadTestFile(java.lang.String,java.lang.String,com.azure.core.util.BinaryData,models.FileType)` was added
    info	[Changelog] * `uploadTestFile(java.lang.String,java.lang.String,com.azure.core.util.BinaryData)` was added
    info	[Changelog] * `createOrUpdateTest(java.lang.String,models.Test)` was added
    info	[Changelog] * `getAppComponents(java.lang.String)` was added
    info	[Changelog] * `deleteTestFile(java.lang.String,java.lang.String)` was added
    info	[Changelog] * `createOrUpdateServerMetricsConfig(java.lang.String,models.TestServerMetricConfig)` was added
    info	[Changelog] * `getTestFile(java.lang.String,java.lang.String)` was added
    info	[Changelog] * `createOrUpdateAppComponents(java.lang.String,models.TestAppComponents)` was added
    info	[Changelog] * `listTests(java.lang.String,java.lang.String,java.time.OffsetDateTime,java.time.OffsetDateTime)` was added
    info	[Changelog] * `deleteTest(java.lang.String)` was added
    info	[Changelog] * `listTests()` was added
    info	[Changelog] * `listTestFiles(java.lang.String)` was added
    info	[Changelog] * `getTest(java.lang.String)` was added
    info	[Changelog]
    info	[Changelog]
    Parse Suppression File Errors
    No suppression file added.
    Please refer to the guidance for suppressing SDK breaking changes.
Posted by Swagger Pipeline | How to fix these errors?

@weidongxu-microsoft : I saw something interesting, while generating the RLC Javascript Client, it generated the model without this property? Could it be related to the same issue?

mitsha-microsoft avatar Jul 03 '24 09:07 mitsha-microsoft

@weidongxu-microsoft : I saw something interesting, while generating the RLC Javascript Client, it generated the model without this property? Could it be related to the same issue?

Yes, if you marked a properties as @visibility("read") we will treat it as readOnly and remove it from the input models.

qiaozha avatar Jul 03 '24 11:07 qiaozha

Hi Mike,

I would add a BreakingChange-Approved-BugFix label on this PR. I've get feedback (and approval) from service that this property should be readOnly.

And all of its other properties is already readOnly. https://github.com/Azure/azure-rest-api-specs/blob/465d3614ef38b4ed3c45bd313035e44a9cad987f/specification/loadtestservice/LoadTestService/models.tsp#L497-L524

Also, this should be a low impact change concerning the Swagger, as both TestFileInfo and TestRunFileInfo is not used as input.

Let me know, if you have any concern of this change.

weidongxu-microsoft avatar Jul 09 '24 05:07 weidongxu-microsoft