GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — attach-artifacts-utf8 by jeffreyaven · Pull Request #897 · stackql/stackql

Conversation

@jeffreyaven

@jeffreyaven jeffreyaven commented Nov 5, 2026

Copy link
Copy Markdown
Member

Fixes the crash hit on the first v1.0.888 dry run of cicd/python/attach_build_artifacts.py on Windows (release process step 2):

UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 116223
TypeError: the JSON object must be str, bytes or bytearray, not NoneType

What changes

  • gh() decodes the subprocess output as UTF-8 (errors='replace') instead of the console code page. gh always writes UTF-8; with text=True alone, Windows decoded it as cp1252, the stdout reader thread died on the first unmappable byte and completed.stdout came back as None.
  • tag_commit() asks the commits endpoint for .sha only via --jq. Unfiltered, that endpoint returns the full diff of the tagged commit (over 100 KB for the plugin-submissions #896 squash), which is where the unmappable byte came from.

Two files touched: the script and its unit tests.

Test plan

  • python -m pytest cicd/python/test_attach_build_artifacts.py: 9 passed, including two new regression tests (UTF-8 decoding kwargs on the gh call; tag_commit requests only the sha and strips it).
  • python cicd/python/attach_build_artifacts.py 1.0.888 --dry-run on Windows with the fix applied, against the real v1.0.888 release.
  • No Go or query behaviour change, so no robot scenario.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jeffreyaven @claude
attach-artifacts-utf8
9d408b2
Decode gh output as UTF-8 in cicd/python/attach_build_artifacts.py and
fetch only the sha when resolving the tag commit.

On Windows subprocess.run(text=True) decodes with the console code page
(cp1252). The commit endpoint returns the whole diff of the tagged commit,
and the first byte cp1252 cannot map crashed the stdout reader thread, so
stdout was None and the script died with a TypeError before attaching
anything (seen on the v1.0.888 dry run). gh always writes UTF-8, so decode
as UTF-8 with errors=replace; tag_commit now passes --jq .sha so the diff
is not fetched at all. Two regression tests cover both.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@jeffreyaven
jeffreyaven merged commit 2cfce65 into main Nov 5, 2026
39 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@jeffreyaven
jeffreyaven deleted the fix/attach-artifacts-utf8 branch November 5, 2026 05:25
This was referenced Nov 5, 2026
post-v1.0.888 directory and release clean-ups #900
Closed
submission-hygiene #901
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@jeffreyaven
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.