Skip to content

SG-43421 Add Flow AM desktop publish hooks (Phase 1)#220

Open
chenm1adsk wants to merge 5 commits into
masterfrom
ticket/SG-43421-flowam-publish-hooks-phase1
Open

SG-43421 Add Flow AM desktop publish hooks (Phase 1)#220
chenm1adsk wants to merge 5 commits into
masterfrom
ticket/SG-43421-flowam-publish-hooks-phase1

Conversation

@chenm1adsk
Copy link
Copy Markdown
Contributor

@chenm1adsk chenm1adsk commented May 27, 2026

Summary

Move Flow AM desktop publish hooks from tk-config-flowam POC into upstream tk-desktop as a lift-and-shift with no logic changes.

Added hooks/tk-multi-publish2/flowam/:

  • collector.py - Desktop-specific collector; blocks DCC file extensions and reads TK_FLOWAM_REVISION_ID_* env var set by Loader
  • publish_to_flow.py - Desktop-specific publish to Flow AM leaf hook

Both hooks inherit from the Flow AM base hooks in tk-multi-publish2 (see PR shotgunsoftware/tk-multi-publish2#217) and are wired up via the hook chain in tk-config-flowam.

Note:
The hooks under hooks/flowam/ are dormant by default.
The hooks are only wired in via a custom config (tk-config-flowam), which acts as a feature flag for the Flow AM workflow. Users on any other configuration are unaffected by this PR.
This is the first iteration of the migration. Once the Flow AM framework is fully migrated, the custom config requirement will be removed and these hooks will trigger automatically when a MEDM project is detected.

Testing

  • tk-desktop with Flow AM config - publish new assets / existing assets completes, Flow AM revision and FPT versions created
  • tk-desktop with non Flow AM config - publish new assets / existing assets completes with no regression

Move Flow AM publish hooks from tk-config-flowam POC into upstream tk-desktop as a lift-and-shift with no logic changes.

Added hooks/flowam/:
- collector_desktop.py: Desktop-specific collector extending base collector
- publish_to_flow_desktop.py: Desktop-specific publish to Flow AM hook
@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 24.71%. Comparing base (1981272) to head (9789c26).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #220      +/-   ##
==========================================
- Coverage   24.81%   24.71%   -0.11%     
==========================================
  Files          68       68              
  Lines        3970     3970              
==========================================
- Hits          985      981       -4     
- Misses       2985     2989       +4     
Flag Coverage Δ
Linux 23.85% <ø> (ø)
Python-3.10 24.63% <ø> (ø)
Python-3.11 24.63% <ø> (-0.11%) ⬇️
Python-3.13 24.55% <ø> (-0.11%) ⬇️
Python-3.9 24.64% <ø> (ø)
Windows 24.08% <ø> (-0.11%) ⬇️
macOS 24.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chenm1adsk chenm1adsk marked this pull request as ready for review May 27, 2026 17:48
@chenm1adsk chenm1adsk requested a review from a team May 27, 2026 18:19
Comment thread hooks/tk-multi-publish2/flowam/collector.py
Comment thread hooks/tk-multi-publish2/flowam/publish_to_flow.py
carlos-villavicencio-adsk

This comment was marked as outdated.

Restructure the Flow AM publisher hooks to live under
hooks/tk-multi-publish2/flowam/ instead of hooks/flowam/. This matches
the layout used by other Toolkit engines (tk-nuke, tk-maya), which
group their app-specific hooks by consumer app first, then by variant.

Also add class-level docstrings to both hooks documenting their
dependency on the tk-multi-publish2 base hooks and the expected hook
chain string in the config.

Changes:
- hooks/flowam/collector.py -> hooks/tk-multi-publish2/flowam/collector.py
- hooks/flowam/publish_to_flow.py -> hooks/tk-multi-publish2/flowam/publish_to_flow.py
Copy link
Copy Markdown
Contributor

@carlos-villavicencio-adsk carlos-villavicencio-adsk left a comment

Choose a reason for hiding this comment

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

Looks good to me. It's only about code move, so I didn't spend much time reviewing the code.

Copy link
Copy Markdown
Member

@julien-lang julien-lang left a comment

Choose a reason for hiding this comment

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

Please add typing info for the new methods

Comment thread hooks/tk-multi-publish2/flowam/publish_to_flow.py Outdated
Comment thread hooks/tk-multi-publish2/flowam/collector.py
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