Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tenantChangeAllowedTenants parameter to GET & PUT tenantPolicy. #27789

Closed
wants to merge 6 commits into from

Conversation

sriramvu
Copy link
Contributor

@sriramvu sriramvu commented Feb 15, 2024

ARM (Control Plane) API Specification Update Pull Request

Tip

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

Note

As of January 2024 there is no PR assignee. This is expected. See https://aka.ms/azsdk/pr-arm-review.

PR review workflow diagram

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

diagram

Click here to see the details of Step 1

Breaking changes review (Diagram Step 1)

If the automation determines you have breaking changes, i.e. Step 1 from the diagram applies to you,
you must follow the breaking changes process.
IMPORTANT This applies even if:

  • The tool fails while it shouldn't, e.g. due to runtime exception, or incorrect detection of breaking changes.
  • You believe there is no need for you to request breaking change approval, for any reason.
    Such claims must be reviewed, and the process is the same.
Click here to see the details of Step 2

ARM API changes review (Diagram Step 2)

Click here to see the diagram footnotes

Diagram footnotes

[1] See ARM review queue (for PR merge queues, see [2]).
[2] public repo merge queue, private repo merge queue (for ARM review queue, [1])
The ARM reviewer on-call engineer visits the merge queue twice a day, so the approximate ETA for merges is 12 - 24 hours.

Purpose of this PR

What's the purpose of this PR? Check the specific option that applies. This is mandatory!

  • New resource provider.
  • New API version for an existing resource provider. (If API spec is not defined in TypeSpec, the PR should have been generated using OpenAPI Hub).
  • Update existing version for a new feature. (This is applicable only when you are revising a private preview API version.)
  • Update existing version to fix OpenAPI spec quality issues in S360.
  • Other, please clarify:
    • here, we are extending existing GET & PUT Tenant Policy API with an optional parameter "tenantChangeAllowedTenants".
      GET & PUT on providers/Microsoft.Subscription/policies/default

Due diligence checklist

To merge this PR, you must go through the following checklist and confirm you understood
and followed the instructions by checking all the boxes:

  • I confirm this PR is modifying Azure Resource Manager (ARM) related specifications, and not data plane related specifications.
  • I have reviewed following Resource Provider guidelines, including
    ARM resource provider contract and
    REST guidelines (estimated time: 4 hours).
    I understand this is required before I can proceed to the diagram Step 2, "ARM API changes review", for this PR.

Additional information

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
suppressions guide to get approval.

Getting help

  • First, please carefully read through this PR description, from top to bottom. Please fill out the Purpose of this PR and Due diligence checklist.
  • 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.
  • For help with PR workflow diagram Step 2 (ARM review), see https://aka.ms/azsdk/pr-arm-review.
  • 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.

Copy link

openapi-pipeline-app bot commented Feb 15, 2024

Next Steps to Merge

Next steps that must be taken to merge this PR:
  • ❌ Your PR is in purview of ARM review (label: ARMReview). Please ensure your PR is on the ARM PR review queue - see instructions in steps 1 and 2 in the PR description diagram.
  • ❌ The required check named Swagger PrettierCheck has failed. Refer to the check in the PR's 'Checks' tab for details on how to fix it.

Copy link

openapi-pipeline-app bot commented Feb 15, 2024

Swagger Validation Report

️️✔️BreakingChange succeeded [Detail] [Expand]
There are no breaking changes.
️❌Breaking Change(Cross-Version): 2 Errors, 0 Warnings failed [Detail] The following breaking changes are detected by comparison with the latest stable version:
Rule Message
Runtime Exception "new":"https://github.com/Azure/azure-rest-api-specs/blob/12712f27af5e7c70fdc54171cddd78137444d948/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-04-04-preview/subscriptions.json",
"old":"https://github.com/Azure/azure-rest-api-specs/blob/main/specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json",
"details":"Breaking change detector (OAD) invoked AutoRest. AutoRest threw a runtime error. First 6 lines of stack trace follow,
indexed. First line should contain AutoRest command line invocation details. Second line should contain the main message reported by AutoRest.
====================
1: Command failed: node "/mnt/vss/_work/_tasks/AzureApiValidation_5654d05d-82c1-48da-ad8f-161b817f6d41/0.0.86/common/temp/node_modules/.pnpm/@Azure[email protected]/node_modules/autorest/dist/app.js" --v2 --input-file=specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-04-04-preview/subscriptions.json --output-artifact=swagger-document.json --output-artifact=swagger-document.map --output-file=new --output-folder=/tmp
--------------------
2: ERROR: Syntax error: missed comma between flow collection entries
--------------------
3: - file:///mnt/vss/_work/1/azure-rest-api-specs/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-04-04-preview/examples/acceptSubscriptionOwnership.json:5:4
--------------------
4: FATAL: swagger-document/loader - FAILED
--------------------
5: FATAL: Error: Syntax errors encountered.
--------------------
6: Error: Syntax errors encountered.
--------------------"


