File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717import dataclasses
1818import fnmatch
19+ import logging
20+ import os
1921from typing import Set
2022
2123from airflow .models import Variable
@@ -52,6 +54,20 @@ def match_quarantine_patterns(
5254 return False
5355
5456
57+ def safe_get_from_variable (key : str , default_var : str ):
58+ """
59+ Check if the current runtime is GitHub Actions. Ignoring getting variable in GitHub Actions to prevent from
60+ spamming logs.
61+ """
62+ value = default_var
63+ is_CI = os .getenv ("GITHUB_ACTIONS" , "false" ).lower () == "true"
64+ if is_CI :
65+ logging .info ("In GitHub Actions, skip getting variables" )
66+ else :
67+ value = Variable .get (key , default_var = default_var )
68+ return value
69+
70+
5571"""
5672The quarantine list is defined by a set of UNIX Shell Glob Patterns.
5773These patterns are used to match and quarantine tests.
@@ -63,7 +79,7 @@ def match_quarantine_patterns(
6379- maxd-sdxl-* (Matches all 'maxd-sdxl-' tests)
6480"""
6581quarantine_patterns = parse_quarantine_patterns (
66- Variable . get ("quarantine_patterns" , "" )
82+ safe_get_from_variable ("quarantine_patterns" , "" )
6783)
6884
6985
You can’t perform that action at this time.
0 commit comments