Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

stacks: generated index.json for CodeWind #163

Merged
merged 24 commits into from
Aug 14, 2019
Merged

Conversation

skoh7645
Copy link
Collaborator

@skoh7645 skoh7645 commented Aug 9, 2019

Checklist:

Description

Wrote a python script to generate an index.json file from the index.yaml for CodeWind to consume appsody projects. The python script is called in the build.sh script.

Related Issues:

Fixes: #161

Copy link
Contributor

@neeraj-laad neeraj-laad left a comment

Choose a reason for hiding this comment

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

I don't belive we need an exact conversion from yaml to json. Please see the issue and hte sample json doc. We need to read specific fields in yaml and write the values out with modified keys.

Copy link
Contributor

@neeraj-laad neeraj-laad left a comment

Choose a reason for hiding this comment

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

I'll test this locally as well but few minor changes are needed before that

res = (OrderedDict([
("displayName", item['name']),
("description", item['description']),
("language", item['id']),
Copy link
Contributor

Choose a reason for hiding this comment

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

language should be set to blank for now: "" as there is no concept of language in our stack.yamls

Choose a reason for hiding this comment

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

Unfortunately Codewind does require a language. Could we hardcode this for now to one of java, nodejs, swift accordingly?

Copy link
Contributor

Choose a reason for hiding this comment

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

@makandre it is not possible for us to set these on the fly, unless we maintain a map of stacks and languages somewhere (quarkus -> java).

As per @tobespc, "" would suffice. Please, can you confirm?

Choose a reason for hiding this comment

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

Toby's away but maybe @deboer-tim can comment?

Choose a reason for hiding this comment

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

Although we can create a project w/o the language set, we will fail to display it in several places within the IDE as you can see in the screenshot:

image

It also breaks debugging. Codewind uses the language to determine the style of debugging to use.

Choose a reason for hiding this comment

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

Sorry, I don't know how the language is used and whether it gets through the template API to the client. I'm assuming at a minimum it would mean you can't filter the list of projects by language (which isn't necessarily a huge loss) but I don't if it would cause other problems. Might be worth trying (at least to see if it is ok for now), or pinging Howard.

("language", item['id']),
("projectType", "appsodyExtension"),
("projectStyle", "Appsody"),
("location", item['templates'][0]['url']),
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe you should pull in url for the default-template here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I have fixed this in the latest commit

@neeraj-laad neeraj-laad mentioned this pull request Aug 13, 2019
4 tasks
neeraj-laad and others added 9 commits August 14, 2019 10:45
Signed-off-by-Neeraj Laad <neeraj.laad@gmail.com>
Signed-off-by: Neeraj Laad <neeraj.laad@gmail.com>
Signed-off-by Neeraj Laads <neeraj.laad@gmail.com>
ci: fixed code formatting using vscode
Copy link
Contributor

@neeraj-laad neeraj-laad left a comment

Choose a reason for hiding this comment

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

LGTM.

@neeraj-laad neeraj-laad merged commit f81000a into appsody:master Aug 14, 2019
@makandre
Copy link

Hi, I see this got merged. Where is the index.json file located?

I also see the language field is going to be blank. As I mentioned in #163 (comment) this is going to break the debug scenario for Codewind.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate index.json for CodeWind to consume appsody projects
4 participants