-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
Signed-off-by: Igor Vinokur <ivinokur@redhat.com>
.vscode/settings.json
Outdated
@@ -0,0 +1,5 @@ | |||
{ |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are defined in the original devfile v1: https://github.com/eclipse-che/che-devfile-registry/blob/b27df2e5a731d54e169d04060533be1458e9fd02/devfiles/go/devfile.yaml#L5-L17
There was a problem hiding this comment.
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'
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
- id: stop | ||
exec: | ||
label: "1.2 Stop outyet" | ||
component: go-cli | ||
commandLine: "kill $(pidof go)" | ||
group: | ||
kind: run |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on Minikube:
-
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?
-
Endpoint should have targetPort 8585 not 27017, because the server is starting on 127.0.0.1:8585
-
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
for specific go modules I see two options
We need also to ensure that modules are persisted across workspace restart (to not prompt the user each time) |
As @benoitf suggested, included it to the Universal image: devfile/developer-images#4
done
Created an issue: eclipse-che/che#20686 |
@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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
introduce devfile version 2