-
Notifications
You must be signed in to change notification settings - Fork 5.6k
add location tabs to heatmap bottom view port #3559
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
Conversation
need to add three location tabs to heatmap bottom view port (currently one table showing all source IPs/query counts).
|
Can one of the admins verify this patch? |
Automation for azure-sdk-for-pythonEncountered an unknown error: (azure-sdk-for-python)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 33, in exception_to_github
yield context
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 170, in rest_handle_action
return rest_pull_close(body, restapi_repo, sdk_pr_target_repo, sdkbase, sdk_tag)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 185, in rest_pull_close
rest_pr_management(rest_pr, sdk_pr_target_repo, sdk_tag, sdk_default_base)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github_handler.py", line 151, in rest_pr_management
sdk_tag=sdk_tag
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/SwaggerToSdkNewCLI.py", line 254, in generate_sdk_from_git_object
with manage_git_folder(gh_token, Path(temp_dir) / Path("rest"), branched_rest_api_id, pr_number=pr_number) as restapi_git_folder, \
File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 272, in manage_git_folder
clone_to_path(gh_token, temp_dir, split_git_id[0], branch_or_commit=branch, pr_number=pr_number)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 212, in clone_to_path
repo.git.checkout(branch_or_commit)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 548, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1014, in _call_process
return self.execute(call, **exec_kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 825, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git checkout c1b4577f9fec6f9274e5a7b9d7c026898f04ce8f
stderr: 'fatal: reference is not a tree: c1b4577f9fec6f9274e5a7b9d7c026898f04ce8f' |
Automation for azure-sdk-for-nodeA PR has been created for you: |
Automation for azure-sdk-for-rubyEncountered an unknown error: (azure-sdk-for-ruby)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 33, in exception_to_github
yield context
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 170, in rest_handle_action
return rest_pull_close(body, restapi_repo, sdk_pr_target_repo, sdkbase, sdk_tag)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 185, in rest_pull_close
rest_pr_management(rest_pr, sdk_pr_target_repo, sdk_tag, sdk_default_base)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github_handler.py", line 151, in rest_pr_management
sdk_tag=sdk_tag
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/SwaggerToSdkNewCLI.py", line 254, in generate_sdk_from_git_object
with manage_git_folder(gh_token, Path(temp_dir) / Path("rest"), branched_rest_api_id, pr_number=pr_number) as restapi_git_folder, \
File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 272, in manage_git_folder
clone_to_path(gh_token, temp_dir, split_git_id[0], branch_or_commit=branch, pr_number=pr_number)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 212, in clone_to_path
repo.git.checkout(branch_or_commit)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 548, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1014, in _call_process
return self.execute(call, **exec_kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 825, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git checkout c1b4577f9fec6f9274e5a7b9d7c026898f04ce8f
stderr: 'fatal: reference is not a tree: c1b4577f9fec6f9274e5a7b9d7c026898f04ce8f' |
Automation for azure-sdk-for-javaEncountered an unknown error: (azure-sdk-for-java)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 33, in exception_to_github
yield context
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 170, in rest_handle_action
return rest_pull_close(body, restapi_repo, sdk_pr_target_repo, sdkbase, sdk_tag)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 185, in rest_pull_close
rest_pr_management(rest_pr, sdk_pr_target_repo, sdk_tag, sdk_default_base)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github_handler.py", line 151, in rest_pr_management
sdk_tag=sdk_tag
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/SwaggerToSdkNewCLI.py", line 254, in generate_sdk_from_git_object
with manage_git_folder(gh_token, Path(temp_dir) / Path("rest"), branched_rest_api_id, pr_number=pr_number) as restapi_git_folder, \
File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 272, in manage_git_folder
clone_to_path(gh_token, temp_dir, split_git_id[0], branch_or_commit=branch, pr_number=pr_number)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 212, in clone_to_path
repo.git.checkout(branch_or_commit)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 548, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1014, in _call_process
return self.execute(call, **exec_kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 825, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git checkout c1b4577f9fec6f9274e5a7b9d7c026898f04ce8f
stderr: 'fatal: reference is not a tree: c1b4577f9fec6f9274e5a7b9d7c026898f04ce8f' |
Automation for azure-sdk-for-goEncountered an unknown error: (azure-sdk-for-go)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 33, in exception_to_github
yield context
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 170, in rest_handle_action
return rest_pull_close(body, restapi_repo, sdk_pr_target_repo, sdkbase, sdk_tag)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 185, in rest_pull_close
rest_pr_management(rest_pr, sdk_pr_target_repo, sdk_tag, sdk_default_base)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github_handler.py", line 151, in rest_pr_management
sdk_tag=sdk_tag
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/SwaggerToSdkNewCLI.py", line 254, in generate_sdk_from_git_object
with manage_git_folder(gh_token, Path(temp_dir) / Path("rest"), branched_rest_api_id, pr_number=pr_number) as restapi_git_folder, \
File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 272, in manage_git_folder
clone_to_path(gh_token, temp_dir, split_git_id[0], branch_or_commit=branch, pr_number=pr_number)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 212, in clone_to_path
repo.git.checkout(branch_or_commit)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 548, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1014, in _call_process
return self.execute(call, **exec_kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 825, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git checkout c1b4577f9fec6f9274e5a7b9d7c026898f04ce8f
stderr: 'fatal: reference is not a tree: c1b4577f9fec6f9274e5a7b9d7c026898f04ce8f' |
[change type to number] Need to add three location tabs under current Traffic Manager Heatmap view port. [discussion and feedback needed]
in addition to default heatmap table, add three location options
| "required": true, | ||
| "type": "string", | ||
| "enum": [ | ||
| "default" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing comma
missing comma for heatMapType enum.
an JSON example to reuse heatmap for heatMapLocation: [Azure/azure-rest-api-specs] add location tabs to heatmap bottom view port (Azure#3559)
add HeatMapPropertyBase and four sub-classes: default, asn, country, state; add links to JSON examples update HeatMapModel
example of HeatMapCountry GET (heapMapType == "country")
example for HeatMapASN GET responses (heatMapType =="asn")
an example for HeatMapState GET response (heatMapType == "state")
| "heatMapType" | ||
| ], | ||
| }, | ||
| "default":{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a meaingful name, and the x-ms-discriminator-value for the real value. Example:
"DatasetBZip2Compression": {
"x-ms-discriminator-value": "BZip2",This means "Create class DatasetBZip2Compression, but match value BZip2 on the wire"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. so here I can use
"HeatMapPropertyAsn":
{"x-ms-discriminator-value": "asn",
to indicate that when heatMapType=="asn", the HeatMapPropertyAsn will be applied?
if so, that's very convenient - I was very confused how I can link the two.
| } | ||
| ] | ||
| }, | ||
| "asn":{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a meaingful name, and the x-ms-discriminator-value for the real value. Example:
"DatasetBZip2Compression": {
"x-ms-discriminator-value": "BZip2",This means "Create class DatasetBZip2Compression, but match value BZip2 on the wire"
| } | ||
| ] | ||
| }, | ||
| "country":{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a meaningful name, and the x-ms-discriminator-value for the real value. Example:
"DatasetBZip2Compression": {
"x-ms-discriminator-value": "BZip2",This means "Create class DatasetBZip2Compression, but match value BZip2 on the wire"
| }, | ||
| "required": [ | ||
| "heatMapType" | ||
| ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra comma, invalid JSON
| "description": "Class representing a Traffic Manager HeatMap properties." | ||
| ] | ||
| }, | ||
| "state":{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a meaningful name, and the x-ms-discriminator-value for the real value. Example:
"DatasetBZip2Compression": {
"x-ms-discriminator-value": "BZip2",This means "Create class DatasetBZip2Compression, but match value BZip2 on the wire"
| }, | ||
| "description": "Class which is a sparse representation of a Traffic Manager endpoint." | ||
| }, | ||
| "HeatMapLocation": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now you split everything, this type should be used somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ar... forgot to update this def name, should be "TrafficLocation" - i'm assuming when I use "$ref": "#/definitions/TrafficLocation", this "TrafficLocation" will be applied.
"default" -> HeatMapProperties "asn" -> HeatMapPropertyAsn "country" -> HeatMapPropertyCountry "state" -> HeatMapPropertyState rename HeatMapLocation to TrafficLocation (referenced)
update resource type name
update resource type
update resource type
update discriminator value to be resource type
ravbhatnagar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some noticeable issues. Lets close over a quick call. I want to make sure service is doing the right thing here.
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1323/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3880/heatMaps/stateTrafficFraction", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name value coming from "id" does not match the value in "name" property. Please make sure service returns the correct "id" and "name" value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated name and type - do we need a separate API version?
| "body": { | ||
| "id": "/subscriptions/{subscription-id}/resourceGroups/azuresdkfornetautoresttrafficmanager1323/providers/Microsoft.Network/trafficManagerProfiles/azuresdkfornetautoresttrafficmanager3880/heatMaps/countryTrafficFraction", | ||
| "name": "country", | ||
| "type": "Microsoft.Network/trafficManagerProfiles/heatMaps/countryTrafficFraction", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name, id, type values are all messed up. Please set up a sync with armapireview to get this approved.
|
LOoks like you have decided to go with enum for heatmap type with fixed set of names that can be given instead of $expand. Looks fine to me. |
| "HeatMapProperties": { | ||
| "HeatMapPropertyBase": { | ||
| "type": "object", | ||
| "discriminator": "heatMapType", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not exactly the way to do it, but we're close :)
- HeatMapModel should declare id, name, and type and nothing more
- HeatMapModel should have the discriminator on "type", since this is the actual value that discriminates (
heatMapTypedoes not exist in the JSON). - For each type, you need two classes (take Country as example)
- HeatMapModelCountry that is a allOf of HeatMapModel and has the x-discriminator-value, and contains one node properties described in a class HeatMapModelCountryProperties. This last one does not talk about discriminator
Hope this clarify a bit, it's easier to see now we made progress and have examples.
- Include ARM's comments to update name, and type. - Swagger discriminator now uses 'name' as distinguisher: "default", "asnTrafficFraction", "countryTrafficFraction", "stateTrafficFraction". - Updated existing HeatMapModel to be the super class with four dervatives with a discriminator value in each class: HeatMapModelDefault, HeatMaptModelAsn, HeatMapModelCountry, HeatMapModelState. - Each sub-model has a corresponding properties class
remove extra comma
|
@lmazuel do you recall what's the deal with this one? should it be merged? |
|
ping @lmazuel :) |
dsgouda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good for the most part
| "description": "Class which is a sparse representation of a Traffic Manager endpoint." | ||
| }, | ||
| "TrafficLocation": { | ||
| "properties": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mark the readonly properties wherever applicable
|
@yuncmsft can you please address the changes requested? |
|
CLosing since there's no response from @yuncmsft please request to reopen if required |
Automation for azure-sdk-for-jsEncountered an unknown error: (azure-sdk-for-js)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 33, in exception_to_github
yield context
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 170, in rest_handle_action
return rest_pull_close(body, restapi_repo, sdk_pr_target_repo, sdkbase, sdk_tag)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github.py", line 185, in rest_pull_close
rest_pr_management(rest_pr, sdk_pr_target_repo, sdk_tag, sdk_default_base)
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/restapi/github_handler.py", line 151, in rest_pr_management
sdk_tag=sdk_tag
File "/usr/local/lib/python3.6/dist-packages/swaggertosdk/SwaggerToSdkNewCLI.py", line 254, in generate_sdk_from_git_object
with manage_git_folder(gh_token, Path(temp_dir) / Path("rest"), branched_rest_api_id, pr_number=pr_number) as restapi_git_folder, \
File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 272, in manage_git_folder
clone_to_path(gh_token, temp_dir, split_git_id[0], branch_or_commit=branch, pr_number=pr_number)
File "/usr/local/lib/python3.6/dist-packages/azure_devtools/ci_tools/github_tools.py", line 212, in clone_to_path
repo.git.checkout(branch_or_commit)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 548, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 1014, in _call_process
return self.execute(call, **exec_kwargs)
File "/usr/local/lib/python3.6/dist-packages/git/cmd.py", line 825, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git checkout c1b4577f9fec6f9274e5a7b9d7c026898f04ce8f
stderr: 'fatal: reference is not a tree: c1b4577f9fec6f9274e5a7b9d7c026898f04ce8f' |
need to add three location tabs to heatmap bottom view port (currently one table showing all source IPs/query counts). * discussion and feedback needed *
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
api-versionin the path should match theapi-versionin the spec).Quality of Swagger