Skip to content
Draft
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
5 changes: 5 additions & 0 deletions .changeset/cute-pianos-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

**DirectRequest and FluxMonitor job types have been removed.** Creating new jobs of these types is no longer supported and will return an error. Any existing jobs of these types that are still present in the database will surface an error in the job UI on node startup rather than running. The underlying database tables (`direct_request_specs`, `flux_monitor_specs`, `flux_monitor_round_stats_v2`) are **unchanged in this release** and will be cleaned up in a future migration. The `[FluxMonitor]` TOML config section is now a no-op but is still accepted to avoid breaking existing config files during the transition. #breaking_change #nops
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
/core/capabilities/ccip/ccipton/ @smartcontractkit/bix-build

# To be deprecated in Chainlink V3
/core/services/fluxmonitorv2/ @smartcontractkit/foundations @smartcontractkit/core
/core/services/job/ @smartcontractkit/foundations @smartcontractkit/core
/core/services/keystore/ @smartcontractkit/foundations
/core/services/ocr*/ @smartcontractkit/foundations @smartcontractkit/core
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/legacy-system-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
ecr:
type: string
required: true
default: "sdlc"

Check failure on line 40 in .github/workflows/legacy-system-tests.yml

View workflow job for this annotation

GitHub Actions / Validate Github Action Workflows

[actionlint] reported by reviewdog 🐶 input "ecr" of workflow_call event has the default value "sdlc", but it is also required. if an input is marked as required, its default value will never be used [events] Raw Output: e:.github/workflows/legacy-system-tests.yml:40:18: input "ecr" of workflow_call event has the default value "sdlc", but it is also required. if an input is marked as required, its default value will never be used [events]
description: "Whether to use the SDLC (sdlc) or public ECR registry (public) for the Chainlink image."
chainlink_version:
required: false
Expand Down Expand Up @@ -86,7 +86,7 @@
echo "resolved_image=${resolved_image}" >> "${GITHUB_OUTPUT}"
- name: Print Summary
working-directory: .
run: |

Check warning on line 89 in .github/workflows/legacy-system-tests.yml

View workflow job for this annotation

GitHub Actions / Validate Github Action Workflows

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:1:86: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/legacy-system-tests.yml:89:9: shellcheck reported issue in this script: SC2086:info:1:86: Double quote to prevent globbing and word splitting [shellcheck]
echo "**Image:** \`${{ steps.resolve-chainlink-image.outputs.resolved_image }}\`" >> $GITHUB_STEP_SUMMARY

test-nightly:
Expand Down Expand Up @@ -122,18 +122,6 @@
runner: "ubuntu-latest"
tests_dir: "cron"
logs_archive_name: "cron"
- display_name: "Test Direct Request Smoke"
testcmd: "go test -v -run TestSmoke"
envcmd: "cl u env.toml,products/directrequest/basic.toml"
runner: "ubuntu-latest"
tests_dir: "directrequest"
logs_archive_name: "directrequest"
- display_name: "Test Flux Smoke"
testcmd: "go test -v -run TestSmoke"
envcmd: "cl u env.toml,products/flux/basic.toml"
runner: "ubuntu-latest"
tests_dir: "flux"
logs_archive_name: "flux"
- display_name: "Test VRF Smoke"
testcmd: "go test -v -timeout 10m -run TestVRFBasic\\|TestVRFJobReplacement"
envcmd: "cl u env.toml,products/vrf/basic.toml"
Expand Down Expand Up @@ -323,7 +311,7 @@
echo "resolved_image=${resolved_image}" >> "${GITHUB_OUTPUT}"

- name: Set environment variables
run: |

Check warning on line 314 in .github/workflows/legacy-system-tests.yml

View workflow job for this annotation

