-
Notifications
You must be signed in to change notification settings - Fork 373
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
Bug fixes for end-to-end tests #2820
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,7 +135,7 @@ def _initialize(self, node: Node, variables: Dict[str, Any], lisa_working_path: | |
|
||
self.__context = self._Context( | ||
vm=VmIdentifier( | ||
cloud=self._get_required_parameter(variables, "c_cloud"), | ||
cloud=self._get_required_parameter(variables, "cloud"), | ||
location=self._get_required_parameter(variables, "c_location"), | ||
subscription=node.features._platform.subscription_id, | ||
resource_group=node_context.resource_group_name, | ||
|
@@ -454,8 +454,6 @@ def _execute_test_suite(self, suite: TestSuiteInfo) -> bool: | |
suite_full_name = f"{suite_name}-{self.context.environment_name}" | ||
suite_start_time: datetime.datetime = datetime.datetime.now() | ||
|
||
success: bool = True # True if all the tests succeed | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this variable was a leftover of a previous iteration of the code and _execute_test_suite was always returning True (i.e. Success, so VM logs were not being collected on test failures) |
||
|
||
with _set_thread_name(suite_full_name): # The thread name is added to the LISA log | ||
log_path: Path = self.context.log_path/f"{suite_full_name}.log" | ||
with set_current_thread_log(log_path): | ||
|
@@ -550,7 +548,7 @@ def _execute_test_suite(self, suite: TestSuiteInfo) -> bool: | |
if not suite_success: | ||
self._mark_log_as_failed() | ||
|
||
return success | ||
return suite_success | ||
|
||
def _check_agent_log(self) -> bool: | ||
""" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,9 +107,7 @@ def enable( | |
extension_parameters | ||
).result(timeout=_TIMEOUT)) | ||
|
||
if result.provisioning_state not in ('Succeeded', 'Updating'): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I copied this check from the original prototype, but it has been producing intermittent failures. Depending on the timing, it can be Succeeded, Updating or just None. I double-checked that on extension failure the call to result() in the previous line will raise an exception anyway, so this check is actually not needed and now we just log an INFO. |
||
raise Exception(f"Enable {self._identifier} failed. Provisioning state: {result.provisioning_state}") | ||
log.info("Enable completed (provisioning state: %s).", result.provisioning_state) | ||
log.info("Enable completed. Provisioning state: %s", result.provisioning_state) | ||
|
||
def get_instance_view(self) -> VirtualMachineExtensionInstanceView: # TODO: Check type for scale sets | ||
""" | ||
|
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.
The 'c_cloud' variable was not being passed to runbooks when running on an existing VM.
While fixing this I realized there is no need for this variable, since the AgentTestSuite and AgentTestSuiteCombinator can just use 'cloud' directly from the runbook.