Skip to content

chore: [CLI-1758] trigger Endpoint Explorer refresh after releases - #7140

Open
mattdolan-snyk wants to merge 1 commit into
mainfrom
codex/endpoint-explorer-release-trigger
Open

chore: [CLI-1758] trigger Endpoint Explorer refresh after releases#7140
mattdolan-snyk wants to merge 1 commit into
mainfrom
codex/endpoint-explorer-release-trigger

Conversation

@mattdolan-snyk

@mattdolan-snyk mattdolan-snyk commented Aug 17, 2026

Copy link
Copy Markdown

What changed

  • trigger the Endpoint Explorer snapshot refresh after successful Preview and Stable S3 publication
  • run each trigger as a terminal CircleCI job with no downstream release dependencies
  • dispatch the existing refresh-cli-data.yml workflow with the published channel
  • cap the dispatch request at five seconds and convert missing credentials, transport failures, and non-204 responses into warnings
  • add release-script tests for accepted dispatches and each non-blocking failure path

Why

The Endpoint Explorer should refresh when a public CLI channel changes, without waiting for the Explorer workflow or making CLI releases depend on Explorer availability.

The dispatch is best-effort. Once GitHub accepts the workflow request, the CLI pipeline does not follow or wait for the Explorer run. If the request cannot be made, the CLI release continues and the existing scheduled/manual Explorer refresh remains available as recovery.

Validation

  • make format
  • make lint
  • go test ./... -skip TestBuildRecipeUsesGeneratedLSMetadataInLdflags in release-scripts
  • bash -n release-scripts/trigger-endpoint-explorer-refresh.sh
  • YAML parse of .circleci/config.yml
  • verified the live snyk/endpoint-binary-explorer workflow still accepts workflow_dispatch with stable and preview channel inputs

The unmodified TestBuildRecipeUsesGeneratedLSMetadataInLdflags currently fails because its temporary CLI fixture does not include the help Markdown now required by the build recipe; the remaining release-script suite passes.

Deployment assumption

HAMMERHEAD_GITHUB_PAT must be able to dispatch Actions workflows in snyk/endpoint-binary-explorer. Missing or insufficient access is intentionally warning-only and does not fail the CLI release.

@mattdolan-snyk
mattdolan-snyk marked this pull request as ready for review August 17, 2026 10:47
@mattdolan-snyk
mattdolan-snyk requested a review from a team as a code owner August 17, 2026 10:47
@snyk-io

snyk-io Bot commented Aug 17, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@snyk-pr-review-bot

This comment has been minimized.

@mattdolan-snyk
mattdolan-snyk force-pushed the codex/endpoint-explorer-release-trigger branch from 96f2dcb to a5ba6d0 Compare August 17, 2026 10:48
@snyk-pr-review-bot

Copy link
Copy Markdown

PR Reviewer Guide 🔍

🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected
📚 Repository Context Analyzed

This review considered 11 relevant code sections from 8 files (average relevance: 0.81)

🤖 Repository instructions applied (from AGENTS.md)

@mattdolan-snyk mattdolan-snyk changed the title chore: trigger Endpoint Explorer refresh after releases chore: [CLI-1758] trigger Endpoint Explorer refresh after releases Aug 17, 2026
--write-out "%{http_code}" \
--silent \
--show-error \
--output /dev/null \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we follow same pattern of trigger_repository_event and output to a file? Then we could have more information about a failure?

Comment on lines +185 to +189
response=$(curl \
--location \
--request POST \
--connect-timeout 2 \
--max-time 5 \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should also include retries, for example--retry 2 --retry-connrefused?

"testing"
)

func TestDistributionTriggersRequestEndpointExplorerRefresh(t *testing.T) {

@danskmt danskmt Aug 24, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you have to plug these tests to run in the CI, e.g. in config.yml, under jobs, under test-go:

- run:
      name: Running release script tests
      command: make test-release-scripts

Comment on lines +200 to +208
if [ "$curl_status" -ne 0 ]; then
echo "WARNING: Endpoint Explorer $channel refresh dispatch failed (curl exit $curl_status); continuing the CLI release."
elif [ "$response" != "204" ]; then
echo "WARNING: Endpoint Explorer $channel refresh was not requested (HTTP $response); continuing the CLI release."
else
echo "Endpoint Explorer $channel refresh requested."
fi

return 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have a different return value for the "WARNING" logs? Because right now it just logs (and might get lost / nobody sees it), but continues the flow normally in all cases.

Sign up for free to 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