The following breaking changes are detected by comparison with the latest preview version:

Rule Message
Runtime Exception "new":"https://github.com/Azure/azure-rest-api-specs/blob/12712f27af5e7c70fdc54171cddd78137444d948/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-04-04-preview/subscriptions.json",
"old":"https://github.com/Azure/azure-rest-api-specs/blob/main/specification/subscription/resource-manager/Microsoft.Subscription/preview/2019-10-01-preview/subscriptions.json",
"details":"Breaking change detector (OAD) invoked AutoRest. AutoRest threw a runtime error. First 6 lines of stack trace follow,
indexed. First line should contain AutoRest command line invocation details. Second line should contain the main message reported by AutoRest.
====================
1: Command failed: node "/mnt/vss/_work/_tasks/AzureApiValidation_5654d05d-82c1-48da-ad8f-161b817f6d41/0.0.86/common/temp/node_modules/.pnpm/@Azure[email protected]/node_modules/autorest/dist/app.js" --v2 --input-file=specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-04-04-preview/subscriptions.json --output-artifact=swagger-document.json --output-artifact=swagger-document.map --output-file=new --output-folder=/tmp
--------------------
2: ERROR: Syntax error: missed comma between flow collection entries
--------------------
3: - file:///mnt/vss/_work/1/azure-rest-api-specs/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-04-04-preview/examples/acceptSubscriptionOwnership.json:5:4
--------------------
4: FATAL: swagger-document/loader - FAILED
--------------------
5: FATAL: Error: Syntax errors encountered.
--------------------
6: Error: Syntax errors encountered.
--------------------"
️️✔️CredScan succeeded [Detail] [Expand]
There is no credential detected.
️️✔️LintDiff succeeded [Detail] [Expand]
Validation passes for LintDiff.
compared tags (via openapi-validator v2.2.0) new version base version
default default(12712f2) default(main)
️❌Avocado: 16 Errors, 1 Warnings failed [Detail]
Rule Message
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: specification/subscription/resource-manager/readme.md
json: preview/2024-04-04-preview/examples/acceptOwnershipStatus.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: specification/subscription/resource-manager/readme.md
json: preview/2024-04-04-preview/examples/acceptSubscriptionOwnership.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: specification/subscription/resource-manager/readme.md
json: preview/2024-04-04-preview/examples/cancelSubscription.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: specification/subscription/resource-manager/readme.md
json: preview/2024-04-04-preview/examples/changeTenantPolicy.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: specification/subscription/resource-manager/readme.md
json: preview/2024-04-04-preview/examples/createAlias.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: specification/subscription/resource-manager/readme.md
json: preview/2024-04-04-preview/examples/deleteAlias.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: specification/subscription/resource-manager/readme.md
json: preview/2024-04-04-preview/examples/enableSubscription.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: specification/subscription/resource-manager/readme.md
json: preview/2024-04-04-preview/examples/getAlias.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: specification/subscription/resource-manager/readme.md
json: preview/2024-04-04-preview/examples/getBillingAccountPolicy.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: specification/subscription/resource-manager/readme.md
json: preview/2024-04-04-preview/examples/getOperations.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: specification/subscription/resource-manager/readme.md
json: preview/2024-04-04-preview/examples/getSubscriptionOperation.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: specification/subscription/resource-manager/readme.md
json: preview/2024-04-04-preview/examples/getTenantPolicy.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: specification/subscription/resource-manager/readme.md
json: preview/2024-04-04-preview/examples/getTenantPolicyList.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: specification/subscription/resource-manager/readme.md
json: preview/2024-04-04-preview/examples/listAlias.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: specification/subscription/resource-manager/readme.md
json: preview/2024-04-04-preview/examples/renameSubscription.json
UNREFERENCED_JSON_FILE The swagger JSON file is not referenced from the readme file.
readme: specification/subscription/resource-manager/readme.md
json: Microsoft.Subscription/preview/2024-04-04-preview/subscriptions.json
⚠️ MULTIPLE_API_VERSION The default tag contains multiple API versions swaggers.
readme: specification/subscription/resource-manager/readme.md
tag: specification/subscription/resource-manager/readme.md#tag-package-2021-10
️️✔️SwaggerAPIView succeeded [Detail] [Expand]
️️✔️TypeSpecAPIView succeeded [Detail] [Expand]
️❌ModelValidation: 2 Errors, 0 Warnings failed [Detail]
Rule Message
JSON_PARSING_ERROR Json parsing error: unexpected token
Url: preview/2024-04-04-preview/examples/renameSubscription.json#L5:5
JSON_PARSING_ERROR Json parsing error: unexpected token
Url: preview/2024-04-04-preview/examples/renameSubscription.json#L5:5
️❌SemanticValidation: 1 Errors, 0 Warnings failed [Detail]
Rule Message
JSON_PARSING_ERROR Json parsing error: unexpected token
JsonUrl: preview/2024-04-04-preview/examples/renameSubscription.json#L5:5
️️✔️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?

