ConduitIO / ConduitIO/conduit

Allow partial updates in the API

Open
#1,940 1 comment 1 reaction 0 assignees View on GitHub
feature
Dominant language
Go
Stars
610
Forks
63
Avg merge
12h 28m
Merged PRs (30d)
57

Description

### Feature description

Currently, our APIs mostly allow full updates only in the sense that, if certain properties are mutable, then the update request updates all of them. One example is the UpdateProcessorRequest:

```proto
message Config {
map settings = 1;
int32 workers = 2;
}

message UpdateProcessorRequest {
string id = 1;
Processor.Config config = 2;
}
```

In the processor service, the whole config is then replaced:

```go
instance.Config = cfg
```

[Link](https://github.com/ConduitIO/conduit/blob/main/pkg/processor/service.go#L175)

This implies that, if a client wants to update just the workers (for example), it first needs to first fetch the existing settings, set the new workers count, and then send the update request. We have similar examples in other APIs (pipelines, connectors).

To make the API more convenient to use, it would be good to allow partial updates that allow only certain parts of a configuration to be updated.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.