Skip to content

Conversation

erikburt
Copy link
Collaborator

@erikburt erikburt commented Oct 16, 2025

Changes

  • Adds functionality:
    • Auto discovers the modules from the plugins file, so the CI command doesn't get stale (fix: pin plugins to version in go.mod #19912)
      • Makes sure to not error on modules that don't exist in the go.mod
    • Adds --ignore-modules parameter to exclude modules as needed. Now "opt-out"
  • Tag/sha comparison fixes
  • Uses go list -m -json ... instead of trying to manually parsing a go.mod file
  • Preserves other functionality like --update

Motivation

This is motivated by a few things:

  1. Automatically enforce proper versions on plugins for the dependencies in our go.mod (command does not get stale)
  2. Dependencies in our go.mod are required to be on the trunk of their repo's branch (go mod validator enforces this), which means plugins that are also in the go.mod are inherently forced to be from the trunk branch

Testing

Updated unit tests, validated locally, https://github.com/smartcontractkit/chainlink/actions/runs/18572518994/job/52949698047?pr=19929

Tested indirect dependency skipping locally due to #19933 / #19932

Output

Example Output

=== Starting plugin version sync check ===
Checking go.mod path: ./go.mod
Plugin files to check: ./plugins/plugins.public.yaml
Mode: CHECK ONLY (use --update flag to update plugin files)


=== Checking plugin file ./plugins/plugins.public.yaml ===
Checking Module (1/9): github.com/smartcontractkit/chainlink-aptos 
  - Plugins version: v0.0.0-20251013133428-62ab1091a563 (SHA: 62ab1091a563)
  - Version in go.mod: v0.0.0-20251013133428-62ab1091a563 (SHA: 62ab1091a563)
  - ✅ Versions match for github.com/smartcontractkit/chainlink-aptos
Checking Module (2/9): github.com/smartcontractkit/chainlink-cosmos 
  - Plugins version: f740e9ae54e79762991bdaf8ad6b50363261c056 (SHA: f740e9ae54e79762991bdaf8ad6b50363261c056)
  - No version found in go.mod for github.com/smartcontractkit/chainlink-cosmos: failed to run go list -m: exit status 1
Checking Module (3/9): github.com/smartcontractkit/chainlink-data-streams 
  - Plugins version: v0.1.5 (Tag: v0.1.5)
  - Version in go.mod: v0.1.5 (Tag: v0.1.5)
  - ✅ Versions match for github.com/smartcontractkit/chainlink-data-streams
Checking Module (4/9): github.com/smartcontractkit/chainlink-feeds 
  - Plugins version: v0.1.2-0.20250227211209-7cd000095135 (SHA: 7cd000095135)
  - Version in go.mod: v0.1.2-0.20250227211209-7cd000095135 (SHA: 7cd000095135)
  - ✅ Versions match for github.com/smartcontractkit/chainlink-feeds
Checking Module (5/9): github.com/smartcontractkit/chainlink-solana 
  - Plugins version: v1.1.2-0.20251007010318-c9a7b2d44524 (SHA: c9a7b2d44524)
  - Version in go.mod: v1.1.2-0.20251007010318-c9a7b2d44524 (SHA: c9a7b2d44524)
  - ✅ Versions match for github.com/smartcontractkit/chainlink-solana
Checking Module (6/9): github.com/smartcontractkit/chainlink-starknet/relayer 
  - Plugins version: 7e854bab99ef4a9cdbaa8dc2cac1fdf059238682 (SHA: 7e854bab99ef4a9cdbaa8dc2cac1fdf059238682)
  - No version found in go.mod for github.com/smartcontractkit/chainlink-starknet/relayer: failed to run go list -m: exit status 1
Checking Module (7/9): github.com/smartcontractkit/chainlink-sui 
  - Plugins version: v0.0.0-20251012014843-5d44e7731854 (SHA: 5d44e7731854)
  - Version in go.mod: v0.0.0-20251012014843-5d44e7731854 (SHA: 5d44e7731854)
  - ✅ Versions match for github.com/smartcontractkit/chainlink-sui
Checking Module (8/9): github.com/smartcontractkit/chainlink-ton 
  - Plugins version: v0.0.0-20251015181357-b635fc06e2ea (SHA: b635fc06e2ea)
  - Version in go.mod: v0.0.0-20251015181357-b635fc06e2ea (SHA: b635fc06e2ea)
  - ✅ Versions match for github.com/smartcontractkit/chainlink-ton
Checking Module (9/9): github.com/smartcontractkit/chainlink-tron/relayer 
  - Plugins version: v0.0.11-0.20250908203554-5bd9d2fe9513 (SHA: 5bd9d2fe9513)
  - Version in go.mod: v0.0.11-0.20250908203554-5bd9d2fe9513 (SHA: 5bd9d2fe9513)
  - ✅ Versions match for github.com/smartcontractkit/chainlink-tron/relayer
=== Plugin version sync check completed successfully ===

@erikburt erikburt self-assigned this Oct 16, 2025
@erikburt erikburt changed the title Feat/update plugout feat(ci): plugout improvements Oct 16, 2025
@erikburt erikburt requested a review from chainchad October 16, 2025 19:33
@erikburt erikburt marked this pull request as ready for review October 16, 2025 19:46
@erikburt erikburt requested review from a team as code owners October 16, 2025 19:46
chainchad
chainchad previously approved these changes Oct 16, 2025
@erikburt erikburt enabled auto-merge October 16, 2025 20:10
@erikburt erikburt requested a review from chainchad October 16, 2025 21:02
@erikburt erikburt marked this pull request as draft October 16, 2025 22:01
auto-merge was automatically disabled October 16, 2025 22:01

Pull request was converted to draft

@erikburt erikburt marked this pull request as ready for review October 16, 2025 23:27
@pavel-raykov
Copy link
Collaborator

Please, consider reenabling tron-relayer check disabled here 5659eb4
to test the changes in this PR.

@chainchad chainchad requested a review from Copilot October 17, 2025 20:07
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds auto-discovery of plugin modules from YAML, refactors sync logic to use go list -m for version resolution, and introduces an ignore-module flag while removing manual --module usage.

  • Auto-discovers modules from plugin YAML instead of requiring repeated --module flags.
  • Adds --ignore-module support and refactors runSync to return mismatch status; updates CI workflow accordingly.
  • Replaces manual go.mod parsing with go list -m -json based normalization and expands test coverage (tags, SHAs, submodule handling).

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
tools/plugout/main.go Core refactor: options struct, discovery, version normalization, exec-based module version resolution, ignore logic.
tools/plugout/main_test.go Expanded unit tests for normalization, matching, YAML update, end-to-end sync modes.
tools/plugout/README.md Updates CLI options removing --module, documents --ignore-module.
.github/workflows/ci-core.yml Simplifies plugout invocation by removing explicit --module arguments and names Go setup step.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

chainchad
chainchad previously approved these changes Oct 17, 2025
@cl-sonarqube-production
Copy link

@erikburt erikburt added this pull request to the merge queue Oct 17, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 17, 2025
@erikburt erikburt added this pull request to the merge queue Oct 17, 2025
Merged via the queue into develop with commit 836f6a2 Oct 17, 2025
186 of 209 checks passed
@erikburt erikburt deleted the feat/update-plugout branch October 17, 2025 21:31
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