Skip to content

Conversation

@stefanorosanelli
Copy link
Contributor

@stefanorosanelli stefanorosanelli commented Sep 11, 2025

This PR fixes the file URL generation in LinkedFileOutput file_url() method to include the job ID in the URL path, ensuring consistency between file storage paths and their corresponding URLs.

@stefanorosanelli stefanorosanelli added bug Something isn't working release:patch labels Sep 11, 2025
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 the file URL generation to include the job ID in the URL path, ensuring consistency between file storage paths and their corresponding URLs.

  • Moves job ID handling from the file writing logic to both URL generation and S3 object naming
  • Ensures that files stored with job ID prefixes have matching URLs that include the job ID
  • Maintains backward compatibility for cases where no job ID is present

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +85 to 87
if self.job_id:
object_name += f"/{self.job_id}"
object_name += f"/{filename}"
Copy link

Copilot AI Sep 11, 2025

Choose a reason for hiding this comment

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

The job_id is being appended to object_name after it's already constructed from the base path. This could result in double slashes or inconsistent path formatting. Consider building the complete object path more systematically, similar to how it's done in the file_url() method.

Copilot uses AI. Check for mistakes.
@stefanorosanelli stefanorosanelli changed the title fix: include job ID in file_url() Include job ID in LinkedFileOutput.file_url() Sep 11, 2025
@stefanorosanelli stefanorosanelli merged commit b008fdb into brevia-ai:main Sep 11, 2025
12 checks passed
@stefanorosanelli stefanorosanelli deleted the fix/output-file-url branch September 11, 2025 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working release:patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant