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

Remove ExecutableWrapper #5033

Merged
merged 1 commit into from Oct 25, 2023
Merged

Remove ExecutableWrapper #5033

merged 1 commit into from Oct 25, 2023

Conversation

MichaelSnowden
Copy link
Contributor

@MichaelSnowden MichaelSnowden commented Oct 24, 2023

What changed?
I discovered an issue with the ExecutableWrapper here. Because we don't wrap the Reschedule method, it adds the unwrapped version to the rescheduler, which loses all of the wrapped behavior. I implemented a fix using the "delegate" pattern, where the base instance holds a reference to the wrapped instance, but it is fraught with peril: you need to remember to use the delegate everywhere it's applicable, and you need to remember to set it--also only one delegate can be set, so you can't have different wrappers for the same object. As a result, I decided to get rid of the wrapper-based approach, and instead added the code directly to the base executable implementation.

Why?
The huge refactoring is necessary because the ExecutableWrapper approach is too complicated and risky.

How did you test it?
There's still 100% test coverage for the DLQ code. Most imporantly, there is now an end-to-end integration test which starts a workflow that produces terminally failing tasks, verifies that it's added to the DLQ, and then uses the tdbg read command to delete the DLQ tasks. This wasn't possible before due to the bug in the ExecutableWrapper.

Potential risks

Is hotfix candidate?

@MichaelSnowden MichaelSnowden merged commit c3d53ba into main Oct 25, 2023
10 checks passed
@MichaelSnowden MichaelSnowden deleted the snowden/no-wrapper branch October 25, 2023 23:34
MichaelSnowden added a commit that referenced this pull request Feb 14, 2024
## What changed?
<!-- Describe what has changed in this PR -->
I added back some metrics that were removed from DLQ writes when we
removed the Executable DLQ Wrapper in #5033

## Why?
<!-- Tell your future self why have you made these changes -->
These were removed by mistake.

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
The more important metric, "dlq_writes" still exists, and that's what
the docs reference for operators, so we're ok that these other ones were
missed.

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
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.

None yet

2 participants