Skip to content

Conversation

Sigmonia
Copy link
Contributor

Rationale

Test failures due to custom assay protocol clean up https://teamcity.labkey.org/buildConfiguration/LabkeyTrunk_DailySuites_DailyDPostgres/2250071?buildTab=tests&name=luminex&expandedTest=build%3A%28id%3A2250071%29%2Cid%3A719

Related Pull Requests

Changes

  • Made the old override of deleteProtocol final so we can catch any custom implementations since the original calling location uses the new signature.

Copy link
Contributor

@labkey-jeckels labkey-jeckels left a comment

Choose a reason for hiding this comment

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

How long do you want to keep this overload around? Just enough to verify via a TeamCity build completes cleanly and there aren't any other overrides in our codebase? Until we ship 23.3?

I appreciate wanting to help catch any third-party overrides but also don't want to keep this around forever. If we don't delete it immediately, I'd keep the Deprecated tag and maybe even make it throw UnsupportedOperationException to help flush out any other third-party callers.

Assuming code uses the Override annotation (like the Flow and Luminex implementations do) the compilation will fail even without the final method.

public void deleteProtocol(ExpProtocol protocol, User user) throws ExperimentException
// Please use new overload with additional String parameter, this version is no longer called, so any custom implementation may get missed.
// Not sure how else to catch overrides as caller is modified. This should be a breaking change, to ensure any custom Assay Providers are updated.
final public void deleteProtocol(ExpProtocol protocol, User user) throws ExperimentException
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you not keep the @Deprecated annotation here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could, but I think the better option would be to use Josh's suggestion to just remove it. That will cause any that are using the @Override annotation to fail. The key is we want these Overrides to get updated to the new signature, as any custom clean-up code won't get called because of the inheritance of the new method in AbstractAssayProvider as experienced with the Luminex assay.

Copy link
Contributor

Choose a reason for hiding this comment

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

I doubt there are many/any AssayProvider implementations of this method outside of LabKey repos. I vote for yanking the method, adding a release note, and moving on.

@Sigmonia Sigmonia force-pushed the fb_fixLuminexDelete branch from 7442428 to bb3e2d6 Compare January 30, 2023 21:10
@Sigmonia Sigmonia merged commit 3f4fd36 into develop Jan 30, 2023
@Sigmonia Sigmonia deleted the fb_fixLuminexDelete branch January 30, 2023 22:47
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