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

[BCI-3862][chainlink-common] - Change DSL Block primitive to string instead of int #683

Closed
wants to merge 6 commits into from
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ jobs:
- name: Ensure "make gomodtidy" has been run
run: |
make gomodtidy
git diff --exit-code
git diff --minimal --exit-code
- name: Ensure "make generate" has been run
run: |
make rm-mocked
make generate
git diff --exit-code
git diff --stat --exit-code
16 changes: 9 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
.PHONY: gomods
gomods: ## Install gomods
go install github.com/jmank88/[email protected]

.PHONY: gomodtidy
gomodtidy:
go mod tidy
gomodtidy: gomods
gomods tidy

.PHONY: docs
docs:
Expand All @@ -22,11 +26,9 @@ rm-mocked:
grep -rl "^// Code generated by mockery" | grep .go$ | xargs -r rm

.PHONY: generate
generate: mockery install-protoc
# add our installed protoc to the head of the PATH
# maybe there is a cleaner way to do this
PATH=$$HOME/.local/bin:$$PATH go generate -x ./...; \
mockery
generate: mockery install-protoc gomods
gomods -w go generate -x ./...
mockery

.PHONY: lint-workspace lint
GOLANGCI_LINT_VERSION := 1.55.2
Expand Down
2 changes: 0 additions & 2 deletions observability-lib/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
Expand Down
7 changes: 6 additions & 1 deletion pkg/capabilities/capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,10 @@ type RemoteTriggerConfig struct {
MessageExpiry time.Duration
}

type RemoteTargetConfig struct {
RequestHashExcludedAttributes []string
}

// NOTE: consider splitting this config into values stored in Registry (KS-118)
// and values defined locally by Capability owners.
func (c *RemoteTriggerConfig) ApplyDefaults() {
Expand All @@ -414,5 +418,6 @@ func (c *RemoteTriggerConfig) ApplyDefaults() {

type CapabilityConfiguration struct {
DefaultConfig *values.Map
RemoteTriggerConfig RemoteTriggerConfig
RemoteTriggerConfig *RemoteTriggerConfig
RemoteTargetConfig *RemoteTargetConfig
}
158 changes: 124 additions & 34 deletions pkg/capabilities/pb/registry.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions pkg/capabilities/pb/registry.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,19 @@ message RemoteTriggerConfig {
google.protobuf.Duration messageExpiry = 4;
}

message RemoteTargetConfig {
// A collection of dot seperated paths to attributes that should be excluded from the request sent to the remote target
// when calculating the hash of the request. This is useful for excluding attributes that are not deterministic to ensure
// that the hash of logically identical requests is consistent.
repeated string requestHashExcludedAttributes = 1;
}

message CapabilityConfig {
values.Map default_config = 1;

oneof remote_config {
RemoteTriggerConfig remote_trigger_config = 2;
RemoteTargetConfig remote_target_config = 3;
}
}

Loading
Loading