eclipse-che / che

Kubernetes based Cloud Development Environments for Enterprise Teams
http://eclipse.org/che
Eclipse Public License 2.0
6.96k stars 1.19k forks source link

Deduplicate samples between che-samples and devspaces-samples #21586

Closed nickboldt closed 7 months ago

nickboldt commented 2 years ago

Is your task related to a problem? Please describe

Today in the Dev Sandbox at https://workspaces.openshift.com we see samples from both Che and CRW 2.15 (soon Dev Spaces 3).

A number of these samples look identical or are at least exposing the same type of project and therefore are redundant to what we're trying to achieve w/ providing a sample or two per language/runtime/env.

c/c++/go image

java / quarkus: image image

node: image

php: image

python: image

Describe the solution you'd like

It would probably make sense to remove samples from devspaces-samples and just reuse the upstream ones, provided that there's a build-time way to override the UDI image used in the devfile when building for the product version.

Describe alternatives you've considered

Alternatively, we could set up a sync process (Jenkins job + sync.sh script) between che-samples/foo and devspaces-samples/foo so that we get the latest from upstream but then use a transformation rule to convert them to use the productized UDI image instead of the Che one.

Additional context

We might need to review the links under "Try Eclipse Che online" at https://www.eclipse.org/che/ in case some of those point to older / deprecated / removed / archived samples.

l0rd commented 2 years ago

The samples we are using in Che now are:

$ curl -sSL https://eclipse-che.github.io/che-devfile-registry/main/devfiles/index.json | jq '.[].links.v2' | sort                                "https://github.com/che-samples/apache-camel-k/tree/devfilev2"
"https://github.com/che-samples/aspnetcore-realworld-example-app/tree/devfilev2"
"https://github.com/che-samples/bash/tree/devfilev2"
"https://github.com/che-samples/cpp-hello-world/tree/devfilev2"
"https://github.com/che-samples/django-realworld-example-app/tree/devfile2"
"https://github.com/che-samples/fuse-rest-http-booster/tree/devfilev2"
"https://github.com/che-samples/golang-example/tree/devfilev2"
"https://github.com/che-samples/helloworld-rust/tree/devfilev2"
"https://github.com/che-samples/java-guestbook/tree/devfilev2"
"https://github.com/che-samples/java-spring-petclinic/tree/devfilev2"
"https://github.com/che-samples/lombok-project-sample/tree/devfilev2"
"https://github.com/che-samples/nodejs-angular/tree/devfilev2"
"https://github.com/che-samples/nodejs-mongodb-sample/tree/devfilev2"
"https://github.com/che-samples/nodejs-react-redux/tree/devfilev2"
"https://github.com/che-samples/php-symfony/tree/devfilev2"
"https://github.com/che-samples/python-hello-world/tree/devfilev2"
"https://github.com/che-samples/quarkus-quickstarts/tree/devfilev2"
"https://github.com/che-samples/react-web-app/tree/devfilev2"
"https://github.com/che-samples/scala-sbt/tree/devfilev2"
"https://github.com/che-samples/web-nodejs-sample/tree/devfilev2"

Which are the ones are duplicates @nickboldt @svor?

nickboldt commented 2 years ago

Downstream devfiles are referenced in https://github.com/redhat-developer/devspaces/tree/devspaces-3-rhel-8/dependencies/che-devfile-registry/devfiles/ ... */meta.yaml

$➔ for d in /path/to/devspaces/dependencies/che-devfile-registry/devfiles/*/meta.yaml; do yq -r '.links.v2' $d; done
https://github.com/devspaces-samples/jboss-eap-quickstarts/tree/devspaces-3-rhel-8
https://github.com/devspaces-samples/microprofile-quickstart-bootable/tree/devspaces-3-rhel-8
https://github.com/devspaces-samples/microprofile-quickstart/tree/devspaces-3-rhel-8
>> https://github.com/devspaces-samples/fuse-rest-http-booster/tree/devspaces-3-rhel-8 <<
https://github.com/devspaces-samples/camel-k/tree/devspaces-3-rhel-8
https://github.com/devspaces-samples/gs-validating-form-input/tree/devspaces-3-rhel-8
>> https://github.com/devspaces-samples/lombok-project-sample/tree/devspaces-3-rhel-8 << 
>> https://github.com/devspaces-samples/quarkus-quickstarts/tree/devspaces-3-rhel-8 << 
https://github.com/devspaces-samples/vertx-http-example/tree/devspaces-3-rhel-8
https://github.com/devspaces-samples/vertx-health-checks-example-redhat/tree/devspaces-3-rhel-8
https://github.com/devspaces-samples/rest-http-example/tree/devspaces-3-rhel-8
https://github.com/devspaces-samples/nodejs-configmap/tree/devspaces-3-rhel-8
>> https://github.com/devspaces-samples/nodejs-mongodb-sample/tree/devspaces-3-rhel-8 <<
>> https://github.com/devspaces-samples/web-nodejs-sample/tree/devspaces-3-rhel-8 << 
>> https://github.com/devspaces-samples/python-hello-world/tree/devspaces-3-rhel-8 << 
https://github.com/devspaces-samples/c-plus-plus/tree/devspaces-3-rhel-8
https://github.com/devspaces-samples/dotnet-web-simple/tree/devspaces-3-rhel-8
https://github.com/devspaces-samples/golang-health-check/tree/devspaces-3-rhel-8
https://github.com/devspaces-samples/cakephp-ex/tree/devspaces-3-rhel-8
https://github.com/devspaces-samples/demo/tree/devspaces-3-rhel-8

There are at least 6 samples that share a name with the che-samples equivalent.

Others might be similar / equivalent and for those, we could decide to choose one or the other... for example how is golang-health-check different from golang-example ? How many different nodejs or java samples do we need between Che and DS?

svor commented 2 years ago

Here is the list of duplicates:

I think we can also use the same sample for PHP, CPP, GO, NodeJs devfiles, just need to decide which one is better.

che-bot commented 1 year ago

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

che-bot commented 1 year ago

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

che-bot commented 8 months ago

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.