GitHub Actions / Validate Github Action Workflows

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:1:87: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: i:.github/workflows/legacy-system-tests.yml:314:9: shellcheck reported issue in this script: SC2086:info:1:87: Double quote to prevent globbing and word splitting [shellcheck]
echo "CHAINLINK_IMAGE=${{ steps.resolve-chainlink-image.outputs.resolved_image }}" >> $GITHUB_ENV
- name: Setup environment
env:
Expand Down
14 changes: 0 additions & 14 deletions .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,6 @@ packages:
interfaces:
TelemetryIngress:
TelemetryIngressEndpoint:
github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/flux_aggregator_wrapper:
config:
dir: core/internal/mocks
filename: flux_aggregator.go
interfaces:
FluxAggregatorInterface:
config:
mockname: FluxAggregator
github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/flags_wrapper:
config:
dir: core/internal/mocks
Expand Down Expand Up @@ -133,12 +125,6 @@ packages:
dir: "core/services/feeds/mocks"
interfaces:
FeedsManagerClient:
github.com/smartcontractkit/chainlink/v2/core/services/fluxmonitorv2:
interfaces:
ContractSubmitter:
Flags:
KeyStoreInterface:
ORM:
github.com/smartcontractkit/chainlink/v2/core/services/functions:
interfaces:
ExternalAdapterClient:
Expand Down
1 change: 0 additions & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ install-plugins-testing: ## Build & install testing only LOOPP binaries (plugins
GOPRIVATE=github.com/smartcontractkit/* go tool loopinstall --concurrency 5 $(LOOPINSTALL_TESTING_ARGS) ./plugins/plugins.testing.yaml; \
fi


.PHONY: install-plugins-local
install-plugins-local: ## Build & install local plugins
go install -ldflags="-s" \
Expand Down
13 changes: 0 additions & 13 deletions core/cmd/direct-request-spec-template.yml

This file was deleted.

152 changes: 9 additions & 143 deletions core/cmd/jobs_commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestJobPresenter_RenderTable(t *testing.T) {
var (
id = "1"
name = "Job 1"
jobSpecType = "fluxmonitor"
jobSpecType = "cron"
schemaVersion = uint32(1)
maxTaskDuration = sqlutil.Interval(1 * time.Second)

Expand All @@ -49,7 +49,7 @@ func TestJobPresenter_RenderTable(t *testing.T) {
SchemaVersion: schemaVersion,
MaxTaskDuration: maxTaskDuration,
DirectRequestSpec: nil,
FluxMonitorSpec: &presenters.FluxMonitorSpec{
CronSpec: &presenters.CronSpec{
CreatedAt: createdAt,
UpdatedAt: updatedAt,
},
Expand Down Expand Up @@ -156,30 +156,6 @@ func TestJob_FriendlyCreatedAt(t *testing.T) {
job *cmd.JobPresenter
result string
}{
{
"gets the direct request spec created at timestamp",
&cmd.JobPresenter{
JobResource: presenters.JobResource{
Type: presenters.DirectRequestJobSpec,
DirectRequestSpec: &presenters.DirectRequestSpec{
CreatedAt: now,
},
},
},
now.Format(time.RFC3339),
},
{
"gets the flux monitor spec created at timestamp",
&cmd.JobPresenter{
JobResource: presenters.JobResource{
Type: presenters.FluxMonitorJobSpec,
FluxMonitorSpec: &presenters.FluxMonitorSpec{
CreatedAt: now,
},
},
},
now.Format(time.RFC3339),
},
{
"gets the cron spec created at timestamp",
&cmd.JobPresenter{
Expand Down Expand Up @@ -253,7 +229,7 @@ func TestJob_FriendlyCreatedAt(t *testing.T) {
"no spec exists",
&cmd.JobPresenter{
JobResource: presenters.JobResource{
Type: presenters.DirectRequestJobSpec,
Type: presenters.CronJobSpec,
},
},
"N/A",
Expand All @@ -276,8 +252,8 @@ func TestJob_ToRows(t *testing.T) {
JAID: cmd.NewJAID("1"),
JobResource: presenters.JobResource{
Name: "Test Job",
Type: presenters.DirectRequestJobSpec,
DirectRequestSpec: &presenters.DirectRequestSpec{
Type: presenters.CronJobSpec,
CronSpec: &presenters.CronSpec{
CreatedAt: now,
},
PipelineSpec: presenters.PipelineSpec{
Expand All @@ -287,80 +263,18 @@ func TestJob_ToRows(t *testing.T) {
}

assert.Equal(t, [][]string{
{"1", "Test Job", "directrequest", "ds1 http", now.Format(time.RFC3339)},
{"1", "Test Job", "directrequest", "ds1_parse jsonparse", now.Format(time.RFC3339)},
{"1", "Test Job", "directrequest", "ds1_multiply multiply", now.Format(time.RFC3339)},
{"1", "Test Job", "cron", "ds1 http", now.Format(time.RFC3339)},
{"1", "Test Job", "cron", "ds1_parse jsonparse", now.Format(time.RFC3339)},
{"1", "Test Job", "cron", "ds1_multiply multiply", now.Format(time.RFC3339)},
}, job.ToRows())

// Produce a single row even if there is not DAG
job.PipelineSpec.DotDAGSource = ""
assert.Equal(t, [][]string{
{"1", "Test Job", "directrequest", "", now.Format(time.RFC3339)},
{"1", "Test Job", "cron", "", now.Format(time.RFC3339)},
}, job.ToRows())
}

//go:embed direct-request-spec-template.yml
var directRequestSpecTemplate string

func getDirectRequestSpec() string {
return fmt.Sprintf(directRequestSpecTemplate, testutils.FixtureChainID.String(), uuid.New(), uuid.New())
}

func TestShell_ListFindJobs(t *testing.T) {
t.Parallel()

app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) {
c.EVM[0].Enabled = ptr(true)
})
client, r := app.NewShellAndRenderer()

// Create the job
fs := flag.NewFlagSet("", flag.ExitOnError)
flagSetApplyFromAction(client.CreateJob, fs, "")

require.NoError(t, fs.Parse([]string{getDirectRequestSpec()}))

err := client.CreateJob(cli.NewContext(nil, fs, nil))
require.NoError(t, err)
require.Len(t, r.Renders, 1)
createOutput, ok := r.Renders[0].(*cmd.JobPresenter)
require.True(t, ok, "Expected Renders[0] to be *cmd.JobPresenter, got %T", r.Renders[0])

require.NoError(t, client.ListJobs(cltest.EmptyCLIContext()))
jobs := *r.Renders[1].(*cmd.JobPresenters)
require.Len(t, jobs, 1)
assert.Equal(t, createOutput.ID, jobs[0].ID)
}

func TestShell_ShowJob(t *testing.T) {
t.Parallel()

app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) {
c.EVM[0].Enabled = ptr(true)
})
client, r := app.NewShellAndRenderer()

// Create the job
fs := flag.NewFlagSet("", flag.ExitOnError)
flagSetApplyFromAction(client.CreateJob, fs, "")

require.NoError(t, fs.Parse([]string{getDirectRequestSpec()}))

err := client.CreateJob(cli.NewContext(nil, fs, nil))
require.NoError(t, err)
require.Len(t, r.Renders, 1)
createOutput, ok := r.Renders[0].(*cmd.JobPresenter)
require.True(t, ok, "Expected Renders[0] to be *cmd.JobPresenter, got %T", r.Renders[0])

set := flag.NewFlagSet("test", 0)
err = set.Parse([]string{createOutput.ID})
require.NoError(t, err)
c := cli.NewContext(nil, set, nil)

require.NoError(t, client.ShowJob(c))
job := *r.Renders[0].(*cmd.JobPresenter)
assert.Equal(t, createOutput.ID, job.ID)
}

//go:embed ocr-bootstrap-spec.yml
var ocrBootstrapSpec string
Expand Down Expand Up @@ -403,54 +317,6 @@ func TestShell_CreateJobV2(t *testing.T) {
assert.Equal(t, "0x27548a32b9aD5D64c5945EaE9Da5337bc3169D15", output.OffChainReportingSpec.ContractAddress.String())
}

func TestShell_DeleteJob(t *testing.T) {
t.Parallel()

app := startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) {
c.Database.Listener.FallbackPollInterval = commonconfig.MustNewDuration(100 * time.Millisecond)
c.EVM[0].Enabled = ptr(true)
c.EVM[0].NonceAutoSync = ptr(false)
c.EVM[0].BalanceMonitor.Enabled = ptr(false)
c.EVM[0].GasEstimator.Mode = ptr("FixedPrice")
})
client, r := app.NewShellAndRenderer()

// Create the job
fs := flag.NewFlagSet("", flag.ExitOnError)
flagSetApplyFromAction(client.CreateJob, fs, "")

require.NoError(t, fs.Parse([]string{getDirectRequestSpec()}))

err := client.CreateJob(cli.NewContext(nil, fs, nil))
require.NoError(t, err)
require.NotEmpty(t, r.Renders)

output := *r.Renders[0].(*cmd.JobPresenter)

requireJobsCount(t, app.JobORM(), 1)

ctx := testutils.Context(t)
jobs, _, err := app.JobORM().FindJobs(ctx, 0, 1000)
require.NoError(t, err)
jobID := jobs[0].ID
cltest.AwaitJobActive(t, app.JobSpawner(), jobID, 3*time.Second)

// Must supply job id
set := flag.NewFlagSet("test", 0)
flagSetApplyFromAction(client.DeleteJob, set, "")
c := cli.NewContext(nil, set, nil)
require.Equal(t, "must pass the job id to be archived", client.DeleteJob(c).Error())

set = flag.NewFlagSet("test", 0)
flagSetApplyFromAction(client.DeleteJob, set, "")

require.NoError(t, set.Parse([]string{output.ID}))

c = cli.NewContext(nil, set, nil)
require.NoError(t, client.DeleteJob(c))

requireJobsCount(t, app.JobORM(), 0)
}

func requireJobsCount(t *testing.T, orm job.ORM, expected int) {
ctx := testutils.Context(t)
Expand Down
1 change: 0 additions & 1 deletion core/config/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ type AppConfig interface {
Workflows() Workflows
Database() Database
Feature() Feature
FluxMonitor() FluxMonitor
Insecure() Insecure
JobDistributor() JobDistributor
JobPipeline() JobPipeline
Expand Down
7 changes: 4 additions & 3 deletions core/config/docs/core.toml
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,12 @@ DefaultTimeout = '15s' # Default
# MaxSize defines the maximum size for HTTP requests and responses made by `http` and `bridge` adapters.
MaxSize = '32768' # Default

# Deprecated: FluxMonitor job type has been removed. These settings are accepted for backwards-compatible
# config parsing only and have no effect.
[FluxMonitor]
# **ADVANCED**
# DefaultTransactionQueueDepth controls the queue size for `DropOldestStrategy` in Flux Monitor. Set to 0 to use `SendEvery` strategy instead.
# DefaultTransactionQueueDepth **DEPRECATED**: has no effect. The FluxMonitor job type has been removed.
DefaultTransactionQueueDepth = 1 # Default
# SimulateTransactions enables transaction simulation for Flux Monitor.
# SimulateTransactions **DEPRECATED**: has no effect. The FluxMonitor job type has been removed.
SimulateTransactions = false # Default

[OCR2]
Expand Down
6 changes: 0 additions & 6 deletions core/config/flux_monitor_config.go

This file was deleted.

28 changes: 16 additions & 12 deletions core/config/toml/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,16 @@ type Core struct {
RootDir *string
ShutdownGracePeriod *commonconfig.Duration

Feature Feature `toml:",omitempty"`
Database Database `toml:",omitempty"`
TelemetryIngress TelemetryIngress `toml:",omitempty"`
AuditLogger AuditLogger `toml:",omitempty"`
Log Log `toml:",omitempty"`
WebServer WebServer `toml:",omitempty"`
JobDistributor JobDistributor `toml:",omitempty"`
JobPipeline JobPipeline `toml:",omitempty"`
Feature Feature `toml:",omitempty"`
Database Database `toml:",omitempty"`
TelemetryIngress TelemetryIngress `toml:",omitempty"`
AuditLogger AuditLogger `toml:",omitempty"`
Log Log `toml:",omitempty"`
WebServer WebServer `toml:",omitempty"`
JobDistributor JobDistributor `toml:",omitempty"`
JobPipeline JobPipeline `toml:",omitempty"`
// Deprecated: FluxMonitor job type has been removed. This field is retained for
// backwards-compatible config parsing only and has no effect.
FluxMonitor FluxMonitor `toml:",omitempty"`
OCR2 OCR2 `toml:",omitempty"`
OCR OCR `toml:",omitempty"`
Expand Down Expand Up @@ -91,8 +93,8 @@ func (c *Core) SetFrom(f *Core) {

c.WebServer.setFrom(&f.WebServer)
c.JobPipeline.setFrom(&f.JobPipeline)

c.FluxMonitor.setFrom(&f.FluxMonitor)

c.OCR2.setFrom(&f.OCR2)
c.OCR.setFrom(&f.OCR)
c.P2P.setFrom(&f.P2P)
Expand Down Expand Up @@ -1414,17 +1416,19 @@ func (j *JobPipelineHTTPRequest) setFrom(f *JobPipelineHTTPRequest) {
}
}

// FluxMonitor is retained for backwards-compatible TOML parsing only.
// The FluxMonitor job type has been removed and these settings have no effect.
type FluxMonitor struct {
DefaultTransactionQueueDepth *uint32
SimulateTransactions *bool
}

func (m *FluxMonitor) setFrom(f *FluxMonitor) {
func (fm *FluxMonitor) setFrom(f *FluxMonitor) {
if v := f.DefaultTransactionQueueDepth; v != nil {
m.DefaultTransactionQueueDepth = v
fm.DefaultTransactionQueueDepth = v
}
if v := f.SimulateTransactions; v != nil {
m.SimulateTransactions = v
fm.SimulateTransactions = v
}
}

Expand Down
Loading
Loading