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

Remove duplicate operations #2459

Merged
merged 1 commit into from
Feb 15, 2018

Conversation

solankisamir
Copy link
Member

@solankisamir solankisamir commented Feb 9, 2018

Tag_ operations have all been moved to apimtags.json file. Removing them from apimproducts.json

Apis_ListByTags have been moved to apimapis.json, removing the file apimapisbytags.json

@dsgouda this is related to PR
#2449

@vfedonkin FYI

This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.

PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes.
  • Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

@azuresdkciprbot
Copy link

Hi There,

I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result:

File: specification/apimanagement/resource-manager/readme.md
Before the PR: Warning(s): 0 Error(s): 0
After the PR: Warning(s): 0 Error(s): 0

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@AutorestCI
Copy link

AutorestCI commented Feb 9, 2018

Automation for azure-sdk-for-python

Nothing to generate for azure-sdk-for-python

@AutorestCI
Copy link

AutorestCI commented Feb 9, 2018

Automation for azure-sdk-for-go

Encountered a Subprocess error: (azure-sdk-for-go)

Command: ['/usr/local/bin/autorest', '/tmp/tmpdap5qv_s/rest/specification/apimanagement/resource-manager/readme.md', '--go', '--go-sdk-folder=/tmp/tmpdap5qv_s/sdk', '--multiapi', '--package-version=nightly', '--use=@microsoft.azure/autorest.go@preview', "--user-agent='Azure-SDK-For-Go/nightly services'", '--verbose']
Finished with return code 1
and output:

AutoRest code generation utility [version: 2.0.4251; node: v7.10.1]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
   Loading AutoRest core      '/tmp/.autorest/@microsoft.azure_autorest-core@2.0.4251/node_modules/@microsoft.azure/autorest-core/dist' (2.0.4251)
FATAL: AutoRest exited unexpectedly after launching autorest-core module @microsoft.azure/autorest-core from /tmp/.autorest/@microsoft.azure_autorest-core@2.0.4251
   Loading AutoRest extension '@microsoft.azure/autorest.go' (preview->2.1.86)
   Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.3.38->2.3.38)
Processing batch task - {"tag":"package-2017-03"} .
FATAL: System.InvalidOperationException: method RegionsClient.ListByService contains a null nextLinkName so it shouldn't be treated as a pageable operation
   at AutoRest.Go.Model.PageTypeGo..ctor(MethodGo method) in C:\Users\ci\AppData\Local\Temp\PUBLISHvae20\98_20180214T032032\autorest.go\src\Model\PageTypeGo.cs:line 41
   at AutoRest.Go.Model.CodeModelGo.CreatePageableTypeForMethod(MethodGo method) in C:\Users\ci\AppData\Local\Temp\PUBLISHvae20\98_20180214T032032\autorest.go\src\Model\CodeModelGo.cs:line 342
   at AutoRest.Go.TransformerGo.TransformMethods(CodeModelGo cmg) in C:\Users\ci\AppData\Local\Temp\PUBLISHvae20\98_20180214T032032\autorest.go\src\TransformerGo.cs:line 288
   at AutoRest.Go.TransformerGo.TransformCodeModel(CodeModel cm) in C:\Users\ci\AppData\Local\Temp\PUBLISHvae20\98_20180214T032032\autorest.go\src\TransformerGo.cs:line 25
   at AutoRest.Go.Program.<ProcessInternal>d__3.MoveNext() in C:\Users\ci\AppData\Local\Temp\PUBLISHvae20\98_20180214T032032\autorest.go\src\Program.cs:line 100
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NewPlugin.<Process>d__15.MoveNext()
FATAL: go/generate - FAILED
FATAL: Error: Plugin go reported failure.
Process() cancelled due to exception : Plugin go reported failure.
Failure during batch task - {"tag":"package-2017-03"} -- Error: Plugin go reported failure..
  Error: Plugin go reported failure.

@solankisamir
Copy link
Member Author

@marstr can you take a look? This is mostly cleanup and things we missed in older pr

@solankisamir
Copy link
Member Author

@marstr a gentle ping again?
I think this scenario should be handled in the validation itself. If in a spec, you have two operations with same OperationId across multiple files and for the same readme.md, we should throw an error.
@dsgouda fyi

@solankisamir
Copy link
Member Author

@mcardosos can you take a look at this? @marstr has been not responsive on the PR

@marstr
Copy link
Member

marstr commented Feb 13, 2018

Hey, sorry for the delay on this. I've been preoccupied with other important matters.

I'll need to spend a little time ensuring that the these are truly duplicated items. I see one of changes is a deleted file. Could you send me a link to the other copy, as well as the updated references to it? (This is likely in the input-files section of your service's README.

@solankisamir
Copy link
Member Author

solankisamir commented Feb 13, 2018

@marstr the

  • deleted file contents are present in Apis_ListByTags
  • Tag_ListProducts, Tag_DetachFromProduct, Tag_AssignToProduct, Tag_GetByProduct which is removed from apimproduct.json is present apimtags.json

@marstr
Copy link
Member

marstr commented Feb 14, 2018

I've verified that the Tag operations match between the ones still present in the repo, and those deleted. The only difference was the location used to reference parameters with the same names.

I am curious though, could you reiterate why the deleted file is only in your fork and what your plans are to reintroduce it?

@solankisamir
Copy link
Member Author

We don't plan to reintroduce the file, the operation will stay in apimapis.json

Tag_ operations have all been moved to apimtags.json file. Removing them from apimproducts.json

Apis_ListByTags have been moved to apimapis.json, removing the file apimapisbytags.json
@azuresdkciprbot
Copy link

Hi There,

I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result:

File: specification/apimanagement/resource-manager/readme.md
Before the PR: Warning(s): 0 Error(s): 0
After the PR: Warning(s): 0 Error(s): 0

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@solankisamir
Copy link
Member Author

@marstr can you merge this?

@marstr marstr merged commit f5492b7 into Azure:master Feb 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants