Repository navigation
test: retry the live head poll while r/all returns an empty listing - #101
Merged
Merged
Conversation
fetch_head now returns None for an empty listing (#100), which the live comment reader test did not expect, so it failed with a TypeError and blocked the deploy of v3.1.1. Co-Authored-By: Toldry <toldry@gmail.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019ddUNNyEKK7YQuAyfKfGwi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Requested by Querent · project thread
Before: after #100,
comment_reader.fetch_head()returnsNonefor an empty r/all listing. The live testtest_live_comment_reader_reads_recent_comments_by_idstill did arithmetic on that result. Reddit returned an empty listing during the master run for #100 (https://github.com/Toldry/RedditAutoCrosspostBot/actions/runs/38970681576), so the test failed withTypeError: unsupported operand type(s) for -: 'NoneType' and 'int'. That skipped the deploy, and the VM is still on 3.1.0, which crashes on empty listings.After: the test calls a small
fetch_head_with_retrieshelper. It tries up to 6 times, 5 s apart, and fails with a clear message if every listing comes back empty.How: this changes the test only, so there is no changelog fragment. The deploy job doesn't depend on a release happening, so merging this deploys master as it stands, including the v3.1.1 release of #100.
Generated by Claude Code