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

Move types into chainlink-common for LOOPP #299

Merged
merged 6 commits into from
Jan 18, 2024
Merged

Conversation

ferglor
Copy link
Collaborator

@ferglor ferglor commented Dec 20, 2023

The services created in core will need to come from the new AutomationProvider, as defined in chainlink-common

These services reference types from this repo; rather than make chainlink-common dependent on chainlink-automation, we need to instead move the automation types into the chainlink-common repo

Associated PRs

chainlink: smartcontractkit/chainlink#11631
chainlink-common: smartcontractkit/chainlink-common#297

github.com/jedib0t/go-pretty/v6 v6.4.7
github.com/pkg/errors v0.9.1
github.com/shopspring/decimal v1.3.1
github.com/smartcontractkit/libocr v0.0.0-20230922131214-122accb19ea6
github.com/smartcontractkit/libocr v0.0.0-20230925165524-ffa38fe11ef8
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

libocr is being bumped here as a consequence of adding chainlink-common as a dependency. The only difference in this version of libocr and the previous version, is an update to the README.md.

Copy link
Collaborator

Choose a reason for hiding this comment

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

is this the libocr version also used in chainlink-core?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, core uses a newer version

// OfInt should return n out of x such that n/x ~ r (ratio)
OfInt(int) int
}
//go:generate mockery --name Ratio --structname MockRatio --srcpkg "github.com/smartcontractkit/chainlink-common/pkg/types/automation" --case underscore --filename ratio.generated.go
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We're moving the type definitions into common, but automation cares about the mocks, so we're keeping the mocks in this repo (by referencing the chainlink-common package in the generate command)

@ferglor ferglor requested a review from amirylm January 11, 2024 16:23
EasterTheBunny
EasterTheBunny previously approved these changes Jan 11, 2024
cmalec
cmalec previously approved these changes Jan 11, 2024
@ferglor ferglor dismissed stale reviews from cmalec and EasterTheBunny via aeb6a41 January 12, 2024 19:02
@ferglor ferglor force-pushed the feature/AUTO-7266-loopp branch 3 times, most recently from d58b805 to 84658ba Compare January 13, 2024 01:51
pkg/v3/plugin/ocr3_test.go Outdated Show resolved Hide resolved
pkg/v3/plugin/plugin.go Outdated Show resolved Hide resolved
@infiloop2
Copy link
Collaborator

infiloop2 commented Jan 15, 2024

This change will make any automation type change a 3-repo dependency. While that might be needed, it would be good to have an overall design doc to understand the end vision for loops and what components will live where

@ferglor ferglor force-pushed the feature/AUTO-7266-loopp branch from 6c5aba2 to 98894cb Compare January 15, 2024 16:08
Update mock

Update mocks

bump
Use mockery v2.28.1

Move some types back into automation, regenerate mocks

Fix tests

Update imports

Generate

Update imports

Fix go version

Bump to go 1.21

Clean up import aliases
@ferglor ferglor force-pushed the feature/AUTO-7266-loopp branch from 98894cb to f6cbafc Compare January 16, 2024 13:27
@ferglor ferglor requested review from amirylm and EasterTheBunny and removed request for EasterTheBunny and amirylm January 17, 2024 12:43
amirylm
amirylm previously approved these changes Jan 17, 2024
@ferglor ferglor merged commit 1ab6a88 into main Jan 18, 2024
7 checks passed
@ferglor ferglor deleted the feature/AUTO-7266-loopp branch January 18, 2024 01:46
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.

6 participants