mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-06 01:45:27 +03:00
fix(infra): skip codspeed for partners without benchmarks (#36775)
The CodSpeed workflow was failing on partner PRs because `check_diff.py` added every partner to the `codspeed` matrix unconditionally — even when no `tests/benchmarks/` directory exists. The workflow then ran an empty shell block for those partners, CodSpeed saw zero benchmarks, and marked the check as failed. Currently no partner package has benchmarks, so this affected every partner PR.
This commit is contained in:
1 parent
1292c64e6d
commit
f2d3a2f6e2
2 files changed
+8
-5
No files matched your search
@@ -316,8 +316,13 @@ if __name__ == "__main__":
|
||||
if not filename.startswith(".")
|
||||
] != ["README.md"]:
|
||||
dirs_to_run["test"].add(f"libs/partners/{partner_dir}")
|
||||
# Skip codspeed for partners without benchmarks or in IGNORED_PARTNERS
|
||||
if partner_dir not in IGNORED_PARTNERS:
|
||||
# Only add to codspeed if the partner has benchmarks and is not ignored
|
||||
if (
|
||||
partner_dir not in IGNORED_PARTNERS
|
||||
and os.path.isdir(
|
||||
f"libs/partners/{partner_dir}/tests/benchmarks"
|
||||
)
|
||||
):
|
||||
dirs_to_run["codspeed"].add(f"libs/partners/{partner_dir}")
|
||||
# Skip if the directory was deleted or is just a tombstone readme
|
||||
elif file.startswith("libs/"):
|
||||
|
||||
Reference in new issue
Block a user