Skip to content

Retry all 500 error codes and raise errors during CLI bulk-update and… - #394

Merged
jonavellecuerdo merged 1 commit into
mainfrom
TIMX-626-retry-5XX-error-codes-and-raise-errors-cli-bulk-update
Jul 29, 2026
Merged

Retry all 500 error codes and raise errors during CLI bulk-update and…#394
jonavellecuerdo merged 1 commit into
mainfrom
TIMX-626-retry-5XX-error-codes-and-raise-errors-cli-bulk-update

Conversation

@jonavellecuerdo

@jonavellecuerdo jonavellecuerdo commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Purpose and background context

Allow TIM to retry when any 500 error codes are raised based on initial results from reindexing sources to AOSS in Prod. The CLI bulk-update and reindex-source commands should skip proceeding with the remaining steps if tim_os.bulk_index fails. This prevents the logging of incorrect summary results due to errors.

How can a reviewer manually see the effects of these changes?

Please review the following CloudWatch logstreams in Dev:
image

Includes new or updated dependencies?

NO

Changes expectations for external applications?

NO

What are the relevant tickets?

Code review

  • Code review best practices are documented here and you are encouraged to have a constructive dialogue with your reviewers about their preferences and expectations.

@jonavellecuerdo
jonavellecuerdo marked this pull request as ready for review July 28, 2026 19:49
@jonavellecuerdo
jonavellecuerdo requested a review from a team as a code owner July 28, 2026 19:49
@jonavellecuerdo
jonavellecuerdo requested a review from ghukill July 28, 2026 19:49

@ghukill ghukill left a comment

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.

Other than a proposal to remove "Retryable", I think it looks great for a quick first pass at getting successful AOSS indexing.

Comment thread tim/opensearch.py Outdated
Comment thread tim/opensearch.py Outdated
Comment thread tim/opensearch.py Outdated
jonavellecuerdo added a commit that referenced this pull request Jul 29, 2026
@jonavellecuerdo
jonavellecuerdo requested a review from ghukill July 29, 2026 13:34
… reindex-source

Why these changes are being introduced:
* Allow TIM to retry when any 500 error codes are raised based on
initial results from reindexing sources to AOSS in Prod. The
CLI bulk-update and reindex-source commands should skip proceeding
with the remaining steps if tim_os.bulk_index fails. This prevents
the logging of incorrect summary results due to errors.

How this addresses that need:
* Call ctx.exit when bulk indexing fails during CLI bulk-update and reindex-source
* Update conditions to check for error codes >= 500 and <600
* Fix log message for tim.helpers.retry

Side effects of this change:
* None

Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/TIMX-626
@jonavellecuerdo
jonavellecuerdo force-pushed the TIMX-626-retry-5XX-error-codes-and-raise-errors-cli-bulk-update branch from da16cae to 7320a95 Compare July 29, 2026 13:40
@jonavellecuerdo
jonavellecuerdo merged commit 8130f81 into main Jul 29, 2026
5 checks passed
@jonavellecuerdo
jonavellecuerdo deleted the TIMX-626-retry-5XX-error-codes-and-raise-errors-cli-bulk-update branch July 29, 2026 13:42
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