-
Notifications
You must be signed in to change notification settings - Fork 1
docs: add project onboarding guide and reindexing scripts #78
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
Open
jordane
wants to merge
5
commits into
main
Choose a base branch
from
jme/LFXV2-1371
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6e9b26a
docs: add project onboarding guide and reindexing scripts
jordane ac0d369
Merge branch 'main' into jme/LFXV2-1371
jordane b48e881
Merge branch 'main' into jme/LFXV2-1371
bramwelt f80d656
fix(scripts): address PR review comments
bramwelt c9ef501
Fix docstring length in reindex_votes.py
bramwelt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # Onboarding a New Project | ||
|
|
||
| ## 1. Add to Allow List | ||
|
|
||
| Update `cmd/lfx-v1-sync-helper/config.go`: | ||
|
|
||
| - **Single project only:** Add the project slug to `projectAllowlist`. | ||
| - **Project + all children:** Add the project slug to `projectFamilyAllowlist`. | ||
|
|
||
| ## 2. Replay the Project Entry | ||
|
|
||
| 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: | ||
|
|
||
| ```sh | ||
| # Get the current value | ||
| nats kv get v1-objects "salesforce-project__c.<sfid>" > <sfid> | ||
|
|
||
| # Put it back (triggers reprocessing) | ||
| nats kv put v1-objects "salesforce-project__c.<sfid>" < <sfid> | ||
| # Remove temporary file | ||
| rm <sfid> | ||
| ``` | ||
|
|
||
| > **Note:** Deleting the WAL listener consumer also works but is not recommended. | ||
|
|
||
| ## 3. Verify Mappings | ||
|
|
||
| Confirm both forward and reverse mappings exist in the `v1-mappings` bucket: | ||
|
|
||
| ```sh | ||
| nats kv get v1-mappings "project.uid.<uid>" | ||
| nats kv get v1-mappings "project.sfid.<sfid>" | ||
| ``` | ||
|
|
||
| - `project.sfid.<sfid>` should contain the project UID. | ||
| - `project.uid.<uid>` should contain the SFID. | ||
|
|
||
| If either mapping is missing, create it: | ||
|
|
||
| ```sh | ||
| nats kv create v1-mappings "project.sfid.<sfid>" "<uid>" | ||
| nats kv create v1-mappings "project.uid.<uid>" "<sfid>" | ||
| ``` | ||
|
|
||
| ## 4. Reindex Committees | ||
|
|
||
| Committees must be indexed **before** other resources (meetings, mailing lists, etc.) since those depend on them. | ||
|
|
||
| - **Order matters:** parent committees must exist before subcommittees. | ||
| - Run the reindex multiple times if needed until all committees (and their members) are added. | ||
|
|
||
| ## 5. Reindex Remaining Resources | ||
|
|
||
| Once committees and committee members are indexed, proceed with: | ||
|
|
||
| - Meetings | ||
| - Votes | ||
| - Surveys | ||
| - Mailing lists | ||
| - Any other resources | ||
|
|
||
| See [`scripts/reindexing/`](../scripts/reindexing/) for reindexing scripts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Reindexing Scripts | ||
|
|
||
| Scripts for reindexing v1 project resources into the v2 sync pipeline via DynamoDB and NATS KV. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Python 3.12+ | ||
| - AWS credentials with DynamoDB read access | ||
| - NATS server with JetStream enabled and access to the `v1-objects` KV bucket | ||
|
|
||
| ## Setup | ||
|
|
||
| ```sh | ||
| uv sync | ||
| ``` | ||
|
|
||
| Or with pip: | ||
|
|
||
| ```sh | ||
| pip install -r requirements.txt | ||
| ``` | ||
|
|
||
| ## Scripts | ||
|
|
||
| Detailed documentation for each script is forthcoming. See the individual script files for usage and `--help` flags. | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The setup instructions recommend
uv sync, but this directory’spyproject.tomlcurrently has an emptydependencieslist, souv syncwon’t install the packages these scripts need. Either list the dependencies inpyproject.toml(preferred) or change this section to useuv pip install -r requirements.txt/pip install -r requirements.txtonly.