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

prevent order dependency if an extension is loaded or not #49681

Closed
wants to merge 1 commit into from

Conversation

KristofferC
Copy link
Member

Fixes ##49656

There were two issues:

  • The gid.ntriggers -= 1 when inserting extension triggers happened unconditionally but needs to be consistent with the extid.ntriggers -= 1 in the extension callbacks.
  • The extid.ntriggers += 1 that happened when a trigger could not be loaded doesn't make sense to me. If such a trigger is loaded we will never load the extension and there should never be a reason to bump this value.

cc @topolarity

@KristofferC KristofferC added the needs tests Unit tests are required for this change label May 8, 2023
Copy link
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

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

The combination of statefullness seems awkward, since the conditionals are evaluated at such widely different points in time, against potentially entirely different environments. And then we don't even know if it needs to load that, just that it is a trigger of it

@KristofferC
Copy link
Member Author

KristofferC commented May 8, 2023

I agree, I must say liked the first implementation of extension loading more (before #48513) where the check of all the triggers happened in one instant.

But after some discussion with @topolarity, I think we should be able to remove this condition and allow extensions to be loaded even in this case which would remove this failure mode.

@vtjnash
Copy link
Member

vtjnash commented May 8, 2023

The trouble with that one was it was re-happening constantly, instead of only at one instant. Preferably, it seems we need to find the right middle ground where it checks the is-now-loaded condition only once (when it loads), but re-checks the is-all--deps-in-environment every time that condition might have changed.

@KristofferC
Copy link
Member Author

I'm gonna close this in favour of #49701 where this failure mode doesn't exist anymore.

@KristofferC KristofferC closed this May 9, 2023
@KristofferC KristofferC removed the backport 1.9 Change should be backported to release-1.9 label May 15, 2023
@giordano giordano deleted the kc/order_dep branch February 25, 2024 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs tests Unit tests are required for this change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants