Pin GitHub Actions to full-length commit SHAs to unblock CI - #79

Merged
Swiddis merged 2 commits into
opensearch-project:1.0-legacyfrom
RyanL1997:fix/ci-pin-actions-to-sha
Aug 4, 2026
Merged

Pin GitHub Actions to full-length commit SHAs to unblock CI#79
Swiddis merged 2 commits into
opensearch-project:1.0-legacyfrom
RyanL1997:fix/ci-pin-actions-to-sha

Conversation

@RyanL1997

@RyanL1997RyanL1997 commented Aug 3, 2026

Copy link
Copy Markdown

Description

CI is completely broken on 1.0-legacy. Every workflow here references actions by tag or branch, and the org now requires full-length commit SHA pins, so jobs fail during Set up job — before checkout, before any code runs:

The actions actions/checkout@v3, actions/setup-python@v4, nick-fields/retry@v2, and
actions/upload-artifact@v3 are not allowed in opensearch-project/sql-cli because all
actions must be pinned to a full-length commit SHA.
The actions tim-actions/get-pr-commits@v1.1.0 and tim-actions/dco@v1.1.0 are not allowed
in opensearch-project/sql-cli because all actions must be pinned to a full-length commit SHA.

That takes out both the DCO check and the test-and-build job on every PR targeting this branch, so nothing can be merged here with green CI. This is independent of any code change — it hits PRs whose diff doesn't touch .github/ at all.

This pins all 13 action references to full SHAs, keeping the tag as a trailing comment in the usual @<sha> # <tag> form.

Where the SHAs come from

main is already SHA-pinned, so wherever it references the same action, this PR reuses main's exact SHA to keep the two branches consistent:

ActionSHASource
tim-actions/get-pr-commits55b867b9… # v1.1.0matches main
tim-actions/dcof2279e6e… # v1.1.0matches main
release-drafter/release-drafter09c613e2… # v5matches main
actions/checkout (link-checker)ee0669bd… # v2matches main
lycheeverse/lychee-action6da1d14f… # mastermatches main
actions/checkout (build)f43a0e5f… # v3matches main
actions/setup-python7f4fc3e2… # v4matches main
actions/upload-artifactea165f8d… # v4matches main (see below)
actions/github-scriptd7906e4a… # v6resolved for the tag in use
nick-fields/retry14672906… # v2resolved for the tag in use
tibdex/github-app-token1901dc7d… # v1.5.0resolved for the tag in use
VachaShah/backport28c49d91… # v1.1.4resolved for the tag in use
SvanBoxel/delete-merged-branch2b5b058e… # mainresolved from main HEAD

Every SHA was verified to resolve in its source repository before being written in.

One deliberate version change

actions/upload-artifact goes v3 → v4, matching main. v3 of the artifact actions was retired, so pinning v3's SHA would satisfy the org policy and still fail at runtime. The build job has a single matrix combination (python 3.8 × opensearch latest), so v4's unique-artifact-name requirement is already satisfied without renaming anything.

Everything else keeps its current major version — this is a pinning change, not an upgrade sweep.

What is not changed

  • The python-version: [3.8] matrix is untouched. I checked the actions/python-versions manifest and setup-python still publishes 3.8.18 builds for ubuntu-24.04, so 3.8 is not the problem here.
  • No workflow logic, trigger, step or with: input was modified.
  • add-untriaged.yml uses CRLF line endings; those are preserved, so its diff is the single uses: line rather than a whole-file rewrite.

Issues Resolved

None filed — surfaced while working on #78, whose CI failed for this reason rather than anything in its diff.

Testing

  • Diff is exactly the pins: 13 insertions / 13 deletions across 7 files, one line per action reference.
  • No unpinned references remain: grep -rn "uses:" .github/workflows/ | grep -vE "@[0-9a-f]{40} #" returns nothing.
  • SHA validity: each of the 13 SHAs confirmed to exist in its repo via repos/{owner}/{repo}/commits/{sha}.
  • YAML validity: all 7 workflow files re-parsed with yaml.safe_load and confirmed to still contain a jobs key.

The real verification is CI on this PR — if the pins are right, the DCO and build jobs should get past Set up job for the first time.

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.


Update: second commit — pinned test container + de-brittled explain assertions

With the pins in place CI reached the test step for the first time in roughly two years, and tests/test_main.py::TestMain::test_explain failed (1 failed, 27 passed, 2 skipped):

Expected: ..."_source":{"includes":["a"],"excludes":[]}}, searchDone=false)
Actual: ..."_source":{"includes":["a"]}}, pitId=null, cursorKeepAlive=null,
searchAfter=null, searchResponse=null)

This is pre-existing rot, not a regression from the pinning commit. The test hardcodes an expected OpenSearchQueryRequest.toString() captured in September 2024 (last touched in #30), while the workflow runs against opensearchproject/opensearch:latest — an unpinned, always-moving tag. The SQL plugin has since added PIT support (pitId, cursorKeepAlive, searchAfter, searchResponse), stopped emitting "excludes", and dropped "searchDone".

1. Pinned the container to 3.7.0. That is what :latest currently resolves to — verified by comparing registry manifest digests (sha256:44ba7ea5… matches the 3.7.0 tag and no other). The test environment now stops moving underfoot, and a comment on the matrix warns that bumping it may require updating the expectations.

2. Stopped asserting on the full request string. The plan structure is still asserted exactly — operator names, projected fields, empty scan children. The request string is now checked only for what this test is actually about: the target index, the LIMIT 150 the query asked for, and the projected source field.

Verified the relaxed assertion is not simply re-pinned to today's server:

InputResult
Observed OpenSearch 3.7.0 outputpasses
Original 2024 server outputpasses
Wrong index namefails (as it should)
Wrong LIMIT / sizefails (as it should)

So it tolerates server-representation drift while still catching the things the assertion was there to catch.

Local pytest tests/ remains 25 passed, 5 skipped; test_main.py compiles and the workflow YAML still parses.

Every workflow on this branch referenced actions by tag or branch. The org now
requires actions to be pinned to a full-length commit SHA, so all jobs fail
during "Set up job" before checkout ever runs:
The actions actions/checkout@v3, actions/setup-python@v4, nick-fields/retry@v2,
and actions/upload-artifact@v3 are not allowed in opensearch-project/sql-cli
because all actions must be pinned to a full-length commit SHA.
That takes out the DCO check and the test-and-build job on every pull request
against 1.0-legacy, so nothing can be merged here with green CI.
Pins all 13 action references to full SHAs, keeping the tag as a trailing
comment. Where the main branch already pins the same action, the SHA matches
main so the two branches stay consistent.
One version change: actions/upload-artifact moves v3 -> v4, matching main.
v3 of the artifact actions was retired and pinning its SHA would satisfy the
policy while still failing at runtime. The build job has a single matrix
combination, so the unique-artifact-name requirement in v4 is already met.
No other behaviour changes: the Python 3.8 matrix is unchanged (setup-python
still publishes 3.8.18 for ubuntu-24.04) and no workflow logic was touched.
All seven workflow files were checked to still parse as valid YAML.
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
With the action pins in place, CI reaches the test step for the first time in
roughly two years and immediately fails on tests/test_main.py::test_explain:
Expected: ..."_source":{"includes":["a"],"excludes":[]}}, searchDone=false)
Actual: ..."_source":{"includes":["a"]}}, pitId=null, cursorKeepAlive=null,
searchAfter=null, searchResponse=null)
The test hardcodes an expected OpenSearchQueryRequest.toString() captured in
September 2024, while the workflow runs against opensearchproject/opensearch
:latest -- an unpinned, always-moving tag. The server-side SQL plugin has since
added PIT support (pitId, cursorKeepAlive, searchAfter, searchResponse),
stopped emitting "excludes" and dropped "searchDone", so the assertion was
guaranteed to rot. Dead CI simply hid it.
Two changes:
1. Pin the container to 3.7.0, which is what :latest currently resolves to
(verified by comparing registry manifest digests), so the test environment
stops moving underfoot.
2. Stop asserting on the full request string. The plan structure is still
checked exactly -- operator names, projected fields, empty scan children --
and the request is checked only for the parts that carry meaning here: the
target index, the LIMIT 150 that the query asked for, and the projected
source field.
The relaxed assertion still fails on a wrong index or a wrong limit, and it
passes against both the 3.7.0 output and the original 2024 output, so it is not
merely re-pinned to today's server.
This keeps the branch green without coupling the suite to server internals it
was never trying to test.
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
@Swiddis
Swiddis merged commit deb5146 into opensearch-project:1.0-legacyAug 4, 2026
4 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@RyanL1997@Swiddis
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Pin GitHub Actions to full-length commit SHAs to unblock CI - #79

Merged
Swiddis merged 2 commits into
opensearch-project:1.0-legacyfrom
RyanL1997:fix/ci-pin-actions-to-sha
Aug 4, 2026
Merged

Pin GitHub Actions to full-length commit SHAs to unblock CI#79
Swiddis merged 2 commits into
opensearch-project:1.0-legacyfrom
RyanL1997:fix/ci-pin-actions-to-sha

Conversation

@RyanL1997

@RyanL1997RyanL1997 commented Aug 3, 2026

Copy link
Copy Markdown

Description

CI is completely broken on 1.0-legacy. Every workflow here references actions by tag or branch, and the org now requires full-length commit SHA pins, so jobs fail during Set up job — before checkout, before any code runs:

The actions actions/checkout@v3, actions/setup-python@v4, nick-fields/retry@v2, and
actions/upload-artifact@v3 are not allowed in opensearch-project/sql-cli because all
actions must be pinned to a full-length commit SHA.
The actions tim-actions/get-pr-commits@v1.1.0 and tim-actions/dco@v1.1.0 are not allowed
in opensearch-project/sql-cli because all actions must be pinned to a full-length commit SHA.

That takes out both the DCO check and the test-and-build job on every PR targeting this branch, so nothing can be merged here with green CI. This is independent of any code change — it hits PRs whose diff doesn't touch .github/ at all.

This pins all 13 action references to full SHAs, keeping the tag as a trailing comment in the usual @<sha> # <tag> form.

Where the SHAs come from

main is already SHA-pinned, so wherever it references the same action, this PR reuses main's exact SHA to keep the two branches consistent:

ActionSHASource
tim-actions/get-pr-commits55b867b9… # v1.1.0matches main
tim-actions/dcof2279e6e… # v1.1.0matches main
release-drafter/release-drafter09c613e2… # v5matches main
actions/checkout (link-checker)ee0669bd… # v2matches main
lycheeverse/lychee-action6da1d14f… # mastermatches main
actions/checkout (build)f43a0e5f… # v3matches main
actions/setup-python7f4fc3e2… # v4matches main
actions/upload-artifactea165f8d… # v4matches main (see below)
actions/github-scriptd7906e4a… # v6resolved for the tag in use
nick-fields/retry14672906… # v2resolved for the tag in use
tibdex/github-app-token1901dc7d… # v1.5.0resolved for the tag in use
VachaShah/backport28c49d91… # v1.1.4resolved for the tag in use
SvanBoxel/delete-merged-branch2b5b058e… # mainresolved from main HEAD

Every SHA was verified to resolve in its source repository before being written in.

One deliberate version change

actions/upload-artifact goes v3 → v4, matching main. v3 of the artifact actions was retired, so pinning v3's SHA would satisfy the org policy and still fail at runtime. The build job has a single matrix combination (python 3.8 × opensearch latest), so v4's unique-artifact-name requirement is already satisfied without renaming anything.

Everything else keeps its current major version — this is a pinning change, not an upgrade sweep.

What is not changed

  • The python-version: [3.8] matrix is untouched. I checked the actions/python-versions manifest and setup-python still publishes 3.8.18 builds for ubuntu-24.04, so 3.8 is not the problem here.
  • No workflow logic, trigger, step or with: input was modified.
  • add-untriaged.yml uses CRLF line endings; those are preserved, so its diff is the single uses: line rather than a whole-file rewrite.

Issues Resolved

None filed — surfaced while working on #78, whose CI failed for this reason rather than anything in its diff.

Testing

  • Diff is exactly the pins: 13 insertions / 13 deletions across 7 files, one line per action reference.
  • No unpinned references remain: grep -rn "uses:" .github/workflows/ | grep -vE "@[0-9a-f]{40} #" returns nothing.
  • SHA validity: each of the 13 SHAs confirmed to exist in its repo via repos/{owner}/{repo}/commits/{sha}.
  • YAML validity: all 7 workflow files re-parsed with yaml.safe_load and confirmed to still contain a jobs key.

The real verification is CI on this PR — if the pins are right, the DCO and build jobs should get past Set up job for the first time.

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.


Update: second commit — pinned test container + de-brittled explain assertions

With the pins in place CI reached the test step for the first time in roughly two years, and tests/test_main.py::TestMain::test_explain failed (1 failed, 27 passed, 2 skipped):

Expected: ..."_source":{"includes":["a"],"excludes":[]}}, searchDone=false)
Actual: ..."_source":{"includes":["a"]}}, pitId=null, cursorKeepAlive=null,
searchAfter=null, searchResponse=null)

This is pre-existing rot, not a regression from the pinning commit. The test hardcodes an expected OpenSearchQueryRequest.toString() captured in September 2024 (last touched in #30), while the workflow runs against opensearchproject/opensearch:latest — an unpinned, always-moving tag. The SQL plugin has since added PIT support (pitId, cursorKeepAlive, searchAfter, searchResponse), stopped emitting "excludes", and dropped "searchDone".

1. Pinned the container to 3.7.0. That is what :latest currently resolves to — verified by comparing registry manifest digests (sha256:44ba7ea5… matches the 3.7.0 tag and no other). The test environment now stops moving underfoot, and a comment on the matrix warns that bumping it may require updating the expectations.

2. Stopped asserting on the full request string. The plan structure is still asserted exactly — operator names, projected fields, empty scan children. The request string is now checked only for what this test is actually about: the target index, the LIMIT 150 the query asked for, and the projected source field.

Verified the relaxed assertion is not simply re-pinned to today's server:

InputResult
Observed OpenSearch 3.7.0 outputpasses
Original 2024 server outputpasses
Wrong index namefails (as it should)
Wrong LIMIT / sizefails (as it should)

So it tolerates server-representation drift while still catching the things the assertion was there to catch.

Local pytest tests/ remains 25 passed, 5 skipped; test_main.py compiles and the workflow YAML still parses.

Every workflow on this branch referenced actions by tag or branch. The org now
requires actions to be pinned to a full-length commit SHA, so all jobs fail
during "Set up job" before checkout ever runs:
The actions actions/checkout@v3, actions/setup-python@v4, nick-fields/retry@v2,
and actions/upload-artifact@v3 are not allowed in opensearch-project/sql-cli
because all actions must be pinned to a full-length commit SHA.
That takes out the DCO check and the test-and-build job on every pull request
against 1.0-legacy, so nothing can be merged here with green CI.
Pins all 13 action references to full SHAs, keeping the tag as a trailing
comment. Where the main branch already pins the same action, the SHA matches
main so the two branches stay consistent.
One version change: actions/upload-artifact moves v3 -> v4, matching main.
v3 of the artifact actions was retired and pinning its SHA would satisfy the
policy while still failing at runtime. The build job has a single matrix
combination, so the unique-artifact-name requirement in v4 is already met.
No other behaviour changes: the Python 3.8 matrix is unchanged (setup-python
still publishes 3.8.18 for ubuntu-24.04) and no workflow logic was touched.
All seven workflow files were checked to still parse as valid YAML.
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
With the action pins in place, CI reaches the test step for the first time in
roughly two years and immediately fails on tests/test_main.py::test_explain:
Expected: ..."_source":{"includes":["a"],"excludes":[]}}, searchDone=false)
Actual: ..."_source":{"includes":["a"]}}, pitId=null, cursorKeepAlive=null,
searchAfter=null, searchResponse=null)
The test hardcodes an expected OpenSearchQueryRequest.toString() captured in
September 2024, while the workflow runs against opensearchproject/opensearch
:latest -- an unpinned, always-moving tag. The server-side SQL plugin has since
added PIT support (pitId, cursorKeepAlive, searchAfter, searchResponse),
stopped emitting "excludes" and dropped "searchDone", so the assertion was
guaranteed to rot. Dead CI simply hid it.
Two changes:
1. Pin the container to 3.7.0, which is what :latest currently resolves to
(verified by comparing registry manifest digests), so the test environment
stops moving underfoot.
2. Stop asserting on the full request string. The plan structure is still
checked exactly -- operator names, projected fields, empty scan children --
and the request is checked only for the parts that carry meaning here: the
target index, the LIMIT 150 that the query asked for, and the projected
source field.
The relaxed assertion still fails on a wrong index or a wrong limit, and it
passes against both the 3.7.0 output and the original 2024 output, so it is not
merely re-pinned to today's server.
This keeps the branch green without coupling the suite to server internals it
was never trying to test.
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
@Swiddis
Swiddis merged commit deb5146 into opensearch-project:1.0-legacyAug 4, 2026
4 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@RyanL1997@Swiddis
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Pin GitHub Actions to full-length commit SHAs to unblock CI - #79

