diff --git a/.github/workflows/ci-lint-checks.yaml b/.github/workflows/ci-lint-checks.yaml index 30523637c64..b665fd533ea 100644 --- a/.github/workflows/ci-lint-checks.yaml +++ b/.github/workflows/ci-lint-checks.yaml @@ -47,7 +47,9 @@ jobs: - uses: ./.github/actions/block-pr-from-main-branch - - run: make lint-nocommit + - run: | + git fetch origin main + make lint-nocommit dco-check: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 3229e2583e6..50d19d2ea7d 100644 --- a/Makefile +++ b/Makefile @@ -153,9 +153,9 @@ lint-license: .PHONY: lint-nocommit lint-nocommit: - @if git diff main | grep '@no''commit' ; then \ + @if git diff origin/main | grep '@no''commit' ; then \ echo "❌ Cannot merge PR that contains @no""commit string" ; \ - GIT_PAGER=cat git diff -G '@no''commit' main ; \ + GIT_PAGER=cat git diff -G '@no''commit' origin/main ; \ false ; \ else \ echo "✅ Changes do not contain @no""commit string" ; \ diff --git a/cmd/jaeger/internal/integration/e2e_integration.go b/cmd/jaeger/internal/integration/e2e_integration.go index 9e4843f030c..c8681e4ed7e 100644 --- a/cmd/jaeger/internal/integration/e2e_integration.go +++ b/cmd/jaeger/internal/integration/e2e_integration.go @@ -13,7 +13,6 @@ import ( "os" "os/exec" "path/filepath" - "strings" "testing" "time" @@ -42,10 +41,10 @@ const otlpPort = 4317 type E2EStorageIntegration struct { integration.StorageIntegration - SkipStorageCleaner bool - ConfigFile string - BinaryName string - HealthCheckEndpoint string + SkipStorageCleaner bool + ConfigFile string + BinaryName string + HealthCheckPort int // overridable for Kafka tests which run two binaries and need different ports // EnvVarOverrides contains a map of environment variables to set. // The key in the map is the environment variable to override and the value @@ -160,10 +159,11 @@ func (s *E2EStorageIntegration) e2eInitialize(t *testing.T, storage string) { } func (s *E2EStorageIntegration) doHealthCheck(t *testing.T) bool { - healthCheckEndpoint := s.HealthCheckEndpoint - if healthCheckEndpoint == "" { - healthCheckEndpoint = "http://localhost:13133/status" + healthCheckPort := s.HealthCheckPort + if healthCheckPort == 0 { + healthCheckPort = ports.CollectorV2HealthChecks } + healthCheckEndpoint := fmt.Sprintf("http://localhost:%d/status", healthCheckPort) t.Logf("Checking if %s is available on %s", s.BinaryName, healthCheckEndpoint) ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) defer cancel() @@ -187,11 +187,6 @@ func (s *E2EStorageIntegration) doHealthCheck(t *testing.T) bool { t.Logf("HTTP response not OK: %v", string(body)) return false } - // for backwards compatibility with other healthchecks - if !strings.HasSuffix(healthCheckEndpoint, "/status") { - t.Logf("OK HTTP from endpoint that is not healthcheckv2") - return true - } var healthResponse struct { Status string `json:"status"` @@ -203,7 +198,7 @@ func (s *E2EStorageIntegration) doHealthCheck(t *testing.T) bool { // Check if the status field in the JSON is "StatusOK" if healthResponse.Status != "StatusOK" { - t.Logf("Received non-K status %s: %s", healthResponse.Status, string(body)) + t.Logf("Received non-OK status %s: %s", healthResponse.Status, string(body)) return false } return true diff --git a/cmd/jaeger/internal/integration/kafka_test.go b/cmd/jaeger/internal/integration/kafka_test.go index 218624788f0..6e9e4d810ef 100644 --- a/cmd/jaeger/internal/integration/kafka_test.go +++ b/cmd/jaeger/internal/integration/kafka_test.go @@ -52,9 +52,9 @@ func TestKafkaStorage(t *testing.T) { t.Log("Collector initialized") ingester := &E2EStorageIntegration{ - BinaryName: "jaeger-v2-ingester", - ConfigFile: "../../config-kafka-ingester.yaml", - HealthCheckEndpoint: "http://localhost:14133/status", + BinaryName: "jaeger-v2-ingester", + ConfigFile: "../../config-kafka-ingester.yaml", + HealthCheckPort: 14133, StorageIntegration: integration.StorageIntegration{ CleanUp: purge, GetDependenciesReturnsSource: true,