Skip to content

Commit

Permalink
Merge branch 'release/0.25.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Holy committed Jun 29, 2021
2 parents 0bd75c3 + 6c0c604 commit b2c3401
Show file tree
Hide file tree
Showing 40 changed files with 1,345 additions and 1,164 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ lib/go/ @airyhq/codeowners-infrastructure
lib/java/ @airyhq/codeowners-backend
lib/typescript/ @airyhq/codeowners-frontend
scripts/ @airyhq/codeowners-infrastructure
*.bzl @lucapette @chrismatix
BUILD @lucapette @chrismatix
*.bzl @chrismatix
BUILD @chrismatix
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.24.0
0.25.0
78 changes: 5 additions & 73 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
# Airy Bazel tools
git_repository(
name = "com_github_airyhq_bazel_tools",
commit = "5943abd41d625ea3bca952bb0087cc01e95b932f",
commit = "b4f52101d80c342ff5e4734fb4c4385af921ffec",
remote = "https://github.com/airyhq/bazel-tools.git",
shallow_since = "1622467587 +0200",
shallow_since = "1624959927 +0200",
)

load("@com_github_airyhq_bazel_tools//:repositories.bzl", "airy_bazel_tools_dependencies", "airy_jvm_deps")
Expand All @@ -21,79 +21,11 @@ airy_bazel_tools_dependencies()
### Java tooling

load("@rules_jvm_external//:defs.bzl", "maven_install")
load("//:repositories.bzl", "excluded_artifacts", jvm_deps = "airy_jvm_deps")

maven_install(
artifacts = airy_jvm_deps + [
"com.amazonaws:aws-java-sdk-core:1.11.933",
"com.amazonaws:aws-java-sdk-s3:1.11.933",
"com.fasterxml.jackson.core:jackson-annotations:2.10.0",
"com.fasterxml.jackson.core:jackson-core:2.10.0",
"com.fasterxml.jackson.core:jackson-databind:2.10.0",
"com.fasterxml.jackson.module:jackson-module-afterburner:2.10.0",
"com.github.everit-org.json-schema:org.everit.json.schema:1.12.2",
"com.google.auth:google-auth-library-oauth2-http:0.20.0",
"com.jayway.jsonpath:json-path:2.4.0",
"com.dinstone:beanstalkc:2.3.0",
"com.twilio.sdk:twilio:7.51.0",
"io.confluent:kafka-avro-serializer:6.1.1",
"io.confluent:kafka-schema-registry-client:6.1.1",
"io.confluent:kafka-schema-registry:6.1.1",
"io.confluent:kafka-streams-avro-serde:6.1.1",
"io.jsonwebtoken:jjwt-api:0.10.5",
"io.jsonwebtoken:jjwt-impl:0.10.5",
"io.jsonwebtoken:jjwt-jackson:0.10.5",
"io.micrometer:micrometer-registry-prometheus:1.6.5",
"javax.activation:javax.activation-api:1.2.0",
"javax.validation:validation-api:2.0.1.Final",
"javax.xml.bind:jaxb-api:2.3.1",
"org.apache.logging.log4j:log4j-core:2.12.1",
"org.apache.logging.log4j:log4j-slf4j-impl:2.12.1",
"org.slf4j:slf4j-api:1.7.29",
"org.apache.avro:avro-tools:1.10.0",
"org.apache.avro:avro:1.10.0",
"org.apache.curator:curator-test:4.2.0",
"org.apache.kafka:connect-api:2.7.0",
"org.apache.kafka:connect-transforms:2.7.0",
"org.apache.kafka:kafka-clients:2.7.0",
"org.apache.kafka:kafka-clients:jar:test:2.7.0",
"org.apache.kafka:kafka-streams:2.7.0",
"org.apache.kafka:kafka_2.13:2.7.0",
"org.apache.lucene:lucene-queryparser:8.7.0",
"org.apache.lucene:lucene-analyzers-common:8.7.0",
"org.apache.lucene:lucene-core:8.7.0",
"org.aspectj:aspectjweaver:1.8.10",
"org.hamcrest:hamcrest-library:2.1",
"org.hamcrest:hamcrest:2.1",
"org.junit.jupiter:junit-jupiter-engine:5.7.0",
"org.junit.jupiter:junit-jupiter:5.7.0",
"org.junit.platform:junit-platform-console:1.7.0",
"org.junit.platform:junit-platform-engine:1.7.0",
"org.mockito:mockito-core:2.28.2",
"org.projectlombok:lombok:1.18.10",
"org.springframework.boot:spring-boot-loader:2.4.5",
"org.springframework.boot:spring-boot-starter-actuator:2.4.5",
"org.springframework.boot:spring-boot-starter-jetty:2.4.5",
"org.springframework.boot:spring-boot-starter-test:2.4.5",
"org.springframework.boot:spring-boot-starter-web:2.4.5",
"org.springframework.boot:spring-boot-starter-websocket:2.4.5",
"org.springframework.boot:spring-boot-starter-security:2.4.5",
"org.springframework.boot:spring-boot-starter-oauth2-client:2.4.5",
"org.springframework.security.oauth:spring-security-oauth2:2.4.1.RELEASE",
"org.springframework.retry:spring-retry:1.2.5.RELEASE",
"org.springframework:spring-aop:4.1.4.RELEASE",
"org.springframework:spring-context-support:5.3.6",
"org.springframework:spring-context:5.3.6",
"org.springframework:spring-messaging:5.3.6",
"org.springframework:spring-websocket:5.3.6",
"org.springframework.security:spring-security-core:5.4.6",
"org.rocksdb:rocksdbjni:5.18.3",
],
excluded_artifacts = [
"ch.qos.logback:logback-classic",
"org.springframework.boot:spring-boot-starter-tomcat",
"org.springframework.boot:spring-boot-starter-logging",
"org.slf4j:slf4j-log4j12",
],
artifacts = airy_jvm_deps + jvm_deps,
excluded_artifacts = excluded_artifacts,
maven_install_json = "//:maven_install.json",
repositories = [
"https://packages.confluent.io/maven",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@
@RestController
public class ClientConfigController {
private final ServiceDiscovery serviceDiscovery;
private final PrincipalAccess principalAccess;

public ClientConfigController(ServiceDiscovery serviceDiscovery) {
public ClientConfigController(ServiceDiscovery serviceDiscovery, PrincipalAccess principalAccess) {
this.serviceDiscovery = serviceDiscovery;
this.principalAccess = principalAccess;
}

@PostMapping("/client.config")
public ResponseEntity<ClientConfigResponsePayload> getConfig(Authentication auth) {
return ResponseEntity.ok(ClientConfigResponsePayload.builder()
.services(serviceDiscovery.getServices())
.userProfile(PrincipalAccess.getUserProfile(auth))
.userProfile(principalAccess.getUserProfile(auth))
.build());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import co.airy.model.message.dto.MessageContainer;
import co.airy.model.message.dto.MessageResponsePayload;
import co.airy.model.metadata.dto.MetadataMap;
import co.airy.spring.auth.PrincipalAccess;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.kafka.clients.producer.KafkaProducer;
Expand All @@ -28,19 +29,19 @@
import java.util.UUID;
import java.util.concurrent.ExecutionException;

import static co.airy.spring.auth.PrincipalAccess.getUserId;

@RestController
public class SendMessageController {
private final Stores stores;
private final ObjectMapper objectMapper;
private final PrincipalAccess principalAccess;
private final KafkaProducer<String, Message> producer;

private final ApplicationCommunicationMessages applicationCommunicationMessages = new ApplicationCommunicationMessages();

SendMessageController(Stores stores, ObjectMapper objectMapper, KafkaProducer<String, Message> producer) {
SendMessageController(Stores stores, ObjectMapper objectMapper, PrincipalAccess principalAccess, KafkaProducer<String, Message> producer) {
this.stores = stores;
this.objectMapper = objectMapper;
this.principalAccess = principalAccess;
this.producer = producer;
}

Expand All @@ -58,7 +59,7 @@ public ResponseEntity<?> sendMessage(@RequestBody @Valid SendMessageRequestPaylo
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}

final String userId = getUserId(auth);
final String userId = principalAccess.getUserId(auth);

final Message message = Message.newBuilder()
.setId(UUID.randomUUID().toString())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class Api implements ApplicationListener<ApplicationReadyEvent> {
private RestTemplate restTemplate;

private static final String subscribedFields = "messages,messaging_postbacks,messaging_optins,message_deliveries,message_reads,messaging_payments,messaging_pre_checkouts,messaging_checkout_updates,messaging_account_linking,messaging_referrals,message_echoes,messaging_game_plays,standby,messaging_handovers,messaging_policy_enforcement,message_reactions,inbox_labels";
private static final String baseUrl = "https://graph.facebook.com/v3.2";
private static final String baseUrl = "https://graph.facebook.com/v11.0";
private static final String requestTemplate = baseUrl + "/me/messages?access_token=%s";
private final String pageFields = "fields=id,name_with_location_descriptor,access_token,picture,is_webhooks_subscribed";

Expand Down Expand Up @@ -109,7 +109,7 @@ public UserProfile getProfileFromContact(String sourceConversationId, String tok

// See https://developers.facebook.com/docs/graph-api/reference/v9.0/conversation#edges
public UserProfile getProfileFromParticipants(String sourceConversationId, String token) {
String reqUrl = String.format("https://graph.facebook.com/v9.0/me/conversations?user_id=%s&fields=participants&access_token=%s",
String reqUrl = String.format(baseUrl + "/me/conversations?user_id=%s&fields=participants&access_token=%s",
sourceConversationId, token);

ResponseEntity<Participants> responseEntity = restTemplate.getForEntity(reqUrl, Participants.class);
Expand Down
3 changes: 3 additions & 0 deletions cli/pkg/providers/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ func (p *provider) PostInstallation(dir workspace.ConfigDir) error {
if err = p.updateIngress("airy-core-ui", loadBalancerUrl, conf.Kubernetes.Namespace); err != nil {
return err
}
if err = p.updateIngress("airy-core-redirect", loadBalancerUrl, conf.Kubernetes.Namespace); err != nil {
return err
}

if err = p.updateHostsConfigMap(loadBalancerUrl, conf.Kubernetes.Namespace); err != nil {
return err
Expand Down
Loading

0 comments on commit b2c3401

Please sign in to comment.