Merged
Swiddis merged 2 commits into
opensearch-project:1.0-legacyfrom
RyanL1997:fix/ci-pin-actions-to-sha
Aug 4, 2026
Merged

Pin GitHub Actions to full-length commit SHAs to unblock CI#79
Swiddis merged 2 commits into
opensearch-project:1.0-legacyfrom
RyanL1997:fix/ci-pin-actions-to-sha

Conversation

@RyanL1997

@RyanL1997RyanL1997 commented Aug 3, 2026

Copy link
Copy Markdown

Description

CI is completely broken on 1.0-legacy. Every workflow here references actions by tag or branch, and the org now requires full-length commit SHA pins, so jobs fail during Set up job — before checkout, before any code runs:

The actions actions/checkout@v3, actions/setup-python@v4, nick-fields/retry@v2, and
actions/upload-artifact@v3 are not allowed in opensearch-project/sql-cli because all
actions must be pinned to a full-length commit SHA.
The actions tim-actions/get-pr-commits@v1.1.0 and tim-actions/dco@v1.1.0 are not allowed
in opensearch-project/sql-cli because all actions must be pinned to a full-length commit SHA.

That takes out both the DCO check and the test-and-build job on every PR targeting this branch, so nothing can be merged here with green CI. This is independent of any code change — it hits PRs whose diff doesn't touch .github/ at all.

This pins all 13 action references to full SHAs, keeping the tag as a trailing comment in the usual @<sha> # <tag> form.

Where the SHAs come from

main is already SHA-pinned, so wherever it references the same action, this PR reuses main's exact SHA to keep the two branches consistent:

ActionSHASource
tim-actions/get-pr-commits55b867b9… # v1.1.0matches main
tim-actions/dcof2279e6e… # v1.1.0matches main
release-drafter/release-drafter09c613e2… # v5matches main
actions/checkout (link-checker)ee0669bd… # v2matches main
lycheeverse/lychee-action6da1d14f… # mastermatches main
actions/checkout (build)f43a0e5f… # v3matches main
actions/setup-python7f4fc3e2… # v4matches main
actions/upload-artifactea165f8d… # v4matches main (see below)
actions/github-scriptd7906e4a… # v6resolved for the tag in use
nick-fields/retry14672906… # v2resolved for the tag in use
tibdex/github-app-token1901dc7d… # v1.5.0resolved for the tag in use
VachaShah/backport28c49d91… # v1.1.4resolved for the tag in use
SvanBoxel/delete-merged-branch2b5b058e… # mainresolved from main HEAD

Every SHA was verified to resolve in its source repository before being written in.

One deliberate version change

actions/upload-artifact goes v3 → v4, matching main. v3 of the artifact actions was retired, so pinning v3's SHA would satisfy the org policy and still fail at runtime. The build job has a single matrix combination (python 3.8 × opensearch latest), so v4's unique-artifact-name requirement is already satisfied without renaming anything.

Everything else keeps its current major version — this is a pinning change, not an upgrade sweep.

What is not changed

  • The python-version: [3.8] matrix is untouched. I checked the actions/python-versions manifest and setup-python still publishes 3.8.18 builds for ubuntu-24.04, so 3.8 is not the problem here.
  • No workflow logic, trigger, step or with: input was modified.
  • add-untriaged.yml uses CRLF line endings; those are preserved, so its diff is the single uses: line rather than a whole-file rewrite.

Issues Resolved

None filed — surfaced while working on #78, whose CI failed for this reason rather than anything in its diff.

Testing

  • Diff is exactly the pins: 13 insertions / 13 deletions across 7 files, one line per action reference.
  • No unpinned references remain: grep -rn "uses:" .github/workflows/ | grep -vE "@[0-9a-f]{40} #" returns nothing.
  • SHA validity: each of the 13 SHAs confirmed to exist in its repo via repos/{owner}/{repo}/commits/{sha}.
  • YAML validity: all 7 workflow files re-parsed with yaml.safe_load and confirmed to still contain a jobs key.

The real verification is CI on this PR — if the pins are right, the DCO and build jobs should get past Set up job for the first time.

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.


Update: second commit — pinned test container + de-brittled explain assertions

With the pins in place CI reached the test step for the first time in roughly two years, and tests/test_main.py::TestMain::test_explain failed (1 failed, 27 passed, 2 skipped):

Expected: ..."_source":{"includes":["a"],"excludes":[]}}, searchDone=false)
Actual: ..."_source":{"includes":["a"]}}, pitId=null, cursorKeepAlive=null,
searchAfter=null, searchResponse=null)

This is pre-existing rot, not a regression from the pinning commit. The test hardcodes an expected OpenSearchQueryRequest.toString() captured in September 2024 (last touched in #30), while the workflow runs against opensearchproject/opensearch:latest — an unpinned, always-moving tag. The SQL plugin has since added PIT support (pitId, cursorKeepAlive, searchAfter, searchResponse), stopped emitting "excludes", and dropped "searchDone".

1. Pinned the container to 3.7.0. That is what :latest currently resolves to — verified by comparing registry manifest digests (sha256:44ba7ea5… matches the 3.7.0 tag and no other). The test environment now stops moving underfoot, and a comment on the matrix warns that bumping it may require updating the expectations.

2. Stopped asserting on the full request string. The plan structure is still asserted exactly — operator names, projected fields, empty scan children. The request string is now checked only for what this test is actually about: the target index, the LIMIT 150 the query asked for, and the projected source field.

Verified the relaxed assertion is not simply re-pinned to today's server:

InputResult
Observed OpenSearch 3.7.0 outputpasses
Original 2024 server outputpasses
Wrong index namefails (as it should)
Wrong LIMIT / sizefails (as it should)

So it tolerates server-representation drift while still catching the things the assertion was there to catch.

Local pytest tests/ remains 25 passed, 5 skipped; test_main.py compiles and the workflow YAML still parses.

Every workflow on this branch referenced actions by tag or branch. The org now
requires actions to be pinned to a full-length commit SHA, so all jobs fail
during "Set up job" before checkout ever runs:
The actions actions/checkout@v3, actions/setup-python@v4, nick-fields/retry@v2,
and actions/upload-artifact@v3 are not allowed in opensearch-project/sql-cli
because all actions must be pinned to a full-length commit SHA.
That takes out the DCO check and the test-and-build job on every pull request
against 1.0-legacy, so nothing can be merged here with green CI.
Pins all 13 action references to full SHAs, keeping the tag as a trailing
comment. Where the main branch already pins the same action, the SHA matches
main so the two branches stay consistent.
One version change: actions/upload-artifact moves v3 -> v4, matching main.
v3 of the artifact actions was retired and pinning its SHA would satisfy the
policy while still failing at runtime. The build job has a single matrix
combination, so the unique-artifact-name requirement in v4 is already met.
No other behaviour changes: the Python 3.8 matrix is unchanged (setup-python
still publishes 3.8.18 for ubuntu-24.04) and no workflow logic was touched.
All seven workflow files were checked to still parse as valid YAML.
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
With the action pins in place, CI reaches the test step for the first time in
roughly two years and immediately fails on tests/test_main.py::test_explain:
Expected: ..."_source":{"includes":["a"],"excludes":[]}}, searchDone=false)
Actual: ..."_source":{"includes":["a"]}}, pitId=null, cursorKeepAlive=null,
searchAfter=null, searchResponse=null)
The test hardcodes an expected OpenSearchQueryRequest.toString() captured in
September 2024, while the workflow runs against opensearchproject/opensearch
:latest -- an unpinned, always-moving tag. The server-side SQL plugin has since
added PIT support (pitId, cursorKeepAlive, searchAfter, searchResponse),
stopped emitting "excludes" and dropped "searchDone", so the assertion was
guaranteed to rot. Dead CI simply hid it.
Two changes:
1. Pin the container to 3.7.0, which is what :latest currently resolves to
(verified by comparing registry manifest digests), so the test environment
stops moving underfoot.
2. Stop asserting on the full request string. The plan structure is still
checked exactly -- operator names, projected fields, empty scan children --
and the request is checked only for the parts that carry meaning here: the
target index, the LIMIT 150 that the query asked for, and the projected
source field.
The relaxed assertion still fails on a wrong index or a wrong limit, and it
passes against both the 3.7.0 output and the original 2024 output, so it is not
merely re-pinned to today's server.
This keeps the branch green without coupling the suite to server internals it
was never trying to test.
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
@Swiddis
Swiddis merged commit deb5146 into opensearch-project:1.0-legacyAug 4, 2026
4 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@RyanL1997@Swiddis
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Pin GitHub Actions to full-length commit SHAs to unblock CI - #79

