Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Karakatiza666
Copy link
Contributor

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

@mihaibudiu
Copy link
Contributor

I think we should reject modified archives, but just use an appropriate error message.
We should not accommodate arbitrary changes.

Copy link
Contributor

Copilot AI left a 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
Copy link

Copilot AI Jan 19, 2026

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).

Suggested change
// where TIMESTAMP is a ISO 8601 timestamp
// where TIMESTAMP is an ISO 8601 timestamp

Copilot uses AI. Check for mistakes.
@Karakatiza666
Copy link
Contributor Author

Karakatiza666 commented Jan 19, 2026

I think we should reject modified archives

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?

@mihaibudiu
Copy link
Contributor

Please make sure that there is an error report for any corrupted archive. That was the point of this issue.

@mihaibudiu
Copy link
Contributor

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]>
@Karakatiza666 Karakatiza666 added this pull request to the merge queue Jan 19, 2026
Merged via the queue into main with commit 0003e59 Jan 20, 2026
1 check passed
@Karakatiza666 Karakatiza666 deleted the fix-deep-bundles branch January 20, 2026 02:23
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