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

suppress systemd errors in e2e tests #3292

Merged
merged 3 commits into from
Jan 7, 2025

Conversation

nagworld9
Copy link
Contributor

Description

suppress systemd errors in e2e tests

Issue #


PR information

  • Ensure development PR is based on the develop branch.
  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made

Quality of Code and Contribution Guidelines

@@ -454,7 +476,7 @@ def matches_ignore_rule(record: AgentLogRecord, ignore_rules: List[Dict[str, Any
"""
Returns True if the given 'record' matches any of the 'ignore_rules'
"""
return any(re.search(rule['message'], record.message) is not None and ('if' not in rule or rule['if'](record)) for rule in ignore_rules)
return any(re.search(rule['message'], record.message, flags=re.DOTALL) is not None and ('if' not in rule or rule['if'](record)) for rule in ignore_rules)
Copy link
Member

@narrieta narrieta Jan 7, 2025

Choose a reason for hiding this comment

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

we should not do this for all rules (or if we do, we need to go back and review very carefully all the existing rules and associated messages).

you can do this exlplicitly at the regex level, as in

'message': r"(?s)name=Microsoft.GuestConfiguration.ConfigurationforLinux.*op=Install.*Unexpected Linux distribution"

regex starts with (?s)

@nagworld9 nagworld9 force-pushed the suppress-systemd-errors branch from f263ad6 to 60f5f46 Compare January 7, 2025 21:31
@nagworld9 nagworld9 merged commit 844c0a6 into Azure:develop Jan 7, 2025
9 of 11 checks passed
@nagworld9 nagworld9 deleted the suppress-systemd-errors branch January 7, 2025 23:22
nagworld9 added a commit to nagworld9/WALinuxAgent that referenced this pull request Jan 7, 2025
* ingonre systemd errors

* addressing comment

(cherry picked from commit 844c0a6)
nagworld9 added a commit that referenced this pull request Jan 8, 2025
* ingonre systemd errors

* addressing comment

(cherry picked from commit 844c0a6)
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