Merged
Swiddis merged 2 commits into
opensearch-project:1.0-legacyfrom
RyanL1997:fix/ci-pin-actions-to-sha
Aug 4, 2026
Merged

Pin GitHub Actions to full-length commit SHAs to unblock CI#79
Swiddis merged 2 commits into
opensearch-project:1.0-legacyfrom
RyanL1997:fix/ci-pin-actions-to-sha

Conversation

@RyanL1997

@RyanL1997RyanL1997 commented Aug 3, 2026

Copy link
Copy Markdown

Description

CI is completely broken on 1.0-legacy. Every workflow here references actions by tag or branch, and the org now requires full-length commit SHA pins, so jobs fail during Set up job — before checkout, before any code runs:

The actions actions/checkout@v3, actions/setup-python@v4, nick-fields/retry@v2, and
actions/upload-artifact@v3 are not allowed in opensearch-project/sql-cli because all
actions must be pinned to a full-length commit SHA.
The actions tim-actions/get-pr-commits@v1.1.0 and tim-actions/dco@v1.1.0 are not allowed
in opensearch-project/sql-cli because all actions must be pinned to a full-length commit SHA.

That takes out both the DCO check and the test-and-build job on every PR targeting this branch, so nothing can be merged here with green CI. This is independent of any code change — it hits PRs whose diff doesn't touch .github/ at all.

This pins all 13 action references to full SHAs, keeping the tag as a trailing comment in the usual @<sha> # <tag> form.

Where the SHAs come from

main is already SHA-pinned, so wherever it references the same action, this PR reuses main's exact SHA to keep the two branches consistent:

ActionSHASource
tim-actions/get-pr-commits55b867b9… # v1.1.0matches main
tim-actions/dcof2279e6e… # v1.1.0matches main
release-drafter/release-drafter09c613e2… # v5matches main
actions/checkout (link-checker)ee0669bd… # v2matches main
lycheeverse/lychee-action6da1d14f… # mastermatches main
actions/checkout (build)f43a0e5f… # v3matches main
actions/setup-python7f4fc3e2… # v4matches main
actions/upload-artifactea165f8d… # v4matches main (see below)
actions/github-scriptd7906e4a… # v6resolved for the tag in use
nick-fields/retry14672906… # v2resolved for the tag in use
tibdex/github-app-token1901dc7d… # v1.5.0resolved for the tag in use
VachaShah/backport28c49d91… # v1.1.4resolved for the tag in use
SvanBoxel/delete-merged-branch2b5b058e… # mainresolved from main HEAD

Every SHA was verified to resolve in its source repository before being written in.

One deliberate version change

actions/upload-artifact goes v3 → v4, matching main. v3 of the artifact actions was retired, so pinning v3's SHA would satisfy the org policy and still fail at runtime. The build job has a single matrix combination (python 3.8 × opensearch latest), so v4's unique-artifact-name requirement is already satisfied without renaming anything.

Everything else keeps its current major version — this is a pinning change, not an upgrade sweep.

What is not changed

  • The python-version: [3.8] matrix is untouched. I checked the actions/python-versions manifest and setup-python still publishes 3.8.18 builds for ubuntu-24.04, so 3.8 is not the problem here.
  • No workflow logic, trigger, step or with: input was modified.
  • add-untriaged.yml uses CRLF line endings; those are preserved, so its diff is the single uses: line rather than a whole-file rewrite.

Issues Resolved

None filed — surfaced while working on #78, whose CI failed for this reason rather than anything in its diff.

Testing

  • Diff is exactly the pins: 13 insertions / 13 deletions across 7 files, one line per action reference.
  • No unpinned references remain: grep -rn "uses:" .github/workflows/ | grep -vE "@[0-9a-f]{40} #" returns nothing.
  • SHA validity: each of the 13 SHAs confirmed to exist in its repo via repos/{owner}/{repo}/commits/{sha}.
  • YAML validity: all 7 workflow files re-parsed with yaml.safe_load and confirmed to still contain a jobs key.

The real verification is CI on this PR — if the pins are right, the DCO and build jobs should get past Set up job for the first time.

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.


Update: second commit — pinned test container + de-brittled explain assertions

With the pins in place CI reached the test step for the first time in roughly two years, and tests/test_main.py::TestMain::test_explain failed (1 failed, 27 passed, 2 skipped):

Expected: ..."_source":{"includes":["a"],"excludes":[]}}, searchDone=false)
Actual: ..."_source":{"includes":["a"]}}, pitId=null, cursorKeepAlive=null,
searchAfter=null, searchResponse=null)

This is pre-existing rot, not a regression from the pinning commit. The test hardcodes an expected OpenSearchQueryRequest.toString() captured in September 2024 (last touched in #30), while the workflow runs against opensearchproject/opensearch:latest — an unpinned, always-moving tag. The SQL plugin has since added PIT support (pitId, cursorKeepAlive, searchAfter, searchResponse), stopped emitting "excludes", and dropped "searchDone".

1. Pinned the container to 3.7.0. That is what :latest currently resolves to — verified by comparing registry manifest digests (sha256:44ba7ea5… matches the 3.7.0 tag and no other). The test environment now stops moving underfoot, and a comment on the matrix warns that bumping it may require updating the expectations.

2. Stopped asserting on the full request string. The plan structure is still asserted exactly — operator names, projected fields, empty scan children. The request string is now checked only for what this test is actually about: the target index, the LIMIT 150 the query asked for, and the projected source field.

Verified the relaxed assertion is not simply re-pinned to today's server:

InputResult
Observed OpenSearch 3.7.0 outputpasses
Original 2024 server outputpasses
Wrong index namefails (as it should)
Wrong LIMIT / sizefails (as it should)

So it tolerates server-representation drift while still catching the things the assertion was there to catch.

Local pytest tests/ remains 25 passed, 5 skipped; test_main.py compiles and the workflow YAML still parses.

Every workflow on this branch referenced actions by tag or branch. The org now
requires actions to be pinned to a full-length commit SHA, so all jobs fail
during "Set up job" before checkout ever runs:
The actions actions/checkout@v3, actions/setup-python@v4, nick-fields/retry@v2,
and actions/upload-artifact@v3 are not allowed in opensearch-project/sql-cli
because all actions must be pinned to a full-length commit SHA.
That takes out the DCO check and the test-and-build job on every pull request
against 1.0-legacy, so nothing can be merged here with green CI.
Pins all 13 action references to full SHAs, keeping the tag as a trailing
comment. Where the main branch already pins the same action, the SHA matches
main so the two branches stay consistent.
One version change: actions/upload-artifact moves v3 -> v4, matching main.
v3 of the artifact actions was retired and pinning its SHA would satisfy the
policy while still failing at runtime. The build job has a single matrix
combination, so the unique-artifact-name requirement in v4 is already met.
No other behaviour changes: the Python 3.8 matrix is unchanged (setup-python
still publishes 3.8.18 for ubuntu-24.04) and no workflow logic was touched.
All seven workflow files were checked to still parse as valid YAML.
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
With the action pins in place, CI reaches the test step for the first time in
roughly two years and immediately fails on tests/test_main.py::test_explain:
Expected: ..."_source":{"includes":["a"],"excludes":[]}}, searchDone=false)
Actual: ..."_source":{"includes":["a"]}}, pitId=null, cursorKeepAlive=null,
searchAfter=null, searchResponse=null)
The test hardcodes an expected OpenSearchQueryRequest.toString() captured in
September 2024, while the workflow runs against opensearchproject/opensearch
:latest -- an unpinned, always-moving tag. The server-side SQL plugin has since
added PIT support (pitId, cursorKeepAlive, searchAfter, searchResponse),
stopped emitting "excludes" and dropped "searchDone", so the assertion was
guaranteed to rot. Dead CI simply hid it.
Two changes:
1. Pin the container to 3.7.0, which is what :latest currently resolves to
(verified by comparing registry manifest digests), so the test environment
stops moving underfoot.
2. Stop asserting on the full request string. The plan structure is still
checked exactly -- operator names, projected fields, empty scan children --
and the request is checked only for the parts that carry meaning here: the
target index, the LIMIT 150 that the query asked for, and the projected
source field.
The relaxed assertion still fails on a wrong index or a wrong limit, and it
passes against both the 3.7.0 output and the original 2024 output, so it is not
merely re-pinned to today's server.
This keeps the branch green without coupling the suite to server internals it
was never trying to test.
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
@Swiddis
Swiddis merged commit deb5146 into opensearch-project:1.0-legacyAug 4, 2026
4 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@RyanL1997@Swiddis
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Pin GitHub Actions to full-length commit SHAs to unblock CI - #79

