Skip to content

ci: reduce log verbosity to surface real test failures#575

Draft
mefellows with Copilot wants to merge 3 commits into
masterfrom
copilot/update-ci-logs-to-error
Draft

ci: reduce log verbosity to surface real test failures#575
mefellows with Copilot wants to merge 3 commits into
masterfrom
copilot/update-ci-logs-to-error

Conversation

Copilot AI commented May 5, 2026

Copy link
Copy Markdown
Contributor

CI logs were flooded with plugin gRPC shutdown and h2 GoAway debug noise, making it hard to identify the actual failing test in PR runs.

Change

  • .github/workflows/test.yml: drop LOG_LEVEL from debugerror
-  LOG_LEVEL: debug
+  LOG_LEVEL: error
Original prompt

Update pull request #573 in repository pact-foundation/pact-go to reduce noisy CI logs so the real failing test is easier to identify.

Context:

  • The failing GitHub Actions job for PR feat: Add DSL method to capture an external reference agaist a V4 Pact interaction #573 emits a large amount of debug-level plugin and h2 shutdown noise, which obscures the actual test failure.
  • The workflow file is .github/workflows/test.yml.
  • The workflow currently sets LOG_LEVEL: debug in the top-level env block.
  • Please change the workflow so CI uses LOG_LEVEL: ERROR instead.
  • Keep the change minimal and scoped to the workflow configuration only unless another tiny adjustment is required for consistency.

Acceptance criteria:

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.

Assistant: The failure is in the pact target, not in the protobuf-message test itself.

Root cause

The log shows:

  • --- PASS: TestPluginMessageConsumer
  • then overall FAIL
  • then make: *** [Makefile:124: pact] Error 1

That points to the command at Makefile:124:

go test -v -tags=consumer -count=1 github.com/pact-foundation/pact-go/v2/examples/...

Immediately after that, the pact target runs make publish and then provider tests at Makefile:125 and Makefile:126:

make publish
go test -v -timeout=30s -tags=provider -count=1 github.com/pact-foundation/pact-go/v2/examples/...

The repeated GoAway(... NO_ERROR ...) and failed serving connection: connection error lines are debug noise from the protobuf plugin shutdown, because the workflow sets LOG_LEVEL: debug in .github/workflows/test.yml:25. They are not the actual test failure.

Why this job is failing

On Ubuntu, the workflow runs full make from .github/workflows/test.yml:47-49:

- name: Test
  if: matrix.os == 'ubuntu-latest'
  run: APP_BRANCH=${APP_REF:11} DOCKER_GATEWAY_HOST=172.17.0.1 DOCKER_HOST_HTTP="http://172.17.0.1" make

And the default target is ci from Makefile:4, which includes pact at Makefile:14:

.DEFAULT_GOAL := ci
ci:: docker deps clean bin test pact

So the likely failure is one of:

  1. make publish failing because branch/tag metadata is bad for PRs,
  2. a provider example test failing after the consumer examples pass,
  3. an example package under examples/... failing even though protobuf-message passed.

Best fix

Use the same PR-safe behavior in CI that already exists in pact_local: skip publish during PR validation.

Current pact target:

pact: clean install docker
	@echo "--- 🔨 Running Pact examples"
	go test -v -tags=consumer -count=1 github.com/pact-foundation/pact-go/v2/examples/...
	make publish
	go test -v -timeout=30s -tags=provider -count=1 github.com/pact-foundation/pact-go/v2/examples/...

Suggested replacement:

pact: clean install docker
	@echo "--- 🔨 Running Pact examples"
	go test -v -tags=consumer -count=1 github.com/pact-foundation/pact-go/v2/examples/...
	if [ -n "$(PACT_BROKER_TOKEN)" ] && [ -n "$(APP_SHA)" ] && [ -n "$(APP_BRANCH)" ] && [ "$(SKIP_PUBLISH)" != "true" ]; then \
		$(MAKE) publish; \
	else \
		echo "--- 📃 Skipping pact publish"; \
	fi
	go test -v -timeout=30s -tags=provider -count=1 github.com/pact-foundation/pact-go/v2/examples/...

Workflow-side improvement

For pull requests, explicitly skip publish in the Ubuntu job:

- name: Test
  if: matrix.os == 'ubuntu-latest'
  run: APP_BRANCH=${APP_REF:11} DOCKER_GATEWAY_HOST=172.17.0.1 DOCKER_HOST_HTTP="http://172.17.0.1" SKIP_PUBLISH=true make

at .github/workflows/test.yml:47-49.

If you wan...

This pull request was created from Copilot chat.

Copilot AI and others added 2 commits May 5, 2026 02:25
Copilot AI changed the title [WIP] Update CI logs to use error-level logging ci: reduce log verbosity to surface real test failures May 5, 2026
Copilot AI requested a review from mefellows May 5, 2026 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants