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

demo web interface for DSpot #801

Open
monperrus opened this issue May 21, 2019 · 23 comments
Open

demo web interface for DSpot #801

monperrus opened this issue May 21, 2019 · 23 comments

Comments

@monperrus
Copy link
Member

we can have a demo web interface for DSpot. there would be two input fields: URL to a repo and email. People would submit their repo, Dspot would be run on the latest version, and the result email would be sent.

This is directly inspired by http://commit.guru/ (the code is online, we may reuse it)

Under discussion at KTH.

@gibello
Copy link

gibello commented May 21, 2019

If based on the maven plugin, I have part of the code: a (not yet committed, still some pending issues) dspot invoker, and a Git cloner already committed in stamp-ci (https://github.com/STAMP-project/stamp-ci/blob/master/stamp-cicd-utils/src/main/java/eu/stamp_project/cicd/utils/git/GitCloner.java ).

@monperrus
Copy link
Member Author

monperrus commented May 21, 2019 via email

@danzone
Copy link
Collaborator

danzone commented May 21, 2019

Consider to use also the code developed by @luandrea, based on EGit Eclipse library (Luca also contributed to this library, adding support for web proxies: his contribution now is officially part of Eclipse library): https://github.com/STAMP-project/botsing-github-app/blob/master/src/main/java/eu/stamp/botsing/service/GitHubService.java In this class you can reuse several methods to open, for instance, pull requests on Github repo, containing the amplified unit tests.

@monperrus
Copy link
Member Author

https://github.com/STAMP-project/botsing-github-app/blob/master/src/main/java/eu/stamp/botsing/service/GitHubService.java

Will be super useful, could you document its usage with some snippets or test cases?

@gibello
Copy link

gibello commented May 21, 2019

Same kind of code here, but for Gitlab: https://github.com/STAMP-project/stamp-ci/blob/master/stamp-cicd-utils/src/main/java/eu/stamp_project/cicd/utils/git/GitlabIssueManager.java .
Has comments + javadoc available.
The GitHubService code could be moved to stamp-ci, I think... For the same reason I was requested to move my code there (it is of common use).

@danzone
Copy link
Collaborator

danzone commented May 22, 2019

Dear @monperrus , at the moment some integration tests show how it works: https://github.com/STAMP-project/botsing-github-app/blob/master/src/test/java/eu/stamp/botsing/service/GitHubServiceTestIT.java Anyway, we will consider to write some documentation on it.

@monperrus
Copy link
Member Author

monperrus commented May 22, 2019 via email

@monperrus
Copy link
Member Author

FYI @tailp is working on this.

  • could you post a temporary screenshot here?
  • could you create a WIP pull-request?

@monperrus monperrus assigned monperrus and unassigned monperrus Jul 18, 2019
@henry-lp
Copy link
Contributor

henry-lp commented Jul 18, 2019

* could you post a temporary screenshot here?

This is a basic layout for the web page :).
screenshot1
screenshot2
screen3
screenshot4

@danzone
Copy link
Collaborator

danzone commented Jul 19, 2019

That's very interesting @tailp ! Looking forward to see your progresses, and of course I will stay at your disposal in case you need some help on the code we referenced previously in this thread.

@henry-lp
Copy link
Contributor

Thank you :). I'll contact you when that's the case .

@danzone
Copy link
Collaborator

danzone commented Jul 19, 2019

Another source of info: two years ago I started to design REST API to expose STAMP as a service. But the project progressed in another direction, and those APIs was abandoned. They are already available at https://app.swaggerhub.com/apis/stamp-project/stamp-api/0.2.0
The idea was to upload test cases to amplify as a zip, base 64-encoded file, and amplified tests would be sent back with the same format (zipped and base64 encoded). The APIs contain example with real data: the base 64 values you will find are real test cases (both the test cases sent to DSpot and test cases generated by DSpot). I generated them executing locally into my laptop, and the used as example for the APIs.

@danglotb
Copy link
Member

Hello @tailp

That looks very nice! Thank you.

@danzone
Copy link
Collaborator

danzone commented Jul 19, 2019

Another source of info: two years ago I started to design REST API to expose STAMP as a service. But the project progressed in another direction, and those APIs was abandoned. They are already available at https://app.swaggerhub.com/apis/stamp-project/stamp-api/0.2.0
The idea was to upload test cases to amplify as a zip, base 64-encoded file, and amplified tests would be sent back with the same format (zipped and base64 encoded). The APIs contain example with real data: the base 64 values you will find are real test cases (both the test cases sent to DSpot and test cases generated by DSpot). I generated them executing locally into my laptop, and the used as example for the APIs.

@henry-lp
Copy link
Contributor

@danzone thank you very much. That sounds very interesting :). Currently I am stuck with another task on repairnator, but I'll surely take a look when I am back to Dspot again :) .

@henry-lp
Copy link
Contributor

henry-lp commented Jul 21, 2019

* could you create a WIP pull-request?

@monperrus currently I already have a fork for the dspot-Kubernetes task. So I won't be able to fork again and make a PR until that's is done :) . I'll continue working offline in the mean time.

@monperrus
Copy link
Member Author

monperrus commented Jul 23, 2019 via email

@monperrus
Copy link
Member Author

@tailp, per our meeting today, in your own fork, you have one branch per pull request.

@danglotb
Copy link
Member

danglotb commented Aug 9, 2019

@tailp I merged #847

I have some questions about it:

  1. Is the provided URL for the example, i.e. http://35.246.191.225:3000/, accessible from everywhere? I tried but could not reach it. (but might an issue on my side)
  2. The README shows:
cd dspot-web
npm install --no-optional
npm run-script start

But what should I do after running the last command to see the web interface?

Thank you, and great job!

@henry-lp
Copy link
Contributor

henry-lp commented Aug 9, 2019

@danglotb Hi :) , ah I think my Kubernetes cluster is running on europe-west3-c , maybe it's not accessible in France. I'll tell the guy resposible for the KTH K8s cluster to deploy it so that it also works at your place.

Meanwhile you can run it yourself locally. After the readme , you'll need 3 more things mongodb, activeMQ and our dspot-pipeline dockerimage (local updates not yet pushed here, related to this #852).

docker run -d --net=host mongo:4.0.11-xenial
docker run -d --net=host webcenter/activemq:5.14.3
docker run  --net=host tailp/dspot-pipeline

The last one is left running undetached since what happens after someone submit a git url is interesting :). You can now access the page at localhost:3000 and submit an url like this random repo on the internet "https://github.com/jenkins-docs/simple-java-maven-app" which will succeed or "https://github.com/STAMP-project/dspot" , which will give you an amplification failed since multi modules autoconfig are not yet supported :) . Otherwise just ping me if you encounter any bugs, I'll fix and update the docker image.

@gluckzhang
Copy link

Hi @danglotb , @monperrus , we just successfully deployed the DSpot web demo in our cluster. You could use this link to test: http://dspot.kth-assert.net/ (which should be avaliable everywhere)

As some project will keep DSpot running for quite a long time, we set up a 10 minutes timeout in the current deployment. Feel free to ping me or @tailp if you have any questions :)

@monperrus
Copy link
Member Author

#847 is a milestone PR for this. we keep this issue open because we continue the work, esp with @borisbaldassari

@monperrus
Copy link
Member Author

It would be great to have syntax highlighting in the test cases sent over email.

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

No branches or pull requests

6 participants