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

2022-06-01-preview Operator Connect #18643

Merged
merged 1 commit into from
May 17, 2022
Merged

Conversation

slpavkov
Copy link
Contributor

MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.

Changelog

Add a changelog entry for this PR by answering the following questions:

  1. What's the purpose of the update?
    • new service onboarding
    • new API version
    • update existing version for new feature
    • update existing version to fix swagger quality issue in s360
    • Other, please clarify
  2. When are you targeting to deploy the new service/feature to public regions? Please provide the date or, if the date is not yet available, the month.
  3. When do you expect to publish the swagger? Please provide date or, the the date is not yet available, the month.
  4. If updating an existing version, please select the specific language SDKs and CLIs that must be refreshed after the swagger is published.
    • SDK of .NET (need service team to ensure code readiness)
    • SDK of Python
    • SDK of Java
    • SDK of Js
    • SDK of Go
    • PowerShell
    • CLI
    • Terraform
    • No refresh required for updates in this PR

Contribution checklist:

If any further question about AME onboarding or validation tools, please view the FAQ.

ARM API Review Checklist

Applicability: ⚠️

If your changes encompass only the following scenarios, you should SKIP this section, as these scenarios do not require ARM review.

  • Change to data plane APIs
  • Adding new properties
  • All removals

Otherwise your PR may be subject to ARM review requirements. Complete the following:

  • Check this box if any of the following apply to the PR so that label "WaitForARMFeedback" will be added automatically to begin ARM API Review. Failure to comply may result in delays to the manifest.

    • Adding a new service
    • Adding new API(s)
    • Adding a new API version
      -[ ] To review changes efficiently, ensure you are using OpenAPIHub to initialize the PR for adding a new version. More details, refer to the wiki.
  • Ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.

  • If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.

Breaking Change Review Checklist

If any of the following scenarios apply to the PR, request approval from the Breaking Change Review Board as defined in the Breaking Change Policy.

  • Removing API(s) in a stable version
  • Removing properties in a stable version
  • Removing API version(s) in a stable version
  • Updating API in a stable or public preview version with Breaking Change Validation errors
  • Updating API(s) in public preview over 1 year (refer to Retirement of Previews)

Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.

Please follow the link to find more details on PR review process.

@slpavkov slpavkov requested a review from a team as a code owner April 11, 2022 14:48
@slpavkov slpavkov requested review from JeffreyRichter and MushMal and removed request for a team April 11, 2022 14:48
@openapi-workflow-bot
Copy link

