Skip to content

Conversation

@blaqbern
Copy link
Contributor

@blaqbern blaqbern commented Jul 14, 2025

We were inadverntently ignoring the subdirectory option when creating File reps, which led to the tool searching zero files when using the project-level dir property in .launchdarkly/coderefs.yml (There is a workaround to just not specify the dir property, but this leads to broken links in gonfalon). The reason for this is that when using the subdirectory property, the workspace (this is the root directory that ld-find-code-refs searches under) becomes <root>/subdirectory, but the project-level dir property is relative to the repo root, so the tool would end up looking in <root>/subdirectory/subdirectory for files to scan which obviously doesn't exist. The fix here is to remove the subdirectory (if it exists) from the file's path property. Existing tests pass; added new tests for the subdirectory use-case.


Related Jira issue: REL-8210: Code Refs - Using subdirectory flag creates broken link in LD UI when clicking View source

@launchdarkly-upra launchdarkly-upra bot changed the title account for subdirectory in ref filepaths [REL-8210] account for subdirectory in ref filepaths Jul 14, 2025
@blaqbern blaqbern marked this pull request as ready for review July 14, 2025 21:26
@blaqbern blaqbern requested a review from a team as a code owner July 14, 2025 21:26
Copy link
Member

@sloloris sloloris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes sense to me

@blaqbern blaqbern merged commit 8e96ab5 into main Jul 15, 2025
2 checks passed
@blaqbern blaqbern deleted the cblackburn/REL-8210/fix-subdirectory-behavior branch July 15, 2025 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants