Skip to content
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

Shuffle compatibility improvements #5741

Merged
merged 2 commits into from
Mar 21, 2024
Merged

Conversation

johnhaddon
Copy link
Member

This improves backwards compatibility for the recent improvements to the Shuffle node. As the tests now demonstrate, not only can you load old files (we had test coverage for this already), but you can now also create new expressions via the API using the legacy plug names. This should help Cinesite get over the upgrade hump, since they have nodes which create such expressions internally in their constructors.

The only difference between this PR and #5739 is that I've rebased to fix the Changes.md conflict and am making the PR from a branch on the main repo, to get GafferArnold in the build artifacts. @danieldresser-ie, this is still a priority for review.

@johnhaddon johnhaddon self-assigned this Mar 21, 2024
@danieldresser-ie
Copy link
Contributor

LGTM

The key change here is that `__plug()` now uses a series of `__getitem__` calls rather than a single call to `descendant()`, giving the compatibility configs the ability to monkey-patch a name change in at any step.

The other changes aren't strictly necessary, but I switched from storing plug paths as "dot.separated.strings" to `( "tuples", "of", "names" )` since that's the form we now need them in most commonly, and avoids a bunch of string manipulations for the more common operations. This leaves us doing string manipulations only for the less common error-handling code paths.
And add test demonstrating that expressions can still be made using the old names for plugs. This is necessary for an internal expression created by a node at Cinesite.
@johnhaddon johnhaddon force-pushed the shuffleCompatImprovementsAgain branch from 726c843 to c06ded1 Compare March 21, 2024 18:09
@johnhaddon johnhaddon merged commit 5e95d88 into main Mar 21, 2024
5 checks passed
@johnhaddon johnhaddon deleted the shuffleCompatImprovementsAgain branch March 22, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants