Skip to content

Commit

Permalink
Merge pull request #9040 from filecoin-project/asr/typo
Browse files Browse the repository at this point in the history
chore: sealer: Fixup typos
  • Loading branch information
arajasek authored Jul 15, 2022
2 parents d4cdd82 + 3353cbe commit 3c3fba8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions storage/paths/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ func (i *Index) StorageAttach(ctx context.Context, si storiface.StorageInfo, st
i.pathAlerts[si.ID] = i.alerting.AddAlertType("sector-index", "pathconf-"+string(si.ID))
}

var hasConfigIsses bool
var hasConfigIssues bool

for id, typ := range si.AllowTypes {
_, err := storiface.TypeFromString(typ)
if err != nil {
// No need to hard-fail here, just warn the user
// (note that even with all-invalid entries we'll deny all types, so nothing unexpected should enter the path)
hasConfigIsses = true
hasConfigIssues = true

if i.alerting != nil {
i.alerting.Raise(i.pathAlerts[si.ID], map[string]interface{}{
Expand All @@ -149,7 +149,7 @@ func (i *Index) StorageAttach(ctx context.Context, si storiface.StorageInfo, st
_, err := storiface.TypeFromString(typ)
if err != nil {
// No need to hard-fail here, just warn the user
hasConfigIsses = true
hasConfigIssues = true

if i.alerting != nil {
i.alerting.Raise(i.pathAlerts[si.ID], map[string]interface{}{
Expand All @@ -168,7 +168,7 @@ func (i *Index) StorageAttach(ctx context.Context, si storiface.StorageInfo, st
si.AllowTypes = allow
si.DenyTypes = deny

if i.alerting != nil && !hasConfigIsses && i.alerting.IsRaised(i.pathAlerts[si.ID]) {
if i.alerting != nil && !hasConfigIssues && i.alerting.IsRaised(i.pathAlerts[si.ID]) {
i.alerting.Resolve(i.pathAlerts[si.ID], map[string]string{
"message": "path config is now correct",
})
Expand Down

0 comments on commit 3c3fba8

Please sign in to comment.