Copy link

openapi-pipeline-app bot commented Feb 15, 2024

Swagger Generation Artifacts

️❌ApiDocPreview: 1 Errors, 0 Warnings failed [Detail]

Only -1 items are listed, please refer to log for more details.

Rule Message
️️✔️SDK Breaking Change Tracking succeeded [Detail] [Expand]

Only 0 items are rendered, please refer to log for more details.

️️✔️ azure-sdk-for-net-track2 succeeded [Detail] [Expand]

Only 0 items are rendered, please refer to log for more details.

️️✔️ azure-sdk-for-go succeeded [Detail] [Expand]

Only 0 items are rendered, please refer to log for more details.

️⚠️ azure-sdk-for-python-track2 warning [Detail]

Only 0 items are rendered, please refer to log for more details.

️❌ azure-sdk-for-js failed [Detail]

Only 0 items are rendered, please refer to log for more details.

️⚠️ azure-resource-manager-schemas warning [Detail]

Only 0 items are rendered, please refer to log for more details.

️️✔️ azure-powershell succeeded [Detail] [Expand]

Only 0 items are rendered, please refer to log for more details.

Posted by Swagger Pipeline | How to fix these errors?

Copy link

openapi-pipeline-app bot commented Feb 15, 2024

Generated ApiView

Language Package Name ApiView Link
Go sdk/resourcemanager/subscription/armsubscription https://apiview.dev/Assemblies/Review/7e8919c0e1ec49729ff9bb54e172e380?revisionId=92deef18750b4948ad5048df5f7daa12
.Net Azure.ResourceManager.Subscription https://apiview.dev/Assemblies/Review/a90b2a7807b040a284612599cada4e01?revisionId=20c94c6698644af49197adc8f1b3d4c2

Copy link

Please address or respond to feedback from the ARM API reviewer.
When you are ready to continue the ARM API review, please remove the ARMChangesRequested label.
This will notify the reviewer to have another look.
If the feedback provided needs further discussion, please use this Teams channel to post your questions - aka.ms/azsdk/support/specreview-channel.
Please include [ARM Query] in the title of your question to indicate that it is ARM-related.

@AzureRestAPISpecReview AzureRestAPISpecReview added BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required new-api-version and removed NewApiVersionRequired labels Mar 4, 2024
@AzureRestAPISpecReview AzureRestAPISpecReview removed BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required NewApiVersionRequired labels Mar 4, 2024
@@ -0,0 +1,1235 @@
{
Copy link

@konrad-jamrozik konrad-jamrozik Mar 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This spec may be malformed. It causes ERROR: Syntax error: missed comma between flow collection entries as seen in https://github.com/Azure/azure-rest-api-specs/pull/27789/checks?check_run_id=22266212679

Please try to fix it. See:

It might be an issue with AutoRest itself, not the spec. Details in the issue.

Copy link
Contributor

Hi, @sriramvu. Your PR has no update for 14 days and it is marked as stale PR. If no further update for over 14 days, the bot will close the PR. If you want to refresh the PR, please remove no-recent-activity label.

@microsoft-github-policy-service microsoft-github-policy-service bot added the no-recent-activity There has been no recent activity on this issue. label Mar 25, 2024
Copy link
Contributor

Hi, @sriramvu. The PR will be closed since the PR has no update for 28 days. If you still need the PR review to proceed, please reopen it and @ mention PR assignee.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review ARMReview new-api-version no-recent-activity There has been no recent activity on this issue. ReadyForApiTest <valid label in PR review process>add this label when swagger and service APIs are ready for test resource-manager
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants