apache / openwhisk

Apache OpenWhisk is an open source serverless cloud platform
https://openwhisk.apache.org/
Apache License 2.0
6.5k stars 1.16k forks source link

"utils" does not need redundant ".swift" actions, existing ".js" sufficient #529

Closed mrutkows closed 7 years ago

mrutkows commented 8 years ago

The "utils" package only requires one implementation of each action (i.e., only one need be installed that works on a given deployment). We should continue to use the existing Jacascript (.js) versions and not accept any more "copies" for other languages, specifically swift. The only package where we should allow multiple language impls. is the "samples" package, that is why it exists.

If you believe that the ".swift" actions add value then move them to "samples", but in my opinion (and I am sorry to the authors) they should be deleted. We should focus our efforts on authoring more samples for language runtimes which provide for instruction (as intended).

Note: the same approach applies the the "system" package which we plan to build out.

mrutkows commented 8 years ago

Please note that also, if someone provides a genuinely new utility action in swift (i.e., not a duplicate function, but a new unique function) then we may choose to accept the pull request, BUT it would be better to be consistent to encourage the use of the same language runtime for all "utils" and encourage all contributions to "utils" or "system" to continue to be in javascript.

rabbah commented 8 years ago

If a swift developer wants to test an action sequence locally using these utils they will need the swift implementations otherwise the testing burden is increased.

csantanapr commented 8 years ago

HI Matt I think since the code got done, I think it's useful to have these actions around and not delete them. They also serve as test fixtures for testing swift in openwhisk.

They currently don't get installed, maybe they can be moved to samples if you think that would be better and more discoverable.

mrutkows commented 8 years ago

If they provide value as a sample (for a language runtime) then I suggest we move them to samples. I understand, as we discussed yesterday, that only 1 gets installed (i.e., the existing .js ones), but we do not want to encourage people to keep writing redundant "utils" just to show how its done in a diff. language do we?

mrutkows commented 8 years ago

at the very least I would like to separate the ones that we actually install from those we dont (and are really just examples) in some way... either by moving them to another subdir, or to samples under some subdir.

csantanapr commented 8 years ago

well not everything under samples directory get install either. I think we should not install any samples/examples. We should find a better and easy way for users to get any or all sample/example installed/copy in their namespace.

csantanapr commented 8 years ago

@mrutkows I think we can move them to samples, when we move catalog folder to own repo in #434 , at that time the corresponding tests also can be updated.

mrutkows commented 8 years ago

That is the point, samples do not get installed and it would be good to move similar actions to "samples" package. The goal of both the "utils" and "system" packages should be to not hold/hold/reposit actions that do not get installed. I agree that when we move the dirs. as part of repo. move we should relocate if we wish to preserve them. Thanks!