Skip to content

Extract shared fullsend install helpers from action.yml and install-fullsend-cli #5511

Description

@rh-hemartin

Problem

action.yml (root) and .github/actions/install-fullsend-cli/action.yml duplicate several blocks of install logic verbatim:

  • OS/arch normalization (runner values to Go release conventions) -- identical 11-line block in both files
  • SHA-to-tag resolution -- same goal, different implementations (curl + manual pagination vs gh api --paginate)
  • retry_curl -- defined twice within action.yml itself (detect step and download step)
  • Source-build clone -- nearly identical shallow-fetch-with-full-clone-fallback pattern

This duplication has already caused the same bug to be patched in both places independently (the jq-injection fix in the SHA-to-tag resolution was one bug fixed twice in a prior review round of #5357).

Proposal

Create .github/scripts/fullsend-install-lib.sh exporting shared functions:

  • retry_curl -- retry wrapper with exponential backoff
  • resolve_runner_platform -- normalize RUNNER_OS/RUNNER_ARCH to Go conventions
  • resolve_sha_to_tag -- look up a 40-char SHA in repo tags, return matching release tag
  • clone_at_ref -- shallow-clone with full-clone fallback for bare SHAs

Both action files source the library instead of inlining the logic.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedBlocked by another issue or external dependency

    Type

    No type

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions