Runs

Upstream drift#46

Success
Event
schedule
Branch
main
Commit
c08bbbe
Started
Duration
0:44

Synced from GitHub

Post the upstream report

SuccessTook 0:05

Steps

  1. 1Set up job, Success0:01
  2. 2Run actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333, Success0:01
  3. 3Post to the drift issue, Success0:01
  4. 4Retain the reported upstream observation, Success0:01
  5. 5Complete job, Success0:00
Whole log, 14 KB
Current runner version: '2.338.2'
▸ Runner Image Provisioner
Hosted Compute Agent
Version: 20261111.635
Commit: b8a594ea514ff44cadb5342986c68b1eac6e22ed
Build Date: 2026-11-11T01:49:01Z
Worker ID: {e6d0fb5c-1290-4ec7-8598-a4aa06b1f09e}
Region: eastus
Cloud: Azure
▸ Operating System
Ubuntu
26.04.1
LTS
▸ Runner Image
Image: ubuntu-26.04
Version: 20261122.9.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu26/20261122.9/images/ubuntu/Ubuntu2604-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu26%2F20261122.9
▸ GITHUB_TOKEN Permissions
Issues: write
Metadata: read
Secret source: Actions
Cache mode: write
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333' (SHA:9000827ccba6bdab643e8b6fd33ac0654aef8333)
Download action repository 'actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9' (SHA:cf430e030ddbb5b0abf93d22962f4752f3646cd9)
Complete job name: Post the upstream report
▸ Run actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333
with:
  name: upstream-report
  path: /home/runner/work/_temp/upstream-current
  merge-multiple: false
  repository: NeonTechSpace/Fluxerly.js
  run-id: 46350343578
  skip-decompress: false
  digest-mismatch: error
Downloading single artifact
Preparing to download the following artifacts:
- upstream-report (ID: 15346131102, Size: 8739, Expected Digest: sha256:c40f02cd81f58bf5e58fd83357e67b84923540692534c1b9467252459056a159)
Redirecting to blob download url: https://productionresultssa19.blob.core.windows.net/actions-results/06651b6e-c877-8cf6-9ea9-1022d24eb67e/workflow-job-run-b630f501-05ca-5dff-a098-885362679e3e/artifacts/a7d3cfe5c7f1ff6b1e841093de0260ac0794f73bec92fc842c24c3e6ab3e8428.zip
Starting download of artifact to: /home/runner/work/_temp/upstream-current
(node:2075) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
SHA256 digest of downloaded artifact is c40f02cd81f58bf5e58fd83357e67b84923540692534c1b9467252459056a159
Artifact download completed successfully.
Total of 1 artifact(s) downloaded
Download artifact has finished successfully
▸ Run baseline="$RUNNER_TEMP/upstream-current/baseline.json"
baseline="$RUNNER_TEMP/upstream-current/baseline.json"
comment="$RUNNER_TEMP/upstream-current/comment.md"
summary="${GITHUB_STEP_SUMMARY:-/dev/null}"
if [[ ! -f "$baseline" ]]; then
  printf 'Upstream baseline file is missing at %s\n' "$baseline" >&2
  exit 1
fi
current_pin=$(jq -r '.pin // empty' "$baseline")
if [[ ! "$current_pin" =~ ^[a-f0-9]{40}$ ]]; then
  printf 'Upstream baseline file has no valid review pin\n' >&2
  exit 1
fi
short_pin="${current_pin:0:10}"
# The jq filter reads $ENV itself, so the single quotes are meant
# shellcheck disable=SC2016
open_issues=$(gh api "repos/$GITHUB_REPOSITORY/issues?state=open&creator=github-actions%5Bbot%5D&per_page=100" \
  --jq '.[] | select(.pull_request == null and .title == $ENV.TITLE) | [.number, ([(.body // "") | scan("<!-- fluxer-pin: ([a-f0-9]{40}) -->")][0][0] // "")] | @tsv')
matching_issue=""
closed_issues=()
while IFS=$'\t' read -r issue_number issue_pin; do
  [[ -n "$issue_number" ]] || continue
  if [[ ! "$issue_number" =~ ^[0-9]+$ ]]; then
    printf 'Issue lookup returned an invalid issue number\n' >&2
    exit 1
  fi
  if [[ "$issue_pin" == "$current_pin" ]]; then
    if [[ -z "$matching_issue" ]]; then
      matching_issue="$issue_number"
    fi
    continue
  fi
  # The backticks are Markdown code spans, so the single quotes are meant
  # shellcheck disable=SC2016
  close_note=$(printf 'Closing this report because the Fluxer review pin moved to `%s`. Any changes after that pin will open a new issue' "$short_pin")
  gh api --method POST "repos/$GITHUB_REPOSITORY/issues/$issue_number/comments" --silent -f "body=$close_note"
  gh api --method PATCH "repos/$GITHUB_REPOSITORY/issues/$issue_number" --silent -f state=closed -f state_reason=completed
  closed_issues+=("#$issue_number")
done <<< "$open_issues"
closed_summary=""
if (( ${#closed_issues[@]} > 0 )); then
  closed_list=""
  for closed in "${closed_issues[@]}"; do
    closed_list="${closed_list:+$closed_list, }$closed"
  done
  closed_summary="Closed previous drift issues ${closed_list} after the review pin moved to ${short_pin}"
  if (( ${#closed_issues[@]} == 1 )); then
    closed_summary="Closed previous drift issue ${closed_list} after the review pin moved to ${short_pin}"
  fi
fi
if [[ ! -f "$comment" ]]; then
  {
    printf '## Upstream report posting\n\n'
    if [[ -n "$closed_summary" ]]; then
      printf '%s\n\n' "$closed_summary"
    fi
    printf 'Nothing to post, no watched Fluxer document, voice folder or source commit changed since the last report\n'
  } >> "$summary"
  exit 0
fi
if [[ -n "$matching_issue" ]]; then
  gh api --method POST "repos/$GITHUB_REPOSITORY/issues/$matching_issue/comments" --silent -F "body=@$comment"
  {
    printf '## Upstream report posting\n\n'
    if [[ -n "$closed_summary" ]]; then
      printf '%s\n\n' "$closed_summary"
    fi
    printf 'Posted the report as a comment on [issue #%s](%s/%s/issues/%s)\n\n### Next action\n\nReview each listed change. Update the SDK where needed and move the review pin\n' "$matching_issue" "$GITHUB_SERVER_URL" "$GITHUB_REPOSITORY" "$matching_issue"
  } >> "$summary"
  exit 0
fi
body="$RUNNER_TEMP/upstream-current/issue.md"
repository="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY"
# The backticks are Markdown code spans, so the single quotes are meant
# shellcheck disable=SC2016
{
  printf '<!-- fluxer-pin: %s -->\n\n' "$current_pin"
  printf 'This issue collects the reports of the [upstream drift check](%s/actions/workflows/upstream-drift.yml). Each report lists what changed in Fluxer since the last one: Its API description, its gateway event docs, its rate limit docs, its voice docs and code, new folders that may hold voice work and the Fluxer commits that touched the paths the SDK watches\n\n' "$repository"
  printf 'A listed change is something to review, not proof that bots are affected. To finish a review, update the SDK where needed and move the review pin as [Repository](%s/blob/main/docs/REPOSITORY.md) describes for `node release/upstream.js`. Moving the review pin automatically closes this issue on the next run and opens a fresh one when new changes appear\n\n' "$repository"
  cat "$comment"
} > "$body"
gh api --method POST "repos/$GITHUB_REPOSITORY/issues" --silent -f "title=$TITLE" -F "body=@$body"
{
  printf '## Upstream report posting\n\n'
  if [[ -n "$closed_summary" ]]; then
    printf '%s\n\n' "$closed_summary"
  fi
  printf 'Opened a new issue titled "%s" with the report, in [the repository issues](%s/%s/issues)\n\n### Next action\n\nReview each listed change. Update the SDK where needed and move the review pin\n' "$TITLE" "$GITHUB_SERVER_URL" "$GITHUB_REPOSITORY"
} >> "$summary"
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  GH_TOKEN: ***
  TITLE: Fluxer upstream changes to review
▸ Run actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
with:
  name: upstream-baseline
  path: /home/runner/work/_temp/upstream-current/baseline.json
  retention-days: 90
  if-no-files-found: error
  overwrite: true
  compression-level: 6
  include-hidden-files: false
  archive: true
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: upstream-baseline.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 2042
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 413047874770248c014289d79fb94c18f85726c65aaa6b9d61aa7357d58137c3
Finalizing artifact upload
Artifact upstream-baseline successfully finalized. Artifact ID 15345997409
Artifact upstream-baseline has been successfully uploaded! Final size is 2042 bytes. Artifact ID is 15345997409
Artifact download URL: https://github.com/NeonTechSpace/Fluxerly.js/actions/runs/46350343578/artifacts/15345997409
Cleaning up orphan processes