Skip to content

Commit

Permalink
Merge branch 'develop' into BCF-3139-chreader-lp-filter-config
Browse files Browse the repository at this point in the history
  • Loading branch information
ilija42 authored Jun 14, 2024
2 parents 1404497 + 90924dc commit 1b51a25
Show file tree
Hide file tree
Showing 24 changed files with 256 additions and 293 deletions.
5 changes: 5 additions & 0 deletions .changeset/thick-moles-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#internal moves workflow name and owner to the yaml spec
40 changes: 32 additions & 8 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,37 @@
<!--- Does this work have a corresponding ticket? -->
## Ticket
<!---
Does this work have a corresponding ticket?
https://smartcontract-it.atlassian.net/browse/...
Please link your Jira ticket by including it in one of the following reference:
- the PR title
- branch name
- commit message
By referencing it, it will let the QA team to know what to watch out for when creating a new release.
<!--- Does this work depend on other open PRs? -->
Example:
Requires:
- https://github.com/smartcontractkit/chainlink-common/pull/123456
[LINK-777](https://smartcontract-it.atlassian.net/browse/LINK-777)
-->

<!--- Does this work support other open PRs? -->
## Requires Dependencies
<!---
Does this work depend on other open PRs?
Supports:
- https://github.com/smartcontractkit/ccip/pull/456789
Please list other PRs that are blocking this PR.
Example:
- https://github.com/smartcontractkit/chainlink-common/pull/7777777
-->

## Resolves Dependencies
<!---
Does this work support other open PRs?
Please list other PRs that are waiting for this PR to be merged.
Example:
- https://github.com/smartcontractkit/ccip/pull/7777777
-->
5 changes: 5 additions & 0 deletions .github/scripts/jira/update-jira-issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ async function run() {
core.notice(
"No JIRA issue number found in: PR title, commit message, or branch name. Please include the issue ID in one of these."
);
core.setOutput(
"jiraComment",
"> :medal_military: No JIRA issue number found - Please include it in the PR title or in a commit message."
);
return;
}
const fixVersionName = `chainlink-v${chainlinkVersion}`;
Expand All @@ -105,6 +109,7 @@ async function run() {
tags,
fixVersionName
);
core.setOutput("jiraComment", "");
} catch (error) {
core.setFailed(error.message);
}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update Jira ticket for core
id: jira
if: ${{ steps.files-changed.outputs.core == 'true' || steps.files-changed.outputs.shared == 'true' }}
shell: bash
working-directory: ./.github/scripts/jira
Expand All @@ -108,10 +109,12 @@ jobs:
if: ${{ steps.files-changed.outputs.core == 'true' || steps.files-changed.outputs.shared == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JIRA_COMMENT: ${{ steps.jira.outputs.jiraComment }}
with:
message: |
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:
${{ env.TAGS }}
${{ env.JIRA_COMMENT }}
reactions: eyes
comment_tag: changeset-core
mode: ${{ steps.files-changed.outputs.core-changeset == 'false' && 'upsert' || 'delete' }}
Expand Down Expand Up @@ -149,10 +152,12 @@ jobs:
if: ${{ steps.files-changed.outputs.core-changeset == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JIRA_COMMENT: ${{ steps.jira.outputs.jiraComment }}
with:
message: |
I see you added a changeset file but it does not contain a tag. Please edit the text include at least one of the following tags:
${{ env.TAGS }}
${{ env.JIRA_COMMENT }}
reactions: eyes
comment_tag: changeset-core-tags
mode: ${{ steps.changeset-tags.outputs.has_tags == 'false' && 'upsert' || 'delete' }}
Expand Down
2 changes: 1 addition & 1 deletion core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/prometheus/client_golang v1.17.0
github.com/shopspring/decimal v1.3.1
github.com/smartcontractkit/chainlink-automation v1.0.4
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240612013352-4fe4a2e2ed0f
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240613201342-a855825f87bb
github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c
Expand Down
4 changes: 2 additions & 2 deletions core/scripts/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1212,8 +1212,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq
github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE=
github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8=
github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240612013352-4fe4a2e2ed0f h1:MfEG+nDHibAFFF1iirnF849YJT8ne+adVEf8p2fVze8=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240612013352-4fe4a2e2ed0f/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240613201342-a855825f87bb h1:R4OkRLPz6mZm8k7JFfLpQ9Ib/e1n1qcxg+hVxc0pKOk=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240613201342-a855825f87bb/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo=
Expand Down
2 changes: 1 addition & 1 deletion core/services/feeds/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@ func (s *service) generateJob(ctx context.Context, spec string) (*job.Job, error
case job.FluxMonitor:
js, err = fluxmonitorv2.ValidatedFluxMonitorSpec(s.jobCfg, spec)
case job.Workflow:
js, err = workflows.ValidatedWorkflowSpec(spec)
js, err = workflows.ValidatedWorkflowJobSpec(spec)
default:
return nil, errors.Errorf("unknown job type: %s", jobType)
}
Expand Down
56 changes: 19 additions & 37 deletions core/services/feeds/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -652,45 +652,15 @@ func Test_Service_ProposeJob(t *testing.T) {
httpTimeout = *commonconfig.MustNewDuration(1 * time.Second)

// variables for workflow spec
wfID = "15c631d295ef5e32deb99a10ee6804bc4af1385568f9b3363f6552ac6dbb2cef"
wfOwner = "00000000000000000000000000000000000000aa"
wfName = "myworkflow" // len 10
specYaml = `
triggers:
- id: "[email protected]"
config: {}
actions:
- id: "[email protected]"
ref: "an-action"
config: {}
inputs:
trigger_output: $(trigger.outputs)
consensus:
- id: "[email protected]"
ref: "a-consensus"
config: {}
inputs:
trigger_output: $(trigger.outputs)
an-action_output: $(an-action.outputs)
targets:
- id: "[email protected]"
config: {}
ref: "a-target"
inputs:
consensus_output: $(a-consensus.outputs)
`
wfSpec = testspecs.GenerateWorkflowSpec(wfID, wfOwner, wfName, specYaml).Toml()
wfJobSpec = testspecs.DefaultWorkflowJobSpec(t)
proposalIDWF = int64(11)
jobProposalSpecIdWF = int64(101)
jobIDWF = int32(1001)
remoteUUIDWF = uuid.New()
argsWF = &feeds.ProposeJobArgs{
FeedsManagerID: 1,
RemoteUUID: remoteUUIDWF,
Spec: wfSpec,
Spec: wfJobSpec.Toml(),
Version: 1,
}
jpWF = feeds.JobProposal{
Expand All @@ -707,14 +677,14 @@ targets:
Status: feeds.JobProposalStatusPending,
}
proposalSpecWF = feeds.JobProposalSpec{
Definition: wfSpec,
Definition: wfJobSpec.Toml(),
Status: feeds.SpecStatusPending,
Version: 1,
JobProposalID: proposalIDWF,
}
autoApprovableProposalSpecWF = feeds.JobProposalSpec{
ID: jobProposalSpecIdWF,
Definition: wfSpec,
Definition: wfJobSpec.Toml(),
Status: feeds.SpecStatusPending,
Version: 1,
JobProposalID: proposalIDWF,
Expand Down Expand Up @@ -755,7 +725,11 @@ targets:
mock.Anything,
mock.Anything,
mock.MatchedBy(func(j *job.Job) bool {
return j.WorkflowSpec.WorkflowOwner == wfOwner
match := j.WorkflowSpec.Workflow == wfJobSpec.Job().WorkflowSpec.Workflow
if !match {
t.Logf("got wf spec %s want %s", j.WorkflowSpec.Workflow, wfJobSpec.Job().WorkflowSpec.Workflow)
}
return match
}),
).
Run(func(args mock.Arguments) { (args.Get(2).(*job.Job)).ID = 1 }).
Expand Down Expand Up @@ -807,7 +781,11 @@ targets:
mock.Anything,
mock.Anything,
mock.MatchedBy(func(j *job.Job) bool {
return j.WorkflowSpec.WorkflowOwner == wfOwner
match := j.WorkflowSpec.Workflow == wfJobSpec.Job().WorkflowSpec.Workflow
if !match {
t.Logf("got wf spec %s want %s", j.WorkflowSpec.Workflow, wfJobSpec.Job().WorkflowSpec.Workflow)
}
return match
}),
).
Run(func(args mock.Arguments) { (args.Get(2).(*job.Job)).ID = 1 }).
Expand Down Expand Up @@ -855,7 +833,11 @@ targets:
mock.Anything,
mock.Anything,
mock.MatchedBy(func(j *job.Job) bool {
return j.WorkflowSpec.WorkflowOwner == wfOwner
match := j.WorkflowSpec.Workflow == wfJobSpec.Job().WorkflowSpec.Workflow
if !match {
t.Logf("got wf spec %s want %s", j.WorkflowSpec.Workflow, wfJobSpec.Job().WorkflowSpec.Workflow)
}
return match
}),
).
Run(func(args mock.Arguments) { (args.Get(2).(*job.Job)).ID = 1 }).
Expand Down
Loading

0 comments on commit 1b51a25

Please sign in to comment.