Skip to content

Commit

Permalink
Merge pull request #68 from 4dn-dcic/dmichaels-fix-deploy-for-cgap-ms…
Browse files Browse the repository at this point in the history
…a-20241126

fix for deploy for cgap-msa (et.al. similar like cgap-dbmi).
  • Loading branch information
dmichaels-harvard authored Jan 10, 2025
2 parents be5aca3 + 0cd4d92 commit 707bc2b
Show file tree
Hide file tree
Showing 8 changed files with 1,252 additions and 1,088 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with:
python-version: 3.12
- name: Install Python dependencies for publish
run: python -m pip install dcicutils==8.7.0.1b2
run: python -m pip install dcicutils==8.16.6
- name: Update the gitinfo.json file with latest relevant git info
run: |
echo "{\"repo\": \"https://github.com/${{ github.repository }}\", \"branch\": \"${GITHUB_REF##*/}\", \"commit\": \"${GITHUB_SHA}\"}" > foursight_core/gitinfo.json
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ foursight-core
Change Log
----------

5.8.0
=====
* 2024-11-26/dmichaels
* Fix in aws_ecs_services for deploying to cgap-msa (et.al. similar e.g. cgap-dbmi);
it wasn't picking up correct CodeBuild project and exceptioning out.
* Updated dcicutils to 8.16.4 (just to keep up to date).


5.7.0
=====
* 2024-10-11/dmichaels
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: test

configure: # does any pre-requisite installs
pip install poetry
pip install poetry==1.8.5
pip install setuptools wheel

lint:
Expand Down
17 changes: 17 additions & 0 deletions foursight_core/react/api/aws_ecs_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,23 @@ def prefer_project(preferred_project: str):
preferred_project = [project for project in projects if image_tag.lower() in project.lower()]
if preferred_project:
return prefer_project(preferred_project[0])

# Bit of a hack here to handle specific case of cgap-msa (and similar e.g. cgap-dbmi) where
# the ECR image name (e.g. "main") does not match the CodeBuild project name, e.g. like
# for smaht we have image name "smaht-devtest" and CodeBuild project name "smaht-devtest"
# for for cgap-msa we have image name "main and CodeBuild project nanme "cgap-msa", so for
# just to make sure we look at the "right" CodeBuild project name first we defavor any
# others like "cgap-msa-pipeline-builder" or ""cgap-msa-tibanna-awsf-builder". The real
# problem is so far have not found a good way to align info from these two data sets,
# i.e. the CodeBuild project names and the ECR images names. But this works for now.
defavored_projects = []
for project in projects:
if ("pipeline" in project.lower()) or ("tibanna" in project.lower()):
defavored_projects.append(project)
for defavored_project in defavored_projects:
projects.remove(defavored_project)
projects.append(defavored_project)

return projects

def get_relevant_builds(project: str) -> Generator[Optional[Dict], None, None]:
Expand Down
2 changes: 1 addition & 1 deletion foursight_core/react/ui/static/css/main.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions foursight_core/react/ui/static/js/main.js

Large diffs are not rendered by default.

2,301 changes: 1,220 additions & 1,081 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "foursight-core"
version = "5.7.0"
version = "5.7.0.1b7" # TODO: To become 5.8.0
description = "Serverless Chalice Application for Monitoring"
authors = ["4DN-DCIC Team <[email protected]>"]
license = "MIT"
Expand All @@ -17,7 +17,7 @@ botocore = "^1.34.136"
click = "^7.1.2"
cron-descriptor = "^1.2.31"
cryptography = "^43.0.1" # Required for AWS Cognito JWT decode (PyJWKClient)
dcicutils = "^8.16.1"
dcicutils = "^8.16.4"
elasticsearch = "7.13.4"
elasticsearch-dsl = "^7.0.0"
geocoder = "1.38.1"
Expand Down

0 comments on commit 707bc2b

Please sign in to comment.