Skip to content

Commit 6dfc296

Browse files
committed
add collect results as dep for upload changelog metadata pt 2
1 parent 7a6e31a commit 6dfc296

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

utils/process_changelog.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,25 @@ def main():
8585
"entries": changelog_data,
8686
},
8787
}
88+
8889
all_results = []
90+
# Deduplicate repeated configs, if for some reason a config key appears multiple times
91+
# in one commit, we don't want to run that config two times (there will just be twice as many
92+
# data points for that config, which is not useful)
93+
all_configs_to_run = set()
94+
8995
for entry_data in changelog_data:
9096
entry = ChangelogEntry.model_validate(entry_data)
9197
configs_to_run = get_config_keys_from_master(
9298
entry.config_keys, load_config_files(MASTER_CONFIGS)
9399
)
94100

101+
# Skip configs already processed
102+
configs_to_run = [c for c in configs_to_run if c not in all_configs_to_run]
103+
if not configs_to_run:
104+
continue
105+
all_configs_to_run.update(configs_to_run)
106+
95107
try:
96108
result = subprocess.run(
97109
[
@@ -111,6 +123,7 @@ def main():
111123
)
112124
except subprocess.CalledProcessError as e:
113125
print(e.stderr)
126+
continue
114127

115128
all_results.extend(json.loads(result.stdout))
116129

0 commit comments

Comments
 (0)