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

Change the way create event-contract works #33

Closed
trietsch opened this issue Aug 10, 2021 · 0 comments · Fixed by #40
Closed

Change the way create event-contract works #33

trietsch opened this issue Aug 10, 2021 · 0 comments · Fixed by #40

Comments

@trietsch
Copy link
Contributor

trietsch commented Aug 10, 2021

As the create event-contract command is quite confusing (since it expects a json representation of the proto message for EventContract, without a wrapping eventContract), let's change the command to work as follows:

strm create event-contract "bla/example/1.3.0" --schema-ref "streammachine/demo/1.0.2" --public --definition-file /path/to/definition.json

--schema-ref and --definition-file are mandatory. --public is a bool flag to make the contract public or not. The definition.json is a JSON file (maybe also support YAML? Or the ability to read from stdin?) containing the following:

{
    "keyField": "consistentValue",
    "piiFields": {
        "consistentValue": 2,
        "someSensitiveValue": 3,
        "uniqueIdentifier": 1
    },
    "validations": [
        {
            "field": "consistentValue",
            "type": "regex",
            "value": "^.+$"
        }
    ]
}

This way, we split versioning logic and a link to the actual schema (which is metadata in this case), from the actual content (the definition).

@trietsch trietsch changed the title Change the way the create event-contract works Change the way create event-contract works Aug 10, 2021
trietsch added a commit that referenced this issue Aug 16, 2021
…i flags and a definition

This splits the meta information (i.e. ref of the contract, whether it's public) from the actual
content of the contract (keyField, piiFields, validations)

ref #33
trietsch added a commit that referenced this issue Aug 18, 2021
…i flags and a definition (#40)

This splits the meta information (i.e. ref of the contract, whether it's public) from the actual
content of the contract (keyField, piiFields, validations)

ref #33
github-actions bot pushed a commit that referenced this issue Aug 18, 2021
# [1.5.0](v1.4.0...v1.5.0) (2021-08-18)

### Features

* **event-contract:** create event contract now partially asks for cli flags and a definition ([#40](#40)) ([ee06c74](ee06c74)), closes [#33](#33)
github-actions bot pushed a commit that referenced this issue Aug 18, 2021
# [1.6.0](v1.5.0...v1.6.0) (2021-08-18)

### Features

* **batch-exporters:** implement plain, table, json, json-raw printers for batch-exporters ([1a8ebc0](1a8ebc0))
* **event-contract:** create event contract now partially asks for cli flags and a definition ([dfa0d74](dfa0d74)), closes [#33](#33)
* **event-contracts:** implement plain, table, json, json-raw printers for event-contracts ([8f5931f](8f5931f))
* **kafka-clusters:** implement plain, table, json, json-raw printers for kafka-clusters ([6dbe06e](6dbe06e))
* **kafka-exporters:** implement plain, table, json, json-raw printers for kafka-exporters ([04ee444](04ee444))
* **kafka-users:** implement plain, table, json, json-raw printers for kafka-users ([fa6473e](fa6473e))
* **key-streams:** implement plain, table, json, json-raw printers for key-streams ([e8efd41](e8efd41))
* **printers:** added interface for printers; implemented list streams printer ([39b183a](39b183a)), closes [#14](#14)
* **schemas:** implement plain, table, json, json-raw printers for schemas ([f205174](f205174))
* **sinks:** implement plain, table, json, json-raw printers for sinks ([6dc2c77](6dc2c77))
* **streams:** implement plain, table, json, json-raw printers for streams ([7d10c42](7d10c42))
* **usage:** added missing column in usage csv ([4af404d](4af404d))
* **usage:** implement csv, json, json-raw printers for usage ([6e96b2e](6e96b2e))
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 a pull request may close this issue.

1 participant