Repository navigation
feat(BA-8673): add bootstrap script created_at and searchable fields - #15987
Merged
Merged
Conversation
BootstrapScriptRow gains created_at and updated_at through LifecycleTimestampsMixin, and BootstrapScriptSearchableFields now builds BootstrapScriptData instead of a to_data method on the row. The script body is user-written, so it carries no filter or order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
seedspirit
marked this pull request as ready for review
October 22, 2026 05:29
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused schema and conversion changes are consistent across existing operations, with no unresolved blocking findings.
No open issues 🎉
What changed in this PR
Adds lifecycle timestamps and searchable fields for bootstrap scripts, preparing the manager model for future scoped searches without changing the current read query.
Changes:
- Adds
created_atandupdated_atcolumns with database defaults and exposes them inBootstrapScriptData. - Centralizes row-to-data conversion in
BootstrapScriptSearchableFieldsacross existing operations. - Defines filtering and ordering for metadata fields while excluding the user-written script body.
| File | Description |
|---|---|
src/ai/backend/manager/models/bootstrap_script/updaters.py |
Uses the shared converter for update results. |
src/ai/backend/manager/models/bootstrap_script/searchable_fields.py |
Defines searchable metadata and timestamp-aware conversion. |
src/ai/backend/manager/models/bootstrap_script/row.py |
Adds the timestamp mixin and removes row-local conversion. |
src/ai/backend/manager/models/bootstrap_script/queriers.py |
Uses the shared converter without changing the query. |
src/ai/backend/manager/models/bootstrap_script/purgers.py |
Uses the shared converter for purge results. |
src/ai/backend/manager/models/bootstrap_script/creators.py |
Uses the shared converter for creation results. |
src/ai/backend/manager/models/alembic/versions/51d33226c0a5_add_timestamps_to_bootstrap_scripts.py |
Adds timestamp columns and corresponding downgrade operations. |
src/ai/backend/manager/data/bootstrap_script/types.py |
Carries creation and update timestamps in script data. |
changes/15987.feature.md |
Documents timestamps and centralized conversion. |
Review effort: Balanced
Script edits will be recorded as revisions, whose created_at tells when the content last changed, so updated_at on the script row would duplicate it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jopemachine
approved these changes
Oct 22, 2026
HyeockJinKim
approved these changes
Oct 22, 2026
HyeockJinKim
left a comment
Collaborator
There was a problem hiding this comment.
Applying this revision might cause some issues, so please just take a quick look at it.
Merged
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.
Summary
created_attobootstrap_scriptsthroughCreatedAtMixin(migration51d33226c0a5, server defaultnow()), and carry it onBootstrapScriptData.BootstrapScriptSearchableFieldsand buildBootstrapScriptDatathere; the row'sto_data()is removed, and the creator, purger, querier and updater convert throughBootstrapScriptSearchableFields.own.to_data(row).There is no
updated_at: script edits are planned to land as revision rows (bootstrap_script_revisions), whosecreated_atrecords when the content last changed. A column on the script row would duplicate that.No read path changes yet:
BootstrapScriptQuerierkeeps its current query. With the searchable fields in place, a follow-up can read a user's script throughsearch_with_scopes.Test plan
pants lint/pants checkon the changed filesalembic headsreports a single headtests/component/config::,tests/unit/manager/repositories/user::Resolves BA-8673
🤖 Generated with Claude Code