Skip to content

Sync upstream 2026 05 20#35

Merged
grodowski merged 5 commits into
masterfrom
sync-upstream-2026-05-20
May 21, 2026
Merged

Sync upstream 2026 05 20#35
grodowski merged 5 commits into
masterfrom
sync-upstream-2026-05-20

Conversation

@grodowski
Copy link
Copy Markdown
Member

No description provided.

olsonjp and others added 5 commits May 14, 2026 12:07
…b#1675)

* Add MigrationContext.Hooks for in-process hook implementations

gh-ost's only hook extension point is on-disk scripts globbed from
--hooks-path. Library callers that embed Migrator must either ship
scripts and their dependencies alongside their binary or maintain a
parallel Go layer that bridges script side effects back into the host
application.

Introduce a Hooks interface in go/base with one method per lifecycle
event, and an optional MigrationContext.Hooks field. NewMigrator reads
the field once at construction and falls back to the existing
HooksExecutor when unset, so CLI behavior is unchanged. A CompositeHooks
helper in go/logic lets callers run the on-disk script executor and
their own Go implementation side-by-side.

HooksExecutor's previously package-private method names are renamed
(onStartup -> OnStartup, etc.) so external types can satisfy the
interface. The struct and constructor were already exported but the
methods weren't, so no usable external API is displaced.

* Skip nil entries in CompositeHooks and self-contain doc example

Address PR review feedback:

- CompositeHooks.OnX methods skip nil members instead of panicking,
  allowing callers to conditionally append optional hooks.
- doc/hooks.md embedded-usage snippet now defines ctx and version so it
  is self-contained.
…p across 1 directory (github#1606)

* Bump golang.org/x/crypto in the go_modules group across 1 directory

Bumps the go_modules group with 1 update in the / directory: [golang.org/x/crypto](https://github.com/golang/crypto).


Updates `golang.org/x/crypto` from 0.37.0 to 0.45.0
- [Commits](golang/crypto@v0.37.0...v0.45.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.45.0
  dependency-type: indirect
  dependency-group: go_modules
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: meiji163 <meiji163@github.com>
…locks (github#1677)

Co-authored-by: meiji163 <meiji163@github.com>
@grodowski grodowski requested a review from coding-chimp May 21, 2026 10:31
@grodowski grodowski merged commit 49ecf58 into master May 21, 2026
9 checks passed
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.

4 participants