Skip to content

Commit

Permalink
gowrap fault injection (#7056)
Browse files Browse the repository at this point in the history
## What changed?
<!-- Describe what has changed in this PR -->

Use [gowrap](https://github.com/hexdigest/gowrap) for generating fault
injection code. Similar to
#7050.

## Why?
<!-- Tell your future self why have you made these changes -->

Less code to maintain.

Before: 238 LOC.

After: 34 line Go Template.

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->

Existing tests + eyeballing the output.

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->

## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
  • Loading branch information
stephanos authored Jan 14, 2025
1 parent 9e52950 commit 1bb6bfc
Show file tree
Hide file tree
Showing 12 changed files with 573 additions and 844 deletions.
238 changes: 0 additions & 238 deletions cmd/tools/genfaultinjection/main.go

This file was deleted.

110 changes: 54 additions & 56 deletions common/persistence/faultinjection/cluster_metadata_store_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1bb6bfc

Please sign in to comment.