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

fix(gateway/connector): await gateway connection before request #15686

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

MStreet3
Copy link
Contributor

this PR enables a gateway connector to await a connection before making a request. the gatewayState now carries a channel that when closed signals that a connection has been made successfully.

Requires

Supports

@MStreet3 MStreet3 requested review from a team as code owners December 13, 2024 16:27
@MStreet3 MStreet3 requested a review from ilija42 December 13, 2024 16:27
Copy link
Contributor

I see you updated files related to core. Please run pnpm changeset in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

🎖️ No JIRA issue number found in: PR title, commit message, or branch name. Please include the issue ID in one of these.

Copy link
Contributor

github-actions bot commented Dec 13, 2024

AER Report: CI Core

aer_workflow , commit , Detect Changes , Clean Go Tidy & Generate , Scheduled Run Frequency , Flakeguard Root Project / Get Tests To Run , Core Tests (go_core_tests) , Core Tests (go_core_tests_integration) , lint , Core Tests (go_core_ccip_deployment_tests) , Flakeguard Deployment Project , Core Tests (go_core_race_tests) , Core Tests (go_core_fuzz) , Flakeguard Root Project / Run Tests (github.com/smartcontractkit/chainlink/v2/core/capabilities/compute, ubuntu-latest) , Flakeguard Root Project / Run Tests (github.com/smartcontractkit/chainlink/v2/core/capabilities/webapi, ubuntu-latest) , Flakeguard Root Project / Run Tests (github.com/smartcontractkit/chainlink/v2/core/capabilities/webapi/target, ubuntu-latest) , 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 due to panic:

[A 1 <= 10 words sentence that describes the error]:[Run tests with flakeguard]

Source of Error:
Run tests with flakeguard	2024-12-13T19:46:03.6973308Z 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-13T19:46:03.6976924Z panic: Log in goroutine after Test_workflowRegisteredHandler/skips_fetch_if_secrets_url_is_missing has completed: 2024-12-13T19:44:24.733Z	DEBUG	CapabilitiesRegistry	capabilities/registry.go:69	get capability	{"version": "unset@unset", "id": "basic-test-trigger@1.0.0"}
Run tests with flakeguard	2024-12-13T19:46:03.6978909Z 
Run tests with flakeguard	2024-12-13T19:46:03.6979117Z goroutine 496 [running]:
Run tests with flakeguard	2024-12-13T19:46:03.6979818Z testing.(*common).logDepth(0xc000bea820, {0xc00002c140, 0x9b}, 0x3)
Run tests with flakeguard	2024-12-13T19:46:03.6981134Z 	/home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.4.linux-amd64/src/testing/testing.go:1029 +0x6d4
Run tests with flakeguard	2024-12-13T19:46:03.6982069Z testing.(*common).log(...)
Run tests with flakeguard	2024-12-13T19:46:03.6983024Z 	/home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.4.linux-amd64/src/testing/testing.go:1011
Run tests with flakeguard	2024-12-13T19:46:03.6984174Z testing.(*common).Logf(0xc000bea820, {0x3c45792, 0x2}, {0xc0010c0d20, 0x1, 0x1})
Run tests with flakeguard	2024-12-13T19:46:03.6989462Z 	/home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.4.linux-amd64/src/testing/testing.go:1062 +0xa5
Run tests with flakeguard	2024-12-13T19:46:03.6990353Z go.uber.org/zap/zaptest.TestingWriter.Write({{0x7fe544a70ff8?, 0xc000bea820?}, 0x10?}, {0xc0010e2000, 0x9c, 0x400})
Run tests with flakeguard	2024-12-13T19:46:03.6991083Z 	/home/runner/go/pkg/mod/go.uber.org/zap@v1.27.0/zaptest/logger.go:146 +0x11e
Run tests with flakeguard	2024-12-13T19:46:03.6992061Z go.uber.org/zap/zapcore.(*ioCore).Write(0xc000d7fb90, {0xff, {0xc1cf41862bbc34a2, 0x15a9d25088, 0x58bbe20}, {0x3c6d327, 0x14}, {0x3c61000, 0xe}, {0x1, ...}, ...}, ...)
Run tests with flakeguard	2024-12-13T19:46:03.6992877Z 	/home/runner/go/pkg/mod/go.uber.org/zap@v1.27.0/zapcore/core.go:99 +0x193
Run tests with flakeguard	2024-12-13T19:46:03.6993729Z go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc0010ca410, {0xc00063c580, 0x1, 0x2})
Run tests with flakeguard	2024-12-13T19:46:03.6994328Z 	/home/runner/go/pkg/mod/go.uber.org/zap@v1.27.0/zapcore/entry.go:253 +0x1f0
Run tests with flakeguard	2024-12-13T19:46:03.6995044Z go.uber.org/zap.(*SugaredLogger).log(0xc0001205a0, 0xff, {0x3c61000, 0xe}, {0x0, 0x0, 0x0}, {0xc000b25aa0, 0x2, 0x2})
Run tests with flakeguard	2024-12-13T19:46:03.6995676Z 	/home/runner/go/pkg/mod/go.uber.org/zap@v1.27.0/sugar.go:355 +0x130
Run tests with flakeguard	2024-12-13T19:46:03.6996112Z go.uber.org/zap.(*SugaredLogger).Debugw(...)
Run tests with flakeguard	2024-12-13T19:46:03.6996523Z 	/home/runner/go/pkg/mod/go.uber.org/zap@v1.27.0/sugar.go:251
Run tests with flakeguard	2024-12-13T19:46:03.6997348Z github.com/smartcontractkit/chainlink/v2/core/capabilities.(*Registry).Get(0xc0009c3100, {0x7fe58df6a0d8?, 0x20?}, {0xc001270f60, 0x18})
Run tests with flakeguard	2024-12-13T19:46:03.6998157Z 	/home/runner/work/chainlink/chainlink/core/capabilities/registry.go:69 +0x1e2
Run tests with flakeguard	2024-12-13T19:46:03.6999075Z github.com/smartcontractkit/chainlink/v2/core/capabilities.(*Registry).GetTrigger(0xc0009c3100, {0x4344338, 0xc000888be0}, {0xc001270f60, 0x18})
Run tests with flakeguard	2024-12-13T19:46:03.6999903Z 	/home/runner/work/chainlink/chainlink/core/capabilities/registry.go:80 +0x6f
Run tests with flakeguard	2024-12-13T19:46:03.7000855Z github.com/smartcontractkit/chainlink/v2/core/services/workflows.(*Engine).resolveWorkflowCapabilities(0xc000148608, {0x4344338, 0xc000888be0})
Run tests with flakeguard	2024-12-13T19:46:03.7001720Z 	/home/runner/work/chainlink/chainlink/core/services/workflows/engine.go:172 +0x17e
Run tests with flakeguard	2024-12-13T19:46:03.7002416Z github.com/smartcontractkit/chainlink/v2/core/services/workflows.(*Engine).init.func1()
Run tests with flakeguard	2024-12-13T19:46:03.7003072Z 	/home/runner/work/chainlink/chainlink/core/services/workflows/engine.go:322 +0x2af
Run tests with flakeguard	2024-12-13T19:46:03.7004064Z github.com/smartcontractkit/chainlink/v2/core/services/workflows.retryable({0x4344338, 0xc000888be0}, {0x4366f90, 0xc00129cc30}, 0x1388, 0x0, 0xc000d11ee0)
Run tests with flakeguard	2024-12-13T19:46:03.7004930Z 	/home/runner/work/chainlink/chainlink/core/services/workflows/retry.go:45 +0x402
Run tests with flakeguard	2024-12-13T19:46:03.7005754Z github.com/smartcontractkit/chainlink/v2/core/services/workflows.(*Engine).init(0xc000148608, {0x4344338, 0xc000888be0})
Run tests with flakeguard	2024-12-13T19:46:03.7006529Z 	/home/runner/work/chainlink/chainlink/core/services/workflows/engine.go:313 +0x225
Run tests with flakeguard	2024-12-13T19:46:03.7007330Z created by github.com/smartcontractkit/chainlink/v2/core/services/workflows.(*Engine).Start.func1 in goroutine 283
Run tests with flakeguard	2024-12-13T19:46:03.7008080Z 	/home/runner/work/chainlink/chainlink/core/services/workflows/engine.go:153 +0x35a
Run tests with flakeguard	2024-12-13T19:46:03.7008754Z FAIL	github.com/smartcontractkit/chainlink/v2/core/services/workflows/syncer	93.100s
Run tests with flakeguard	2024-12-13T19:46:03.7009084Z 
Run tests with flakeguard	2024-12-13T19:46:03.7015304Z ##[error]Process completed with exit code 1.

Why: The error occurred because a log entry was made in a goroutine after the test Test_workflowRegisteredHandler/skips_fetch_if_secrets_url_is_missing had already completed, causing a panic that the test result parser could not attribute correctly.

Suggested fix: Ensure that all logging and other operations in goroutines are completed before the test function returns. This can be done by using synchronization mechanisms like WaitGroup to wait for all goroutines to finish.

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit

agparadiso
agparadiso previously approved these changes Dec 13, 2024
@MStreet3 MStreet3 dismissed stale reviews from agparadiso and cedric-cordenier via 2a47585 December 13, 2024 17:01
@MStreet3 MStreet3 enabled auto-merge December 13, 2024 17:02
ettec
ettec previously approved these changes Dec 13, 2024
agparadiso
agparadiso previously approved these changes Dec 13, 2024
@justinkaseman justinkaseman self-requested a review December 13, 2024 18:20
justinkaseman
justinkaseman previously approved these changes Dec 13, 2024
Copy link

@Osazperry Osazperry left a comment

Choose a reason for hiding this comment

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

ASAP

@justinkaseman justinkaseman self-requested a review December 13, 2024 21:10
@MStreet3 MStreet3 added this pull request to the merge queue Dec 13, 2024
Merged via the queue into develop with commit 98f222d Dec 13, 2024
170 of 173 checks passed
@MStreet3 MStreet3 deleted the fix/gateway-race branch December 13, 2024 22:03
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.

6 participants