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

Java: clean up legacy resource name overrides #895

Open
chingor13 opened this issue Jan 5, 2021 · 3 comments
Open

Java: clean up legacy resource name overrides #895

chingor13 opened this issue Jan 5, 2021 · 3 comments
Labels
lang: java Issues specific to Java. type: cleanup An internal cleanup or hygiene concern.

Comments

@chingor13
Copy link
Contributor

Tracking Issue From #883

@stephaniewang526

This should unblock microgenerator migration for bigquerydatatransfer: googleapis/java-bigquerydatatransfer#570 (currently outstanding due to the fact that we need to remove 2 methods post-processing).

@chingor13

This is to handle ~4 GA clients with legacy resource name implementations. This override was specified in the gapic yaml which is no longer possible for any microgenerator. When these client next release a breaking change, we want to remove these legacy resource names and it will be difficult if these 4 cases are hard-coded in the microgenerator.

@miraleung

The monolith used to generate resource name classes that subclassed other generated ones, but that was removed before the microgenerator came around. Subsequently, the subclassed resource name classes were deprecated.

However, they contain some public static methods that are part of the superclass as well. Since this special case applies only to a very few number of APIs and is deprecated, removing them (in favor of the superclass's method) is the optimal temporary fix, as opposed to hardcoding a significant amount of complex logic in the microgenerator.

I agree that semantic modification can be error-prone, which also motivates moving such logic alterations upstream for OneHorizontal. As semantic changes are already in-scope for synthtool's existing functionality, this doesn't seem to deviate from the current post-processing model.

We could remove this feature after those 4 APIs have taken a major version bump (unless we need to support regeneration of the older versions forever).

@chingor13 chingor13 added the type: cleanup An internal cleanup or hygiene concern. label Jan 5, 2021
@chingor13 chingor13 self-assigned this Jan 5, 2021
@kolea2
Copy link
Collaborator

kolea2 commented Jan 6, 2021

+1 for this feature for bigtable, see: googleapis/java-bigtable#561 (comment)

@chingor13 chingor13 assigned Neenu1995 and unassigned chingor13 Jul 15, 2021
@chingor13 chingor13 added the lang: java Issues specific to Java. label Feb 28, 2022
@Neenu1995 Neenu1995 assigned meltsufin and unassigned Neenu1995 Jul 26, 2022
@meltsufin meltsufin removed their assignment Jul 26, 2022
@meltsufin
Copy link
Member

@kolea2 @chingor13 Can you give an example of the problem please?

@kolea2
Copy link
Collaborator

kolea2 commented Jul 26, 2022

@meltsufin it has been a while since I looked at this, but IIRC this is what we currently do to remove certain operations that should not be exposed in the generated layer: https://github.com/googleapis/java-bigtable/blob/main/owlbot.py#L69-L73

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang: java Issues specific to Java. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

4 participants