Skip to content

Commit

Permalink
Merge branch 'release/0.50.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
bilge-cakmak committed Oct 7, 2022
2 parents 3338765 + 9d04185 commit 83c877e
Show file tree
Hide file tree
Showing 388 changed files with 6,557 additions and 3,269 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.49.0
0.50.0
4 changes: 2 additions & 2 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 = "f33ecc4e2e3349f7f7634bb8491b2e431dd41fa6",
commit = "f499013901107a0462e7fbe6043b84b8cd260e3a",
remote = "https://github.com/airyhq/bazel-tools.git",
shallow_since = "1660918023 +0200",
shallow_since = "1664876567 +0200",
)

load("@com_github_airyhq_bazel_tools//:repositories.bzl", "airy_bazel_tools_dependencies", "airy_jvm_deps")
Expand Down
2 changes: 1 addition & 1 deletion backend/components/admin/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ springboot(

custom_java_library(
name = "test-util",
srcs = ["src/test/java/co/airy/core/api/admin/util/Topics.java"],
srcs = ["src/test/java/co/airy/core/admin/util/Topics.java"],
deps = app_deps,
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package co.airy.core.api.admin;
package co.airy.core.admin;

import co.airy.avro.communication.Channel;
import co.airy.avro.communication.ChannelConnectionState;
import co.airy.avro.communication.Metadata;
import co.airy.core.api.admin.payload.ChannelsResponsePayload;
import co.airy.core.admin.payload.ChannelsResponsePayload;
import co.airy.model.channel.ChannelPayload;
import co.airy.model.channel.dto.ChannelContainer;
import co.airy.model.metadata.MetadataKeys;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin;
package co.airy.core.admin;

import co.airy.avro.communication.Channel;
import co.airy.avro.communication.ChannelConnectionState;
Expand Down Expand Up @@ -39,7 +39,7 @@
import java.util.Optional;
import java.util.concurrent.ExecutionException;

import static co.airy.core.api.admin.TimestampExtractor.timestampExtractor;
import static co.airy.core.admin.TimestampExtractor.timestampExtractor;
import static co.airy.model.metadata.MetadataRepository.getId;
import static co.airy.model.metadata.MetadataRepository.getSubject;

Expand Down Expand Up @@ -189,19 +189,21 @@ public Template getTemplate(String templateId) {
public List<ChannelContainer> getChannels() {
final ReadOnlyKeyValueStore<String, ChannelContainer> store = getConnectedChannelsStore();

final KeyValueIterator<String, ChannelContainer> iterator = store.all();

List<ChannelContainer> channels = new ArrayList<>();
iterator.forEachRemaining(kv -> channels.add(kv.value));
List<ChannelContainer> channels;
try (KeyValueIterator<String, ChannelContainer> iterator = store.all()) {
channels = new ArrayList<>();
iterator.forEachRemaining(kv -> channels.add(kv.value));
}

return channels;
}

public List<Template> getTemplates() {
final KeyValueIterator<String, Template> iterator = getTemplatesStore().all();

List<Template> templates = new ArrayList<>();
iterator.forEachRemaining(kv -> templates.add(kv.value));
List<Template> templates;
try (KeyValueIterator<String, Template> iterator = getTemplatesStore().all()) {
templates = new ArrayList<>();
iterator.forEachRemaining(kv -> templates.add(kv.value));
}

return templates;
}
Expand All @@ -212,16 +214,20 @@ public Webhook getWebhook(String webhookId) {
}

public List<Webhook> getWebhooks() {
final KeyValueIterator<String, Webhook> iterator = getWebhookStore().all();
List<Webhook> webhooks = new ArrayList<>();
iterator.forEachRemaining(kv -> webhooks.add(kv.value));
List<Webhook> webhooks;
try (KeyValueIterator<String, Webhook> iterator = getWebhookStore().all()) {
webhooks = new ArrayList<>();
iterator.forEachRemaining(kv -> webhooks.add(kv.value));
}
return webhooks;
}

public List<User> getUsers() {
final KeyValueIterator<String, User> iterator = getUsersStore().all();
List<User> users = new ArrayList<>();
iterator.forEachRemaining(kv -> users.add(kv.value));
List<User> users;
try (KeyValueIterator<String, User> iterator = getUsersStore().all()) {
users = new ArrayList<>();
iterator.forEachRemaining(kv -> users.add(kv.value));
}
return users;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package co.airy.core.api.admin;
package co.airy.core.admin;

import co.airy.avro.communication.Tag;
import co.airy.avro.communication.TagColor;
import co.airy.core.api.admin.payload.CreateTagRequestPayload;
import co.airy.core.api.admin.payload.DeleteTagRequestPayload;
import co.airy.core.api.admin.payload.ListTagsResponsePayload;
import co.airy.core.admin.payload.CreateTagRequestPayload;
import co.airy.core.admin.payload.DeleteTagRequestPayload;
import co.airy.core.admin.payload.ListTagsResponsePayload;
import co.airy.core.api.admin.payload.TagPayload;
import co.airy.core.api.admin.payload.UpdateTagRequestPayload;
import co.airy.core.admin.payload.UpdateTagRequestPayload;
import co.airy.spring.web.payload.RequestErrorResponsePayload;
import org.apache.kafka.streams.state.KeyValueIterator;
import org.apache.kafka.streams.state.ReadOnlyKeyValueStore;
Expand Down Expand Up @@ -68,10 +68,11 @@ ResponseEntity<?> createTag(@RequestBody @Valid CreateTagRequestPayload payload)
@PostMapping("/tags.list")
ResponseEntity<ListTagsResponsePayload> listTags() {
final ReadOnlyKeyValueStore<String, Tag> store = stores.getTagsStore();
final KeyValueIterator<String, Tag> iterator = store.all();

List<Tag> tags = new ArrayList<>();
iterator.forEachRemaining(kv -> tags.add(kv.value));
List<Tag> tags;
try (KeyValueIterator<String, Tag> iterator = store.all()) {
tags = new ArrayList<>();
iterator.forEachRemaining(kv -> tags.add(kv.value));
}

final List<TagPayload> data = tags.stream().map(TagPayload::fromTag).collect(toList());

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package co.airy.core.api.admin;
package co.airy.core.admin;

import co.airy.avro.communication.Template;
import co.airy.core.api.admin.payload.CreateTemplateRequestPayload;
import co.airy.core.api.admin.payload.DeleteTemplateRequestPayload;
import co.airy.core.api.admin.payload.GetTemplateRequestPayload;
import co.airy.core.api.admin.payload.ListTemplatesRequestPayload;
import co.airy.core.api.admin.payload.TemplatesResponsePayload;
import co.airy.core.api.admin.payload.UpdateTemplateRequestPayload;
import co.airy.core.admin.payload.CreateTemplateRequestPayload;
import co.airy.core.admin.payload.DeleteTemplateRequestPayload;
import co.airy.core.admin.payload.GetTemplateRequestPayload;
import co.airy.core.admin.payload.ListTemplatesRequestPayload;
import co.airy.core.admin.payload.TemplatesResponsePayload;
import co.airy.core.admin.payload.UpdateTemplateRequestPayload;
import co.airy.model.template.TemplatePayload;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package co.airy.core.api.admin;
package co.airy.core.admin;

import co.airy.avro.ops.HttpLog;
import co.airy.core.api.admin.dto.LogWithTimestamp;
import co.airy.core.admin.dto.LogWithTimestamp;
import org.apache.kafka.streams.KeyValue;
import org.apache.kafka.streams.kstream.Transformer;
import org.apache.kafka.streams.kstream.TransformerSupplier;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package co.airy.core.api.admin;
package co.airy.core.admin;

import co.airy.avro.communication.User;
import co.airy.core.api.admin.payload.ListUsersResponsePayload;
import co.airy.core.api.admin.payload.PaginationData;
import co.airy.core.api.admin.payload.UserResponsePayload;
import co.airy.core.api.admin.payload.UsersListRequestPayload;
import co.airy.core.admin.payload.ListUsersResponsePayload;
import co.airy.core.admin.payload.PaginationData;
import co.airy.core.admin.payload.UserResponsePayload;
import co.airy.core.admin.payload.UsersListRequestPayload;
import co.airy.pagination.Page;
import co.airy.pagination.Paginator;
import org.springframework.http.ResponseEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
package co.airy.core.api.admin;

package co.airy.core.admin;

import co.airy.core.admin.payload.WebhookInfoRequestPayload;
import co.airy.core.admin.payload.WebhookListPayload;
import co.airy.core.admin.payload.WebhookListResponsePayload;
import co.airy.core.admin.payload.WebhookResponsePayload;
import co.airy.core.admin.payload.WebhookSubscribePayload;
import co.airy.core.admin.payload.WebhookUnsubscribePayload;
import co.airy.core.admin.payload.WebhookUpdatePayload;
import co.airy.avro.communication.Status;
import co.airy.avro.communication.Webhook;
import co.airy.core.api.admin.payload.*;
import co.airy.core.api.config.ServiceDiscovery;
import co.airy.core.api.config.dto.ComponentInfo;
import co.airy.core.config.ServiceDiscovery;
import co.airy.core.config.dto.ComponentInfo;
import co.airy.model.event.payload.EventType;
import co.airy.spring.web.payload.RequestErrorResponsePayload;
import org.springframework.http.HttpStatus;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.dto;
package co.airy.core.admin.dto;

import co.airy.avro.ops.HttpLog;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import co.airy.model.channel.ChannelPayload;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import lombok.AllArgsConstructor;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import com.fasterxml.jackson.databind.JsonNode;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import lombok.AllArgsConstructor;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import lombok.AllArgsConstructor;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import co.airy.core.api.admin.payload.TagPayload;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import lombok.AllArgsConstructor;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import co.airy.model.template.TemplatePayload;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import lombok.AllArgsConstructor;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import com.fasterxml.jackson.databind.JsonNode;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import co.airy.avro.communication.User;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import lombok.AllArgsConstructor;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import lombok.AllArgsConstructor;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import lombok.Builder;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import lombok.AllArgsConstructor;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import lombok.Builder;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import co.airy.model.event.payload.EventType;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import lombok.AllArgsConstructor;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.admin.payload;
package co.airy.core.admin.payload;

import co.airy.model.event.payload.EventType;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package co.airy.core.api.config;
package co.airy.core.config;

import co.airy.core.api.config.payload.ClientConfigResponsePayload;
import co.airy.core.config.payload.ClientConfigResponsePayload;
import co.airy.spring.auth.PrincipalAccess;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.config;
package co.airy.core.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.config;
package co.airy.core.config;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package co.airy.core.api.config;
package co.airy.core.config;

import co.airy.core.api.config.dto.ComponentInfo;
import co.airy.core.api.config.dto.ServiceInfo;
import co.airy.core.api.config.payload.ServicesResponsePayload;
import co.airy.core.config.dto.ComponentInfo;
import co.airy.core.config.dto.ServiceInfo;
import co.airy.core.config.payload.ServicesResponsePayload;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.scheduling.annotation.Scheduled;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.config.dto;
package co.airy.core.config.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package co.airy.core.api.config.dto;
package co.airy.core.config.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
Expand Down
Loading

0 comments on commit 83c877e

Please sign in to comment.