Skip to content

Commit d8bb4c5

Browse files
authored
feat!: Release v1.0.0 (#133)
* refactor!: modBase64 * refactor!: modAWSLambda * refactor!: modAWSDynamoDB * refactor: metaSwitch * refactor: metaPlugin * refactor!: metaPipeline * refactor!: metaForEach * refactor!: Messages * refactor!: Object Transforms * refactor!: Array Transforms * refactor!: Strings Transforms * refactor!: Time Transforms * refactor!: Number Transforms * test: Time Tests * fix!: newObjToInt * refactor: Send Transforms * refactor!: Format Transforms * refactor!: PP Transform * refactor!: Compression Transforms * refactor!: Enrichment Transforms * refactor!: External Transforms * refactor!: Hash Transforms * refactor!: Aggregate Transforms * refactor: Transform Variables * fix: newSendAWSSQS * refactor: Func Order * refactor: Func Order * refactor!: Meta Transforms * refactor!: Remove Close() * refactor!: NetworkFQDN to NetworkDomain * refactor!: Conditions * chore: DDB ReadConsistency * feat: iconfig * refactor!: Remove File Suffix * chore: DDB Read Consistency * refactor: cmds * test: Fix Tests * refactor: internal/aws pkg * chore: linting * chore: remove lint * build: containers * build: go mod * refactor!: Retry.Count * refactor!: DNS Transforms * refactor!: String Functions * refactor!: Condition Objects * refactor!: Transforms * build: config/libsonnet * refactor: Layout * test: Fix Tests * feat: MetaErr Transform * refactor!: Remove MetaPlugin Transform * test: Example Transform * test: Quickstart Config * refactor!: Network IP Inspectors * refactor!: Buffer Config * refactor: JSON * build: libsonnet * docs: examples/aws/pubsub * test: libsonnet * ci: Jsonnet * refactor: devcontainer * docs: Examples * refactor!: build/terraform * chore: terraform install * fix: enrichDNS Transform * docs: Microservice Example * build: Terraform Modules * ci: jsonnet compile * docs: Microservice URI * fix: errgroup bug * docs: pubsub * docs: pubsub * fix: snsPublish * refactor: sendAWSSNS * fix: Terraform Module IAM Policies * build: Go upgrades * style: lint * fix: Terraform Modules * refactor!: TF SNS, Terraform * fix: TF Sids * docs: aws/kinesis/multistream * docs: aws README * fix: sendKinesis * docs: aws/sns * docs: aws/sqs Example * refactor: sendDynamoDB * docs: aws/dynamodb/cdc * docs: aws/examples * fix: cmd/dev * docs: README * docs: README * docs: README * refactor: build/config * feat: cmd/firehose * docs: examples * refactor!: playground * build: devcontainer * refactor: build/container * refactor!: cmd/ * docs * build: format scripts * refactor: internal/bufio * style: imports * build: local env * feat!: Kinesis, UUID, AWS * docs: README * refactor!: Number Transform * refactor!: Compress Transform * build: wasm * test: Transforms * refactor!: Number Inspectors * refactor: Transform * build: config * refactor: jq * refactor: condition num/bitwise * style: fmt * docs: CONTRIBUTING * chore: lint * refactor: function names * refactor!: string pattern * chore: wasm * refactor: condition * refactor!: math transform * build: configs * fix: enrichDDB * docs: fields * refactor!: sendHTTP * refactor: numMath * refactor!: kvstoreSet * build: config, gitignore * test: examples * refactor!: secrets * docs: pkg/transform example * feat: ignore empty values * docs: tests * refactor: tf buffers * refactor!: ttl_offset string * refactor!: kvStoreSet, DDB KV * docs: format * docs: message * docs: package * refactor!: metrics * refactor: transform/metrics * ci: fixes * refactor: cmd, docs * feat: aws/ecr force delete * docs: ddb/cdc * docs: examples/aws * ci: v1 * feat!: ns precision * refactor: bufferConfig * build: Go flags * ci: gitignore * build: tf/ddb ttl * style: examples tf fmt * build: obj abbv * fix: tf/ddb JSON * refactor: tf msg err * build: sub libsonnet * style: tf * fix: buffer concurrency bug * build: default settings * test: agg/sample example * fix: tf metaErr * feat: aws/lambda vpc example * build: aws/networking/vpc * build: aws/lambda secret * docs: fmt * perf: remove sjson opts * perf: lambda async sources * style: unused linter * docs: transform/array/group example * feat: condition/meta_for_each JSON Arrays * docs: fix if_all_else example * refactor!: Simplify App Transform * feat: Go 1.20 * refactor: Valid JSON * docs: markdown * doc: Add Missing Component * docs: README * docs: README * docs: README * docs: README * docs: README * fix: Floats in number_math Transforms * docs: Move Examples * refactor!: Remove cmd/client/file * docs: Remove README * docs: Example Lib Import * test: condition/format_json * docs: examples/build/terraform * docs: S3/SNS Example * fix: rand.Seed * docs: Kinesis example * docs: Retry with Backoff example * docs: Crash Program example * docs: If All Else example * docs: README * docs: typo * docs: Retry with Backoff * style: fmt * refactor!: Switch to Cases (Copilot) * refactor!: StringCapture (Copilot) * refactor!: StringReplace (Copilot) * refactor!: StringAppend (Copilot) * refactor!: condition/string (Copilot) * refactor!: condition/num_length (Copilot) * refactor!: condition/num_bitwise (Copilot) * refactor!: AWS Role ARN (Copilot) * refactor!: transform/jq (Copilot) * refactor: int/agg Default Duration * refactor: int/secrets Max Capacity * build: Add required versions and providers for Terraform modules * build: Refactor Lambda, add Secret Terraform modules * build: Standardize Terraform role name * build(terraform):Add Multi-Region Support * build(terraform): Add CloudWatch Modules * build(config): Update libsonnet * build(config): Update Defaults * fix(transform): metaSwitch Struct * fix(condition): metaForEach Missing Value * test: metaSwitch * build(terraform): Randomized IAM Names * refactor!: Object Config * refactor(transform): String Capture * refactor(transform): Logic Complexity * chore(transform): Remove Sumo Logic * refactor(transform): arrayJoin, Examples * examples(terraform/aws): Kinesis Docs * chore(devcontainer): Default Memory * refactor!(transform): Array Group -> Zip * examples(transform): arrayZip * refactor: Object Keys, Batching, Send Transforms * docs(examples): Kinesis/Multistream * fix(transform): Send AWS S3 * build(terraform): DynamoDB * docs(examples): Terraform KMS Policies * docs: README * fix(transform): metaForEach * docs(examples): array group * docs: Public API * docs(examples): Config * docs: README * chore(transform): Remove arrayToObject * docs(examples): README * docs(examples): README * docs: README
1 parent 45ab2fd commit d8bb4c5

File tree

649 files changed

+27622
-25191
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

649 files changed

+27622
-25191
lines changed

.devcontainer/Dockerfile

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
1-
FROM mcr.microsoft.com/vscode/devcontainers/go:1.19
1+
FROM mcr.microsoft.com/vscode/devcontainers/go:1.20
22
RUN apt-get update -y && \
3-
# install Terraform
4-
cd /tmp/ && \
5-
curl https://releases.hashicorp.com/terraform/1.1.7/terraform_1.1.7_linux_$(dpkg --print-architecture).zip -o ./terraform.zip && \
6-
unzip terraform.zip && \
7-
mv terraform /usr/local/bin/terraform && \
8-
# install Jsonnet
3+
# https://developer.hashicorp.com/terraform/downloads
4+
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg && \
5+
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/hashicorp.list && \
6+
apt update -y && apt install -y terraform && \
7+
# go-jsonnet
98
go install github.com/google/go-jsonnet/cmd/jsonnet@latest && \
109
go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest && \
1110
go install github.com/google/go-jsonnet/cmd/jsonnet-lint@latest && \
12-
# install AWS CLI
11+
# AWS CLI
1312
apt-get install -y awscli && \
14-
# install pip and boto3
15-
apt-get install -y python3-pip && pip3 install boto3 && pip3 install black && \
16-
# install protobuf compiler tools
17-
# https://grpc.io/docs/languages/go/quickstart/#prerequisites
18-
apt-get install -y protobuf-compiler && \
19-
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest && \
20-
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest && \
21-
export PATH="$PATH:$(go env GOPATH)/bin"
13+
# python
14+
apt-get install -y python3 python3-boto3 black

.devcontainer/devcontainer.json

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,19 @@
44
"dockerfile": "Dockerfile"
55
},
66
"remoteUser": "root",
7-
"extensions": [
8-
"golang.go",
9-
"hashicorp.terraform",
10-
"zxh404.vscode-proto3",
11-
"grafana.vscode-jsonnet"
12-
],
137
"runArgs": [
14-
"--memory=1g",
8+
"--memory=2g",
159
"--cpus=2"
1610
],
17-
"postCreateCommand": "bash .devcontainer/install-dev-tools.sh"
11+
"postCreateCommand": "bash .devcontainer/install-dev-tools.sh",
12+
"customizations": {
13+
"vscode": {
14+
"extensions": [
15+
"ms-vscode.go",
16+
"hashicorp.terraform",
17+
"zxh404.vscode-proto3",
18+
"grafana.vscode-jsonnet"
19+
]
20+
}
21+
}
1822
}

