-
Notifications
You must be signed in to change notification settings - Fork 97
[profile-vis] Fix support bundle files not discovered when located in subdirectories of the archive #5465
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
Conversation
|
I think we should reject modified archives, but just use an appropriate error message. |
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.
Pull request overview
This PR fixes a bug where support bundle files located in subdirectories of the archive were not being discovered. The fix updates the regex pattern used to extract profile timestamps from filenames to handle both shallow paths (files at the root) and deep paths (files in subdirectories).
Changes:
- Updated regex pattern from
^(.*?)_to(?:^|\/)(\d{4}-\d{2}-\d{2}T[^/_]+)_to match timestamps either at the start of the filename or after a directory separator - Improved documentation with clearer comment explaining the timestamp format (ISO 8601) and added examples showing both shallow and deep file paths
| // group by file timestamp; all files in a bundle are named with names like TIMESTAMP_FILENAME | ||
| // where TIMESTAMP is a string encoding a timestamp | ||
| (file) => file.filename.match(/^(.*?)_/)?.[1] ?? '' | ||
| // where TIMESTAMP is a ISO 8601 timestamp |
Copilot
AI
Jan 19, 2026
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 comment states "where TIMESTAMP is a ISO 8601 timestamp", but it should be "where TIMESTAMP is an ISO 8601 timestamp" (article should be "an" before a vowel sound).
| // where TIMESTAMP is a ISO 8601 timestamp | |
| // where TIMESTAMP is an ISO 8601 timestamp |
53f8b7e to
5c6fdb0
Compare
We could, but in the case of a few recent profiles with nested directories the file names generated by the pipeline-manager were not affected. I'd think this is a decent empiric for whether we should accept or reject the profile files? |
|
Please make sure that there is an error report for any corrupted archive. That was the point of this issue. |
|
It's ok to display some modified ones, but you have to handle the errors too. |
… subdirectories of the archive Signed-off-by: Karakatiza666 <[email protected]>
5c6fdb0 to
ba9eb7c
Compare
All the files in the archive are easily discoverable - their parent directories are just prepended in the full path, so I only needed to revise the regex to properly extract the profile timetamp for both shallow and deep file paths