Merged
Swiddis merged 2 commits into
opensearch-project:1.0-legacyfrom
RyanL1997:fix/ci-pin-actions-to-sha
Aug 4, 2026
Merged

Pin GitHub Actions to full-length commit SHAs to unblock CI#79
Swiddis merged 2 commits into
opensearch-project:1.0-legacyfrom
RyanL1997:fix/ci-pin-actions-to-sha

Conversation

@RyanL1997

@RyanL1997RyanL1997 commented Aug 3, 2026

Copy link
Copy Markdown

Description

CI is completely broken on 1.0-legacy. Every workflow here references actions by tag or branch, and the org now requires full-length commit SHA pins, so jobs fail during Set up job — before checkout, before any code runs:

The actions actions/checkout@v3, actions/setup-python@v4, nick-fields/retry@v2, and
actions/upload-artifact@v3 are not allowed in opensearch-project/sql-cli because all
actions must be pinned to a full-length commit SHA.
The actions tim-actions/get-pr-commits@v1.1.0 and tim-actions/dco@v1.1.0 are not allowed
in opensearch-project/sql-cli because all actions must be pinned to a full-length commit SHA.

That takes out both the DCO check and the test-and-build job on every PR targeting this branch, so nothing can be merged here with green CI. This is independent of any code change — it hits PRs whose diff doesn't touch .github/ at all.

This pins all 13 action references to full SHAs, keeping the tag as a trailing comment in the usual @<sha> # <tag> form.

Where the SHAs come from

main is already SHA-pinned, so wherever it references the same action, this PR reuses main's exact SHA to keep the two branches consistent:

ActionSHASource
tim-actions/get-pr-commits55b867b9… # v1.1.0matches main
tim-actions/dcof2279e6e… # v1.1.0matches main
release-drafter/release-drafter09c613e2… # v5matches main
actions/checkout (link-checker)ee0669bd… # v2matches main
lycheeverse/lychee-action6da1d14f… # mastermatches main
actions/checkout (build)f43a0e5f… # v3matches main
actions/setup-python7f4fc3e2… # v4matches main
actions/upload-artifactea165f8d… # v4matches main (see below)
actions/github-scriptd7906e4a… # v6resolved for the tag in use
nick-fields/retry14672906… # v2resolved for the tag in use
tibdex/github-app-token1901dc7d… # v1.5.0resolved for the tag in use
VachaShah/backport28c49d91… # v1.1.4resolved for the tag in use
SvanBoxel/delete-merged-branch2b5b058e… # mainresolved from main HEAD

Every SHA was verified to resolve in its source repository before being written in.

One deliberate version change

actions/upload-artifact goes v3 → v4, matching main. v3 of the artifact actions was retired, so pinning v3's SHA would satisfy the org policy and still fail at runtime. The build job has a single matrix combination (python 3.8 × opensearch latest), so v4's unique-artifact-name requirement is already satisfied without renaming anything.

Everything else keeps its current major version — this is a pinning change, not an upgrade sweep.

What is not changed

  • The python-version: [3.8] matrix is untouched. I checked the actions/python-versions manifest and setup-python still publishes 3.8.18 builds for ubuntu-24.04, so 3.8 is not the problem here.
  • No workflow logic, trigger, step or with: input was modified.
  • add-untriaged.yml uses CRLF line endings; those are preserved, so its diff is the single uses: line rather than a whole-file rewrite.

Issues Resolved

None filed — surfaced while working on #78, whose CI failed for this reason rather than anything in its diff.

Testing

  • Diff is exactly the pins: 13 insertions / 13 deletions across 7 files, one line per action reference.
  • No unpinned references remain: grep -rn "uses:" .github/workflows/ | grep -vE "@[0-9a-f]{40} #" returns nothing.
  • SHA validity: each of the 13 SHAs confirmed to exist in its repo via repos/{owner}/{repo}/commits/{sha}.
  • YAML validity: all 7 workflow files re-parsed with yaml.safe_load and confirmed to still contain a jobs key.

The real verification is CI on this PR — if the pins are right, the DCO and build jobs should get past Set up job for the first time.

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.


Update: second commit — pinned test container + de-brittled explain assertions

With the pins in place CI reached the test step for the first time in roughly two years, and tests/test_main.py::TestMain::test_explain failed (1 failed, 27 passed, 2 skipped):

Expected: ..."_source":{"includes":["a"],"excludes":[]}}, searchDone=false)
Actual: ..."_source":{"includes":["a"]}}, pitId=null, cursorKeepAlive=null,
searchAfter=null, searchResponse=null)

This is pre-existing rot, not a regression from the pinning commit. The test hardcodes an expected OpenSearchQueryRequest.toString() captured in September 2024 (last touched in #30), while the workflow runs against opensearchproject/opensearch:latest — an unpinned, always-moving tag. The SQL plugin has since added PIT support (pitId, cursorKeepAlive, searchAfter, searchResponse), stopped emitting "excludes", and dropped "searchDone".

1. Pinned the container to 3.7.0. That is what :latest currently resolves to — verified by comparing registry manifest digests (sha256:44ba7ea5… matches the 3.7.0 tag and no other). The test environment now stops moving underfoot, and a comment on the matrix warns that bumping it may require updating the expectations.

2. Stopped asserting on the full request string. The plan structure is still asserted exactly — operator names, projected fields, empty scan children. The request string is now checked only for what this test is actually about: the target index, the LIMIT 150 the query asked for, and the projected source field.

Verified the relaxed assertion is not simply re-pinned to today's server:

InputResult
Observed OpenSearch 3.7.0 outputpasses
Original 2024 server outputpasses
Wrong index namefails (as it should)
Wrong LIMIT / sizefails (as it should)

So it tolerates server-representation drift while still catching the things the assertion was there to catch.

Local pytest tests/ remains 25 passed, 5 skipped; test_main.py compiles and the workflow YAML still parses.

Every workflow on this branch referenced actions by tag or branch. The org now
requires actions to be pinned to a full-length commit SHA, so all jobs fail
during "Set up job" before checkout ever runs:
The actions actions/checkout@v3, actions/setup-python@v4, nick-fields/retry@v2,
and actions/upload-artifact@v3 are not allowed in opensearch-project/sql-cli
because all actions must be pinned to a full-length commit SHA.
That takes out the DCO check and the test-and-build job on every pull request
against 1.0-legacy, so nothing can be merged here with green CI.
Pins all 13 action references to full SHAs, keeping the tag as a trailing
comment. Where the main branch already pins the same action, the SHA matches
main so the two branches stay consistent.
One version change: actions/upload-artifact moves v3 -> v4, matching main.
v3 of the artifact actions was retired and pinning its SHA would satisfy the
policy while still failing at runtime. The build job has a single matrix
combination, so the unique-artifact-name requirement in v4 is already met.
No other behaviour changes: the Python 3.8 matrix is unchanged (setup-python
still publishes 3.8.18 for ubuntu-24.04) and no workflow logic was touched.
All seven workflow files were checked to still parse as valid YAML.
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
With the action pins in place, CI reaches the test step for the first time in
roughly two years and immediately fails on tests/test_main.py::test_explain:
Expected: ..."_source":{"includes":["a"],"excludes":[]}}, searchDone=false)
Actual: ..."_source":{"includes":["a"]}}, pitId=null, cursorKeepAlive=null,
searchAfter=null, searchResponse=null)
The test hardcodes an expected OpenSearchQueryRequest.toString() captured in
September 2024, while the workflow runs against opensearchproject/opensearch
:latest -- an unpinned, always-moving tag. The server-side SQL plugin has since
added PIT support (pitId, cursorKeepAlive, searchAfter, searchResponse),
stopped emitting "excludes" and dropped "searchDone", so the assertion was
guaranteed to rot. Dead CI simply hid it.
Two changes:
1. Pin the container to 3.7.0, which is what :latest currently resolves to
(verified by comparing registry manifest digests), so the test environment
stops moving underfoot.
2. Stop asserting on the full request string. The plan structure is still
checked exactly -- operator names, projected fields, empty scan children --
and the request is checked only for the parts that carry meaning here: the
target index, the LIMIT 150 that the query asked for, and the projected
source field.
The relaxed assertion still fails on a wrong index or a wrong limit, and it
passes against both the 3.7.0 output and the original 2024 output, so it is not
merely re-pinned to today's server.
This keeps the branch green without coupling the suite to server internals it
was never trying to test.
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
@Swiddis
Swiddis merged commit deb5146 into opensearch-project:1.0-legacyAug 4, 2026
4 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@RyanL1997@Swiddis
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Pin GitHub Actions to full-length commit SHAs to unblock CI - #79