.devcontainer/install-dev-tools.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# download go packages
22
go mod download
3-
# compile protobuf
4-
sh build/scripts/proto/compile.sh
53
# compile configurations
64
sh build/scripts/config/compile.sh
1.21 MB
Loading
File renamed without changes.

.github/workflows/code.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,20 @@ jobs:
3939
pip3 install black
4040
find -name *.py | xargs black --check
4141
42-
proto:
42+
jsonnet:
4343
runs-on: ubuntu-latest
4444
steps:
45-
- uses: actions/checkout@v2
46-
- uses: bufbuild/buf-setup-action@v1
47-
- uses: bufbuild/buf-lint-action@v1
45+
- name: checkout
46+
uses: actions/checkout@v2
47+
with:
48+
fetch-depth: 1
49+
50+
- name: setup
51+
uses: actions/setup-go@v2
52+
with:
53+
go-version: 1.19
54+
55+
- name: compile
56+
run: |
57+
go install github.com/google/go-jsonnet/cmd/jsonnet@latest
58+
sh build/scripts/config/compile.sh

.github/workflows/release_please.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,3 @@ jobs:
1414
with:
1515
release-type: go
1616
package-name: release-please-action
17-
# beta changes are v0.x
18-
bump-minor-pre-major: true
19-
bump-patch-for-minor-pre-major: true

