Skip to content

Commit

Permalink
Merge branch 'release/0.47.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
AitorAlgorta committed Jul 21, 2022
2 parents 4f7c4d1 + 45463af commit 36cccd6
Show file tree
Hide file tree
Showing 247 changed files with 10,058 additions and 2,709 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ package-lock.json
*.tfstate
*.tfstate.backup
*.tfvars
*.tfstate.*.backup
*.tfstate.*
.terraform.tfstate.lock.info
.terraform.lock.hcl

# Kubernetes
.kubeconfig
kube.conf

# Misc
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.46.0
0.47.0
14 changes: 7 additions & 7 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

git_repository(
name = "com_github_airyhq_bazel_tools",
commit = "e0dacc284148983bac428012adef1f7e25cabe45",
commit = "50e7c808d9e7f5d839fda7898168143e75326878",
remote = "https://github.com/airyhq/bazel-tools.git",
shallow_since = "1655129212 +0200",
shallow_since = "1657698793 +0200",
)

load("@com_github_airyhq_bazel_tools//:repositories.bzl", "airy_bazel_tools_dependencies", "airy_jvm_deps")
Expand Down Expand Up @@ -62,6 +62,11 @@ http_archive(
],
)

load("//:go_repositories.bzl", "go_repositories")

# gazelle:repository_macro go_repositories.bzl%go_repositories
go_repositories()

load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")