Merged
Swiddis merged 2 commits into
opensearch-project:1.0-legacyfrom
RyanL1997:fix/ci-pin-actions-to-sha
Aug 4, 2026
Merged

Pin GitHub Actions to full-length commit SHAs to unblock CI#79
Swiddis merged 2 commits into
opensearch-project:1.0-legacyfrom
RyanL1997:fix/ci-pin-actions-to-sha

Conversation

@RyanL1997

@RyanL1997RyanL1997 commented Aug 3, 2026

Copy link
Copy Markdown

Description

CI is completely broken on 1.0-legacy. Every workflow here references actions by tag or branch, and the org now requires full-length commit SHA pins, so jobs fail during Set up job — before checkout, before any code runs:

The actions actions/checkout@v3, actions/setup-python@v4, nick-fields/retry@v2, and
actions/upload-artifact@v3 are not allowed in opensearch-project/sql-cli because all
actions must be pinned to a full-length commit SHA.
The actions tim-actions/get-pr-commits@v1.1.0 and tim-actions/dco@v1.1.0 are not allowed
in opensearch-project/sql-cli because all actions must be pinned to a full-length commit SHA.

That takes out both the DCO check and the test-and-build job on every PR targeting this branch, so nothing can be merged here with green CI. This is independent of any code change — it hits PRs whose diff doesn't touch .github/ at all.

This pins all 13 action references to full SHAs, keeping the tag as a trailing comment in the usual @<sha> # <tag> form.

Where the SHAs come from

main is already SHA-pinned, so wherever it references the same action, this PR reuses main's exact SHA to keep the two branches consistent:

ActionSHASource
tim-actions/get-pr-commits55b867b9… # v1.1.0matches main
tim-actions/dcof2279e6e… # v1.1.0matches main
release-drafter/release-drafter09c613e2… # v5matches main
actions/checkout (link-checker)ee0669bd… # v2matches main
lycheeverse/lychee-action6da1d14f… # mastermatches main
actions/checkout (build)f43a0e5f… # v3matches main
actions/setup-python7f4fc3e2… # v4matches main
actions/upload-artifactea165f8d… # v4matches main (see below)
actions/github-scriptd7906e4a… # v6resolved for the tag in use
nick-fields/retry14672906… # v2resolved for the tag in use
tibdex/github-app-token1901dc7d… # v1.5.0resolved for the tag in use
VachaShah/backport28c49d91… # v1.1.4resolved for the tag in use
SvanBoxel/delete-merged-branch2b5b058e… # mainresolved from main HEAD

Every SHA was verified to resolve in its source repository before being written in.

One deliberate version change

actions/upload-artifact goes v3 → v4, matching main. v3 of the artifact actions was retired, so pinning v3's SHA would satisfy the org policy and still fail at runtime. The build job has a single matrix combination (python 3.8 × opensearch latest), so v4's unique-artifact-name requirement is already satisfied without renaming anything.

Everything else keeps its current major version — this is a pinning change, not an upgrade sweep.

What is not changed

  • The python-version: [3.8] matrix is untouched. I checked the actions/python-versions manifest and setup-python still publishes 3.8.18 builds for ubuntu-24.04, so 3.8 is not the problem here.
  • No workflow logic, trigger, step or with: input was modified.
  • add-untriaged.yml uses CRLF line endings; those are preserved, so its diff is the single uses: line rather than a whole-file rewrite.

Issues Resolved

None filed — surfaced while working on #78, whose CI failed for this reason rather than anything in its diff.

Testing

  • Diff is exactly the pins: 13 insertions / 13 deletions across 7 files, one line per action reference.
  • No unpinned references remain: grep -rn "uses:" .github/workflows/ | grep -vE "@[0-9a-f]{40} #" returns nothing.
  • SHA validity: each of the 13 SHAs confirmed to exist in its repo via repos/{owner}/{repo}/commits/{sha}.
  • YAML validity: all 7 workflow files re-parsed with yaml.safe_load and confirmed to still contain a jobs key.

The real verification is CI on this PR — if the pins are right, the DCO and build jobs should get past Set up job for the first time.

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.


Update: second commit — pinned test container + de-brittled explain assertions

With the pins in place CI reached the test step for the first time in roughly two years, and tests/test_main.py::TestMain::test_explain failed (1 failed, 27 passed, 2 skipped):

Expected: ..."_source":{"includes":["a"],"excludes":[]}}, searchDone=false)
Actual: ..."_source":{"includes":["a"]}}, pitId=null, cursorKeepAlive=null,
searchAfter=null, searchResponse=null)

This is pre-existing rot, not a regression from the pinning commit. The test hardcodes an expected OpenSearchQueryRequest.toString() captured in September 2024 (last touched in #30), while the workflow runs against opensearchproject/opensearch:latest — an unpinned, always-moving tag. The SQL plugin has since added PIT support (pitId, cursorKeepAlive, searchAfter, searchResponse), stopped emitting "excludes", and dropped "searchDone".

1. Pinned the container to 3.7.0. That is what :latest currently resolves to — verified by comparing registry manifest digests (sha256:44ba7ea5… matches the 3.7.0 tag and no other). The test environment now stops moving underfoot, and a comment on the matrix warns that bumping it may require updating the expectations.

2. Stopped asserting on the full request string. The plan structure is still asserted exactly — operator names, projected fields, empty scan children. The request string is now checked only for what this test is actually about: the target index, the LIMIT 150 the query asked for, and the projected source field.

Verified the relaxed assertion is not simply re-pinned to today's server:

InputResult
Observed OpenSearch 3.7.0 outputpasses
Original 2024 server outputpasses
Wrong index namefails (as it should)
Wrong LIMIT / sizefails (as it should)

So it tolerates server-representation drift while still catching the things the assertion was there to catch.

Local pytest tests/ remains 25 passed, 5 skipped; test_main.py compiles and the workflow YAML still parses.

Every workflow on this branch referenced actions by tag or branch. The org now
requires actions to be pinned to a full-length commit SHA, so all jobs fail
during "Set up job" before checkout ever runs:
The actions actions/checkout@v3, actions/setup-python@v4, nick-fields/retry@v2,
and actions/upload-artifact@v3 are not allowed in opensearch-project/sql-cli
because all actions must be pinned to a full-length commit SHA.
That takes out the DCO check and the test-and-build job on every pull request
against 1.0-legacy, so nothing can be merged here with green CI.
Pins all 13 action references to full SHAs, keeping the tag as a trailing
comment. Where the main branch already pins the same action, the SHA matches
main so the two branches stay consistent.
One version change: actions/upload-artifact moves v3 -> v4, matching main.
v3 of the artifact actions was retired and pinning its SHA would satisfy the
policy while still failing at runtime. The build job has a single matrix
combination, so the unique-artifact-name requirement in v4 is already met.
No other behaviour changes: the Python 3.8 matrix is unchanged (setup-python
still publishes 3.8.18 for ubuntu-24.04) and no workflow logic was touched.
All seven workflow files were checked to still parse as valid YAML.
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
With the action pins in place, CI reaches the test step for the first time in
roughly two years and immediately fails on tests/test_main.py::test_explain:
Expected: ..."_source":{"includes":["a"],"excludes":[]}}, searchDone=false)
Actual: ..."_source":{"includes":["a"]}}, pitId=null, cursorKeepAlive=null,
searchAfter=null, searchResponse=null)
The test hardcodes an expected OpenSearchQueryRequest.toString() captured in
September 2024, while the workflow runs against opensearchproject/opensearch
:latest -- an unpinned, always-moving tag. The server-side SQL plugin has since
added PIT support (pitId, cursorKeepAlive, searchAfter, searchResponse),
stopped emitting "excludes" and dropped "searchDone", so the assertion was
guaranteed to rot. Dead CI simply hid it.
Two changes:
1. Pin the container to 3.7.0, which is what :latest currently resolves to
(verified by comparing registry manifest digests), so the test environment
stops moving underfoot.
2. Stop asserting on the full request string. The plan structure is still
checked exactly -- operator names, projected fields, empty scan children --
and the request is checked only for the parts that carry meaning here: the
target index, the LIMIT 150 that the query asked for, and the projected
source field.
The relaxed assertion still fails on a wrong index or a wrong limit, and it
passes against both the 3.7.0 output and the original 2024 output, so it is not
merely re-pinned to today's server.
This keeps the branch green without coupling the suite to server internals it
was never trying to test.
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
@Swiddis
Swiddis merged commit deb5146 into opensearch-project:1.0-legacyAug 4, 2026
4 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@RyanL1997@Swiddis
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Pin GitHub Actions to full-length commit SHAs to unblock CI - #79

