Skip to content

Commit 80c48a4

Browse files
committed
Merge branch 'release/1.16.0'
2 parents f6f0101 + 5d4a01e commit 80c48a4

76 files changed

Lines changed: 19637 additions & 3713 deletions

File tree

Some content is hidden

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

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99

1010
### Added
11+
- Add color picker to reference layer flyout [#1150](https://github.com/PublicMapping/districtbuilder/pull/1150)
12+
- Add district type to project cards on 'My Maps' page [#1162](https://github.com/PublicMapping/districtbuilder/pull/1162)
13+
- Add Creation and Login Dates to User [#1159](https://github.com/PublicMapping/districtbuilder/pull/1159)
14+
- Allow admins to archive organization templates [#1164](https://github.com/PublicMapping/districtbuilder/pull/1164)
1115

1216
### Changed
17+
- Updated caching setup based on load testing [#1172](https://github.com/PublicMapping/districtbuilder/pull/1172)
1318

1419
### Fixed
20+
- Updated tippecanoe & fix process-geojson [#1173](https://github.com/PublicMapping/districtbuilder/pull/1173)
21+
- Fixed crash when loading regions, don't show inactive templates / templates w/ archived regions [#1185](https://github.com/PublicMapping/districtbuilder/pull/1185)
1522

1623
## [1.15.1] - 2022-03-03
1724

@@ -460,7 +467,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
460467

461468
- Initial release.
462469

463-
[unreleased]: https://github.com/publicmapping/districtbuilder/compare/1.15.0...HEAD
470+
[unreleased]: https://github.com/publicmapping/districtbuilder/compare/1.15.1...HEAD
471+
[1.15.1]: https://github.com/publicmapping/districtbuilder/compare/1.15.0...1.15.1
464472
[1.15.0]: https://github.com/publicmapping/districtbuilder/compare/1.14.0...1.15.0
465473
[1.14.0]: https://github.com/publicmapping/districtbuilder/compare/1.13.0...1.14.0
466474
[1.13.0]: https://github.com/publicmapping/districtbuilder/compare/1.12.1...1.13.0

deployment/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ To deploy this project's core infrastructure, use the `infra` wrapper script to
7474

7575
```bash
7676
$ docker-compose -f docker-compose.ci.yml run --rm terraform
77+
$ export GIT_COMMIT= (an existing git hash of an image that has been published)
7778
$ ./scripts/infra plan
7879
```
7980

@@ -83,7 +84,7 @@ Once the plan has been assembled, and you agree with the changes, apply it:
8384
$ ./scripts/infra apply
8485
```
8586

86-
This will attempt to apply the plan assembled in the previous step using Amazon's APIs.
87+
This will attempt to apply the plan assembled in the previous step using Amazon's APIs. If you want to change production you need to prepend DB_SETTINGS_BUCKET=districtbuilder-production-config-us-east-1 to the infra commands.
8788

8889
## Migrations
8990

deployment/terraform/app.tf

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -202,37 +202,6 @@ resource "aws_ecs_service" "app" {
202202
]
203203
}
204204

205-
resource "aws_ecs_task_definition" "app_cli" {
206-
family = "${var.environment}AppCLI"
207-
network_mode = "awsvpc"
208-
requires_compatibilities = ["FARGATE"]
209-
cpu = var.fargate_app_cli_cpu
210-
memory = var.fargate_app_cli_memory
211-
212-
task_role_arn = aws_iam_role.ecs_task_role.arn
213-
execution_role_arn = aws_iam_role.ecs_task_execution_role.arn
214-
215-
container_definitions = templatefile("${path.module}/task-definitions/app_cli.json.tmpl", {
216-
image = "${module.ecr_cli.repository_url}:${var.image_tag}"
217-
218-
postgres_host = aws_route53_record.database.name
219-
postgres_port = module.database.port
220-
postgres_user = var.rds_database_username
221-
postgres_password = var.rds_database_password
222-
postgres_db = var.rds_database_name
223-
224-
project = var.project
225-
environment = var.environment
226-
aws_region = var.aws_region
227-
})
228-
229-
tags = {
230-
Name = "${var.environment}AppCLI",
231-
Project = var.project
232-
Environment = var.environment
233-
}
234-
}
235-
236205
#
237206
# CloudWatch Resources
238207
#

deployment/terraform/container_service.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ data "template_cloudinit_config" "container_instance_cloud_config" {
2323
# better than choosing an arbitrary constant.
2424
#
2525
# See: doc/DistrictBuilder_Memory_Usage_vs_Memory_Map_Areas.xlsx
26-
vm_max_map_count = local.container_instance_app_memory * 3 + (8 * 1024)
26+
#
27+
# Edit 3-17-2022, doubled map count to account for new cache architecture
28+
vm_max_map_count = local.container_instance_app_memory * 6 + (8 * 1024)
2729
})
2830
}
2931
}

deployment/terraform/storage.tf

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,3 @@ module "ecr" {
2828
repository_name = lower(var.project)
2929
attach_lifecycle_policy = true
3030
}
31-
32-
module "ecr_cli" {
33-
source = "github.com/azavea/terraform-aws-ecr-repository?ref=1.0.0"
34-
35-
repository_name = "${lower(var.project)}-manage"
36-
attach_lifecycle_policy = true
37-
}

deployment/terraform/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ variable "container_instance_asg_health_check_grace_period" {
253253
}
254254

255255
variable "container_instance_reserved_memory" {
256-
default = 4 * 1024
256+
default = 2 * 1024
257257
type = number
258258
}
259259

docker-compose.ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
version: "2.4"
22
services:
33
server:
4-
image: "districtbuilder:${GIT_COMMIT:-latest}"
4+
image: "districtbuilder:${GIT_COMMIT}"
55
volumes:
66
- "/var/cache/district-builder-${EXECUTOR_NUMBER}-server-node-modules:/home/node/app/server/node_modules"
77

88
client:
9-
image: node:16-slim
9+
image: node:16-bullseye-slim
1010
volumes:
1111
- "/var/cache/district-builder-${EXECUTOR_NUMBER}-client-node-modules:/home/node/app/node_modules"
1212

1313
manage:
14-
image: "districtbuilder-manage:${GIT_COMMIT:-latest}"
14+
image: "districtbuilder-manage:${GIT_COMMIT}"
1515
volumes:
1616
- "/var/cache/district-builder-${EXECUTOR_NUMBER}-server-node-modules:/home/node/app/server/node_modules"
1717
- "/var/cache/district-builder-${EXECUTOR_NUMBER}-manage-node-modules:/home/node/app/manage/node_modules"
@@ -29,7 +29,7 @@ services:
2929
- $HOME/.aws:/root/.aws:ro
3030
environment:
3131
- AWS_PROFILE=${AWS_PROFILE:-district-builder}
32-
- GIT_COMMIT=${GIT_COMMIT:-latest}
32+
- GIT_COMMIT=${GIT_COMMIT}
3333
- DB_DEBUG=1
3434
- DB_SETTINGS_BUCKET=${DB_SETTINGS_BUCKET:-districtbuilder-staging-config-us-east-1}
3535
- DB_ROLLBAR_ACCESS_TOKEN

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ services:
4444
database:
4545
condition: service_healthy
4646
command: start:dev
47+
mem_limit: 12g
48+
memswap_limit: 12g
4749

4850
client:
4951
image: node:16-bullseye-slim

load-tests/harness.js

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,32 @@ export const options = {
88
vus: 1,
99
iterations: 1,
1010
discardResponseBodies: true,
11-
verbose: true,
1211
maxRedirects: 0,
1312
thresholds: {
14-
checks: [{ threshold: "rate==1", abortOnFail: true }],
15-
},
13+
checks: [{ threshold: "rate==1", abortOnFail: true }]
14+
}
1615
};
1716

1817
const har = JSON.parse(open(`./${__ENV.HAR_FILE}`));
1918

2019
export function setup() {
2120
const requests = {};
2221

23-
har.log.entries.forEach((entry) => {
22+
har.log.entries.forEach(entry => {
2423
const url = entry.request.url.replace(
2524
/(http|https):\/\/([^\/]+)\//,
2625
__ENV.REQ_ORIGIN ? `${__ENV.REQ_ORIGIN}/` : "$1://$2/"
2726
);
2827

2928
const referer = entry.request.headers
30-
.find((header) => header.name.toLowerCase() === "referer")
29+
.find(header => header.name.toLowerCase() === "referer")
3130
.value.replace(
3231
/(http|https):\/\/([^\/]+)\//,
3332
__ENV.REQ_ORIGIN ? `${__ENV.REQ_ORIGIN}/` : "$1://$2/"
3433
);
3534

3635
const authHeader = entry.request.headers.find(
37-
(header) => header.name.toLowerCase() === "authorization"
36+
header => header.name.toLowerCase() === "authorization"
3837
);
3938
const authorization = authHeader
4039
? authHeader.value.replace(/^Bearer .*$/, `Bearer ${__ENV.JWT_AUTH_TOKEN}`)
@@ -60,12 +59,12 @@ export function setup() {
6059
"Content-Type": "application/json",
6160
authorization,
6261
// Without this referer, CloudFront will throw a 401
63-
referer,
64-
},
65-
},
62+
referer
63+
}
64+
}
6665
]);
6766
} else {
68-
__ENV.PROJECT_UUIDS.split(" ").forEach((uuid) => {
67+
__ENV.PROJECT_UUIDS.split(" ").forEach(uuid => {
6968
requests[batchTime].push([
7069
entry.request.method,
7170
url.replace(
@@ -82,9 +81,9 @@ export function setup() {
8281
referer: referer.replace(
8382
/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/i,
8483
uuid
85-
),
86-
},
87-
},
84+
)
85+
}
86+
}
8887
]);
8988
});
9089
}
@@ -98,7 +97,7 @@ export function setup() {
9897
return [batches, requests];
9998
}
10099

101-
export default (data) => {
100+
export default data => {
102101
const batches = data[0];
103102
const requests = data[1];
104103

@@ -109,9 +108,14 @@ export default (data) => {
109108

110109
const responses = http.batch(requests[batch]);
111110

112-
responses.forEach((res) => {
111+
responses.forEach(res => {
113112
check(res, {
114-
"is status 200": (r) => r.status === 200,
113+
"is status 200": r => {
114+
if (r.status !== 200) {
115+
console.log(r.status);
116+
}
117+
return r.status === 200;
118+
}
115119
});
116120
});
117121

load-tests/patch-staging-texas-project.har

Lines changed: 3436 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)