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

Frame dropDepends now drops all depend types #976

Conversation

roulaoregan-spi
Copy link
Contributor

Summarize your change.
Fixed MenuActions' frame.dropDepends bug which only dropped FRAME_ON_FRAME dependencies. The DependDoJdbc query only checks pk_frame_depend_er and returns empty list if none found, this does not drop any other types of dependencies. Users create complicated dependency types like FRAME_ON_JOB, FRAME_ON_LAYER etc. that don't always have FRAME_ON_FRAME, so this function failed to drop the dependencies and caused the frame to be "stuck" in Depend state because all depend types need to be satisfied before the frame is allowed to run.

Changed loop over the different dependencies with getWhatThisDependsOn() and drop them one by one, allowing the frame to go in "Waiting" and ready to run.

@roulaoregan-spi
Copy link
Contributor Author

@bcipriano - the changes broke the test_dropDepends unittest, made a new commit with fixes to the unittest to get it to pass

Copy link
Collaborator

@bcipriano bcipriano left a comment

Choose a reason for hiding this comment

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

See comment about test line.

MenuActions calling frame.dropDepends only drops FRAME_ON_FRAME
dependencies, DependDoJdbc query only checks "pk_frame_depend_er"
returns empty list if none found. This does not drop any other types
of dependencies. Users create complicated dependency types like
FRAME_ON_JOB, FRAME_ON_LAYER etc. that don't always have FRAME_ON_FRAME,
so this function would fail to drop the dependencies and caused the
frame to be "stuck" in Depend state because all depend types need to
be satisfied before the frame is allowed to run. Changed loop to
getWhatThisDependsOn() and drop them one by one, allowing the frame to
go in "Waiting" and ready to run.

(cherry picked from commit 9741efe5f21e524e5c0353115da644698a971488)
The changes to dropDepends broke the MenuActions
unittest, because the fn now calls
`getWhatThisDependsOn`, which threw a `'Mock' object
is not iterable` error. Needed to add depend object
for it to pass.
Cuegui MenuActions_tests.py's test_dropDepends
unittest no longer applies since the fn no longer
calls the pycue's dropDepends with a target
parameter. This is a bug fix to dropDepends and
now the fn iterates over each dependency and calls
"depend.satisfy" instead to remove since the
pycue'sdropDepends only applys to "one" depend
target, so it will not remove different multiple
different dependency types linked to the one frame.
Hence, this caused the Cuegui unittest to fail on
the Github PR. Opting to put the dropDepends test
in pycue (which didn't have one) and remove the test
in Cuegui, since Cuegui already has a test coverage
for depend.satisfy.
@DiegoTavares
Copy link
Collaborator

@bcipriano I think you need to approve Roula's change to kick the test pipeline again

@DiegoTavares DiegoTavares merged commit dd67131 into AcademySoftwareFoundation:master Jun 20, 2024
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