Merged
Swiddis merged 2 commits into
opensearch-project:1.0-legacyfrom
RyanL1997:fix/ci-pin-actions-to-sha
Aug 4, 2026
Merged

Pin GitHub Actions to full-length commit SHAs to unblock CI#79
Swiddis merged 2 commits into
opensearch-project:1.0-legacyfrom
RyanL1997:fix/ci-pin-actions-to-sha

Conversation

@RyanL1997

@RyanL1997RyanL1997 commented Aug 3, 2026

Copy link
Copy Markdown

Description

CI is completely broken on 1.0-legacy. Every workflow here references actions by tag or branch, and the org now requires full-length commit SHA pins, so jobs fail during Set up job — before checkout, before any code runs:

The actions actions/checkout@v3, actions/setup-python@v4, nick-fields/retry@v2, and
actions/upload-artifact@v3 are not allowed in opensearch-project/sql-cli because all
actions must be pinned to a full-length commit SHA.
The actions tim-actions/get-pr-commits@v1.1.0 and tim-actions/dco@v1.1.0 are not allowed
in opensearch-project/sql-cli because all actions must be pinned to a full-length commit SHA.

That takes out both the DCO check and the test-and-build job on every PR targeting this branch, so nothing can be merged here with green CI. This is independent of any code change — it hits PRs whose diff doesn't touch .github/ at all.

This pins all 13 action references to full SHAs, keeping the tag as a trailing comment in the usual @<sha> # <tag> form.

Where the SHAs come from

main is already SHA-pinned, so wherever it references the same action, this PR reuses main's exact SHA to keep the two branches consistent:

ActionSHASource
tim-actions/get-pr-commits55b867b9… # v1.1.0matches main
tim-actions/dcof2279e6e… # v1.1.0matches main
release-drafter/release-drafter09c613e2… # v5matches main
actions/checkout (link-checker)ee0669bd… # v2matches main
lycheeverse/lychee-action6da1d14f… # mastermatches main
actions/checkout (build)f43a0e5f… # v3matches main
actions/setup-python7f4fc3e2… # v4matches main
actions/upload-artifactea165f8d… # v4matches main (see below)
actions/github-scriptd7906e4a… # v6resolved for the tag in use
nick-fields/retry14672906… # v2resolved for the tag in use
tibdex/github-app-token1901dc7d… # v1.5.0resolved for the tag in use
VachaShah/backport28c49d91… # v1.1.4resolved for the tag in use
SvanBoxel/delete-merged-branch2b5b058e… # mainresolved from main HEAD

Every SHA was verified to resolve in its source repository before being written in.

One deliberate version change

actions/upload-artifact goes v3 → v4, matching main. v3 of the artifact actions was retired, so pinning v3's SHA would satisfy the org policy and still fail at runtime. The build job has a single matrix combination (python 3.8 × opensearch latest), so v4's unique-artifact-name requirement is already satisfied without renaming anything.

Everything else keeps its current major version — this is a pinning change, not an upgrade sweep.

What is not changed

  • The python-version: [3.8] matrix is untouched. I checked the actions/python-versions manifest and setup-python still publishes 3.8.18 builds for ubuntu-24.04, so 3.8 is not the problem here.
  • No workflow logic, trigger, step or with: input was modified.
  • add-untriaged.yml uses CRLF line endings; those are preserved, so its diff is the single uses: line rather than a whole-file rewrite.

Issues Resolved

None filed — surfaced while working on #78, whose CI failed for this reason rather than anything in its diff.

Testing

  • Diff is exactly the pins: 13 insertions / 13 deletions across 7 files, one line per action reference.
  • No unpinned references remain: grep -rn "uses:" .github/workflows/ | grep -vE "@[0-9a-f]{40} #" returns nothing.
  • SHA validity: each of the 13 SHAs confirmed to exist in its repo via repos/{owner}/{repo}/commits/{sha}.
  • YAML validity: all 7 workflow files re-parsed with yaml.safe_load and confirmed to still contain a jobs key.

The real verification is CI on this PR — if the pins are right, the DCO and build jobs should get past Set up job for the first time.

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.


Update: second commit — pinned test container + de-brittled explain assertions

With the pins in place CI reached the test step for the first time in roughly two years, and tests/test_main.py::TestMain::test_explain failed (1 failed, 27 passed, 2 skipped):

Expected: ..."_source":{"includes":["a"],"excludes":[]}}, searchDone=false)
Actual: ..."_source":{"includes":["a"]}}, pitId=null, cursorKeepAlive=null,
searchAfter=null, searchResponse=null)

This is pre-existing rot, not a regression from the pinning commit. The test hardcodes an expected OpenSearchQueryRequest.toString() captured in September 2024 (last touched in #30), while the workflow runs against opensearchproject/opensearch:latest — an unpinned, always-moving tag. The SQL plugin has since added PIT support (pitId, cursorKeepAlive, searchAfter, searchResponse), stopped emitting "excludes", and dropped "searchDone".

1. Pinned the container to 3.7.0. That is what :latest currently resolves to — verified by comparing registry manifest digests (sha256:44ba7ea5… matches the 3.7.0 tag and no other). The test environment now stops moving underfoot, and a comment on the matrix warns that bumping it may require updating the expectations.

2. Stopped asserting on the full request string. The plan structure is still asserted exactly — operator names, projected fields, empty scan children. The request string is now checked only for what this test is actually about: the target index, the LIMIT 150 the query asked for, and the projected source field.

Verified the relaxed assertion is not simply re-pinned to today's server:

InputResult
Observed OpenSearch 3.7.0 outputpasses
Original 2024 server outputpasses
Wrong index namefails (as it should)
Wrong LIMIT / sizefails (as it should)

So it tolerates server-representation drift while still catching the things the assertion was there to catch.

Local pytest tests/ remains 25 passed, 5 skipped; test_main.py compiles and the workflow YAML still parses.

Every workflow on this branch referenced actions by tag or branch. The org now
requires actions to be pinned to a full-length commit SHA, so all jobs fail
during "Set up job" before checkout ever runs:
The actions actions/checkout@v3, actions/setup-python@v4, nick-fields/retry@v2,
and actions/upload-artifact@v3 are not allowed in opensearch-project/sql-cli
because all actions must be pinned to a full-length commit SHA.
That takes out the DCO check and the test-and-build job on every pull request
against 1.0-legacy, so nothing can be merged here with green CI.
Pins all 13 action references to full SHAs, keeping the tag as a trailing
comment. Where the main branch already pins the same action, the SHA matches
main so the two branches stay consistent.
One version change: actions/upload-artifact moves v3 -> v4, matching main.
v3 of the artifact actions was retired and pinning its SHA would satisfy the
policy while still failing at runtime. The build job has a single matrix
combination, so the unique-artifact-name requirement in v4 is already met.
No other behaviour changes: the Python 3.8 matrix is unchanged (setup-python
still publishes 3.8.18 for ubuntu-24.04) and no workflow logic was touched.
All seven workflow files were checked to still parse as valid YAML.
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
With the action pins in place, CI reaches the test step for the first time in
roughly two years and immediately fails on tests/test_main.py::test_explain:
Expected: ..."_source":{"includes":["a"],"excludes":[]}}, searchDone=false)
Actual: ..."_source":{"includes":["a"]}}, pitId=null, cursorKeepAlive=null,
searchAfter=null, searchResponse=null)
The test hardcodes an expected OpenSearchQueryRequest.toString() captured in
September 2024, while the workflow runs against opensearchproject/opensearch
:latest -- an unpinned, always-moving tag. The server-side SQL plugin has since
added PIT support (pitId, cursorKeepAlive, searchAfter, searchResponse),
stopped emitting "excludes" and dropped "searchDone", so the assertion was
guaranteed to rot. Dead CI simply hid it.
Two changes:
1. Pin the container to 3.7.0, which is what :latest currently resolves to
(verified by comparing registry manifest digests), so the test environment
stops moving underfoot.
2. Stop asserting on the full request string. The plan structure is still
checked exactly -- operator names, projected fields, empty scan children --
and the request is checked only for the parts that carry meaning here: the
target index, the LIMIT 150 that the query asked for, and the projected
source field.
The relaxed assertion still fails on a wrong index or a wrong limit, and it
passes against both the 3.7.0 output and the original 2024 output, so it is not
merely re-pinned to today's server.
This keeps the branch green without coupling the suite to server internals it
was never trying to test.
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
@Swiddis
Swiddis merged commit deb5146 into opensearch-project:1.0-legacyAug 4, 2026
4 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@RyanL1997@Swiddis
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Pin GitHub Actions to full-length commit SHAs to unblock CI - #79

