Support languageservices expressions test data#1691
Support languageservices expressions test data#1691DarkaMaul wants to merge 3 commits intozizmorcore:mainfrom
Conversation
a16c64b to
7d9e9a2
Compare
|
The current test result is: So roughly the following categories:
I will triage the issues, and open the appropriate issues if needed. |
support/sync-expression-tests.py
Outdated
| def _git_blob_sha(data: bytes) -> str: | ||
| """Compute the git blob SHA-1 for the given content.""" | ||
| header = f"blob {len(data)}\0".encode() | ||
| return hashlib.sha1(header + data).hexdigest() |
There was a problem hiding this comment.
I think this is the wrong level of abstraction -- ideally we'd use the same trick as codeql-injection-sinks here, i.e. just do a sparse checkout of the specific tree we're interested in. That also avoids any GitHub API traffic (since it's git egress), which would count against repo-wide API quotas.
(Specifically, we probably want the equivalent of _clone_actions_codeql, and the PR creation action will do the chore work of skipping the PR if the contents didn't actually change.)
There was a problem hiding this comment.
Makes sense!
I liked using the GH API to only update the changed files - but the sparse checkout option is indeed simpler.
Pre-submission checks
Please check these boxes:
Mandatory: This PR corresponds to an issue (if not, please create
one first) (Tests: integrate GitHub's official expression tests #1688)
I hereby disclose the use of an LLM or other AI coding assistant in the
creation of this PR. PRs will not be rejected for using AI tools, but
will be rejected for undisclosed use.
If a checkbox is not applicable, you can leave it unchecked.
Summary
This PR adds a mechanism to support the KAT from actions/languageservices .
Test Plan
This is a test only PR.