Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions framework/.changeset/v0.15.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Set CL node image also as `CTF_CHAINLINK_IMAGE` env var in compat command
15 changes: 12 additions & 3 deletions framework/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,10 @@ Be aware that any TODO requires your attention before your run the final test!
Name: "exclude-refs",
Usage: "Patterns to exclude specific refs (e.g., beta,rc,v0,v1)",
},
&cli.BoolFlag{
Name: "skip-pull",
Usage: "Skip docker pull; use locally built images (e.g. for local testing)",
},
},
Usage: "Rollbacks N versions back, runs the test the upgrades CL nodes with new versions",
Action: func(c *cli.Context) error {
Expand All @@ -362,6 +366,7 @@ Be aware that any TODO requires your attention before your run the final test!

nop := c.String("nop")
sotURL := c.String("sot-url")
skipPull := c.Bool("skip-pull")

// test logic is:
// - rollback to selected ref
Expand Down Expand Up @@ -393,7 +398,7 @@ Be aware that any TODO requires your attention before your run the final test!
Msg("Formed upgrade sequence")
// if no commands just show the tags and return
if buildcmd == "" || envcmd == "" || testcmd == "" {
framework.L.Info().Msg("No envcmd or testcmd provided, skipping")
framework.L.Info().Msg("No envcmd or testcmd or buildcmd provided, skipping")
return nil
Comment on lines 400 to 402
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

The log message is misleading: the condition triggers when any of buildcmd/envcmd/testcmd is empty, but the message reads as if none were provided. Consider wording that indicates all three are required (or specify which one is missing).

Copilot uses AI. Check for mistakes.
}
// checkout the oldest ref
Expand All @@ -410,7 +415,9 @@ Be aware that any TODO requires your attention before your run the final test!

// setup the env and verify with test command
framework.L.Info().Strs("Sequence", refs).Msg("Running upgrade sequence")
// first env var is used by devenv, second by simple nodeset to override the image
os.Setenv("CHAINLINK_IMAGE", fmt.Sprintf("%s:%s", registry, refs[0]))
os.Setenv("CTF_CHAINLINK_IMAGE", fmt.Sprintf("%s:%s", registry, refs[0]))
if _, err := framework.ExecCmdWithContext(c.Context, buildcmd); err != nil {
return err
}
Expand All @@ -427,8 +434,10 @@ Be aware that any TODO requires your attention before your run the final test!
Str("Version", tag).
Msg("Upgrading nodes")
img := fmt.Sprintf("%s:%s", registry, tag)
if _, err := framework.ExecCmdWithContext(c.Context, fmt.Sprintf("docker pull %s", img)); err != nil {
return fmt.Errorf("failed to pull image %s: %w", img, err)
if !skipPull {
if _, err := framework.ExecCmdWithContext(c.Context, fmt.Sprintf("docker pull %s", img)); err != nil {
return fmt.Errorf("failed to pull image %s: %w", img, err)
}
}
for i := range nodes {
if err := framework.UpgradeContainer(c.Context, fmt.Sprintf(nodeNameTemplate, i), img); err != nil {
Expand Down
Loading