|
| 1 | +# Onboarding a New Project |
| 2 | + |
| 3 | +## 1. Add to Allow List |
| 4 | + |
| 5 | +Update `cmd/lfx-v1-sync-helper/config.go`: |
| 6 | + |
| 7 | +- **Single project only:** Add the project slug to `projectAllowlist`. |
| 8 | +- **Project + all children:** Add the project slug to `projectFamilyAllowlist`. |
| 9 | + |
| 10 | +## 2. Replay the Project Entry |
| 11 | + |
| 12 | +The project entry has likely already been processed and skipped. To replay it, update the `v1-objects` NATS KV bucket with the same value it currently has: |
| 13 | + |
| 14 | +```sh |
| 15 | +# Get the current value |
| 16 | +nats kv get v1-objects "salesforce-project__c.<sfid>" > <sfid> |
| 17 | + |
| 18 | +# Put it back (triggers reprocessing) |
| 19 | +nats kv put v1-objects "salesforce-project__c.<sfid>" < <sfid> |
| 20 | +# Remove temporary file |
| 21 | +rm <sfid> |
| 22 | +``` |
| 23 | + |
| 24 | +> **Note:** Deleting the WAL listener consumer also works but is not recommended. |
| 25 | +
|
| 26 | +## 3. Verify Mappings |
| 27 | + |
| 28 | +Confirm both forward and reverse mappings exist in the `v1-mappings` bucket: |
| 29 | + |
| 30 | +```sh |
| 31 | +nats kv get v1-mappings "project.uid.<uid>" |
| 32 | +nats kv get v1-mappings "project.sfid.<sfid>" |
| 33 | +``` |
| 34 | + |
| 35 | +- `project.sfid.<sfid>` should contain the project UID. |
| 36 | +- `project.uid.<uid>` should contain the SFID. |
| 37 | + |
| 38 | +If either mapping is missing, create it: |
| 39 | + |
| 40 | +```sh |
| 41 | +nats kv create v1-mappings "project.sfid.<sfid>" "<uid>" |
| 42 | +nats kv create v1-mappings "project.uid.<uid>" "<sfid>" |
| 43 | +``` |
| 44 | + |
| 45 | +## 4. Reindex Committees |
| 46 | + |
| 47 | +Committees must be indexed **before** other resources (meetings, mailing lists, etc.) since those depend on them. |
| 48 | + |
| 49 | +- **Order matters:** parent committees must exist before subcommittees. |
| 50 | +- Run the reindex multiple times if needed until all committees (and their members) are added. |
| 51 | + |
| 52 | +## 5. Reindex Remaining Resources |
| 53 | + |
| 54 | +Once committees and committee members are indexed, proceed with: |
| 55 | + |
| 56 | +- Meetings |
| 57 | +- Votes |
| 58 | +- Surveys |
| 59 | +- Mailing lists |
| 60 | +- Any other resources |
| 61 | + |
| 62 | +See [`scripts/reindexing/`](../scripts/reindexing/) for reindexing scripts. |
0 commit comments