Skip to content

Commit c23811d

Browse files
authored
Fix improper markdown (#2367)
* fix improper markdown * make PR template more readable and navigable * make issue template more readable and navigable * fix improper markdown in contributing file * fix some improper markdown in daemons readmes * fix more improper markdown in dss notify readme
1 parent 2feac5f commit c23811d

File tree

9 files changed

+118
-55
lines changed

9 files changed

+118
-55
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

@@ -245,6 +248,7 @@ When deploying for the first time, a Google Cloud Platform service account must
245248
### Setting admin emails
246249
247250
Set admin account emails within AWS Secret Manager
251+
248252
```
249253
echo ' ' | ./scripts/set_secret.py --secret-name $ADMIN_USER_EMAILS_SECRETS_NAME
250254
```
@@ -261,42 +265,47 @@ usual plan/review Terraform workflow, and should therefore be lightweight in nat
261265
added to `$DSS_HOME/infra` instead.
262266
263267
##### Resources
268+
264269
Cloud resources have the potential for naming collision in both [AWS](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
265270
and [GCP](https://cloud.google.com/storage/docs/naming), ensure that you rename resources as needed.
266271
267272
#### Buckets
268273
269274
Buckets within AWS and GCP need to be available for use by the DSS. Use Terraform to setup these resources:
270275
271-
272276
```
273277
make -C infra COMPONENT=buckets plan
274278
make -C infra COMPONENT=buckets apply
275279
```
276280
277281
#### ElasticSearch
282+
278283
The AWS Elasticsearch Service is used for metadata indexing. Currently the DSS uses version 5.5 of ElasticSearch. For typical development deployments the
279284
t2.small.elasticsearch instance type is sufficient. Use the [`DSS_ES_`](./docs/environment/README.md) variables to adjust the cluster as needed.
280285
281286
Add allowed IPs for ElasticSearch to the secret manager, use comma separated IPs:
287+
282288
```
283289
echo ' ' | ./scripts/set_secret.py --secret-name $ES_ALLOWED_SOURCE_IP_SECRETS_NAME
284-
285290
```
291+
286292
Use Terraform to deploy ES resource:
293+
287294
```
288295
make -C infra COMPONENT=elasticsearch plan
289296
make -C infra COMPONENT=elasticsearch apply
290297
```
291298
292299
#### Certificates
300+
293301
A certificate matching your domain must be registered with
294302
[AWS Certificate Manager](https://docs.aws.amazon.com/acm/latest/userguide/acm-overview.html). Set `ACM_CERTIFICATE_IDENTIFIER`
295303
to the identifier of the certificate, which can be found on the AWS console.
296304
297305
An AWS route53 zone must be available for your domain name and configured in `environment`.
298306
299307
#### Deploying
308+
300309
Now deploy using make:
301310
302311
make plan-infra
@@ -312,8 +321,9 @@ And you should be able to list bundles like this:
312321
curl -X GET "https://<domain_name>/v1/bundles" -H "accept: application/json"
313322
314323
#### Monitoring
315-
Please see the [data-store-monitor](https://www.github.com/humancellatlas/data-store-monitor) repo for additional
316-
monitoring tools.
324+
325+
Please see the [data-store-monitor](https://www.github.com/humancellatlas/data-store-monitor) repo for additional
326+
monitoring tools.
317327
318328
### CI/CD with Travis CI and GitLab
319329
@@ -385,14 +395,17 @@ indexed metadata.
385395
'
386396
387397
## Running Tests
398+
388399
1. Check that software packages required to test and deploy are available, and install them if necessary:
389400
390401
`make --dry-run`
391402
392403
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
393-
the correct bucket names are provided)_:
404+
the correct bucket names are provided)**_:
394405
395-
`tests/fixtures/populate.py --s3-bucket $DSS_S3_BUCKET_TEST_FIXTURES --gs-bucket $DSS_GS_BUCKET_TEST_FIXTURES`
406+
```
407+
tests/fixtures/populate.py --s3-bucket $DSS_S3_BUCKET_TEST_FIXTURES --gs-bucket $DSS_GS_BUCKET_TEST_FIXTURES
408+
```
396409
397410
1. Set the environment variable `DSS_TEST_ES_PATH` to the path of the `elasticsearch` binary on your machine.
398411
@@ -483,12 +496,15 @@ test-deploy-test cycle after this (the test after the deploy is required to test
483496
```
484497
485498
### Enabling Profiling
499+
486500
AWS Xray tracing is used for profiling the performance of deployed lambdas. This can be enabled for `chalice/app.py` by
487501
setting the lambda environment variable `DSS_XRAY_TRACE=1`. For all other daemons you must also check
488502
"Enable active tracking" under "Debugging and error handling" in the AWS Lambda console.
489503
490504
## Security Policy
505+
491506
See our [Security Policy](https://github.com/HumanCellAtlas/.github/blob/master/SECURITY.md).
492507
493508
## Contributing
509+
494510
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`.

dss/notify/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ Full disclosure: the ordering constraints enforced by FIFO queues are obviously
6969
than one worker consumes a queue. Furthermore, the unqiqueness constraint (aka "exactly-once delivery") of FIFO queues
7070
is weakened by two rare, but unavoidable race conditions.
7171

72-
1) It is possible for a failed notification to become visible on queue N while it is being enqueued in queue N+1.
73-
Reversing the order of operations—deleting the message from queue N before enqueueing it in queue N+1—would risk the
74-
loss of that notification if the worker thread is interrupted in between the two steps. In other words, the design
75-
favors duplication over data loss.
72+
1) It is possible for a failed notification to become visible on queue N while it is being enqueued in queue N+1.
73+
Reversing the order of operations—deleting the message from queue N before enqueueing it in queue N+1—would risk the
74+
loss of that notification if the worker thread is interrupted in between the two steps. In other words, the design
75+
favors duplication over data loss.
7676

77-
2) When delivering a notification to a slow endpoint, it is possible that the endpoint considers the request a
78-
success whereas the notifier sees it as a timeout. Once the notification attempt times out, the 200 HTTP status
79-
response will be discarded, and the message will be enqueued in the next queue for another attempt.
77+
2) When delivering a notification to a slow endpoint, it is possible that the endpoint considers the request a
78+
success whereas the notifier sees it as a timeout. Once the notification attempt times out, the 200 HTTP status
79+
response will be discarded, and the message will be enqueued in the next queue for another attempt.
8080

8181
Lastly, FIFO message groups also interfere with the invariant that messages mature in FIFO order. A call to SQS's
8282
`ReceiveMessage` API on a FIFO may return a probabalistic sampling of messages from different message groups, therefore

0 commit comments

Comments
 (0)