Use a relative target for the latest log symlink#983
Open
Old-Ding wants to merge 1 commit into
Open
Conversation
The latest link and each run directory are siblings. Point the link at the run directory basename so it remains valid when the parent log directory is mounted at a different absolute path. Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
|
Tick the box to add this pull request to the merge queue (same as
|
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.
Description
Create the
latestlog symlink with the run directory basename as its target. Because the link and run directory are siblings, the relative target resolves identically in place and remains valid when the parent log directory is mounted at a different absolute path.Add a platform-independent regression test that verifies the target is relative and resolves back to the run directory.
Fixes #978
Is this user-facing behavior change?
Yes.
latestcontinues to resolve to the newest run directory, butos.readlink()now returns a relative basename instead of an absolute path. This keeps the link usable across host and container mount paths.Did you use Generative AI?
Yes. OpenAI Codex (GPT-5) was used to trace the logging path, implement the one-line behavior change, add the regression test, and review the diff. The contributor reviewed and locally validated the final change.
Additional Information
Local validation:
pytest launch/test/launch/test_logging.py: 21 passedpytest launch/test/launch: 280 passedpytest launch/test/test_flake8.py: 1 passed