Skip to content

fix(mcms): select public rpc for fork tests#553

Merged
gustavogama-cll merged 1 commit into
mainfrom
ggama/fix-select-public-rpc-for-fork-tests
Oct 31, 2025
Merged

fix(mcms): select public rpc for fork tests#553
gustavogama-cll merged 1 commit into
mainfrom
ggama/fix-select-public-rpc-for-fork-tests

Conversation

@gustavogama-cll

@gustavogama-cll gustavogama-cll commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

What

Ignore CLL rpcs when selecting the RPC for the ForkedEnvironment (used by anvil to fetch
the contract state).

Why

In the CI, the fork tests need to GAP to access the CLL rpcs. However, because we run anvil inside a containers, the setup gets rather complicated -- we need to copy+adapt the entries added to /etc/hosts and add GAP's custom CA certificates. But, because anvil is managed using testcontainers (indirectly, via CTF), we'd need to add support for this feature to CTF, then CLDF and finally the CLD workflows.

However, CLL is moving towards replacing GAP with Tailscale to access internal resources from GHA runners. So, rather than spending significant resources implementing the GAP solution, we're adding this quick fix -- which should solve the problem for 95% of the proposals -- until the Tailscale option is ready.


DPT-277

@changeset-bot

changeset-bot Bot commented Oct 30, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3b9fc53

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
chainlink-deployments-framework Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gustavogama-cll gustavogama-cll force-pushed the ggama/fix-select-public-rpc-for-fork-tests branch 2 times, most recently from 10b14a5 to 415824c Compare October 31, 2025 05:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR ensures that fork tests use public RPCs by filtering out private internal RPCs from the chain configuration. The change prevents fork test failures when only private RPCs are available by validating RPC accessibility and selecting appropriate public endpoints.

Key changes:

  • Added validation to ensure public RPCs are available before running fork tests
  • Implemented RPC filtering logic to distinguish between public and private endpoints
  • Added comprehensive test coverage for the new RPC selection functionality

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
engine/cld/legacy/cli/mcmsv2/mcms_v2.go Added validation check to ensure at least one RPC is available before executing fork commands
engine/cld/environment/anvil.go Implemented selectPublicRPC and isPublicRPC functions to filter and select public RPCs for fork environments
engine/cld/environment/anvil_test.go Added comprehensive unit tests for the new RPC selection logic
.changeset/fine-cups-battle.md Added changeset documentation for the fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread engine/cld/environment/anvil.go
@gustavogama-cll gustavogama-cll force-pushed the ggama/fix-select-public-rpc-for-fork-tests branch from 415824c to 3b9fc53 Compare October 31, 2025 05:17
@cl-sonarqube-production

Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
75.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

@gustavogama-cll gustavogama-cll marked this pull request as ready for review October 31, 2025 05:30
@gustavogama-cll gustavogama-cll requested review from a team as code owners October 31, 2025 05:30
Copilot AI review requested due to automatic review settings October 31, 2025 05:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread engine/cld/environment/anvil.go
@gustavogama-cll gustavogama-cll requested review from ecPablo and removed request for kalverra October 31, 2025 05:33

@ecPablo ecPablo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@gustavogama-cll gustavogama-cll added this pull request to the merge queue Oct 31, 2025
Merged via the queue into main with commit 8d6a9f7 Oct 31, 2025
14 of 15 checks passed
@gustavogama-cll gustavogama-cll deleted the ggama/fix-select-public-rpc-for-fork-tests branch October 31, 2025 14:40
github-merge-queue Bot pushed a commit that referenced this pull request Oct 31, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## chainlink-deployments-framework@0.60.1

### Patch Changes

-
[#553](#553)
[`8d6a9f7`](8d6a9f7)
Thanks [@gustavogama-cll](https://github.com/gustavogama-cll)! -
fix(mcms): select public rpc for fork tests

-
[#551](#551)
[`cf4de66`](cf4de66)
Thanks [@giogam](https://github.com/giogam)! - fix(catalog): updates
errors in remote implementation

---------

Co-authored-by: app-token-issuer-engops[bot] <144731339+app-token-issuer-engops[bot]@users.noreply.github.com>
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.

4 participants