Skip to content

Delivery: compute publishedBasename before destination path validation#1935

Open
jakubjezek001 wants to merge 1 commit into
developfrom
enhancement/YN-0905-delivery-implementing-publishedfilename-representaion-dynamic-context-key
Open

Delivery: compute publishedBasename before destination path validation#1935
jakubjezek001 wants to merge 1 commit into
developfrom
enhancement/YN-0905-delivery-implementing-publishedfilename-representaion-dynamic-context-key

Conversation

@jakubjezek001

@jakubjezek001 jakubjezek001 commented Jul 8, 2026

Copy link
Copy Markdown
Member

Changelog Description

Delivery now computes the publishedBasename template key (via pathlib.Path) before validating the destination path, instead of after. Previously, destination validation ran before publishedBasename was set, so templates relying on that key always failed the check.

Additional info

  • Sequences: basename is derived from the first source file with the frame number and trailing separators stripped.
  • Single files: basename is used as-is.

Testing notes:

  1. Deliver a sequence representation using a template containing {publishedBasename} and confirm the destination path resolves and validates correctly.
  2. Deliver a single-file representation using a template containing {publishedBasename} and confirm the same.

Dependency

Close #1934
YN-0905

@ynbot ynbot added type: enhancement Improvement of existing functionality or minor addition size/XS labels Jul 8, 2026
@jakubjezek001 jakubjezek001 changed the title Compute publishedBasename with Path and defer destination check Delivery: compute publishedBasename before destination path validation Jul 8, 2026
@jakubjezek001 jakubjezek001 marked this pull request as ready for review July 8, 2026 13:52
@jakubjezek001 jakubjezek001 requested review from BigRoy and iLLiCiTiT July 8, 2026 13:52
@jakubjezek001 jakubjezek001 self-assigned this Jul 8, 2026
template_data,
datetime_data,
template_name
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I actually my doubts about still manipulating the publishedBasename like stripping of the frame numer.

First replace(first_frame, "") is a wrong assumption.

If my shot is 1100 and the first frame happens to be 1100 then suddenly I'm also removing the shot name from the shot.

What's the reason we can't just have publishedFilename be the full source filename?

So essentially:

published_filename = os.path.basename(source)

And that's it. It doesn't make much sense to use {publishedFilename} with any other tokens (unless you want to prefix it perhaps) but at least it's very clear what it does, it's the full filename of the file we're copying over?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

but how do you deal with frames and what if you want to renumber frames?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In that scenario you wouldn't renumber frames - you'd get the exact filename that lives in the publish directory essentially.

@iLLiCiTiT thoughts? am I oversimplifying?

@ynbot ynbot moved this to Review In Progress in PR reviewing Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS type: enhancement Improvement of existing functionality or minor addition

Projects

Status: Review In Progress

Development

Successfully merging this pull request may close these issues.

YN-0905: delivery implementing publishedFilename representaion dynamic context key

3 participants