Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: alerts: Add lotus-miner legacy-markets alert #10868

Merged
merged 1 commit into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions node/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ const (

// health checks
CheckFDLimit
LegacyMarketsEOL

// libp2p
PstoreAddSelfKeysKey
Expand Down
4 changes: 4 additions & 0 deletions node/builder_miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ func ConfigStorageMiner(c interface{}) Option {
),

If(cfg.Subsystems.EnableMarkets,

// Alert that legacy-markets is being deprecated
Override(LegacyMarketsEOL, modules.LegacyMarketsEOL),

// Markets
Override(new(dtypes.StagingBlockstore), modules.StagingBlockstore),
Override(new(dtypes.StagingGraphsync), modules.StagingGraphsync(cfg.Dealmaking.SimultaneousTransfersForStorage, cfg.Dealmaking.SimultaneousTransfersForStoragePerClient, cfg.Dealmaking.SimultaneousTransfersForRetrieval)),
Expand Down
10 changes: 10 additions & 0 deletions node/modules/alerts.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ func CheckFdLimit(min uint64) func(al *alerting.Alerting) {
}
}

func LegacyMarketsEOL(al *alerting.Alerting) {
// Add alert if lotus-miner legacy markets subsystem is still in use
alert := al.AddAlertType("system", "EOL")

// Alert with a message to migrate to Boost or similar markets subsystems
al.Raise(alert, map[string]string{
"message": "The lotus-miner legacy markets subsystem is deprecated and will be removed in a future release. Please migrate to [Boost](https://boost.filecoin.io) or similar markets subsystems.",
})
}

// TODO: More things:
// * Space in repo dirs (taking into account mounts)
// * Miner
Expand Down