.gitignore

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,15 @@ CHANGELOG.md
1212

1313
# ignore all JSON by default
1414
*.json
15+
*.jsonl
1516
# allow Visual Studio Code devcontainer config file
1617
!.devcontainer/devcontainer.json
1718
# allow Visual Studio Code settings config file
1819
!.vscode/settings.json
19-
# allow static JSON files in the examples/ directory
20-
!examples/condition/data.json
21-
!examples/*/data.json
22-
!examples/quickstart/data.json
23-
# ignore playground files
24-
playground.wasm
25-
playground.wasm.gz
26-
wasm_exec.js
27-
build/playground/substation_logo.png
20+
# allow specific JSON files in the examples/ directory
21+
!examples/**/data*.json
22+
!examples/**/data*.jsonl
23+
!examples/**/stdout.jsonl
2824

2925
# Go profiling files
3026
*.prof

CONTRIBUTING.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,11 @@ We rely on contributors to test changes before they are submitted as pull reques
5555

5656
#### Environment Variables
5757

58-
Substation uses environment variables to customize runtime settings of the system (e.g., concurrency is controlled by `SUBSTATION_CONCURRENCY`).
59-
60-
Custom applications should implement their own runtime settings as required; for example, the [AWS Lambda application](/cmd/aws/lambda/substation/) uses `SUBSTATION_HANDLER` to manage [invocation settings](https://docs.aws.amazon.com/lambda/latest/dg/lambda-invocation.html).
58+
Applications may implement runtime settings that are managed by environment variables. For example, the [AWS Lambda application](/cmd/aws/lambda/substation/) uses `SUBSTATION_HANDLER` to manage [invocation settings](https://docs.aws.amazon.com/lambda/latest/dg/lambda-invocation.html).
6159

6260
#### Configurations
6361

64-
Substation uses a single configuration pattern for all components in the system (see `Config` in [config/config.go](/config/config.go)). This pattern is highly reusable and should be nested to create complex configurations supported by Jsonnet. Below is an example that shows how configurations should be designed:
62+
Substation uses a single configuration pattern for all components in the system (see `Config` in [config/config.go](/config/config.go)). This pattern is highly reusable and should be embedded to create custom configurations. Below is an example that shows how configurations should be designed:
6563

6664
```json
6765
"foo": {
@@ -81,13 +79,13 @@ Substation uses a single configuration pattern for all components in the system
8179
}
8280
```
8381

84-
Repeating this pattern allows components and applications to integrate with the factory pattern.
82+
Repeating this pattern allows components and applications to integrate with Substation's factory patterns.
8583

8684
#### Factories
8785

88-
Substation relies on [factory methods](https://refactoring.guru/design-patterns/factory-method) to create objects that [satisfy interfaces](https://go.dev/doc/effective_go#interface_methods) across the system. Factories should be combined with the configuration design pattern to create pre-configured, ready-to-use objects.
86+
Substation relies on [factory methods](https://refactoring.guru/design-patterns/factory-method) to create objects that [satisfy interfaces](https://go.dev/doc/effective_go#interface_methods) across the project. Factories should be combined with the configuration design pattern to create new components.
8987

90-
Factories are the preferred method for allowing users to customize the system. Example factories can be seen in [condition](/condition/condition.go) and [process](/process/process.go).
88+
Factories are the preferred method for allowing users to customize the system. Example factories can be seen in [condition](/condition/condition.go) and [transform](/transform/transform.go).
9189

9290
#### Reading and Writing Streaming Data
9391

@@ -103,9 +101,9 @@ Substation commonly uses these io compatible containers:
103101

104102
#### Errors
105103

106-
Errors should always start with `err` (or `Err`, if they are public) and be defined as constants using [internal/errors](/internal/errors/errors.go).
104+
Errors should always start with `err` (or `Err`, if they are public). Commonly used errors are defined in [internal/errors.go](internal/errors.go).
107105

108-
If the error is related to an object created by an interface factory, then the object should be referenced by name in the error. For example, if the factory returns objects named `Foo`, `Bar`, and `Baz`, then related errors should be `errFooShortDescription`, `errBarShortDescription`, and `errBazShortDescription`.
106+
If the error is related to a specific component, then the component name should be included in the error. For example, if the error is related to the `Foo` component, then the error should be named `errFooShortDescription`.
109107

110108
#### Environment Variables
111109

@@ -115,15 +113,15 @@ Any environment variable that changes a default runtime setting should always st
115113

116114
#### Application Variables
117115

118-
Variable names should always follow conventions from [Effective Go](https://go.dev/doc/effective_go#names), the [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments#variable-names) and avoid [predeclared identifiers](https://go.dev/ref/spec#Predeclared_identifiers). For example `capsule` is used instead of `cap` to avoid shadowing the capacity function while modifiers and plural usage are `newCapsule` and `capsules`.
116+
Variable names should always follow conventions from [Effective Go](https://go.dev/doc/effective_go#names), the [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments#variable-names) and avoid [predeclared identifiers](https://go.dev/ref/spec#Predeclared_identifiers).
119117

120118
#### Source Metadata
121119

122-
Sources that [add metadata during encapsulation](/config/README.md) should use lowerCamelCase for their JSON keys.
120+
Sources that [add metadata during message creation](/message/) should use lowerCamelCase for their JSON keys.
123121

124122
#### Package Configurations
125123

126-
Configurations for packages (for example, [process](/process/README.md) and [condition](/condition/README.md)) should always use lower_snake_case in their JSON keys. This helps maintain readability when reviewing large configuration files.
124+
Configurations for packages (for example, [condition](/condition/README.md) and [transform](/transform/README.md)) should always use lower_snake_case in their JSON keys. This helps maintain readability when reviewing large configuration files.
127125

128126
We strongly urge everyone to use Jsonnet for managing configurations.
129127

0 commit comments

Comments
 (0)