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

Support multiple inheritance for doc generation #406

Merged
merged 41 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
62bfb03
Refactor workaround for setting Helm app `nameOverride`
disrupted Jan 2, 2024
55089be
Update snapshot assertions
disrupted Jan 2, 2024
8d9bb60
Use consistent naming for app values
disrupted Jan 2, 2024
934e4ed
Rename fixture
disrupted Jan 2, 2024
1c4e313
Refactor
disrupted Jan 2, 2024
2309a7b
Rename
disrupted Jan 2, 2024
7c8ff89
Merge remote-tracking branch 'origin/v3' into refactor/helm-nameoverride
disrupted Jan 2, 2024
f67a23f
Refactor streams-bootstrap cleanup
disrupted Jan 2, 2024
0578cb0
Update tests
disrupted Jan 2, 2024
44195e7
Inherit from common streams-bootstrap app
disrupted Jan 2, 2024
a2a8418
Remove desc
disrupted Jan 2, 2024
3457d1f
Fix failing hooks
disrupted Jan 2, 2024
6ac39da
Merge remote-tracking branch 'origin/v3' into refactor/streams-bootst…
disrupted Jan 2, 2024
a725f03
Cosmetic
disrupted Jan 2, 2024
26ac7f9
Cosmetic
disrupted Jan 2, 2024
b193c03
Rename run to clean
disrupted Jan 2, 2024
9d27adc
Fix returned object type
disrupted Jan 3, 2024
c517a3b
Add pydocs and todo
disrupted Jan 3, 2024
11dcc1e
Create streams-bootstrap base for all components based on its Helm
disrupted Jan 3, 2024
d9786dd
Cleanup KPOps components import
disrupted Jan 3, 2024
a49b551
Fix inheritance order of streams-boostrap apps
disrupted Jan 3, 2024
2e2c7ba
Update components hierarchy diagram
disrupted Jan 3, 2024
02c0ef7
Fix docs
disrupted Jan 4, 2024
70cf1f3
Merge branch 'v3' into refactor/streams-bootstrap-cleanup
disrupted Jan 8, 2024
83ac398
Update defaults schema
disrupted Jan 8, 2024
45c58d8
Add docs for streams-bootstrap
disrupted Jan 8, 2024
7c92421
Add docs for streams-bootstrap
disrupted Jan 8, 2024
18cece3
refactor: extract function to utils
sujuka99 Jan 9, 2024
d9808f8
refactor: enable multiple inheritance for doc gen
sujuka99 Jan 10, 2024
87c24de
style: add TODO
sujuka99 Jan 10, 2024
372a0e5
refactor: Use mro to collect parents
sujuka99 Jan 10, 2024
a83d607
style: improve naming
sujuka99 Jan 10, 2024
34584cb
refactor: allow issubclass to take second arg
sujuka99 Jan 10, 2024
c601fa4
refactor: move parents logic to PipelineComponent,
sujuka99 Jan 10, 2024
358f843
fix: import exception
sujuka99 Jan 10, 2024
2f2d61b
refactor: get parents returns list of classes
sujuka99 Jan 11, 2024
d54e7d1
Refactor parents method as classproperty & remove self
disrupted Jan 11, 2024
6e6f625
Merge remote-tracking branch 'origin/v3' into ci/support-multiple-inh…
sujuka99 Jan 11, 2024
26e6893
Merge branch 'ci/support-multiple-inheritance' of github.com:bakdata/…
sujuka99 Jan 11, 2024
e27b6fb
copy-paste from backup branch
sujuka99 Jan 11, 2024
ef9f3fd
run pre-commit
sujuka99 Jan 11, 2024
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
6 changes: 5 additions & 1 deletion docs/docs/resources/architecture/components-hierarchy.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
```mermaid
flowchart BT
KubernetesApp --> PipelineComponent
KafkaApp --> PipelineComponent
HelmApp --> KubernetesApp
KafkaApp --> HelmApp
StreamsBootstrap --> HelmApp
StreamsApp --> KafkaApp
StreamsApp --> StreamsBootstrap
ProducerApp --> KafkaApp
ProducerApp --> StreamsBootstrap
KafkaConnector --> PipelineComponent
KafkaSourceConnector --> KafkaConnector
KafkaSinkConnector --> KafkaConnector

click KubernetesApp "/kpops/user/core-concepts/components/kubernetes-app"
click HelmApp "/kpops/user/core-concepts/components/helm-app"
click KafkaApp "/kpops/user/core-concepts/components/kafka-app"
click StreamsBootstrap "/kpops/user/core-concepts/components/streams-bootstrap"
click StreamsApp "/kpops/user/core-concepts/components/streams-app"
click ProducerApp "/kpops/user/core-concepts/components/producer-app"
click KafkaConnector "/kpops/user/core-concepts/components/kafka-connector"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ helm-app.yaml:
- app-helm-app.yaml
- repo_config-helm-app.yaml
kafka-app.yaml:
- prefix.yaml
- from_.yaml
- to.yaml
- app-kafka-app.yaml
- version-kafka-app.yaml
kafka-connector.yaml:
- prefix.yaml
- from_.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ kpops_components_fields:
- prefix
- from_
- to
- namespace
- app
- repo_config
- version
kafka-connector:
- name
- prefix
Expand Down Expand Up @@ -78,13 +75,35 @@ kpops_components_fields:
- app
- repo_config
- version
streams-bootstrap:
- name
- prefix
- from_
- to
- namespace
- app
- repo_config
- version
kpops_components_inheritance_ref:
helm-app: kubernetes-app
kafka-app: helm-app
kafka-connector: pipeline-component
kafka-sink-connector: kafka-connector
kafka-source-connector: kafka-connector
kubernetes-app: pipeline-component
pipeline-component: base-defaults-component
producer-app: kafka-app
streams-app: kafka-app
helm-app:
- kubernetes-app
kafka-app:
- pipeline-component
kafka-connector:
- pipeline-component
kafka-sink-connector:
- kafka-connector
kafka-source-connector:
- kafka-connector
kubernetes-app:
- pipeline-component
pipeline-component:
- base-defaults-component
producer-app:
- kafka-app
- streams-bootstrap
streams-app:
- kafka-app
- streams-bootstrap
streams-bootstrap:
- helm-app
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ kafka-app.yaml:
- prefix.yaml
- from_.yaml
- to.yaml
- namespace.yaml
- app-kafka-app.yaml
- repo_config-helm-app.yaml
- version-kafka-app.yaml
kafka-connector.yaml:
- prefix.yaml
- from_.yaml
Expand Down Expand Up @@ -54,13 +51,11 @@ producer-app.yaml:
- to.yaml
- namespace.yaml
- app-producer-app.yaml
- repo_config-helm-app.yaml
- version-kafka-app.yaml
streams-app.yaml:
- prefix.yaml
- from_.yaml
- to.yaml
- namespace.yaml
- app-streams-app.yaml
- repo_config-helm-app.yaml
- version-kafka-app.yaml
12 changes: 0 additions & 12 deletions docs/docs/resources/pipeline-components/kafka-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
cleanup.policy: compact
models: # SchemaProvider is initiated with the values given here
model: model
namespace: namespace # required
# `app` can contain application-specific settings, hence the user is free to
# add the key-value pairs they need.
app: # required
Expand All @@ -53,14 +52,3 @@
schemaRegistryUrl: ${schema_registry_url}
nameOverride: override-with-this-name # kafka-app-specific
imageTag: "1.0.0" # Example values that are shared between streams-app and producer-app
# Helm repository configuration (optional)
# If not set the helm repo add will not be called. Useful when using local Helm charts
repo_config:
repository_name: bakdata-streams-bootstrap # required
url: https://bakdata.github.io/streams-bootstrap/ # required
repo_auth_flags:
username: user
password: pass
ca_file: /home/user/path/to/ca-file
insecure_skip_tls_verify: false
version: "2.12.0" # Helm chart version
32 changes: 0 additions & 32 deletions docs/docs/resources/pipeline-components/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
cleanup.policy: compact
models: # SchemaProvider is initiated with the values given here
model: model
namespace: namespace # required
# `app` can contain application-specific settings, hence the user is free to
# add the key-value pairs they need.
app: # required
Expand All @@ -116,17 +115,6 @@
schemaRegistryUrl: ${schema_registry_url}
nameOverride: override-with-this-name # kafka-app-specific
imageTag: "1.0.0" # Example values that are shared between streams-app and producer-app
# Helm repository configuration (optional)
# If not set the helm repo add will not be called. Useful when using local Helm charts
repo_config:
repository_name: bakdata-streams-bootstrap # required
url: https://bakdata.github.io/streams-bootstrap/ # required
repo_auth_flags:
username: user
password: pass
ca_file: /home/user/path/to/ca-file
insecure_skip_tls_verify: false
version: "2.12.0" # Helm chart version
# Kafka sink connector
- type: kafka-sink-connector
name: kafka-sink-connector # required
Expand Down Expand Up @@ -334,16 +322,6 @@
output_role1: output_topic1
output_role2: output_topic2
nameOverride: override-with-this-name # kafka-app-specific
# Helm repository configuration (optional)
# If not set the helm repo add will not be called. Useful when using local Helm charts
repo_config:
repository_name: bakdata-streams-bootstrap # required
url: https://bakdata.github.io/streams-bootstrap/ # required
repo_auth_flags:
username: user
password: pass
ca_file: /home/user/path/to/ca-file
insecure_skip_tls_verify: false
version: "2.12.0" # Helm chart version
# StreamsApp component that configures a streams bootstrap app.
# More documentation on StreamsApp: https://github.com/bakdata/streams-bootstrap
Expand Down Expand Up @@ -448,14 +426,4 @@
topics: # List of auto-generated Kafka Streams topics used by the streams app.
- topic1
- topic2
# Helm repository configuration (optional)
# If not set the helm repo add will not be called. Useful when using local Helm charts
repo_config:
repository_name: bakdata-streams-bootstrap # required
url: https://bakdata.github.io/streams-bootstrap/ # required
repo_auth_flags:
username: user
password: pass
ca_file: /home/user/path/to/ca-file
insecure_skip_tls_verify: false
version: "2.12.0" # Helm chart version
10 changes: 0 additions & 10 deletions docs/docs/resources/pipeline-components/producer-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,4 @@
output_role1: output_topic1
output_role2: output_topic2
nameOverride: override-with-this-name # kafka-app-specific
# Helm repository configuration (optional)
# If not set the helm repo add will not be called. Useful when using local Helm charts
repo_config:
repository_name: bakdata-streams-bootstrap # required
url: https://bakdata.github.io/streams-bootstrap/ # required
repo_auth_flags:
username: user
password: pass
ca_file: /home/user/path/to/ca-file
insecure_skip_tls_verify: false
version: "2.12.0" # Helm chart version
10 changes: 0 additions & 10 deletions docs/docs/resources/pipeline-components/streams-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,4 @@
topics: # List of auto-generated Kafka Streams topics used by the streams app.
- topic1
- topic2
# Helm repository configuration (optional)
# If not set the helm repo add will not be called. Useful when using local Helm charts
repo_config:
repository_name: bakdata-streams-bootstrap # required
url: https://bakdata.github.io/streams-bootstrap/ # required
repo_auth_flags:
username: user
password: pass
ca_file: /home/user/path/to/ca-file
insecure_skip_tls_verify: false
version: "2.12.0" # Helm chart version
43 changes: 42 additions & 1 deletion docs/docs/resources/pipeline-defaults/defaults-kafka-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,48 @@
# Parent of: ProducerApp, StreamsApp
# Child of: KubernetesApp
kafka-app:
# Pipeline prefix that will prefix every component name. If you wish to not
# have any prefix you can specify an empty string.
prefix: ${pipeline_name}-
from: # Must not be null
topics: # read from topic
${pipeline_name}-input-topic:
type: input # Implied when role is NOT specified
${pipeline_name}-extra-topic:
role: topic-role # Implies `type` to be extra
${pipeline_name}-input-pattern-topic:
type: pattern # Implied to be an input pattern if `role` is undefined
${pipeline_name}-extra-pattern-topic:
type: pattern # Implied to be an extra pattern if `role` is defined
role: some-role
components: # read from specific component
account-producer:
type: output # Implied when role is NOT specified
other-producer:
role: some-role # Implies `type` to be extra
component-as-input-pattern:
type: pattern # Implied to be an input pattern if `role` is undefined
component-as-extra-pattern:
type: pattern # Implied to be an extra pattern if `role` is defined
role: some-role
# Topic(s) into which the component will write output
to:
topics:
${pipeline_name}-output-topic:
type: output # Implied when role is NOT specified
${pipeline_name}-extra-topic:
role: topic-role # Implies `type` to be extra; Will throw an error if `type` is defined
${pipeline_name}-error-topic:
type: error
# Currently KPOps supports Avro and JSON schemas.
key_schema: key-schema # must implement SchemaProvider to use
value_schema: value-schema
partitions_count: 1
replication_factor: 1
configs: # https://kafka.apache.org/documentation/#topicconfigs
cleanup.policy: compact
models: # SchemaProvider is initiated with the values given here
model: model
# `app` can contain application-specific settings, hence the user is free to
# add the key-value pairs they need.
app: # required
Expand All @@ -11,4 +53,3 @@ kafka-app:
schemaRegistryUrl: ${schema_registry_url}
nameOverride: override-with-this-name # kafka-app-specific
imageTag: "1.0.0" # Example values that are shared between streams-app and producer-app
version: "2.12.0" # Helm chart version
43 changes: 42 additions & 1 deletion docs/docs/resources/pipeline-defaults/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,48 @@ helm-app:
# Parent of: ProducerApp, StreamsApp
# Child of: KubernetesApp
kafka-app:
# Pipeline prefix that will prefix every component name. If you wish to not
# have any prefix you can specify an empty string.
prefix: ${pipeline_name}-
from: # Must not be null
topics: # read from topic
${pipeline_name}-input-topic:
type: input # Implied when role is NOT specified
${pipeline_name}-extra-topic:
role: topic-role # Implies `type` to be extra
${pipeline_name}-input-pattern-topic:
type: pattern # Implied to be an input pattern if `role` is undefined
${pipeline_name}-extra-pattern-topic:
type: pattern # Implied to be an extra pattern if `role` is defined
role: some-role
components: # read from specific component
account-producer:
type: output # Implied when role is NOT specified
other-producer:
role: some-role # Implies `type` to be extra
component-as-input-pattern:
type: pattern # Implied to be an input pattern if `role` is undefined
component-as-extra-pattern:
type: pattern # Implied to be an extra pattern if `role` is defined
role: some-role
# Topic(s) into which the component will write output
to:
topics:
${pipeline_name}-output-topic:
type: output # Implied when role is NOT specified
${pipeline_name}-extra-topic:
role: topic-role # Implies `type` to be extra; Will throw an error if `type` is defined
${pipeline_name}-error-topic:
type: error
# Currently KPOps supports Avro and JSON schemas.
key_schema: key-schema # must implement SchemaProvider to use
value_schema: value-schema
partitions_count: 1
replication_factor: 1
configs: # https://kafka.apache.org/documentation/#topicconfigs
cleanup.policy: compact
models: # SchemaProvider is initiated with the values given here
model: model
# `app` can contain application-specific settings, hence the user is free to
# add the key-value pairs they need.
app: # required
Expand All @@ -32,7 +74,6 @@ kafka-app:
schemaRegistryUrl: ${schema_registry_url}
nameOverride: override-with-this-name # kafka-app-specific
imageTag: "1.0.0" # Example values that are shared between streams-app and producer-app
version: "2.12.0" # Helm chart version
# Kafka connector
#
# Parent of: KafkaSinkConnector, KafkaSourceConnector
Expand Down
Loading
Loading