-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Upgrade the container/compute library to 0.32.0 #1233
Conversation
8a391d7
to
096067a
Compare
It looks like there are some Pylint errors and at least one test ( |
@brendandburns, please add a new test step for |
cli_command('acs list', ContainerServiceOperations.list, factory) | ||
cli_command('acs delete', ContainerServiceOperations.delete, factory) | ||
cli_command('acs show', ContainerServicesOperations.get, factory) | ||
cli_command('acs list', list_container_services) |
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.
Change this to cli_command('acs list', list_container_services, factory)
as line 114 already createes to container_services client.
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.
done.
@@ -1020,3 +1020,9 @@ def update_acs(resource_group_name, container_service_name, new_agent_count): | |||
return client.container_service.create_or_update(resource_group_name, | |||
container_service_name, instance) | |||
|
|||
def list_container_services(resource_group_name=None): | |||
''' List Container Services. ''' | |||
ccf = _compute_client_factory() |
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.
... Then in this method:
- Remove
ccf = _compute_client_factory()
andccf.container_services
- The first argument will now be the container service client.
def list_container_services(client, resource_group_name=None):
svc_list = client.list_by_resource_group(resource_group_name=resource_group_name) \
if resource_group_name else ccf.container_services.list()
return list(svc_list)
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.
done.
comments addressed, ci/cd fixed (i hope), please take another look. Thanks! |
there are lint errors still:
|
f49889a
to
cc4312b
Compare
@yugangw-msft all passing now, sorry for the issues. Thanks! |
|
||
def list_container_services(client, resource_group_name=None): | ||
''' List Container Services. ''' | ||
svc_list = client.container_services.list_by_resource_group( |
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.
With your change at commands.py
to reuse the factory
object, the client
now points to container_services
already, so this line might be broken. Please double check. Also it won't hurt to invoke the list
command in the e2e test case.
I usually avoid passing in operation_group object as client
to custom commands, because of the inconsistency, hence confusing.
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.
@brendandburns, see my comments above, please verify list
still works
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.
@yugangw-msft good catch, fixed.
How do I add it to the e2e test case?
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.
@brendandburns, add a test step here. I recently added similar testing for webapp. Yes, you need to delete and re-record VCR data.
Since people are waiting for this change, I went ahead and merged it. You can catch up the test coverage in the next PR
@derekbekoe @yugangw-msft