Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement/org enrichment with temporal c 2905 #2035

Merged
merged 39 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
87603ea
wip
Jan 2, 2024
2c22d5a
wip
Jan 2, 2024
fb1a924
done without testing
Jan 2, 2024
160df85
fixes still untested
Jan 3, 2024
594fa2d
wip
Jan 3, 2024
5f0f5f2
done
Jan 3, 2024
ea81368
wip
Jan 3, 2024
c0fe084
bugfix
Jan 3, 2024
285b3bf
test fixes
Jan 3, 2024
048e17d
Merge branch 'enhancement/org-identities-C-2904' into enhancement/org…
Jan 3, 2024
bdc4f0b
wip
Jan 4, 2024
b46f70e
done
Jan 4, 2024
0182d71
Merge branch 'enhancement/org-identities-C-2904' into enhancement/org…
Jan 4, 2024
16861f1
wip
Jan 4, 2024
16d0238
Merge branch 'main' into enhancement/org-identities-C-2904
Jan 4, 2024
9355667
Merge branch 'enhancement/org-identities-C-2904' into enhancement/org…
Jan 4, 2024
d62d63c
wip
Jan 5, 2024
2ccfd27
wip
Jan 5, 2024
113be86
Merge branch 'main' into enhancement/org-identities-C-2904
Jan 5, 2024
341c966
Merge branch 'enhancement/org-identities-C-2904' into enhancement/org…
Jan 5, 2024
df0f9e4
lint fix
Jan 5, 2024
cc98285
bugfixes
Jan 5, 2024
da66369
optimization
Jan 5, 2024
973f1f5
Merge branch 'enhancement/org-identities-C-2904' into enhancement/org…
Jan 5, 2024
8514345
done untested
Jan 6, 2024
3f0b350
fixes
Jan 6, 2024
a8dfaf1
Merge branch 'main' into enhancement/org-enrichment-with-temporal-C-2905
Jan 7, 2024
a8d3d76
done
Jan 8, 2024
ef41137
bugfix
Jan 8, 2024
25483a3
test fix
Jan 8, 2024
52fa964
remove line
Jan 8, 2024
9b6dba0
remove line
Jan 8, 2024
6a61cc1
bugfix
Jan 8, 2024
43534f4
bugfix
Jan 8, 2024
29839aa
bugfix
Jan 8, 2024
8f8b6d9
bugfix
Jan 8, 2024
978a6f3
query fix
Jan 8, 2024
2f0cb0c
sync to opensearch
Jan 8, 2024
ec851f2
Merge branch 'main' into enhancement/org-enrichment-with-temporal-C-2905
Jan 9, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/lf-production-deploy-new.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -491,4 +491,4 @@ jobs:
with:
service: script-executor
image: ${{ needs.build-and-push-script-executor.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}
cluster: ${{ env.CROWD_CLUSTER }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: LF Staging Deploy Organizations Enrichment Worker

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

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: organizations-enrichment-worker

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

deploy-organizations-enrichment-worker:
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: organizations-enrichment-worker
image: ${{ needs.build-and-push.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Staging Deploy Organizations Enrichment Worker

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

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: organizations-enrichment-worker

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

deploy-organizations-enrichment-worker:
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: organizations-enrichment-worker
image: ${{ needs.build-and-push.outputs.image }}
cluster: ${{ env.CROWD_CLUSTER }}
3 changes: 2 additions & 1 deletion backend/src/api/plan/stripe/checkout.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Error400, Error403 } from '@crowd/common'
import { TenantPlans } from '@crowd/types'
import { PLANS_CONFIG } from '../../../conf'
import Plans from '../../../security/plans'
import TenantService from '../../../services/tenantService'
Expand All @@ -19,7 +20,7 @@ export default async (req, res) => {
}

if (
currentTenant.plan !== Plans.values.essential &&
currentTenant.plan !== TenantPlans.Essential &&
currentTenant.planStatus !== 'cancel_at_period_end' &&
currentTenant.planUserId !== currentUser.id
) {
Expand Down
4 changes: 2 additions & 2 deletions backend/src/api/plan/stripe/portal.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Error400, Error403 } from '@crowd/common'
import { TenantPlans } from '@crowd/types'
import { PLANS_CONFIG } from '../../../conf'
import Plans from '../../../security/plans'
import TenantService from '../../../services/tenantService'
import { tenantSubdomain } from '../../../services/tenantSubdomain'

Expand All @@ -19,7 +19,7 @@ export default async (req, res) => {
}

if (
currentTenant.plan !== Plans.values.essential &&
currentTenant.plan !== TenantPlans.Essential &&
currentTenant.planStatus !== 'cancel_at_period_end' &&
currentTenant.planUserId !== currentUser.id
) {
Expand Down
3 changes: 1 addition & 2 deletions backend/src/api/premium/enrichment/memberEnrichBulk.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { RedisCache } from '@crowd/redis'
import { getServiceLogger } from '@crowd/logging'
import { Error403 } from '@crowd/common'
import { FeatureFlag, FeatureFlagRedisKey } from '@crowd/types'
import { FeatureFlag, FeatureFlagRedisKey, PLAN_LIMITS } from '@crowd/types'
import { getSecondsTillEndOfMonth } from '../../../utils/timing'
import Permissions from '../../../security/permissions'
import identifyTenant from '../../../segment/identifyTenant'
import PermissionChecker from '../../../services/user/permissionChecker'
import track from '../../../segment/track'
import { PLAN_LIMITS } from '../../../feature-flags/isFeatureEnabled'
import SequelizeRepository from '../../../database/repositories/sequelizeRepository'
import { getNodejsWorkerEmitter } from '@/serverless/utils/serviceSQS'

Expand Down
Loading
Loading