Skip to content

Commit 587f44c

Browse files
authored
Fix AML/GitIgnore Flakiness (Azure#28434)
* Fix AML/GitIgnore Flakiness * add changelog
1 parent f538be5 commit 587f44c

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

sdk/ml/azure-ai-ml/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
-
77

88
### Bugs Fixed
9-
-
9+
- Fixed an issue where the ordering of `.amlignore` and `.gitignore` files are not respected
1010

1111
### Other Changes
1212
- Update workspace creation to use Log Analytics-Based Application Insights when the user does not specify/bring their own App Insights.
@@ -61,7 +61,7 @@
6161
## 1.1.2 (2022-11-21)
6262

6363
### Features Added
64-
- Restored idle_time_before_shutdown property for Compute Instances.
64+
- Restored idle_time_before_shutdown property for Compute Instances.
6565
- Deprecated idle_time_before_shutdown property in favor of idle_time_before_shutdown_minutes.
6666

6767
### Bugs Fixed

sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_asset_utils.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def _get_ignore_list(self) -> List[str]:
9595

9696
def _create_pathspec(self) -> List[GitWildMatchPattern]:
9797
"""Creates path specification based on ignore list."""
98-
return [GitWildMatchPattern(ignore) for ignore in set(self._get_ignore_list())]
98+
return [GitWildMatchPattern(ignore) for ignore in self._get_ignore_list()]
9999

100100
def is_file_excluded(self, file_path: Union[str, Path]) -> bool:
101101
"""Checks if given file_path is excluded.
@@ -115,13 +115,14 @@ def is_file_excluded(self, file_path: Union[str, Path]) -> bool:
115115
# 2 paths are on different drives
116116
return True
117117

118-
file_path = str(file_path)
119118
norm_file = normalize_file(file_path)
119+
matched = False
120120
for pattern in self._path_spec:
121121
if pattern.include is not None:
122-
if norm_file in pattern.match((norm_file,)):
123-
return bool(pattern.include)
124-
return False
122+
if pattern.match_file(norm_file) is not None:
123+
matched = pattern.include
124+
125+
return matched
125126

126127
@property
127128
def path(self) -> Union[Path, str]:

0 commit comments

Comments
 (0)