Skip to content

Commit 0a7fbcf

Browse files
committed
Merge branch 'master' into chmreid-secrets-infra
* master: Fix failing collections tests Add pagination response headers (closes #2287) Fix improper markdown (#2367)
2 parents 17ba644 + 2e73ab3 commit 0a7fbcf

File tree

16 files changed

+165
-60
lines changed

16 files changed

+165
-60
lines changed

CONTRIBUTING.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
# Contributing Guidelines
2+
23
Contributions to HCA working group repos are subject to overall HCA
34
governance and technical guidance. In addition, contributors are
4-
expected to abide by the following guidelines.
5+
expected to abide by the following guidelines:
56

67
1. Rough consensus and running code: instead of formal procedures for
7-
agreeing on everything, systems with working prototypes and existing
8-
users are prioritized as platforms for discussion.
8+
agreeing on everything, systems with working prototypes and existing
9+
users are prioritized as platforms for discussion.
910

1011
1. Keep it simple: prioritize scalability and the ability to keep the
11-
project easy to understand and scale over features. Use
12-
well-supported upstream solutions where possible. Provide useful
13-
defaults and don't expose unnecessary configuration options.
12+
project easy to understand and scale over features. Use
13+
well-supported upstream solutions where possible. Provide useful
14+
defaults and don't expose unnecessary configuration options.
1415

1516
1. Separation of concerns and layers: (TODO: elaborate)
1617

1718
1. Don't break the build: pull requests are expected to pass all
18-
automated CI checks.
19+
automated CI checks.
1920

2021
1. Keep the build simple: Automated CI checks that are fragile or don't
21-
serve a clear agreed upon purpose will be removed.
22+
serve a clear agreed upon purpose will be removed.
2223

2324
1. All Pull Request comments must be addressed, even after merge.
2425

2526
1. All code must be reviewed by at least 1 other team member.
2627

27-
1. All Pull Requests relating to an issue must include "connected to
28-
#123", where #123 is the issue number.
28+
1. All pull requests relating to an issue must include "connected to
29+
\#123", where \#123 is the issue number.
2930

3031
1. Individual commit messages should clearly express the commit's purpose.

ISSUE_TEMPLATE.md

+20-5
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,39 @@
1-
<!-- IF YOU ARE FILING A BUG, please uncomment/use the markdown below and apply the 'bug' label -->
1+
<!--
2+
**IF YOU ARE FILING A BUG**, please uncomment/use the markdown below
3+
and apply the 'bug' label.
4+
-->
5+
26
<!--
37
## Software version (git hash, date, branch)
48
## Expected behavior
59
## Actual behavior
610
## Steps to reproduce the behavior
711
-->
812

9-
<!-- IF YOU ARE FILING A FEATURE REQUEST, please uncomment/use the mardown below -->
1013
<!--
14+
**IF YOU ARE FILING A FEATURE REQUEST**, please uncomment/use the markdown below
15+
-->
16+
17+
<!--
18+
1119
## User story
20+
1221
* As a <type of user>
1322
* I want to <action>
1423
* so that <result>
1524
1625
## Definition of done
26+
1727
-->
1828

1929
<!--
20-
Other best practices
21-
* Use the following GitHub keyword if your PR completely resolves an issue: "Fixes #123"
22-
* If you are on the core dev team for this repo, mention your issue in daily scrum, sprint review, or to the PM.
30+
31+
Other best practices:
32+
33+
* Use the GitHub keywords "fixes" or "closes" if your PR completely resolves an issue:
34+
"Fixes #123" or "Closes #456"
35+
* If you are on the core dev team for this repo, mention your issue in daily
36+
scrum, sprint review, or to the PM.
2337
* Also, assign the issue to someone or to yourself.
38+
2439
-->

PULL_REQUEST_TEMPLATE.md

+32-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,36 @@
1-
<!-- Please make sure to provide a meaningful title for your PR. Do not keep the default title. -->
2-
<!-- Use the following GitHub keyword if your PR completely resolves an issue: "Fixes #123" -->
1+
<!--
2+
Please make sure to provide a meaningful title for your PR.
3+
Do not keep the default title.
4+
-->
35

4-
<!-- Describe how you tested this PR, and how you will test the feature after it is merged. Uncomment below:
5-
### Test plan -->
6+
<!--
7+
Use GitHub keywords "fixes" or "closes" followed by an issue number if your PR
8+
completely resolves an issue:
9+
"Fixes #123" or "Closes #456"
10+
-->
611

7-
<!-- Describe any special instructions to the operator who will deploy your code to the integration,
8-
staging and production deployments. Uncomment below:
9-
### Deployment instructions & migrations -->
12+
<!--
13+
Describe how you tested this PR, and how you will test the feature after it is
14+
merged. Uncomment below:
1015
11-
<!-- Add notes to highlight the feature when it's released/demoed. Uncomment the headings below:
12-
### Release notes -->
16+
### Test plan
17+
-->
1318

14-
<!-- Do you want your PR to be merged by the reviewer using squash or rebase merging? If so, mention it here. -->
19+
<!--
20+
Describe any special instructions to the operator who will deploy your code to
21+
the integration, staging and production deployments. Uncomment below:
22+
23+
### Deployment instructions & migrations
24+
-->
25+
26+
<!--
27+
Add notes to highlight the feature when it's released/demoed. Uncomment the
28+
headings below:
29+
30+
### Release notes
31+
-->
32+
33+
<!--
34+
Do you want your PR to be merged by the reviewer using squash or rebase
35+
merging? If so, mention it here.
36+
-->

README.md

+23-7
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ implements [Step Functions](https://aws.amazon.com/step-functions/) to orchestra
2323
as large file writes. You can find the API documentation and give it a try [here](https://dss.data.humancellatlas.org/).
2424

2525
#### [Architectural Diagram](https://www.lucidchart.com/documents/view/b65c8898-46e3-4560-b3b2-9e85f1c0a4c7)
26+
2627
![DSS Sync SFN diagram](https://www.lucidchart.com/publicSegments/view/43dfe33a-47c9-466b-9cb6-6d941a406d8f/image.png)
2728

2829
#### DSS API
30+
2931
The DSS API uses [Swagger](http://swagger.io/) to define the [API specification](dss-api.yml) according to the
3032
[OpenAPI 2.0 specification](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md).
3133
[Connexion](https://github.com/zalando/connexion) is used to map the API specification to its implementation in Python.
@@ -71,13 +73,15 @@ to review and edit the API specification. When the API is live, the spec is also
7173
* [Contributing](#contributing)
7274

7375
## Getting Started
76+
7477
In this section, you'll configure and deploy a local API server and your own suite of cloud services to run a
7578
development version of the DSS.
7679

7780
Note that privileged access to cloud accounts (AWS, GCP, etc.) is required to deploy the data-store. IF your deployment fails
7881
due to access restrictions, please consult your local systems administrators.
7982

8083
### Install Dependencies
84+
8185
The DSS requires Python 3.6 to run.
8286

8387
Clone the repo and install dependencies:
@@ -91,7 +95,6 @@ Also install [terraform from Hashicorp](https://www.terraform.io/) from your fav
9195

9296
### Configuration
9397

94-
9598
The DSS is configured via environment variables. The required environment variables and their default values
9699
are defined in the file [`environment`](environment). To customize the values of these environment variables:
97100

@@ -247,6 +250,7 @@ When deploying for the first time, a Google Cloud Platform service account must
247250
### Setting admin emails
248251
249252
Set admin account emails within AWS Secret Manager
253+
250254
```
251255
echo ' ' | ./scripts/dss-ops.py secrets set --secret-name $ADMIN_USER_EMAILS_SECRETS_NAME
252256
```
@@ -263,42 +267,47 @@ usual plan/review Terraform workflow, and should therefore be lightweight in nat
263267
added to `$DSS_HOME/infra` instead.
264268
265269
##### Resources
270+
266271
Cloud resources have the potential for naming collision in both [AWS](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
267272
and [GCP](https://cloud.google.com/storage/docs/naming), ensure that you rename resources as needed.
268273
269274
#### Buckets
270275
271276
Buckets within AWS and GCP need to be available for use by the DSS. Use Terraform to setup these resources:
272277
273-
274278
```
275279
make -C infra COMPONENT=buckets plan
276280
make -C infra COMPONENT=buckets apply
277281
```
278282
279283
#### ElasticSearch
284+
280285
The AWS Elasticsearch Service is used for metadata indexing. Currently the DSS uses version 5.5 of ElasticSearch. For typical development deployments the
281286
t2.small.elasticsearch instance type is sufficient. Use the [`DSS_ES_`](./docs/environment/README.md) variables to adjust the cluster as needed.
282287
283288
Add allowed IPs for ElasticSearch to the secret manager, use comma separated IPs:
289+
284290
```
285291
echo ' ' | ./scripts/dss-ops.py secret set --secret-name $ES_ALLOWED_SOURCE_IP_SECRETS_NAME
286-
287292
```
293+
288294
Use Terraform to deploy ES resource:
295+
289296
```
290297
make -C infra COMPONENT=elasticsearch plan
291298
make -C infra COMPONENT=elasticsearch apply
292299
```
293300
294301
#### Certificates
302+
295303
A certificate matching your domain must be registered with
296304
[AWS Certificate Manager](https://docs.aws.amazon.com/acm/latest/userguide/acm-overview.html). Set `ACM_CERTIFICATE_IDENTIFIER`
297305
to the identifier of the certificate, which can be found on the AWS console.
298306
299307
An AWS route53 zone must be available for your domain name and configured in `environment`.
300308
301309
#### Deploying
310+
302311
Now deploy using make:
303312
304313
make plan-infra
@@ -314,8 +323,9 @@ And you should be able to list bundles like this:
314323
curl -X GET "https://<domain_name>/v1/bundles" -H "accept: application/json"
315324
316325
#### Monitoring
317-
Please see the [data-store-monitor](https://www.github.com/humancellatlas/data-store-monitor) repo for additional
318-
monitoring tools.
326+
327+
Please see the [data-store-monitor](https://www.github.com/humancellatlas/data-store-monitor) repo for additional
328+
monitoring tools.
319329
320330
### CI/CD with Travis CI and GitLab
321331
@@ -387,14 +397,17 @@ indexed metadata.
387397
'
388398
389399
## Running Tests
400+
390401
1. Check that software packages required to test and deploy are available, and install them if necessary:
391402
392403
`make --dry-run`
393404
394405
1. Populate text fixture buckets with test fixture data _**(This command will completely empty the given buckets** before populating them with test fixture data, please ensure
395-
the correct bucket names are provided)_:
406+
the correct bucket names are provided)**_:
396407
397-
`tests/fixtures/populate.py --s3-bucket $DSS_S3_BUCKET_TEST_FIXTURES --gs-bucket $DSS_GS_BUCKET_TEST_FIXTURES`
408+
```
409+
tests/fixtures/populate.py --s3-bucket $DSS_S3_BUCKET_TEST_FIXTURES --gs-bucket $DSS_GS_BUCKET_TEST_FIXTURES
410+
```
398411
399412
1. Set the environment variable `DSS_TEST_ES_PATH` to the path of the `elasticsearch` binary on your machine.
400413
@@ -485,12 +498,15 @@ test-deploy-test cycle after this (the test after the deploy is required to test
485498
```
486499
487500
### Enabling Profiling
501+
488502
AWS Xray tracing is used for profiling the performance of deployed lambdas. This can be enabled for `chalice/app.py` by
489503
setting the lambda environment variable `DSS_XRAY_TRACE=1`. For all other daemons you must also check
490504
"Enable active tracking" under "Debugging and error handling" in the AWS Lambda console.
491505
492506
## Security Policy
507+
493508
See our [Security Policy](https://github.com/HumanCellAtlas/.github/blob/master/SECURITY.md).
494509
495510
## Contributing
511+
496512
External contributions are welcome. Please review the [Contributing Guidelines](CONTRIBUTING.md)

daemons/dss-dlq-reaper/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ This daemon is a part of the DLQ-based framework for reprocessing failed Lambda
1313
#### Enabling DLQ-based retries for DSS daemons Lambdas
1414

1515
In order to enable DLQ-based reprocessing for DSS daemons each daemon needs to be configured individually.
16+
1617
- Locate config.json file in the daemon's .chalice directory
1718
- Add the following entry to the `config.json` file `"dead_letter_queue_target_arn": "",`.
1819
- The entry needs to be created at the top level of the json attribute hierarchy. During deployment the value would be replaced with approriate SQS queue name.

daemons/dss-gs-event-relay/Readme.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
#### Activating Google Cloud APIs
2+
23
```
34
gcloud service-management enable cloudfunctions.googleapis.com
45
gcloud service-management enable runtimeconfig.googleapis.com
56
```
67

78
#### Retrieving GCF logs
8-
`gcloud beta functions logs read dss-gs-event-relay`
9+
10+
```
11+
gcloud beta functions logs read dss-gs-event-relay
12+
```
913

1014
#### Example Google Storage event
15+
1116
```
1217
{
1318
"timestamp": "2017-08-25T23:08:25.270Z",
@@ -35,6 +40,7 @@ gcloud service-management enable runtimeconfig.googleapis.com
3540
```
3641

3742
#### Environment variables in the GCF container
43+
3844
```
3945
{
4046
"WORKER_PORT": "8091",

daemons/dss-notify-v2/Readme.md

+2
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ The bundle metadata document format for a new bundle or version is is
9393
```
9494

9595
For a tombstone it is
96+
9697
```
9798
{
9899
'event_type': "TOMBSTONE",
@@ -104,6 +105,7 @@ For a tombstone it is
104105
```
105106

106107
For a deleted bundle it is
108+
107109
```
108110
{
109111
'event_type': "DELETE",
+15-15
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
# HCA DSS: Scalability Testing framework
22

33
This is a scalability test framework for the replicated data storage system (aka the "blue box") of
4-
the [Human Cell Atlas](https://www.humancellatlas.org/).
4+
the [Human Cell Atlas](https://www.humancellatlas.org/).
55

66
#### About the scalability testing framework
77

88
1. The scalability test framework is based on AWS Step Functions. Workflow definition resembles smoke test for DSS.
9-
2. The execution is triggered by sending SNS messages to dss-scalability-test-run-{STAGE} topic
10-
3. The scalability test writes results of execution of individual executions and aggregated run metrics into the
11-
following DynamoDB tables: scalability_test_result, scalability_test
12-
4. The SFN execution is initiated and starts by entering WAIT step. Wait is configured to end at the 5 minute intervals
13-
to accommodate the AWS limit on starting SFN executions and enable generation of bursts of load
14-
5. Once all parallel branches of execution are done, it writes summary of the run in DynamoDB
15-
6. DynamoDB is configured to stream new records into Lambda which aggregates the results and writes incremental metrics
16-
back into DynamoDB
17-
7. CloudWatch dashboard has been configured to display relevant execution metrics and deployed automatically. The
18-
dashboard is named as "Scalability{stage}"
9+
1. The execution is triggered by sending SNS messages to `dss-scalability-test-run-{STAGE}` topic
10+
1. The scalability test writes results of execution of individual executions and aggregated run metrics into the
11+
following DynamoDB tables: `scalability_test_result`, `scalability_test`
12+
1. The SFN execution is initiated and starts by entering WAIT step. Wait is configured to end at the 5 minute intervals
13+
to accommodate the AWS limit on starting SFN executions and enable generation of bursts of load
14+
1. Once all parallel branches of execution are done, it writes summary of the run in DynamoDB
15+
1. DynamoDB is configured to stream new records into Lambda which aggregates the results and writes incremental metrics
16+
back into DynamoDB
17+
1. CloudWatch dashboard has been configured to display relevant execution metrics and deployed automatically. The
18+
dashboard is named as `Scalability{stage}`
1919

2020
#### Running the scale test locally
2121

2222
* Run with default configuration `make scaletest` in the top-level `data-store` directory.
23-
* Run with custom configuration './tests/scalability/scale_test_runner.py -r <rps> -d <seconds>' in the
24-
top-level `data-store` directory. Where "rps" is a number of requests generated per second and "d" is a duration of the
25-
test in seconds
23+
* Run with custom configuration `./tests/scalability/scale_test_runner.py -r <rps> -d <duration_sec>` in the
24+
top-level `data-store` directory, where `<rps>` is a number of requests generated per second and
25+
`<duration_sec>` is the duration of the test in seconds.
2626

2727
#### Adding new tests
2828

29-
New tests can easily be addeed to the existing step function definition at app.py
29+
New tests can easily be addeed to the existing step function definition at `app.py`.

0 commit comments

Comments
 (0)