-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
TOML config: implement remaining interfaces #7523
Conversation
I see that you haven't updated any CHANGELOG files. Would it make sense to do so? |
3305697
to
68797d2
Compare
- dotted lines indicate implicit interface implementation | ||
- regular w/ dot indicate implementation types | ||
|
||
```mermaid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Was this generated or did you write it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✋ 🖌️
core/config/v2/types.go
Outdated
type Pyroscope struct { | ||
AuthToken *string | ||
//TODO enabled? | ||
AuthToken *string //TODO move to secrets? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vyzaldysanchez @samsondav This should probably be moved to secrets.toml
, no?
55efd4e
to
b5df751
Compare
925218f
to
3097b77
Compare
7a2ffc0
7a2ffc0
to
c987050
Compare
core/web/resolver/node.go
Outdated
@@ -29,7 +29,7 @@ func NewNodes(nodes []types.Node) []*NodeResolver { | |||
|
|||
// ID resolves the node's unique identifier. | |||
func (r *NodeResolver) ID() graphql.ID { | |||
return int32GQLID(r.node.ID) | |||
return graphql.ID(r.node.Name) //TODO change on UI side too? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may require changes in the UI, depending on what's being done there with this value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f20fc66
to
c3b9909
Compare
- added `v2.ChainScoped` to implement `config.ChainScopedConfig` with a `gencfg.BasicConfig` and `v2.EVMConfig` - refactored monolithic `setFrom()` methods to be per-struct - expanded unique name & URL validation cross chains of the same type - updated graphql & node controllers to use `Name` instead of `ID` from database (still unqiue) - added TOML Chain and ChainSet variants - added immutable TOML ORM variants - pull core defaults from docs - test EVM fallback defaults against docs - rename `GeneralOnlyConfig` to `BasicConfig` and move some `GlobalConfig` methods - added standard `ErrUnsupported` error ("unsupported with config v2") - cleaner validation error format
c3b9909
to
204e762
Compare
204e762
to
d241683
Compare
@@ -90,16 +90,23 @@ type ChainScopedOnlyConfig interface { | |||
|
|||
//go:generate mockery --name ChainScopedConfig --output ./mocks/ --case=underscore | |||
type ChainScopedConfig interface { | |||
config.GeneralConfig | |||
config.BasicConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A better name 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't recall if I explained the nuance of this change anywhere, but for posterity: I moved some methods between the two interfaces to align the abstractions with how we were using them. The old sets were intuitive for humans, but this way some uses could be reduced to just one interface or the other. (and we avoid another set of unimplemented/panicing v2 methods)
https://app.shortcut.com/chainlinklabs/story/33615/create-new-implementation-of-chainscopedconfig-generalconfig-interfaces-that-sources-config-from-a-config-toml-file
https://app.shortcut.com/chainlinklabs/story/37975/chains-nodes-should-be-read-from-the-config-interface
BlockBackfillDepth
&BlockBackfillSkip
fallback valuesv2.ChainScoped
to implementconfig.ChainScopedConfig
with agencfg.BasicConfig
andv2.EVMConfig
setFrom()
methods to be per-structName
instead ofID
from database (still unqiue)GeneralOnlyConfig
toBasicConfig
and move someGlobalConfig
methodsErrUnsupported
error ("unsupported with config v2")Configuration Transition
https://github.com/smartcontractkit/chainlink/blob/sc-33615-chain-scoped-config/core/services/chainlink/CONFIG.md
TODO
Expose configv2 endpoint in graphql #7490Audit Logs Rebase #7443// https://app.shortcut.com/chainlinklabs/story/33622/remove-legacy-config
(cannot use proper// Deprecation
yet tag sincestaticcheck
blocks usages)"EvmGasBumpTxDepth should default to EvmMaxInFlightTransactions and may not be set larger than this"to follow-upoperator-ui screenshots
Requires: