Skip to content

Commit

Permalink
Merge branch 'trunk' into rate_limit_spec
Browse files Browse the repository at this point in the history
  • Loading branch information
gkc authored Sep 12, 2023
2 parents 2b190f0 + d2a1756 commit cab8227
Show file tree
Hide file tree
Showing 20 changed files with 680 additions and 357 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/at_server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ jobs:
ls -laR tools/build_virtual_environment/ve/*
- name: Build docker image
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1
with:
file: tools/build_virtual_environment/ve/Dockerfile
context: tools/build_virtual_environment/ve
Expand Down Expand Up @@ -249,7 +249,7 @@ jobs:
# Builds and pushes the secondary server image to docker hub.
- name: Build and push secondary image for x64
id: docker_build_secondary
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1
with:
push: true
provenance: false
Expand Down Expand Up @@ -608,7 +608,7 @@ jobs:
# Builds and pushes the at_virtual_env to docker hub.
- name: Build and push
id: docker_build
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1
with:
file: tools/build_virtual_environment/ve/Dockerfile.vip
context: .
Expand Down Expand Up @@ -662,7 +662,7 @@ jobs:
# Builds and pushes the secondary server image to docker hub.
- name: Build and push secondary image for amd64 and arm64
id: docker_build_secondary
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1
with:
push: true
provenance: false
Expand Down Expand Up @@ -717,7 +717,7 @@ jobs:
# Builds and pushes the secondary server image to docker hub.
- name: Build and push secondary image for amd64 and arm64
id: docker_build_observable_secondary
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1
with:
push: true
provenance: false
Expand Down Expand Up @@ -770,7 +770,7 @@ jobs:
# Builds and pushes the secondary server image to docker hub.
- name: Build and push secondary image for amd64 and arm64
id: docker_build_secondary
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1
with:
push: true
provenance: false
Expand Down Expand Up @@ -814,7 +814,7 @@ jobs:

- name: Build and push
id: docker_build
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1
with:
file: tools/build_virtual_environment/ve/Dockerfile.vip
context: .
Expand Down Expand Up @@ -861,7 +861,7 @@ jobs:
# Builds and pushes the secondary server image to docker hub.
- name: Build and push secondary image for amd64 and arm64
id: docker_build_secondary
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1
with:
push: true
provenance: false
Expand Down Expand Up @@ -895,7 +895,7 @@ jobs:

- name: Build and push
id: docker_build
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1
with:
file: tools/build_virtual_environment/ve/Dockerfile.vip
context: .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/at_server_dev_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

# Build the Docker image for Dev
- name: Build and push
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1
with:
file: packages/at_root_server/Dockerfile
context: packages/at_root_server
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/at_server_prod_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

# Build the Docker image for Dev
- name: Build and push
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1
with:
file: packages/at_root_server/Dockerfile
context: packages/at_root_server
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/promote_canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
# Builds and pushes the secondary server image to docker hub.
- name: Build and push secondary image for amd64 and arm64
id: docker_build_canary_to_prod
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1
with:
push: true
provenance: false
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
# Builds and pushes the secondary server image to docker hub.
- name: Build and push virtualenv image for amd64 and arm64
id: docker_build_canary_to_vip
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1
with:
push: true
file: tools/build_virtual_environment/ve/Dockerfile.canary_to_vip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ve_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- name: Build and push
id: docker_build
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1
uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1
with:
file: tools/build_virtual_environment/ve_base/Dockerfile
push: true
Expand Down
2 changes: 1 addition & 1 deletion packages/at_root_server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM dart:3.1.0@sha256:96d2e5d03b8356c2a7542716ace7dce745971efe1d03888a1d7ecd2e7c1dde36 AS buildimage
FROM dart:3.1.1@sha256:ec7bb9e577648ea5526c9daf714e9bc7af670ce7c93b594205e68c14a10cea3b AS buildimage
ENV HOMEDIR=/atsign
ENV BINARYDIR=/usr/local/at
ENV USER_ID=1024
Expand Down
2 changes: 2 additions & 0 deletions packages/at_secondary_server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 3.0.36
- fix: Implement notify ephemeral changes - Send notification with value without caching the key on receiver's secondary server
## 3.0.35
- chore: Upgraded at_persistence_secondary_server to 3.0.57 for memory optimization in commit log
- feat: APKAM keys verb implementation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class ResourceManager {
NotifyConnectionsPool.getInstance();

int get outboundConnectionLimit => _notifyConnectionsPool.size;

set outboundConnectionLimit(int ocl) => _notifyConnectionsPool.size = ocl;

void start() {
Expand Down Expand Up @@ -201,6 +202,9 @@ class ResourceManager {
// looked at this code.
String commandBody;
commandBody = '${atNotification.notification}';
if (atNotification.atValue != null) {
commandBody = '$commandBody:${atNotification.atValue}';
}
var atMetaData = atNotification.atMetadata;
if (atMetaData != null) {
if (atNotification.atMetadata!.skeEncAlgo != null) {
Expand Down Expand Up @@ -237,7 +241,7 @@ class ResourceManager {
}
if (atMetaData.ttr != null) {
commandBody =
'ttr:${atMetaData.ttr}:ccd:${atMetaData.isCascade}:$commandBody:${atNotification.atValue}';
'ttr:${atMetaData.ttr}:ccd:${atMetaData.isCascade}:$commandBody';
}
if (atMetaData.ttb != null) {
commandBody = 'ttb:${atMetaData.ttb}:$commandBody';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import 'package:at_secondary/src/verb/manager/response_handler_manager.dart';
import 'package:at_server_spec/at_server_spec.dart';
import 'package:at_server_spec/at_verb_spec.dart';
import 'package:at_utils/at_logger.dart';
import 'package:at_secondary/src/utils/secondary_util.dart';

final String paramFullCommandAsReceived = 'FullCommandAsReceived';

Expand Down Expand Up @@ -89,6 +90,10 @@ abstract class AbstractVerbHandler implements VerbHandler {
AtData enrollData = await keyStore.get(enrollmentKey);
EnrollDataStoreValue enrollDataStoreValue =
EnrollDataStoreValue.fromJson(jsonDecode(enrollData.data!));
if (!SecondaryUtil.isActiveKey(enrollData) &&
enrollDataStoreValue.approval!.state != EnrollStatus.approved.name) {
enrollDataStoreValue.approval?.state = EnrollStatus.expired.name;
}
return enrollDataStoreValue;
} on KeyNotFoundException {
logger.severe('$enrollmentKey does not exist in the keystore');
Expand Down
Loading

0 comments on commit cab8227

Please sign in to comment.