Skip to content
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

modify cloud-init error pattern #3320

Merged
merged 4 commits into from
Jun 19, 2024

Conversation

rmhsawyer
Copy link
Contributor

Correct pattern matching list _ERROR_WARNING_pattern for cloud-init test in LISA. Previously, it does not properly catch message patter [ERROR] and [WARNING] in cloud-init.log

re.compile(r"^(.*\[WARNING\]*)$", re.MULTILINE),
re.compile(r"^(.*WARNING:*)$", re.MULTILINE),
re.compile(r"^(.*[ERROR]*)$", re.MULTILINE),
re.compile(r"^(.*[WARNING]*)$", re.MULTILINE),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new pattern looks incorrect and wide. It matches like W, AWRING, IN or something else.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add newly examples above, so you can test the new patterns without regressions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing this out. I tested the new pattern ^(.[WARNING]:) on https://regex101.com/. Also, I removed the $ sign to make the match more tolerate. For now, the only pattern strings in cloud-init.log we want to match are "[ERROR]:" and "[WARNING]:"

@LiliDeng LiliDeng merged commit c97b143 into microsoft:main Jun 19, 2024
23 checks passed
re.compile(r"^(.*ERROR:*)$", re.MULTILINE),
re.compile(r"^(.*\[WARNING\]*)$", re.MULTILINE),
re.compile(r"^(.*WARNING:*)$", re.MULTILINE),
re.compile(r"^(.*\[ERROR\]:.*)", re.MULTILINE),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add examples above, which error want or unwanted. The previous pattern captured patterns like ERROR: aaa. But they are removed. Please specify the reasons.

@rmhsawyer rmhsawyer deleted the minghe/cloud-init_test_pattern branch June 19, 2024 18:17
r-dailey pushed a commit to r-dailey/lisa that referenced this pull request Jul 3, 2024
* modify cloud-init error pattern

* modify cloud-init error pattern

* modify cloud-init error pattern

* modify cloud-init error pattern
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.

None yet

3 participants