diff --git a/.circleci/config.yml b/.circleci/config.yml index af1f09b8a3..a57248f6da 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,9 +1,11 @@ version: 2.1 orbs: - aws-cli: circleci/aws-cli@3.1 + aws-cli: circleci/aws-cli@4.1.1 + aws-ecs: circleci/aws-ecs@4.0.0 opsgenie: opsgenie/opsgenie@1.0.8 + jobs: frontend-code-test: resource_class: large @@ -68,7 +70,7 @@ jobs: TM_ORG_CODE: "CICode" TM_ORG_NAME: "CircleCI Test Organisation" - - image: cimg/postgres:14.2-postgis + - image: cimg/postgres:14.9-postgis environment: POSTGRES_USER: taskingmanager POSTGRES_DB: test_tm @@ -79,12 +81,6 @@ jobs: - run: sudo apt-get update - run: sudo apt-get -y install libgeos-dev # Required for shapely - run: sudo apt-get -y install proj-bin libproj-dev - - run: - name: Configure Postgresql Test database - command: | - psql \ - -d $SQLALCHEMY_DATABASE_URI \ - -c "CREATE EXTENSION postgis;" - run: pip install --upgrade pip pdm - run: pdm config --global python.use_venv False - run: pdm export --dev --without-hashes > requirements.txt @@ -113,13 +109,13 @@ jobs: description: "Cloudformation stack name" type: string docker: - - image: cimg/postgres:15.1-postgis + - image: cimg/postgres:15.4-postgis steps: - aws-cli/setup: - role-arn: "arn:aws:iam::$ORG_AWS_ACCOUNT_ID:role/CircleCI-OIDC-Connect" - profile-name: "OIDC-Profile" - role-session-name: "database-snapshot" - session-duration: "2700" + role_arn: "arn:aws:iam::$ORG_AWS_ACCOUNT_ID:role/CircleCI-OIDC-Connect" + profile_name: "OIDC-Profile" + role_session_name: "database-snapshot" + session_duration: "2700" - run: name: Find the instance ID of the database in the stack to backup command: | @@ -193,10 +189,10 @@ jobs: steps: - checkout - aws-cli/setup: - role-arn: "arn:aws:iam::$ORG_AWS_ACCOUNT_ID:role/CircleCI-OIDC-Connect" - profile-name: "OIDC-Profile" - role-session-name: "backend-deploy" - session-duration: "2700" + role_arn: "arn:aws:iam::$ORG_AWS_ACCOUNT_ID:role/CircleCI-OIDC-Connect" + profile_name: "OIDC-Profile" + role_session_name: "backend-deploy" + session_duration: "2700" - run: sudo apt-get update - run: sudo apt-get -y install libgeos-dev jq - run: sudo yarn global add @mapbox/cfn-config @mapbox/cloudfriend @@ -222,6 +218,21 @@ jobs: export JSON_CONFIG="$(< $CIRCLE_WORKING_DIRECTORY/cfn-config-<< parameters.stack_name >>.json)" cfn-config update << parameters.stack_name >> $CIRCLE_WORKING_DIRECTORY/scripts/aws/cloudformation/tasking-manager.template.js -f -c hot-cfn-config -t hot-cfn-config -r $AWS_REGION -p "$JSON_CONFIG" + backend_deploy_containers: + working_directory: /home/circleci/tasking-manager + docker: + - image: cimg/python:3.10.7 + steps: + - checkout + - aws-cli/setup: + role_arn: "arn:aws:iam::$ORG_AWS_ACCOUNT_ID:role/CircleCI-OIDC-Connect" + profile_name: "OIDC-Profile" + role_session_name: "backend-deploy-containers" + session_duration: "2700" + - run: sudo apt-get update + - run: sudo apt-get -y install curl + - run: echo "Run AWS Fargate" + frontend_deploy: working_directory: /home/circleci/tasking-manager resource_class: large @@ -234,10 +245,10 @@ jobs: steps: - checkout - aws-cli/setup: - role-arn: "arn:aws:iam::$ORG_AWS_ACCOUNT_ID:role/CircleCI-OIDC-Connect" - profile-name: "OIDC-Profile" - role-session-name: "frontend-deploy" - session-duration: "1800" + role_arn: "arn:aws:iam::$ORG_AWS_ACCOUNT_ID:role/CircleCI-OIDC-Connect" + profile_name: "OIDC-Profile" + role_session_name: "frontend-deploy" + session_duration: "1800" - run: name: Deploy Frontend to S3 command: | diff --git a/README.md b/README.md index f5317df6ad..90750c3c2d 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,7 @@ This is Free and Open Source Software. You are welcome to use the code and set u * Read the monthly update blogs on [OSM Discourse](https://community.openstreetmap.org/c/general/38/all). ## Product Roadmap -We have included below a high level roadmap/plan [subject to change] that can be used as an overview. -![image](https://user-images.githubusercontent.com/98902727/218763601-f08e3879-51f3-40a7-ae6e-bdf96f8a5979.png) - +We have included below a [high level roadmap/plan](https://github.com/orgs/hotosm/projects/28/) [subject to change] that can be used as an overview. ## Developers diff --git a/backend/config.py b/backend/config.py index a76256e6d4..555205014f 100644 --- a/backend/config.py +++ b/backend/config.py @@ -205,7 +205,7 @@ class EnvironmentConfig: """ import json - _params = json.loads(os.getenv("OAUTH2_APP_CREDENTIALS"), None) + _params = json.loads(os.getenv("OAUTH2_APP_CREDENTIALS", None)) OAUTH_CLIENT_ID = _params.get("CLIENT_ID", None) OAUTH_CLIENT_SECRET = _params.get("CLIENT_SECRET", None) OAUTH_REDIRECT_URI = _params.get("REDIRECT_URI", None) diff --git a/frontend/src/components/projects/projectCardPaginator.js b/frontend/src/components/projects/projectCardPaginator.js index e3da5d7a0a..c5be0fd17a 100644 --- a/frontend/src/components/projects/projectCardPaginator.js +++ b/frontend/src/components/projects/projectCardPaginator.js @@ -15,7 +15,8 @@ export const ProjectCardPaginator = ({ status, pagination, fullProjectsQuery, se ); }; - if (!apiIsFetched) { + // do not show pagination when the data is being fetched or it has zero results + if (!apiIsFetched || !pagination?.total) { return null; } const activePage = (apiIsFetched && pagination?.page) || 1; diff --git a/frontend/src/views/contributions.js b/frontend/src/views/contributions.js index a6e79dda22..fd1b4eaffc 100644 --- a/frontend/src/views/contributions.js +++ b/frontend/src/views/contributions.js @@ -46,7 +46,12 @@ export const ContributionsPage = () => {
- +
); }; diff --git a/scripts/aws/cloudformation/tasking-manager.template.js b/scripts/aws/cloudformation/tasking-manager.template.js index e03637dc9e..7c66644165 100644 --- a/scripts/aws/cloudformation/tasking-manager.template.js +++ b/scripts/aws/cloudformation/tasking-manager.template.js @@ -562,7 +562,9 @@ const Resources = { Name: cf.stackName, SecurityGroups: [cf.importValue(cf.join('-', ['hotosm-network-production', cf.ref('NetworkEnvironment'), 'elbs-security-group', cf.region]))], Subnets: cf.ref('ELBSubnets'), - Type: 'application' + Type: 'application', + IpAddressType: 'dualstack', + Tags: [ { "Key": "stack_name", "Value": cf.stackName } ] } }, TaskingManagerLoadBalancerRoute53: { @@ -651,6 +653,7 @@ const Resources = { DBInstanceClass: cf.ref('DatabaseInstanceType'), DBSnapshotIdentifier: cf.if('UseASnapshot', cf.ref('DBSnapshot'), cf.noValue), VPCSecurityGroups: [cf.importValue(cf.join('-', ['hotosm-network-production', cf.ref('NetworkEnvironment'), 'ec2s-security-group', cf.region]))], + PubliclyAccessible: false } }, TaskingManagerReactBucket: {