Skip to content

Commit

Permalink
tools/internal/parser: process Github PR checks concurrently
Browse files Browse the repository at this point in the history
Combined with the PR state cache, and with the bugfix to stop crashes
on concurrent PSL parses, this takes a full verification of the PSL
from ~15min down to 15s with a warmed cache, and under 5min on a cold
cache.
  • Loading branch information
danderson committed Sep 18, 2024
1 parent 0f3a356 commit fbd94e7
Show file tree
Hide file tree
Showing 3 changed files with 299 additions and 176 deletions.
18 changes: 18 additions & 0 deletions tools/internal/parser/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,21 @@ func (e ErrTXTRecordMismatch) Error() string {
panic(fmt.Sprintf("unexpected block type %T in ErrTXTRecordMismatch", e.Block))
}
}

type ErrTXTCheckFailure struct {
Block
Err error
}

func (e ErrTXTCheckFailure) Error() string {
var name string
switch v := e.Block.(type) {
case *Suffix:
name = v.Domain.String()
case *Wildcard:
name = v.Domain.String()
default:
panic(fmt.Sprintf("unexpected block type %T in ErrInvalidTXTRecord", e.Block))
}
return fmt.Sprintf("%s: error checking suffix %s: %v", e.SrcRange().LocationString(), name, e.Err)
}
Loading

0 comments on commit fbd94e7

Please sign in to comment.