-
Notifications
You must be signed in to change notification settings - Fork 375
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 test pipeline #2764
Conversation
narrieta
commented
Feb 16, 2023
- Fix check for image locations
- Fix error message for image not available in a location
- Add combinator to existing_vm runbook
- Fix log collection
if not any(suite.location in i.locations for i in self.images[suite.images]): | ||
raise Exception(f"Test suite {suite.name} must be executed in {suite.location}, but no images in {suite.images} are available in that location") | ||
for image in self.images[suite.images]: | ||
if len(image.locations) > 0: |
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 check below needs to be done only when the image specifies a location
for image in self.images[suite.images]: | ||
if len(image.locations) > 0: | ||
if suite.location not in image.locations: | ||
raise Exception(f"Test suite {suite.name} must be executed in {suite.location}, but <{image.urn}> is not available in that location") |
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.
Fixed error message to use the URN for the image blocking the test
@@ -91,7 +90,7 @@ def _set_thread_name(name: str): | |||
# | |||
# Possible values for the collect_logs parameter | |||
# | |||
class CollectLogs(Enum): |
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.
comparing a string to one of the enum items was failing; changed this to be a class with string data members instead of an Enum
@@ -341,14 +340,15 @@ def _execute_test_suite(self, suite: TestSuiteInfo) -> bool: | |||
suite_full_name = f"{suite_name}-{self.context.image_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 comment
The reason will be displayed to describe this comment to others. Learn more.
This method is supposed to return True on success; it was returning True on failure
@@ -44,7 +46,61 @@ variable: | |||
value: "" | |||
is_secret: true | |||
|
|||
# Set these to use an SSH proxy | |||
# |
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 forgot to add the combinator to this runbook in my previous PR
…M64 images into their own image set
Codecov Report
@@ Coverage Diff @@
## develop #2764 +/- ##
===========================================
+ Coverage 71.97% 71.99% +0.01%
===========================================
Files 103 104 +1
Lines 15692 15831 +139
Branches 2486 2264 -222
===========================================
+ Hits 11295 11397 +102
- Misses 3881 3913 +32
- Partials 516 521 +5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
# An image or image set (as defined in images.yml) specifying the images the suite must run on. | ||
images: str | ||
# Images or image sets (as defined in images.yml) on which the suite must run. | ||
images: List[str] |
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 added support for multiple images/image sets so now this is a List, you'll see several changes wrapping references to this member in for loops
# Endorsed distros (ARM64) that are tested on the daily runs | ||
endorsed-arm64: | ||
- "mariner_2_arm64" | ||
|
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.
separated ARM64 into its own image set
raise Exception(f"Test suite {suite.name} must be executed in {suite.location}, but no images in {suite.images} are available in that location") | ||
for suite_image in suite.images: | ||
for image in self.images[suite_image]: | ||
if len(image.locations) > 0: |
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.
if len(image.locations) == 0
, does that mean the image is available in any location?
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.
yes, "locations" is used when the image is available only on specific regions. if not provided, or empty, it means the image should be available on all locations.