Merged
Swiddis merged 2 commits into
opensearch-project:1.0-legacyfrom
RyanL1997:fix/ci-pin-actions-to-sha
Aug 4, 2026
Merged

Pin GitHub Actions to full-length commit SHAs to unblock CI#79
Swiddis merged 2 commits into
opensearch-project:1.0-legacyfrom
RyanL1997:fix/ci-pin-actions-to-sha

Conversation

@RyanL1997

@RyanL1997RyanL1997 commented Aug 3, 2026

Copy link
Copy Markdown

Description

CI is completely broken on 1.0-legacy. Every workflow here references actions by tag or branch, and the org now requires full-length commit SHA pins, so jobs fail during Set up job — before checkout, before any code runs:

The actions actions/checkout@v3, actions/setup-python@v4, nick-fields/retry@v2, and
actions/upload-artifact@v3 are not allowed in opensearch-project/sql-cli because all
actions must be pinned to a full-length commit SHA.
The actions tim-actions/get-pr-commits@v1.1.0 and tim-actions/dco@v1.1.0 are not allowed
in opensearch-project/sql-cli because all actions must be pinned to a full-length commit SHA.

That takes out both the DCO check and the test-and-build job on every PR targeting this branch, so nothing can be merged here with green CI. This is independent of any code change — it hits PRs whose diff doesn't touch .github/ at all.

This pins all 13 action references to full SHAs, keeping the tag as a trailing comment in the usual @<sha> # <tag> form.

Where the SHAs come from

main is already SHA-pinned, so wherever it references the same action, this PR reuses main's exact SHA to keep the two branches consistent:

ActionSHASource
tim-actions/get-pr-commits55b867b9… # v1.1.0matches main
tim-actions/dcof2279e6e… # v1.1.0matches main
release-drafter/release-drafter09c613e2… # v5matches main
actions/checkout (link-checker)ee0669bd… # v2matches main
lycheeverse/lychee-action6da1d14f… # mastermatches main
actions/checkout (build)f43a0e5f… # v3matches main
actions/setup-python7f4fc3e2… # v4matches main
actions/upload-artifactea165f8d… # v4matches main (see below)
actions/github-scriptd7906e4a… # v6resolved for the tag in use
nick-fields/retry14672906… # v2resolved for the tag in use
tibdex/github-app-token1901dc7d… # v1.5.0resolved for the tag in use
VachaShah/backport28c49d91… # v1.1.4resolved for the tag in use
SvanBoxel/delete-merged-branch2b5b058e… # mainresolved from main HEAD

Every SHA was verified to resolve in its source repository before being written in.

One deliberate version change

actions/upload-artifact goes v3 → v4, matching main. v3 of the artifact actions was retired, so pinning v3's SHA would satisfy the org policy and still fail at runtime. The build job has a single matrix combination (python 3.8 × opensearch latest), so v4's unique-artifact-name requirement is already satisfied without renaming anything.

Everything else keeps its current major version — this is a pinning change, not an upgrade sweep.

What is not changed

  • The python-version: [3.8] matrix is untouched. I checked the actions/python-versions manifest and setup-python still publishes 3.8.18 builds for ubuntu-24.04, so 3.8 is not the problem here.
  • No workflow logic, trigger, step or with: input was modified.
  • add-untriaged.yml uses CRLF line endings; those are preserved, so its diff is the single uses: line rather than a whole-file rewrite.

Issues Resolved

None filed — surfaced while working on #78, whose CI failed for this reason rather than anything in its diff.

Testing

  • Diff is exactly the pins: 13 insertions / 13 deletions across 7 files, one line per action reference.
  • No unpinned references remain: grep -rn "uses:" .github/workflows/ | grep -vE "@[0-9a-f]{40} #" returns nothing.
  • SHA validity: each of the 13 SHAs confirmed to exist in its repo via repos/{owner}/{repo}/commits/{sha}.
  • YAML validity: all 7 workflow files re-parsed with yaml.safe_load and confirmed to still contain a jobs key.

The real verification is CI on this PR — if the pins are right, the DCO and build jobs should get past Set up job for the first time.

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.


Update: second commit — pinned test container + de-brittled explain assertions

With the pins in place CI reached the test step for the first time in roughly two years, and tests/test_main.py::TestMain::test_explain failed (1 failed, 27 passed, 2 skipped):

Expected: ..."_source":{"includes":["a"],"excludes":[]}}, searchDone=false)
Actual: ..."_source":{"includes":["a"]}}, pitId=null, cursorKeepAlive=null,
searchAfter=null, searchResponse=null)

This is pre-existing rot, not a regression from the pinning commit. The test hardcodes an expected OpenSearchQueryRequest.toString() captured in September 2024 (last touched in #30), while the workflow runs against opensearchproject/opensearch:latest — an unpinned, always-moving tag. The SQL plugin has since added PIT support (pitId, cursorKeepAlive, searchAfter, searchResponse), stopped emitting "excludes", and dropped "searchDone".

1. Pinned the container to 3.7.0. That is what :latest currently resolves to — verified by comparing registry manifest digests (sha256:44ba7ea5… matches the 3.7.0 tag and no other). The test environment now stops moving underfoot, and a comment on the matrix warns that bumping it may require updating the expectations.

2. Stopped asserting on the full request string. The plan structure is still asserted exactly — operator names, projected fields, empty scan children. The request string is now checked only for what this test is actually about: the target index, the LIMIT 150 the query asked for, and the projected source field.

Verified the relaxed assertion is not simply re-pinned to today's server:

InputResult
Observed OpenSearch 3.7.0 outputpasses
Original 2024 server outputpasses
Wrong index namefails (as it should)
Wrong LIMIT / sizefails (as it should)

So it tolerates server-representation drift while still catching the things the assertion was there to catch.

Local pytest tests/ remains 25 passed, 5 skipped; test_main.py compiles and the workflow YAML still parses.

Every workflow on this branch referenced actions by tag or branch. The org now
requires actions to be pinned to a full-length commit SHA, so all jobs fail
during "Set up job" before checkout ever runs:
The actions actions/checkout@v3, actions/setup-python@v4, nick-fields/retry@v2,
and actions/upload-artifact@v3 are not allowed in opensearch-project/sql-cli
because all actions must be pinned to a full-length commit SHA.
That takes out the DCO check and the test-and-build job on every pull request
against 1.0-legacy, so nothing can be merged here with green CI.
Pins all 13 action references to full SHAs, keeping the tag as a trailing
comment. Where the main branch already pins the same action, the SHA matches
main so the two branches stay consistent.
One version change: actions/upload-artifact moves v3 -> v4, matching main.
v3 of the artifact actions was retired and pinning its SHA would satisfy the
policy while still failing at runtime. The build job has a single matrix
combination, so the unique-artifact-name requirement in v4 is already met.
No other behaviour changes: the Python 3.8 matrix is unchanged (setup-python
still publishes 3.8.18 for ubuntu-24.04) and no workflow logic was touched.
All seven workflow files were checked to still parse as valid YAML.
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
With the action pins in place, CI reaches the test step for the first time in
roughly two years and immediately fails on tests/test_main.py::test_explain:
Expected: ..."_source":{"includes":["a"],"excludes":[]}}, searchDone=false)
Actual: ..."_source":{"includes":["a"]}}, pitId=null, cursorKeepAlive=null,
searchAfter=null, searchResponse=null)
The test hardcodes an expected OpenSearchQueryRequest.toString() captured in
September 2024, while the workflow runs against opensearchproject/opensearch
:latest -- an unpinned, always-moving tag. The server-side SQL plugin has since
added PIT support (pitId, cursorKeepAlive, searchAfter, searchResponse),
stopped emitting "excludes" and dropped "searchDone", so the assertion was
guaranteed to rot. Dead CI simply hid it.
Two changes:
1. Pin the container to 3.7.0, which is what :latest currently resolves to
(verified by comparing registry manifest digests), so the test environment
stops moving underfoot.
2. Stop asserting on the full request string. The plan structure is still
checked exactly -- operator names, projected fields, empty scan children --
and the request is checked only for the parts that carry meaning here: the
target index, the LIMIT 150 that the query asked for, and the projected
source field.
The relaxed assertion still fails on a wrong index or a wrong limit, and it
passes against both the 3.7.0 output and the original 2024 output, so it is not
merely re-pinned to today's server.
This keeps the branch green without coupling the suite to server internals it
was never trying to test.
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
@Swiddis
Swiddis merged commit deb5146 into opensearch-project:1.0-legacyAug 4, 2026
4 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@RyanL1997@Swiddis