Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CAPPL-402] correctly propagate errors on fetcher #15758

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

agparadiso
Copy link
Contributor

@agparadiso agparadiso commented Dec 18, 2024

Description

Whenever the fetcher was failing to download the artifacts (EG: response payload too big) we where not checking for the error in the payload, aside from that we were also logging the wrong error.

CAPPL-402

Requires

Supports

Copy link
Contributor

github-actions bot commented Dec 18, 2024

AER Report: CI Core

aer_workflow , commit , Detect Changes , Clean Go Tidy & Generate , Scheduled Run Frequency , Flakeguard Root Project / Get Tests To Run , lint , Core Tests (go_core_tests) , Flakeguard Deployment Project , Core Tests (go_core_tests_integration) , Core Tests (go_core_ccip_deployment_tests) , Core Tests (go_core_race_tests) , Core Tests (go_core_fuzz) , Flakeguard Root Project / Run Tests (github.com/smartcontractkit/chainlink/v2/core/services/workflows/syncer, ubuntu-latest) , Flakey Test Detection , SonarQube Scan , Flakeguard Root Project / Report

1. Error parsing test results

[Run tests with flakeguard] [2024-12-18T16:38:49.3003614Z] [Error running tests: failed to parse test results: failed to attribute panic to test, using regex syncer.(Test[^\.\(]+) on these strings:]

Source of Error:
Run tests with flakeguard	2024-12-18T16:38:49.3003614Z Error running tests: failed to parse test results: failed to attribute panic to test, using regex syncer\.(Test[^\.\(]+) on these strings:
Run tests with flakeguard	2024-12-18T16:38:49.3005564Z panic: Log in goroutine after Test_workflowRegisteredHandler/skips_fetch_if_config_url_is_missing has completed: 2024-12-18T16:38:49.173Z	DEBUG	CapabilitiesRegistry	capabilities/registry.go:69	get capability	{"version": "unset@unset", "id": "[email protected]"}

Why: The error occurred because a panic was logged after the test Test_workflowRegisteredHandler/skips_fetch_if_config_url_is_missing had already completed. This caused the test result parser to fail in attributing the panic to the correct test case.

Suggested fix: Ensure that no logging or operations occur after a test has completed. Review the test and related code to ensure all operations are properly synchronized and completed within the test's lifecycle.

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit

@agparadiso agparadiso marked this pull request as ready for review December 18, 2024 16:02
@agparadiso agparadiso requested a review from a team as a code owner December 18, 2024 16:02
@@ -100,5 +100,9 @@ func (s *FetcherService) Fetch(ctx context.Context, url string) ([]byte, error)
return nil, err
}

if payload.ExecutionError {
return nil, fmt.Errorf("execution error from gateway: %v", payload.ErrorMessage)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: use %s rather than %v here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😅 forgot to change that one, done! thanks

@agparadiso agparadiso force-pushed the CAPPL-402_propagate_error_downloading_artifacts branch from 2d25f6e to 2dfc60b Compare December 18, 2024 16:26
@agparadiso agparadiso enabled auto-merge December 19, 2024 09:09
@agparadiso agparadiso added this pull request to the merge queue Dec 19, 2024
Merged via the queue into develop with commit d5e2184 Dec 19, 2024
168 of 170 checks passed
@agparadiso agparadiso deleted the CAPPL-402_propagate_error_downloading_artifacts branch December 19, 2024 09:47
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.

3 participants