Skip to content

Commit 9cc6639

Browse files
authored
A few fixes for Prometheus service (#129)
* A few fixes for prometheus * Update CI
1 parent 12e5597 commit 9cc6639

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

.github/workflows/checks.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
flags:
1717
- "l1"
1818
- "l1 --use-native-reth"
19+
- "l1 --with-prometheus"
1920
- "opstack"
2021
- "opstack --external-builder http://host.docker.internal:4444"
2122
- "opstack --enable-latest-fork=10"

internal/catalog.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ func init() {
2020
register(&BuilderHub{})
2121
register(&BuilderHubPostgres{})
2222
register(&BuilderHubMockProxy{})
23+
register(&nullService{})
2324
}
2425

2526
func FindComponent(name string) ServiceGen {

internal/components.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,3 +571,13 @@ func (p *OpReth) Watchdog(out io.Writer, instance *instance, ctx context.Context
571571
rethURL := fmt.Sprintf("http://localhost:%d", instance.service.MustGetPort("http").HostPort)
572572
return watchChainHead(out, rethURL, 2*time.Second)
573573
}
574+
575+
type nullService struct {
576+
}
577+
578+
func (n *nullService) Run(service *Service, ctx *ExContext) {
579+
}
580+
581+
func (n *nullService) Name() string {
582+
return "null"
583+
}

internal/local_runner.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,8 @@ func CreatePrometheusServices(manifest *Manifest, out *output) error {
950950
WithTag("latest").
951951
WithArgs("--config.file", "/data/prometheus.yaml").
952952
WithPort("metrics", 9090, "tcp").
953-
WithArtifact("/data/prometheus.yml", "prometheus.yaml")
953+
WithArtifact("/data/prometheus.yaml", "prometheus.yaml")
954+
srv.ComponentName = "null" // For now, later on we can create a Prometheus component
954955
manifest.services = append(manifest.services, srv)
955956

956957
return nil

0 commit comments

Comments
 (0)