-
Notifications
You must be signed in to change notification settings - Fork 0
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
Rewrite documentation with more specific use cases in mind #119
Open
tlater-famedly
wants to merge
2
commits into
main
Choose a base branch
from
tlater/better-docs
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.
+175
−119
Open
Changes from 1 commit
Commits
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
Next
Next commit
doc(README): Factor dev docs into a separate CONTRIBUTING.md
commit 4470ddf1367a8f55a34b2d704c77341152e05afd
There are no files selected for viewing
This file contains 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,57 @@ | ||
## Testing & Development | ||
|
||
This repository uses [`nextest`](https://nexte.st/) to perform test | ||
env spin-up and teardown. To install it, either see their website, or | ||
run: | ||
|
||
``` | ||
cargo install cargo-nextest --locked | ||
``` | ||
|
||
Tests can then be run using: | ||
|
||
``` | ||
cargo nextest run [--no-fail-fast] [-E 'test(<specific_test_to_run>)'] | ||
``` | ||
|
||
Note that tests need to be executed from the repository root since we | ||
do not currently implement anything to find files required for tests | ||
relative to it. | ||
|
||
In addition, a modern docker with the `compose` subcommand is | ||
required - importantly, this is not true for many distro docker | ||
packages. Firewalls also need to be configured to allow container <-> | ||
container as well as container <-> host communication. | ||
|
||
### E2E test architecture | ||
|
||
For e2e testing, we need an ldap and a zitadel instance to test | ||
against. These are spun up using docker compose. | ||
|
||
After ldap and zitadel have spun up, another docker container runs, | ||
which simply executes a script to clean up existing test data and | ||
create the necessary pre-setup organization structures to support a | ||
test run. | ||
|
||
Tests are then expected to directly communicate with ldap/zitadel to | ||
create/delete/modify users and confirm test results. | ||
|
||
Importantly, since the tests run with no teardown between individual | ||
tests, users created *must* have different LDAP ID/email addresses, so | ||
that they can be managed independently. | ||
|
||
E2E tests cannot run concurrently, since this would cause | ||
synchronization to happen concurrently. | ||
|
||
For LDAP-over-TLS, openldap is configured to allow connections without | ||
client certificates, but if one is provided, it must be verified | ||
correctly. This allows us to test scenarios with and without client | ||
certificates. | ||
|
||
## Contributing | ||
|
||
### Pre-commit usage | ||
|
||
1. If not installed, install with your package manager, or `pip install --user pre-commit` | ||
2. Run `pre-commit autoupdate` to update the pre-commit config to use the newest template | ||
3. Run `pre-commit install` to install the pre-commit hooks to your local environment |
This file contains 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
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.
I think it would also be good to expand the first part of the README: What does famedly-sync do (and not do)?
What are the potential footguns? How do you troubleshoot problems?
What are the known limitations or design considerations? Are ldap group structures maintained? can you use all three data sources simultaneously? will famedly-sync automagically figure out the special format of our AD that's been running since 1993? etc
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.
Yep, this PR focuses on the deployment flow, since infra specifically asked for it - I think we should split this out into a separate ticket so we get the quick win from clearer deployment docs?
FWIW, this should probably make it into more general user docs, but adding it to the readme while we don't have a clear process for that seems reasonable.