Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/6238: Keeper runs #4210

Merged
merged 6 commits into from
Apr 20, 2021
Merged

Feature/6238: Keeper runs #4210

merged 6 commits into from
Apr 20, 2021

Conversation

connorwstein
Copy link
Contributor

@connorwstein connorwstein commented Apr 13, 2021

We want to show runs to indicate progress on the keeper jobs as well as spec errors in the case of the contract not existing at the address specified.

Run:
image

Spec Error:
image

@github-actions
Copy link
Contributor

I see that you haven't updated any CHANGELOG files. Would it make sense to do so?

@connorwstein connorwstein marked this pull request as ready for review April 13, 2021 21:31
jkongie
jkongie previously approved these changes Apr 14, 2021
Copy link
Contributor

@jkongie jkongie left a comment

Choose a reason for hiding this comment

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

LGTM

jkongie
jkongie previously approved these changes Apr 14, 2021
Copy link
Contributor

@spooktheducks spooktheducks left a comment

Choose a reason for hiding this comment

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

Looks good, just a few questions and minor verbiage changes

var runID int64

// Keeper jobs are special in that they do not have a task graph.
if jb.Type == job.Keeper {
Copy link
Contributor

Choose a reason for hiding this comment

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

chainlink.Application#RunJobV2 is only used by the web interface to initiate one-off jobs. Seems inapplicable to Keeper jobs, especially given that there's no TaskDAG of any kind, just an insertion of a DB row. What's the thinking?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its actually not used by the UI at all - @DeividasK added it to help with debugging. I also just used it to be able to create local keeper runs to test. I made the debugging nature of it explicit with the CHAINLINK_DEV check

Copy link
Contributor

@spooktheducks spooktheducks Apr 19, 2021

Choose a reason for hiding this comment

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

Didn't mean the UI specifically. Was thinking-- wouldn't this be useful for the web job type? So probably good to avoid the DEV var

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yeah for sure, when we add the web v2 jobs I'd imagine they could use the same logic. Maybe when that happens we'd want to break out a non-dev function/endpoint though

core/services/pipeline/runner.go Outdated Show resolved Hide resolved
core/services/pipeline/runner.go Outdated Show resolved Hide resolved
@@ -53,6 +57,12 @@ func (d *Delegate) ServicesForSpec(spec job.Job) (services []job.Service, err er
return nil, errors.Wrap(err, "unable to create keeper registry contract wrapper")
}

// Make sure we can read the contract
Copy link
Contributor

Choose a reason for hiding this comment

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

Would this cause the job to fail and stop attempting to execute if the ETH node is inaccessible briefly on startup?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah it would. I was thinking you could just delete and add, but thats not great. I'll move the spec_error creation to the GetConfig call in newRegistryFromChain and make it non-blocking

@@ -266,6 +266,28 @@ func NewConfigWithWSServer(t testing.TB, url string, wsserver *httptest.Server)
return config
}

type JobPipelineV2TestHelper struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably use this pattern more in our tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. I think it'll just be a slow migration

core/services/chainlink/application.go Outdated Show resolved Hide resolved
core/services/keeper/orm.go Show resolved Hide resolved
core/services/keeper/upkeep_executer.go Show resolved Hide resolved
if err != nil {
return errors.Wrap(err, "transmitter failed to get RowsAffected on eth_tx insert")
if etx.ID == 0 {
return etx, errors.New("a keeper eth_tx with insufficient eth is present, not creating a new eth_tx")
Copy link
Contributor

Choose a reason for hiding this comment

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

It's actually any tx with insufficient eth, but this message is probably ok.

@connorwstein connorwstein merged commit 018b025 into develop Apr 20, 2021
@connorwstein connorwstein deleted the feature/6238-keeper-runs branch April 20, 2021 00:17
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.

None yet

4 participants