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

Feature request: Java Templates should allow users to pick between SDK v1 and v2 #247

Open
rli opened this issue Jun 2, 2022 · 10 comments

Comments

@rli
Copy link
Contributor

rli commented Jun 2, 2022

Requested through the internal toolkits issue queue

@rli rli added stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. type/feature labels Jun 2, 2022
@moelasmar
Copy link
Contributor

Thanks @rli for requesting this feature. Could you please clarify more what do you mean by SDK v1, and V2. Do you mean AWS SDK?

@moelasmar moelasmar removed the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Jun 3, 2022
@Metrowerks
Copy link

@moelasmar yes it was about the AWS SDK v2

@mndeveci
Copy link
Contributor

mndeveci commented Jul 5, 2022

Thanks for the request. I haven't checked in detail but looking at the package groupId it looks like they are different. So I wonder if we can still build the same code with V1 and V2 at the same time?

If not then we can think about completely moving to V2 if that is the intention or have alternatives for each (or at least most of) the templates so that users can choose during sam init.

@rli
Copy link
Contributor Author

rli commented Jul 5, 2022

no the imports / namespace are different. i'd confirm with the Java SDK team, but i think they'd leaning towards pushing customers to V2, rather than keeping both templates around

@mndeveci
Copy link
Contributor

mndeveci commented Jul 6, 2022

Sure, if they are pushing for V2, we can update all java templates with them as well.

@mndeveci mndeveci added the blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. label Jul 6, 2022
@Metrowerks
Copy link

hi, we are doing SDK v2 so for us whether completely moving to v2 or maintaining both versions won't matter. I mentioned options to select v2 because I thought some other users may have use case to stay with v1, but I see the point to make it completely v2 to motivate users to move to the latest SDK version.

@mndeveci
Copy link
Contributor

mndeveci commented Jul 8, 2022

Thanks, but my question was about whether we want customers to still use V1 given that we are working on V2 for a while. So depending on the answers we could;

  • A: If using V1 is still accepted and encouraged, keep V1 and add V2 examples as well (which means duplicated templates & more maintenance work for us)
  • B: If using V1 still OK but we want people to use V2, we can migrate all templates to V2 but leave hello-world examples with V1 options as well.
  • C: If our target is to push everyone to V2 eventually, and we don't our customers to use V1 for the new projects, we can migrate everything to V2 and no V1 template will be left.

Looking at the feedback, going with option B makes more sense, please let me know your preference.

@Metrowerks
Copy link

I'd prefer option C. For us, we don't do anything with V1 anymore. I think if you change everything in the toolkit to v2, and then have the v1 templates in a github repo for users to clone if needed, that'd work.

@mndeveci
Copy link
Contributor

Sure, if that is the case, we can go with option C there. Would you like to contribute this repo and raise a pull request for the changes?

@Metrowerks
Copy link

Metrowerks commented Jul 13, 2022

I'd love to but we're in a crunch time to deliver P0 for this year and it has been taking a good amount of time for us to figure out how to set up the project with the SDK's.

btw, this is an out-of-topic question but are there any examples for how to implement lambda handlers in SDK 2 using RequestHandler like with SDK 1? It seems that RequestHandler is still only available in SDK 1?

@moelasmar moelasmar removed maintainer/need-followup blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. labels May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants