Skip to content

Commit 11e0670

Browse files
Try to fix the deployment 32
Signed-off-by: Lukasz Gryglicki <[email protected]>
1 parent 0accf22 commit 11e0670

File tree

7 files changed

+56
-20
lines changed

7 files changed

+56
-20
lines changed

.github/workflows/deploy-dev.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
python -m venv .venv
7474
source .venv/bin/activate
7575
pip install --upgrade pip
76-
pip install python-jose
76+
pip install python-jose pynamodb
7777
pip install -r requirements.txt
7878
7979
- name: Python Lint
@@ -155,7 +155,6 @@ jobs:
155155
if [[ ! -f bin/gitlab-repository-check-lambda ]]; then echo "Missing bin/gitlab-repository-check-lambda binary file. Exiting..."; exit 1; fi
156156
if [[ ! -f serverless.yml ]]; then echo "Missing serverless.yml file. Exiting..."; exit 1; fi
157157
if [[ ! -f serverless-authorizer.yml ]]; then echo "Missing serverless-authorizer.yml file. Exiting..."; exit 1; fi
158-
find bin/
159158
yarn sls deploy --force --stage ${STAGE} --region us-east-1 --verbose
160159
161160
- name: EasyCLA v1 Service Check
@@ -199,7 +198,6 @@ jobs:
199198
if [[ ! -f bin/user-subscribe-lambda ]]; then echo "Missing bin/user-subscribe-lambda binary file. Exiting..."; exit 1; fi
200199
rm -rf ./node_modules/
201200
yarn install
202-
find bin/
203201
yarn sls deploy --force --stage ${STAGE} --region us-east-2 --verbose
204202
205203
- name: EasyCLA v2 Service Check

cla-backend/cla/models/dynamo_models.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ class DocumentModel(MapAttribute):
939939
document_preamble = UnicodeAttribute(null=True)
940940
document_legal_entity_name = UnicodeAttribute(null=True)
941941
document_s3_url = UnicodeAttribute(null=True)
942-
document_tabs = ListAttribute(of=DocumentTabModel, default=[])
942+
document_tabs = ListAttribute(of=DocumentTabModel)
943943

944944

945945
class Document(model_interfaces.Document):
@@ -1142,9 +1142,9 @@ class Meta:
11421142
project_external_id = UnicodeAttribute()
11431143
project_name = UnicodeAttribute()
11441144
project_name_lower = UnicodeAttribute(null=True)
1145-
project_individual_documents = ListAttribute(of=DocumentModel, default=[])
1146-
project_corporate_documents = ListAttribute(of=DocumentModel, default=[])
1147-
project_member_documents = ListAttribute(of=DocumentModel, default=[])
1145+
project_individual_documents = ListAttribute(of=DocumentModel)
1146+
project_corporate_documents = ListAttribute(of=DocumentModel)
1147+
project_member_documents = ListAttribute(of=DocumentModel)
11481148
project_icla_enabled = BooleanAttribute(default=True)
11491149
project_ccla_enabled = BooleanAttribute(default=True)
11501150
project_ccla_requires_icla_signature = BooleanAttribute(default=False)
@@ -1158,7 +1158,7 @@ class Meta:
11581158
project_name_lower_search_index = ProjectNameLowerIndex()
11591159
foundation_sfid_project_name_index = ProjectFoundationIDIndex()
11601160

1161-
project_acl = UnicodeSetAttribute(default=set())
1161+
project_acl = UnicodeSetAttribute(default=set)
11621162
# Default is v1 for all of our models - override for this model so that we can redirect to new UI when ready
11631163
# version = UnicodeAttribute(default="v2") # Schema version is v2 for Project Models
11641164

@@ -1567,7 +1567,7 @@ class Meta:
15671567
user_id = UnicodeAttribute(hash_key=True)
15681568
# User Emails are specifically GitHub Emails
15691569
user_external_id = UnicodeAttribute(null=True)
1570-
user_emails = UnicodeSetAttribute(default=set())
1570+
user_emails = UnicodeSetAttribute(default=set)
15711571
user_name = UnicodeAttribute(null=True)
15721572
user_company_id = UnicodeAttribute(null=True)
15731573
user_github_id = NumberAttribute(null=True)
@@ -3491,7 +3491,7 @@ class Meta:
34913491
company_name_index = CompanyNameIndex()
34923492
signing_entity_name_index = SigningEntityNameIndex()
34933493
company_external_id_index = ExternalCompanyIndex()
3494-
company_acl = UnicodeSetAttribute(default=set())
3494+
company_acl = UnicodeSetAttribute(default=set)
34953495
note = UnicodeAttribute(null=True)
34963496

34973497

@@ -4562,7 +4562,7 @@ class Meta:
45624562
host = "http://localhost:8000"
45634563

45644564
username = UnicodeAttribute(hash_key=True)
4565-
projects = UnicodeSetAttribute(default=set())
4565+
projects = UnicodeSetAttribute(default=set)
45664566

45674567

45684568
class UserPermissions(model_interfaces.UserPermissions): # pylint: disable=too-many-public-methods
@@ -5262,7 +5262,7 @@ class Meta:
52625262
project_id = UnicodeAttribute(null=True)
52635263
project_name = UnicodeAttribute(null=True)
52645264
request_status = UnicodeAttribute(null=True)
5265-
user_emails = UnicodeSetAttribute(default=set())
5265+
user_emails = UnicodeSetAttribute(default=set)
52665266
user_id = UnicodeAttribute(null=True)
52675267
user_github_id = UnicodeAttribute(null=True)
52685268
user_github_username = UnicodeAttribute(null=True)

cla-backend/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pydocusign==2.2
3737
PyGithub==1.55
3838
PyJWT==2.7.0
3939
pylint==2.11.1
40-
pynamodb==4.4.0
40+
## pynamodb==4.4.0
4141
pyparsing==2.4.5
4242
pytest==5.0.1
4343
pytest-clarity==0.3.0a0

utils/health_python_v2.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

utils/health_v2.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
# API_URL=https://[xyz].ngrok-free.app (defaults to localhost:5000)
3+
if [ -z "$API_URL" ]
4+
then
5+
export API_URL="http://localhost:5000"
6+
fi
7+
curl -s --fail -XGET "${API_URL}/v2/health"
8+
r=$?
9+
if [[ ${r} -eq 0 ]]
10+
then
11+
echo "Successful response"
12+
else
13+
echo "Failed to get a successful response"
14+
exit ${r}
15+
fi

utils/health_v3.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
# API_URL=https://[xyz].ngrok-free.app (defaults to localhost:5000)
3+
if [ -z "$API_URL" ]
4+
then
5+
export API_URL="http://localhost:5000"
6+
fi
7+
curl -s --fail -XGET "${API_URL}/v3/ops/health"
8+
r=$?
9+
if [[ ${r} -eq 0 ]]
10+
then
11+
echo "Successful response"
12+
else
13+
echo "Failed to get a successful response"
14+
exit ${r}
15+
fi

utils/health_v4.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
# API_URL=https://[xyz].ngrok-free.app (defaults to localhost:5000)
3+
if [ -z "$API_URL" ]
4+
then
5+
export API_URL="http://localhost:5000"
6+
fi
7+
curl -s --fail -XGET "${API_URL}/v4/ops/health"
8+
r=$?
9+
if [[ ${r} -eq 0 ]]
10+
then
11+
echo "Successful response"
12+
else
13+
echo "Failed to get a successful response"
14+
exit ${r}
15+
fi

0 commit comments

Comments
 (0)