Hi, @slpavkov Thanks for your PR. I am workflow bot for review process. Here are some small tips.

  • Please ensure to do self-check against checklists in first PR comment.
  • PR assignee is the person auto-assigned and responsible for your current PR reviewing and merging.
  • For specs comparison cross API versions, Use API Specs Comparison Report Generator
  • If there is CI failure(s), to fix CI error(s) is mandatory for PR merging; or you need to provide justification in PR comment for explanation. How to fix?

  • Any feedback about review process or workflow bot, pls contact swagger and tools team. [email protected]

    @openapi-workflow-bot
    Copy link

    [Call for Action] To better understand Azure service dev/test scenario, and support Azure service developer better on Swagger and REST API related tests in early phase, please help to fill in with this survey https://aka.ms/SurveyForEarlyPhase. It will take 5 to 10 minutes. If you already complete survey, please neglect this comment. Thanks.

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Apr 11, 2022

    Swagger Validation Report

    ️️✔️BreakingChange succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️LintDiff succeeded [Detail] [Expand]
    Validation passes for LintDiff.

    ️️✔️Avocado succeeded [Detail] [Expand]
    Validation passes for Avocado.
    ️️✔️~[Staging] ApiReadinessCheck succeeded [Detail] [Expand]
    ️️✔️ModelValidation succeeded [Detail] [Expand]
    Validation passes for ModelValidation.
    ️️✔️SemanticValidation succeeded [Detail] [Expand]
    Validation passes for SemanticValidation.
    ️❌Cross-Version Breaking Changes: 8 Errors, 8 Warnings failed [Detail]
    The following breaking changes are detected by comparison with the latest stable version:
    Rule Message
    1008 - ModifiedOperationId The operation id has been changed from 'PhoneNumbers_UpdateCapabilities' to 'PhoneNumbers_UpdateCapabilitiesOC'. This will impact generated code.
    New: PhoneNumbers/preview/2022-06-01-preview/phonenumbers.json#L277:7
    Old: PhoneNumbers/stable/2021-03-07/phonenumbers.json#L277:7
    1034 - AddedRequiredProperty The new version has new required property 'operatorId' that was not found in the old version.
    New: PhoneNumbers/preview/2022-06-01-preview/phonenumbers.json#L807:7
    Old: PhoneNumbers/stable/2021-03-07/phonenumbers.json#L805:7
    1034 - AddedRequiredProperty The new version has new required property 'operatorName' that was not found in the old version.
    New: PhoneNumbers/preview/2022-06-01-preview/phonenumbers.json#L807:7
    Old: PhoneNumbers/stable/2021-03-07/phonenumbers.json#L805:7
    1034 - AddedRequiredProperty The new version has new required property 'phoneNumberSource' that was not found in the old version.
    New: PhoneNumbers/preview/2022-06-01-preview/phonenumbers.json#L807:7
    Old: PhoneNumbers/stable/2021-03-07/phonenumbers.json#L805:7
    1034 - AddedRequiredProperty The new version has new required property 'operatorId, operatorName, phoneNumberSource' that was not found in the old version.
    New: PhoneNumbers/preview/2022-06-01-preview/phonenumbers.json#L312:13
    Old: PhoneNumbers/stable/2021-03-07/phonenumbers.json#L312:13
    1034 - AddedRequiredProperty The new version has new required property 'operatorId, operatorName, phoneNumberSource' that was not found in the old version.
    New: PhoneNumbers/preview/2022-06-01-preview/phonenumbers.json#L377:13
    Old: PhoneNumbers/stable/2021-03-07/phonenumbers.json#L377:13
    1034 - AddedRequiredProperty The new version has new required property 'operatorId, operatorName, phoneNumberSource' that was not found in the old version.
    New: PhoneNumbers/preview/2022-06-01-preview/phonenumbers.json#L887:11
    Old: PhoneNumbers/stable/2021-03-07/phonenumbers.json#L865:11
    1034 - AddedRequiredProperty The new version has new required property 'operatorId, operatorName, phoneNumberSource' that was not found in the old version.
    New: PhoneNumbers/preview/2022-06-01-preview/phonenumbers.json#L791:5
    Old: PhoneNumbers/stable/2021-03-07/phonenumbers.json#L792:5


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

    Rule Message
    ⚠️ 1008 - ModifiedOperationId The operation id has been changed from 'PhoneNumbers_UpdateCapabilities' to 'PhoneNumbers_UpdateCapabilitiesOC'. This will impact generated code.
    New: PhoneNumbers/preview/2022-06-01-preview/phonenumbers.json#L277:7
    Old: PhoneNumbers/preview/2022-01-11-preview2/phonenumbers.json#L277:7
    ⚠️ 1034 - AddedRequiredProperty The new version has new required property 'operatorId' that was not found in the old version.
    New: PhoneNumbers/preview/2022-06-01-preview/phonenumbers.json#L807:7
    Old: PhoneNumbers/preview/2022-01-11-preview2/phonenumbers.json#L805:7
    ⚠️ 1034 - AddedRequiredProperty The new version has new required property 'operatorName' that was not found in the old version.
    New: PhoneNumbers/preview/2022-06-01-preview/phonenumbers.json#L807:7
    Old: PhoneNumbers/preview/2022-01-11-preview2/phonenumbers.json#L805:7
    ⚠️ 1034 - AddedRequiredProperty The new version has new required property 'phoneNumberSource' that was not found in the old version.
    New: PhoneNumbers/preview/2022-06-01-preview/phonenumbers.json#L807:7
    Old: PhoneNumbers/preview/2022-01-11-preview2/phonenumbers.json#L805:7
    ⚠️ 1034 - AddedRequiredProperty The new version has new required property 'operatorId, operatorName, phoneNumberSource' that was not found in the old version.
    New: PhoneNumbers/preview/2022-06-01-preview/phonenumbers.json#L312:13
    Old: PhoneNumbers/preview/2022-01-11-preview2/phonenumbers.json#L312:13
    ⚠️ 1034 - AddedRequiredProperty The new version has new required property 'operatorId, operatorName, phoneNumberSource' that was not found in the old version.
    New: PhoneNumbers/preview/2022-06-01-preview/phonenumbers.json#L377:13
    Old: PhoneNumbers/preview/2022-01-11-preview2/phonenumbers.json#L377:13
    ⚠️ 1034 - AddedRequiredProperty The new version has new required property 'operatorId, operatorName, phoneNumberSource' that was not found in the old version.
    New: PhoneNumbers/preview/2022-06-01-preview/phonenumbers.json#L887:11
    Old: PhoneNumbers/preview/2022-01-11-preview2/phonenumbers.json#L865:11
    ⚠️ 1034 - AddedRequiredProperty The new version has new required property 'operatorId, operatorName, phoneNumberSource' that was not found in the old version.
    New: PhoneNumbers/preview/2022-06-01-preview/phonenumbers.json#L791:5
    Old: PhoneNumbers/preview/2022-01-11-preview2/phonenumbers.json#L792:5
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️️✔️SDK Track2 Validation succeeded [Detail] [Expand]
    Validation passes for SDKTrack2Validation

    ️️✔️PrettierCheck succeeded [Detail] [Expand]
    Validation passes for PrettierCheck.
    ️️✔️SpellCheck succeeded [Detail] [Expand]
    Validation passes for SpellCheck.
    ️️✔️Lint(RPaaS) succeeded [Detail] [Expand]
    Validation passes for Lint(RPaaS).
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Apr 11, 2022

    Swagger pipeline restarted successfully, please wait for status update in this comment.

    @openapi-workflow-bot
    Copy link

    Hi @slpavkov, Your PR has some issues. Please fix the CI sequentially by following the order of Avocado, semantic validation, model validation, breaking change, lintDiff. If you have any questions, please post your questions in this channel https://aka.ms/swaggersupport.

    TaskHow to fixPriority
    AvocadoFix-AvocadoHigh
    Semantic validationFix-SemanticValidation-ErrorHigh
    Model validationFix-ModelValidation-ErrorHigh
    LintDiffFix-LintDiffhigh
    If you need further help, please feedback via swagger feedback.

    @JeffreyRichter
    Copy link
    Member

    Some comments:

    • POST /availablePhoneNumbers/countries/{countryCode}/:search
      • What is the operation-id response header for? Is this the per-operation guid used to help diagnose problems? If so, this header is usually called x-ms-request-id
      • Why is there a serch-id response header AND a searchId JSON property?
    • Do you care if the POST actions are idempotent or not? Right now, they are not and we usually try to make them idempotent.
    • DELETE /phoneNumbers/operations/{operationId}
      • Do you need this? Can't the service automatically delete these operation resources sometime after they complete?
    • PATCH /phoneNumbers/{phoneNumber}/capabilities
      • We have a new LRO pattern which offers many improvements over what Azure teams have used in the past. I'd recommend you use it here unless you really need to keep consistency with other LRO patterns already-shipped in ACS.
      • For one thing, the new LRO pattern does allow for long-running PATCH operations because this means that ALL PATCH operations must be long running, and it is impossible to offer a synchronous PATCH now. Instead, we'd say that this should be modelled as a long-running POST-action.
      • This PATCH probably should NOT return a Location header because the resource URL being patched is already known to the client.

    @slpavkov
    Copy link
    Contributor Author

    slpavkov commented Apr 11, 2022

    hi @JeffreyRichter these comments are all meaningful but im afraid that im not the owner of this api. I just need to add couple of missing properties for new feature we are building. So im curious how does that work? Is it so that whoever needs to change the swagger, needs also to update it to latest recommendations? I'm afraid of that, since any changes in the API (outside the ones i did - which is adding 3 properties in the PurchasedPhoneNumber dto) would mean more changes in UI and add a lot of work to my team in general. So how do the teams usually approach these situations?

    @JeffreyRichter
    Copy link
    Member

    So first, it would be great if you could track down some PM or someone who owns this API and share my comments with them. Especially while this is in preview, we can easily make the kinds of changes I'm suggesting.

    Second, when you asked me to review this PR, what were you asking for? Just to review 3 new properties? If so, how would I have known to look for these? How would I know what they do or what data type they should be? I don't know what I was being asked to do and so I reviewed the whole of the API.

    @slpavkov slpavkov force-pushed the slpavkov/phone-numbers-2022-06-01 branch from 19628a9 to a8cdff0 Compare April 12, 2022 14:53
    @slpavkov
    Copy link
    Contributor Author

    Hi @JeffreyRichter, my apologies for not setting the context of the review and causing the confusion.
    Let me please correct that in this comment:
    The purpose of this swagger review and change in PR is only to add 3 new properties to the PurchasedPhoneNumber class that is returned from the PhoneNumbers API.
    We need to do this to enable Private Preview for ACS Operator Connect (UI needs to show who is the partner for each purchased number, is it Microsoft, or some other operator). Since this is a breaking change, we created this PR with three additional properties in that class (it's a new folder with copy of previous swagger and examples, but if you would compare the 'phonenumbers.json' swagger in the newly added folder '2022-06-01-preview' with the one if previous folder you would see diff is in these three properties in JSON added:
    - partnerName
    - partnerId
    - isOperatorConnect

    All your comments deserve to be addressed but i would propose a compromise to postpone that to future when we do Public Preview or GA for ACS Operator Connect.
    For this change we have limited resources/timelines and doing proper upgrade of this swagger would push the Private Preview far in the future, and we want to ship it fast to onboard operators and give them something to test with.
    If the feature turns out to be useful, we will have to create an updated version of swagger for GA and then we can address all those points you mentioned.

    You asked to pull into discussion people who are considered API owners so I'm adding @whisper6284 (Adrian Tang) who also made previous changes on the API and can answer any questions you might have.

    Please let us know if this proposal makes sense.

    @JeffreyRichter JeffreyRichter added the Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 label Apr 12, 2022
    @JeffreyRichter
    Copy link
    Member

    Thanks for the explanation; I approved the PR. Yes you can postpone changing the API until before public preview.

    @slpavkov
    Copy link
    Contributor Author

    Thanks @JeffreyRichter for approval and for prompt response! I will fix the validation changes and later we can merge it.

    Copy link
    Member

    @MushMal MushMal left a comment

    Choose a reason for hiding this comment

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

    Question/comment about the name of the isOperatorConnect parameter.

    Other than that, based on the conversation LGTM

    "purchaseDate",
    "partnerName",
    "partnerId",
    "isOperatorConnect"
    Copy link
    Member

    Choose a reason for hiding this comment

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

    Can this be a more descriptive name of the parameter?

    Copy link
    Contributor Author

    @slpavkov slpavkov Apr 19, 2022

    Choose a reason for hiding this comment

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

    @MushMal you are right its not a good name. We are actually planing to use Enum "NumberSource" instead with 2 values:

    1. CloudNumber (for numbers bought via MSFT)
    2. OperatorConnect (for numbers purchased with operators
      Would that be acceptable? If not, can you elaborate more please?

    Copy link
    Member

    Choose a reason for hiding this comment

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

    I like the idea of making this boolean an enum - easier to extend. Make sure you are using extensible enums https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#use-extensible-enums

    The name itself can be anything like you have - phoneNumberType or phoneNumberSource..?

    Copy link
    Member

    Choose a reason for hiding this comment

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

    I see you've made the changes already. Looks good

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

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

    Hi @JeffreyRichter and @MushMal can this be merged? Thanks!

    Copy link
    Member

    Choose a reason for hiding this comment

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

    You have my LGTM. I would ask Jeffrey for his. You need two

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

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

    Hi @MushMal we have two approval now, please merge if possible (i dont have the rights to do it). Thanks!

    Copy link
    Member

    Choose a reason for hiding this comment

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

    Apologies for the delay. Let me figure this out ASAP as I don't seem to have the merge rights either

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

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

    Hi @MushMal any eta on when this can be merged please? Thanks!

    @slpavkov slpavkov force-pushed the slpavkov/phone-numbers-2022-06-01 branch 2 times, most recently from fbe63b4 to 9958497 Compare April 27, 2022 17:36
    @slpavkov slpavkov force-pushed the slpavkov/phone-numbers-2022-06-01 branch from cc1d84c to 6de2e5b Compare April 27, 2022 18:04
    @heaths heaths merged commit d55b800 into main May 17, 2022
    @heaths heaths deleted the slpavkov/phone-numbers-2022-06-01 branch May 17, 2022 16:16
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    5 participants