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

Clean up old code related to PluggableTask and Package material config/preferences #12191

Open
chadlwilson opened this issue Oct 31, 2023 · 2 comments
Assignees
Labels
java Pull requests that update Java code technical-debt

Comments

@chadlwilson
Copy link
Member

Summary

At some point it appears the metadata mechanism for plugins were changed within GoCD and the way metadata for plugins is registered with, understood by the server and agent was changed.

However there is deprecated code still lingering around, and it appears some clean-up code by done.

PluggableTaskConfig

@Deprecated
public class PluggableTaskConfigStore extends PluginPreferenceStore<TaskPreference> {

@Deprecated
@Component
public class PluggableTaskPreferenceLoader implements PluginChangeListener {

Possibly replaced by

public class PluggableTaskMetadataStore extends MetadataStore<PluggableTaskPluginInfo> {

Package material config

@Deprecated
@Component
public class PackageMaterialMetadataLoader implements PluginChangeListener {

Possibly replaced by

@Component
public class NewPackageMaterialMetadataLoader extends MetadataLoader<PackageMaterialPluginInfo> {

Expected Results

Remove the unnecessary logic and/or remove the deprecations if there is no viable path towards removal.

Additional detail

Generally these things were deprecated with 19b3e9c and #3600

Old plugin API versions

It's also worth noting that for most plugin-api types there is old code for old plugin versions still lying around that has never been removed - it seems the deprecations here did often not lead to removals. It may be that this is unrelated to the way plugin info/metadata is managed. All have been documented here since at least 21.2.0. Probably need to do a review of which plugins might break.

Plugins with more than one version:

  • notification v1, v2, v3, v4
  • elastic agent v4, v5
  • config repo v1, v2, v3
  • analytics v1, v2
@chadlwilson chadlwilson added technical-debt java Pull requests that update Java code labels Oct 31, 2023
@chadlwilson chadlwilson added this to the Release 23.5.0 milestone Oct 31, 2023
@chadlwilson
Copy link
Member Author

Hello @ketan - I know this is a very long time ago (2017!), however if you have any recollections here about the intended direction for these deprecations/removals that'd be useful to know. (e.g were they already replaced by some other mechanisms awaiting migration of plugins/API removals, or were the deprecations intended to indicate "we need to do more work here"?

@chadlwilson chadlwilson self-assigned this Oct 31, 2023
@ketan
Copy link
Member

ketan commented Nov 8, 2023

I looked at this. I don't particularly recall what we decided in terms of removal of the code (and the impact it may havve on breaking plugins). Your call on how you want to remove the code.

@chadlwilson chadlwilson removed this from the Release 24.1.0 milestone Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
java Pull requests that update Java code technical-debt
Projects
None yet
Development

No branches or pull requests

2 participants