Skip to content

[ARO] az aro: Fix table output#13066

Merged
haroldrandom merged 1 commit intoAzure:devfrom
m1kola:fix_aro_table_output
Apr 20, 2020
Merged

[ARO] az aro: Fix table output#13066
haroldrandom merged 1 commit intoAzure:devfrom
m1kola:fix_aro_table_output

Conversation

@m1kola
Copy link
Contributor

@m1kola m1kola commented Apr 17, 2020

Description

Fixes a bug in az aro {command} --output table (az aro list --output table, for example) when the comamnd fails due to not taking into account potential None values in data in some edge cases table output currently fails. For example:

  • When there are no worker profiles (cluster only has masters or we failed to get data from API server)
  • When a worker profile does not have count (machine set was scaled to 0)

Testing Guide

Create an ARO cluster, scale all machine sets to 0 and try to run az aro list --output table.

History Notes

[ARO] az aro: Fix table output


This checklist is used to make sure that common guidelines for a pull request are followed.

@yonzhan
Copy link
Collaborator

yonzhan commented Apr 17, 2020

add to S169

@m1kola m1kola force-pushed the fix_aro_table_output branch from ebf96ff to edf4d37 Compare April 17, 2020 13:49
@haroldrandom
Copy link
Contributor

haroldrandom commented Apr 17, 2020

Could you please add __init__.py under tests/ and its child directory latest/? (To enable test discover mechanism)

And adding this require re-recording tests.

@m1kola m1kola force-pushed the fix_aro_table_output branch from edf4d37 to e0fa70d Compare April 17, 2020 14:00
@m1kola
Copy link
Contributor Author

m1kola commented Apr 17, 2020

Good catch! Added __init__.py into these dirs. But I think we also need to update request recordings. I'll look into how to do it now.

@haroldrandom
Copy link
Contributor

Good catch! Added __init__.py into these dirs. But I think we also need to update request recordings. I'll look into how to do it now.

One reason why CI failed is azure-mgmt-network has bumped to a newer version, you could re-recordin test to resolve this.
But still need you fix the problem for your modifcation if any.

@m1kola m1kola force-pushed the fix_aro_table_output branch from e0fa70d to 6fc8b44 Compare April 20, 2020 10:53
Fixes a bug in `az aro {command} --output table` (`az aro list --output table`, for example) when the comamnd fails due to not taking into account potential `None` values in data in some edge cases table output currently fails. For example:

* When there are no worker profiles (cluster only has masters or we failed to get data from API server)
* When a worker profile does not have count (machine set was scaled to 0)
@m1kola
Copy link
Contributor Author

m1kola commented Apr 20, 2020

@jiasli @haroldrandom please take a look. I rebased on top of dev branch which now has __init__.py files for tests and new recordings and added some extra test for table output.

@haroldrandom haroldrandom merged commit 2989946 into Azure:dev Apr 20, 2020
@m1kola m1kola deleted the fix_aro_table_output branch April 20, 2020 14:14
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.

3 participants