go_rules_dependencies()
Expand Down Expand Up @@ -167,11 +172,6 @@ load("@com_github_ash2k_bazel_tools//multirun:deps.bzl", "multirun_dependencies"

multirun_dependencies()

load("//:go_repositories.bzl", "go_repositories")

# gazelle:repository_macro go_repositories.bzl%go_repositories
go_repositories()

http_archive(
name = "rules_pkg",
sha256 = "038f1caa773a7e35b3663865ffb003169c6a71dc995e39bf4815792f385d837d",
Expand Down
4 changes: 0 additions & 4 deletions backend/api/admin/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
kafka.brokers=${KAFKA_BROKERS}
kafka.schema-registry-url=${KAFKA_SCHEMA_REGISTRY_URL}
kafka.cleanup=${KAFKA_CLEANUP:false}
kafka.commit-interval-ms=${KAFKA_COMMIT_INTERVAL_MS}
kubernetes.namespace=${KUBERNETES_NAMESPACE}
kubernetes.app=${KUBERNETES_APP}
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
kafka.brokers=${KAFKA_BROKERS}
kafka.schema-registry-url=${KAFKA_SCHEMA_REGISTRY_URL}
kafka.cleanup=${KAFKA_CLEANUP:false}
kafka.commit-interval-ms=${KAFKA_COMMIT_INTERVAL_MS}

async-messages-handler.max-wait-millis=${ASYNC_MESSAGES_HANDLER_MAX_WAIT_MILLIS:30000}
async-messages-handler.check-period-millis=${ASYNC_MESSAGES_HANDLER_CHECK_PERIOD_MILLIS:1000}
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
kafka.brokers=${KAFKA_BROKERS}
kafka.schema-registry-url=${KAFKA_SCHEMA_REGISTRY_URL}

kafka.suppress-interval-ms=${KAFKA_SUPPRESS_INTERVAL_MS:3000}
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
kafka.brokers=${KAFKA_BROKERS}
kafka.schema-registry-url=${KAFKA_SCHEMA_REGISTRY_URL}
kafka.cleanup=${KAFKA_CLEANUP:false}
kafka.commit-interval-ms=${KAFKA_COMMIT_INTERVAL_MS}
3 changes: 0 additions & 3 deletions backend/media/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ spring.servlet.multipart.max-file-size=512MB
spring.servlet.multipart.max-request-size=512MB
spring.servlet.multipart.enabled=true

kafka.brokers=${KAFKA_BROKERS}
kafka.schema-registry-url=${KAFKA_SCHEMA_REGISTRY_URL}

kafka.suppress-interval-ms=${KAFKA_SUPPRESS_INTERVAL_MS:3000}

s3.key=${s3Key}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
kafka.brokers=${KAFKA_BROKERS}
kafka.schema-registry-url=${KAFKA_SCHEMA_REGISTRY_URL}
kafka.commit-interval-ms=${KAFKA_COMMIT_INTERVAL_MS}
chat-plugin.auth.jwt-secret=${jwtSecret}
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
facebook.webhook-secret=${FACEBOOK_WEBHOOK_SECRET}
kafka.brokers=${KAFKA_BROKERS}
kafka.cleanup=${KAFKA_CLEANUP:false}
kafka.commit-interval-ms=${KAFKA_COMMIT_INTERVAL_MS}
kafka.schema-registry-url=${KAFKA_SCHEMA_REGISTRY_URL}
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
kafka.brokers=${KAFKA_BROKERS}
kafka.schema-registry-url=${KAFKA_SCHEMA_REGISTRY_URL}
kafka.cleanup=${KAFKA_CLEANUP:false}
kafka.commit-interval-ms=${KAFKA_COMMIT_INTERVAL_MS}
facebook.app-id=${FACEBOOK_APP_ID}
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
google.auth.sa=${GOOGLE_SA_FILE}
google.partner-key=${GOOGLE_PARTNER_KEY}
kafka.brokers=${KAFKA_BROKERS}
kafka.schema-registry-url=${KAFKA_SCHEMA_REGISTRY_URL}
kafka.commit-interval-ms=${KAFKA_COMMIT_INTERVAL_MS}
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
kafka.brokers=${KAFKA_BROKERS}
kafka.schema-registry-url=${KAFKA_SCHEMA_REGISTRY_URL}
kafka.commit-interval-ms=${KAFKA_COMMIT_INTERVAL_MS}
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
kafka.brokers=${KAFKA_BROKERS}
kafka.schema-registry-url=${KAFKA_SCHEMA_REGISTRY_URL}
kafka.commit-interval-ms=${KAFKA_COMMIT_INTERVAL_MS}
twilio.account-sid=${TWILIO_ACCOUNT_SID}
twilio.auth-token=${TWILIO_AUTH_TOKEN}
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
kafka.brokers=${KAFKA_BROKERS}
kafka.schema-registry-url=${KAFKA_SCHEMA_REGISTRY_URL}
kafka.commit-interval-ms=${KAFKA_COMMIT_INTERVAL_MS}
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
kafka.brokers=${KAFKA_BROKERS}
kafka.schema-registry-url=${KAFKA_SCHEMA_REGISTRY_URL}
kafka.commit-interval-ms=${KAFKA_COMMIT_INTERVAL_MS}
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
kafka.brokers=${KAFKA_BROKERS}
kafka.schema-registry-url=${KAFKA_SCHEMA_REGISTRY_URL}
kafka.cleanup=${KAFKA_CLEANUP:false}
kafka.commit-interval-ms=${KAFKA_COMMIT_INTERVAL_MS}

beanstalk.hostname=${BEANSTALK_HOSTNAME}
beanstalk.port=${BEANSTALK_PORT}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
kafka.brokers=${KAFKA_BROKERS}
kafka.schema-registry-url=${KAFKA_SCHEMA_REGISTRY_URL}
kafka.cleanup=${KAFKA_CLEANUP:false}
kafka.commit-interval-ms=${KAFKA_COMMIT_INTERVAL_MS}

beanstalk.hostname=${BEANSTALK_HOSTNAME}
beanstalk.port=${BEANSTALK_PORT}
28 changes: 14 additions & 14 deletions cli/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ require (
github.com/aws/aws-sdk-go-v2/service/iam v1.18.5
github.com/kr/pretty v0.3.0
github.com/mitchellh/go-homedir v1.1.0
github.com/spf13/cobra v1.4.0
github.com/spf13/cobra v1.5.0
github.com/spf13/viper v1.11.0
github.com/thanhpk/randstr v1.0.4
github.com/txn2/txeh v1.3.0
goji.io v2.0.2+incompatible
gopkg.in/segmentio/analytics-go.v3 v3.1.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.24.0
k8s.io/apimachinery v0.24.0
k8s.io/client-go v0.24.0
k8s.io/api v0.24.2
k8s.io/apimachinery v0.24.2
k8s.io/client-go v0.24.2
)

require (
Expand Down Expand Up @@ -58,7 +58,7 @@ require (
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
Expand All @@ -82,21 +82,21 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.3.0 // indirect
github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c // indirect
golang.org/x/crypto v0.0.0-20220518034528-6f7dac969898 // indirect
golang.org/x/net v0.0.0-20220524220425-1d687d428aca // indirect
golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 // indirect
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
golang.org/x/net v0.0.0-20220630215102-69896b714898 // indirect
golang.org/x/oauth2 v0.0.0-20220630143837-2104d58473e0 // indirect
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e // indirect
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect
golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog v1.0.0 // indirect
k8s.io/klog/v2 v2.60.1 // indirect
k8s.io/kube-openapi v0.0.0-20220413171646-5e7f5fdc6da6 // indirect
k8s.io/klog/v2 v2.70.0 // indirect
k8s.io/kube-openapi v0.0.0-20220627174259-011e075b9cb8 // indirect
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
sigs.k8s.io/json v0.0.0-20220525155127-227cbc7cc124 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
Expand Down
2 changes: 1 addition & 1 deletion cli/pkg/cmd/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func create(cmd *cobra.Command, args []string) {
console.Exit("setting up Helm failed with err: ", err)
}

fmt.Println("🚀 Starting core with default components")
fmt.Println("🚀 Starting airy with default components")

if err := helm.InstallCharts(); err != nil {
console.Exit("installing Helm charts failed with err: ", err)
Expand Down
2 changes: 1 addition & 1 deletion cli/pkg/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func init() {
apihost := ""
RootCmd.PersistentFlags().StringVar(&apihost, "apihost", "", "Airy Core HTTP API endpoint")
viper.BindPFlag("apihost", RootCmd.PersistentFlags().Lookup("apihost"))
viper.SetDefault("apihost", "http://airy.core")
viper.SetDefault("apihost", "http://localhost")

RootCmd.PersistentFlags().StringVar(&cliConfigDir, "workspace", "", "workspace directory of an Airy core instance (default is the cwd)")
RootCmd.AddCommand(api.APICmd)
Expand Down
1 change: 0 additions & 1 deletion cli/pkg/providers/minikube/minikube.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
const (
minikube = "minikube"
profile = "airy-core"
hostAlias = "airy.core"
dockerRuntime = " --container-runtime=containerd"
)

Expand Down
3 changes: 0 additions & 3 deletions cli/pkg/workspace/template/src/airy.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
security:
allowedOrigins: '*'
jwtSecret: {{ randAlphaNum 128 }}
{{- if .Host }}
global:
host: {{ .Host }}
Expand Down
2 changes: 1 addition & 1 deletion docs/cli-doc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module main
go 1.18

require (
github.com/spf13/cobra v1.4.0
github.com/spf13/cobra v1.5.0
)

replace github.com/airyhq/airy/cli => ../../cli
69 changes: 69 additions & 0 deletions docs/docs/api/endpoints/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,72 @@ The list of the deleted components is returned.
}
}
```

## List

List all the components, both installed and not installed.

`POST /components.list`

**Sample request**

```json
{
"repository": "airy-core" // optional
}
```

**Sample response**

```json5
{
"components": [
{
"name": "sources-facebook",
"repository": "airy-core",
"installed": true
},
{
"name": "sources-google",
"repository": "airy-core",
"installed": false
}
]
}
```

## Install

Install a new component.

`POST /components.install`

**Sample request**

```json
{
"name": "airy-core/sources-chatplugin"
}
```

**(201) Success Response Payload**

## Uninstall

Uninstall an existing component.

`POST /components.uninstall`

**Sample request**

```json
{
"name": "airy-enterprise/dialogflow-connector"
}
```

**(201) Success Response Payload**

```
```
39 changes: 39 additions & 0 deletions docs/docs/api/endpoints/repositories.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: Repositories
sidebar_label: Repositories
---

The `repositories.*` API is about controlling the repositories from where the individual components are installed.

## List

Retrieve a list of repositories.

`POST /repositories.list`

The list of the currently configured components is returned.

**Sample response**

```json5
{
"repositories": [
{
"name": "airy-core",
"url": "https://github.com/airyhq/airy/tree/develop/infrastructure/helm-chart/charts/components/charts"
},
{
"name": "airy-enterprise",
"url": "enterprise-url"
},
{
"name": "airy-tools",
"url": "https://github.com/airyhq/airy/tree/develop/infrastructure/helm-chart/charts/tools/charts"
},
{
"name": "my-custom-airy-repo",
"url": "my-custom-url"
}
]
}
```
Loading

0 comments on commit 36cccd6

Please sign in to comment.