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

chore: introduce devfile version 2 #1

Merged
merged 12 commits into from
Oct 26, 2021

Conversation

vinokurig
Copy link

introduce devfile version 2

Signed-off-by: Igor Vinokur <ivinokur@redhat.com>
@vinokurig vinokurig requested review from benoitf and svor October 20, 2021 06:14
@@ -0,0 +1,5 @@
{
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need these settings ?
it's not brought automatically by the plug-in definition ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed the file

devfile.yaml Outdated
schemaVersion: 2.1.0
metadata:
name: golang-echo-example
projects:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we have two projects being checkout there ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok but with devfile v2 we really want to emphasis the devfile being inside the project and not being cross-project

so either we merge two examples in one repository or we create one devfile per repository. It means 'two samples'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Splited the devfile to separate projects

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to create one devfile per repository and in go/meta.yaml use only https://github.com/che-samples/golang-echo-example/tree/devfilev2 as Getting Started sample.
@benoitf wdyt?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine

devfile.yaml Outdated
Comment on lines 25 to 31
- id: stop
exec:
label: "1.2 Stop outyet"
component: go-cli
commandLine: "kill $(pidof go)"
group:
kind: run
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be removed as well no ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command works for both projects

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but look at the name of the command (label)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right, renamed the command

@vinokurig
Copy link
Author

@benoitf @svor Looks like all comments were addressed, could you please review it again?

@benoitf
Copy link

benoitf commented Oct 21, 2021

Screenshot 2021-10-21 at 09 33 23

I clicked on build and on run but I'm not seeing any progress

Copy link

@svor svor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on Minikube:

  1. After opening *.go file i see that some go modules are not installed. It is possible to install them by clicking Install button, but it could be a problem in disconnected environment. From another side I don't think that is good idea to install that modules into Universal image to have them from the start as it was done in sidecar image. @benoitf what should we do in this case?
    screenshot-192 168 49 2 nip io-2021 10 20-17_58_03

  2. Endpoint should have targetPort 8585 not 27017, because the server is starting on 127.0.0.1:8585
    screenshot-192 168 49 2 nip io-2021 10 20-18_01_24

  3. It seems the application doesn't work as we expected. But it is not related to this PR, we need to create another issue for that
    screenshot-nimbus-capture-2021 10 20-18_02_48

@benoitf
Copy link

benoitf commented Oct 21, 2021

for specific go modules I see two options

  1. if 99% of the go projects are using a specific module then it's good to add it in the universal image
  2. we could have some workspace post start events calling 'init-module' command to do that on the first run of the workspace but these events are not implemented yet on DevWorkspace level

We need also to ensure that modules are persisted across workspace restart (to not prompt the user each time)

@vinokurig
Copy link
Author

@benoitf

I clicked on build and on run but I'm not seeing any progress

My output shows a progress:
screenshot-192 168 64 57 nip io-2021 10 25-14_28_27
screenshot-192 168 64 57 nip io-2021 10 25-14_27_52

@svor

After opening *.go file i see that some go modules are not installed. It is possible to install them by clicking Install button, but it could be a problem in disconnected environment. From another side I don't think that is good idea to install that modules into Universal image to have them from the start as it was done in sidecar image. @benoitf what should we do in this case?

As @benoitf suggested, included it to the Universal image: devfile/developer-images#4

Endpoint should have targetPort 8585 not 27017, because the server is starting on 127.0.0.1:8585

done

It seems the application doesn't work as we expected. But it is not related to this PR, we need to create another issue for that

Created an issue: eclipse-che/che#20686

@svor
Copy link

svor commented Oct 25, 2021

@vinokurig your PR into developer-image was merged and built, could you please update your PR to use the correct image, i suppose it should be quay.io/devfile/universal-developer-image:ubi8-112f94a

@vinokurig
Copy link
Author

@svor

@vinokurig your PR into developer-image was merged and built, could you please update your PR to use the correct image, i suppose it should be quay.io/devfile/universal-developer-image:ubi8-112f94a

done

# between the two
value: /tmp/.cache
endpoints:
- name: 8080-tcp
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small remark, maybe it's better to change the name as well: 8585-tcp

Copy link

@svor svor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

screencast-192.168.49.2.nip.io-2021.10.26-12_26_04.mp4

@vinokurig vinokurig merged commit a3da836 into che-samples:devfilev2 Oct 26, 2021
@vinokurig vinokurig deleted the devfile2 branch October 26, 2021 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants