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

chore(workflow-engine): comparison json schema for LevelHandler #84049

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ameliahsu
Copy link
Member

comparison for LevelHandler should be a dict with level: LOG_LEVELS_MAP.values() and match: MatchType

@ameliahsu ameliahsu requested a review from cathteng January 24, 2025 23:50
@ameliahsu ameliahsu requested a review from a team as a code owner January 24, 2025 23:50
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 24, 2025
comparison_json_schema = {
"type": "object",
"properties": {
"level": {"type": "integer", "enum": [*LOG_LEVELS_MAP.values()]},
Copy link
Member

Choose a reason for hiding this comment

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

nit: does this work?

Suggested change
"level": {"type": "integer", "enum": [*LOG_LEVELS_MAP.values()]},
"level": {"type": "integer", "enum": list(LOG_LEVELS_MAP.values())},

Copy link
Member Author

Choose a reason for hiding this comment

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

yes maam i will fix

}
assert dc.condition_result is True
assert dc.condition_group == dcg

def test_json_schema(self):
Copy link
Member

Choose a reason for hiding this comment

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

nit: test invalid match?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants