Repository navigation
fix(ci): let the openldap image import the test LDIF files - #4057
Merged
Merged
Conversation
The ldap-server step copied our LDIF files to a directory the bitnami image never reads, so the image created its own default tree. Our entrypoint override then polled until LDAP answered and imported the files with ldapadd. That races with the image setup: it answers on a temporary slapd that gets shut down when setup finishes. In https://ci.opencloud.rocks/repos/3/pipeline/5531/21 10_base.ldif failed with "Already exists" and 20_users.ldif was cut off by the slapd shutdown, so there was no admin user and the multiTenancy server never became ready. We now point LDAP_CUSTOM_LDIF_DIR at the LDIF files. The image imports them during setup, before slapd listens, and skips its default tree. The override only creates the TLS certificate. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: JΓΆrn Friedrich Dreyer <[email protected]>
Up to standards βπ’ Issues
|
| Metric | Results |
|---|---|
| Coverage variation | β -0.01% coverage variation (-1.00%) |
| Diff coverage | β β diff coverage |
Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (f8a8ecf) 94293 28310 30.02% Head commit (d9d5e11) 94293 (+0) 28296 (-14) 30.01% (-0.01%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>
Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#4057) 0 0 β (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
v-scharf
approved these changes
Nov 18, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The multiTenancy tests flake because the test LDAP server sometimes has no users. We now let the bitnami image import our LDIF files itself instead of racing it with
ldapadd.Our override copied the LDIF files to
/opt/bitnami/openldap/ldifs, but the image only imports fromLDAP_CUSTOM_LDIF_DIR(default/ldifs). So it created its default tree, and our script imported the files as soon as LDAP answered ... which can be the temporary slapd the image runs during setup. From https://ci.opencloud.rocks/repos/3/pipeline/5531/21:No admin user, so
wait-for-opencloud-servertimed out after 300s.With
LDAP_CUSTOM_LDIF_DIRset the image imports the files during setup, before slapd listens, and skips the default tree. Only the multiTenancy pipeline uses this LDAP server.Tested locally: started the container with the step's commands three times, all 5 users with their tenant ids were there on the first LDAPS answer (~3s). Then ran
apiTenancyagainst a server with the multiTenancy env: 2 scenarios passed.AI assistance: Claude Code (claude-opus-5-5) analyzed the CI logs, wrote the fix, tested it locally and wrote this description.