Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
2b9db32
init search_sync_api express app
skwowet Oct 15, 2023
6b86816
Extract search_sync_worker methods into opensearch lib and init APIs
skwowet Oct 15, 2023
fe6d10c
Fix package.json for build
skwowet Oct 15, 2023
7c3fac1
Fix failing tests
skwowet Oct 15, 2023
47ee121
Add opensearch and redis middlewares
skwowet Oct 15, 2023
b36ef5c
Fix failing tests
skwowet Oct 15, 2023
f78ceff
Add config to lib and refactor later
skwowet Oct 17, 2023
0d1c25f
Merge branch 'main' into search-sync-api
skwowet Oct 17, 2023
4ac0c27
Wrap endpoints with asyncWrap
skwowet Oct 17, 2023
1e67044
Fix middleware and pass arguments properly
skwowet Oct 24, 2023
83086eb
Refactor existing sqs triggers to adapt the new api
skwowet Oct 25, 2023
ac18a33
Refactor existing sqs triggers and extract httpclients to lib
skwowet Oct 25, 2023
ef17a18
Add github workflows for the new api service
skwowet Oct 25, 2023
b9ae7c7
Merge branch 'main' into search-sync-api
skwowet Oct 25, 2023
acc7c36
Refactor conf usages
skwowet Oct 25, 2023
130c70b
Add envs properly with config set
skwowet Oct 25, 2023
5b5e074
Resolve pr comments by passing configs thro constructor
skwowet Oct 26, 2023
9dbd7c6
Fix bug casuing search sync server to hang
skwowet Oct 26, 2023
d0b98da
Merge branch 'main' into search-sync-api
skwowet Oct 26, 2023
ee9efc7
Fix failing tests
skwowet Oct 27, 2023
935c367
Add searchSyncApi default config
skwowet Oct 27, 2023
9719ddf
Fix failing test cases - env, init
skwowet Oct 27, 2023
114837a
Merge branch 'main' into search-sync-api
skwowet Oct 27, 2023
bdbc33c
Fix env for tests
skwowet Oct 27, 2023
d772303
Add builder script for the service
skwowet Oct 27, 2023
e3c7b44
Fix env anc check tests
skwowet Oct 27, 2023
ad1640c
dataSink and integrationRun services syncs to opensearch asynchronous…
epipav Nov 2, 2023
1a68d6d
Merge branch 'main' into feature/synchronous-opensearch-sync
epipav Nov 3, 2023
89d18f8
synchronous sync working with organization merge
epipav Nov 3, 2023
9194267
member merge syncing fix
epipav Nov 3, 2023
ae38960
Fix loading and messages when performing bulk actions
joanagmaia Nov 3, 2023
2bb8f05
Fix loading messages
joanagmaia Nov 3, 2023
74fb791
formatting
epipav Nov 6, 2023
0a0039c
Merge branch 'feature/synchronous-opensearch-sync' of github.com:Crow…
epipav Nov 6, 2023
268a74a
feature flagged synchronous opensearch updates
epipav Nov 7, 2023
a4a4e6a
async search syncing in ata sink worker scripts
epipav Nov 7, 2023
8cdab06
tests now always use the async emitter
epipav Nov 7, 2023
3ce01e4
formatting
epipav Nov 7, 2023
fb46512
httpsclient removed from data sink and integration run workers
epipav Nov 7, 2023
20c8bc8
cleaning code
epipav Nov 7, 2023
4e0daca
more cleaning
epipav Nov 7, 2023
496f726
sink worker cleaning
epipav Nov 7, 2023
df2fda4
introduced modes in SearchSyncService for easy mode override
epipav Nov 7, 2023
ae5edae
formatting
epipav Nov 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/lf-production-deploy-new.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
description: Deploy search-sync-worker service?
required: true
type: boolean
deploy_search_sync_api:
description: Deploy search-sync-api service?
required: true
type: boolean
deploy_integration_sync_worker:
description: Deploy integration-sync-worker service?
required: true
Expand Down Expand Up @@ -56,6 +60,27 @@ jobs:
- name: Set docker image output
id: image
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT

build-and-push-search-sync-api:
runs-on: ubuntu-latest
if: ${{ inputs.deploy_search_sync_api }}
outputs:
image: ${{ steps.image.outputs.IMAGE }}
defaults:
run:
shell: bash
steps:
- name: Check out repository code
uses: actions/checkout@v2

- uses: ./.github/actions/build-docker-image
id: image-builder
with:
image: search-sync-api

- name: Set docker image output
id: image
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT

build-and-push-integration-sync-worker:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -159,6 +184,24 @@ jobs:
image: ${{ needs.build-and-push-search-sync-worker.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}

deploy-search-sync-api:
needs: build-and-push-search-sync-api
runs-on: ubuntu-latest
if: ${{ inputs.deploy_search_sync_api }}
defaults:
run:
shell: bash

steps:
- name: Check out repository code
uses: actions/checkout@v2

- uses: ./.github/actions/deploy-service
with:
service: search-sync-api
image: ${{ needs.build-and-push-search-sync-api.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}

deploy-integration-sync-worker:
needs: build-and-push-integration-sync-worker
runs-on: ubuntu-latest
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/lf-staging-deploy-search-sync-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: LF Staging Deploy Search Sync API

on:
push:
branches:
- 'lf-staging/**'
- 'lf-staging-**'
paths:
- 'services/libs/**'
- 'services/apps/search_sync_api/**'

env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
CROWD_CLUSTER: ${{ secrets.LF_STAGING_CLUSTER_NAME }}
CROWD_ROLE_ARN: ${{ secrets.LF_STAGING_CLUSTER_ROLE_ARN }}
AWS_ACCESS_KEY_ID: ${{ secrets.LF_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.LF_AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.LF_AWS_REGION }}
SLACK_CHANNEL: deploys-lf-staging
SLACK_WEBHOOK: ${{ secrets.LF_STAGING_SLACK_CHANNEL_HOOK }}

jobs:
build-and-push:
runs-on: ubuntu-latest
outputs:
image: ${{ steps.image.outputs.IMAGE }}
defaults:
run:
shell: bash

steps:
- name: Check out repository code
uses: actions/checkout@v2

- uses: ./.github/actions/build-docker-image
id: image-builder
with:
image: search-sync-api

- name: Set docker image output
id: image
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT

deploy-search-sync-api:
needs: build-and-push
runs-on: ubuntu-latest
defaults:
run:
shell: bash

steps:
- name: Check out repository code
uses: actions/checkout@v2

- uses: ./.github/actions/deploy-service
with:
service: search-sync-api
image: ${{ needs.build-and-push.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}
43 changes: 43 additions & 0 deletions .github/workflows/production-deploy-new.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
description: Deploy search-sync-worker service?
required: true
type: boolean
deploy_search_sync_api:
description: Deploy search-sync-api service?
required: true
type: boolean
deploy_integration_sync_worker:
description: Deploy integration-sync-worker service?
required: true
Expand Down Expand Up @@ -56,6 +60,27 @@ jobs:
- name: Set docker image output
id: image
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT

build-and-push-search-sync-api:
runs-on: ubuntu-latest
if: ${{ inputs.deploy_search_sync_api }}
outputs:
image: ${{ steps.image.outputs.IMAGE }}
defaults:
run:
shell: bash
steps:
- name: Check out repository code
uses: actions/checkout@v2

- uses: ./.github/actions/build-docker-image
id: image-builder
with:
image: search-sync-api

- name: Set docker image output
id: image
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT

build-and-push-integration-sync-worker:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -159,6 +184,24 @@ jobs:
image: ${{ needs.build-and-push-search-sync-worker.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}

deploy-search-sync-api:
needs: build-and-push-search-sync-api
runs-on: ubuntu-latest
if: ${{ inputs.deploy_search_sync_api }}
defaults:
run:
shell: bash

steps:
- name: Check out repository code
uses: actions/checkout@v2

- uses: ./.github/actions/deploy-service
with:
service: search-sync-api
image: ${{ needs.build-and-push-search-sync-api.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}

deploy-integration-sync-worker:
needs: build-and-push-integration-sync-worker
runs-on: ubuntu-latest
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/staging-deploy-search-sync-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Staging Deploy Search Sync API

on:
push:
branches:
- 'staging/**'
- 'staging-**'
paths:
- 'services/libs/**'
- 'services/apps/search_sync_api/**'

env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
CROWD_CLUSTER: ${{ secrets.STAGING_CLUSTER_NAME }}
CROWD_ROLE_ARN: ${{ secrets.STAGING_CLUSTER_ROLE_ARN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
SLACK_CHANNEL: deploys-staging
SLACK_WEBHOOK: ${{ secrets.STAGING_SLACK_CHANNEL_HOOK }}

jobs:
build-and-push:
runs-on: ubuntu-latest
outputs:
image: ${{ steps.image.outputs.IMAGE }}
defaults:
run:
shell: bash

steps:
- name: Check out repository code
uses: actions/checkout@v2

- uses: ./.github/actions/build-docker-image
id: image-builder
with:
image: search-sync-api

- name: Set docker image output
id: image
run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT

deploy-search-sync-api:
needs: build-and-push
runs-on: ubuntu-latest
defaults:
run:
shell: bash

steps:
- name: Check out repository code
uses: actions/checkout@v2

- uses: ./.github/actions/deploy-service
with:
service: search-sync-api
image: ${{ needs.build-and-push.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}
5 changes: 4 additions & 1 deletion backend/.env.dist.composed
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ CROWD_NANGO_URL=http://nango:3003
CROWD_OPENSEARCH_NODE=http://open-search:9200

# Temporal
CROWD_TEMPORAL_SERVER_URL=temporal:7233
CROWD_TEMPORAL_SERVER_URL=temporal:7233

# Seach sync api
CROWD_SEARCH_SYNC_API_URL=http://search-sync-api:8083
5 changes: 4 additions & 1 deletion backend/.env.dist.local
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,7 @@ CROWD_ANALYTICS_API_TOKEN=

# Temporal
CROWD_TEMPORAL_SERVER_URL=localhost:7233
CROWD_TEMPORAL_NAMESPACE=default
CROWD_TEMPORAL_NAMESPACE=default

# Seach sync api
CROWD_SEARCH_SYNC_API_URL=http://search-sync-api:8083
2 changes: 1 addition & 1 deletion backend/.env.test
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ CROWD_REDIS_PORT=6380
CROWD_SQS_PORT=9325

# Temporal settings
CROWD_TEMPORAL_SERVER_URL=localhost:7234
CROWD_TEMPORAL_SERVER_URL=localhost:7234
3 changes: 3 additions & 0 deletions backend/config/custom-environment-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,5 +201,8 @@
"namespace": "CROWD_TEMPORAL_NAMESPACE",
"certificate": "CROWD_TEMPORAL_CERTIFICATE",
"privateKey": "CROWD_TEMPORAL_PRIVATE_KEY"
},
"searchSyncApi": {
"baseUrl": "CROWD_SEARCH_SYNC_API_URL"
}
}
3 changes: 2 additions & 1 deletion backend/config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@
},
"temporal": {
"automationsTaskQueue": "automations"
}
},
"searchSyncApi": {}
}
Loading