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

REST APIs that allows saving/edit/delete/search/share devfiles #17843

Merged
merged 15 commits into from
Oct 6, 2020

Conversation

skabashnyuk
Copy link
Contributor

@skabashnyuk skabashnyuk commented Sep 11, 2020

What does this PR do?

This is a set of REST APIs that allows saving/edit/delete/search/share devfiles.
The code is marked as 'Preview Beta'. We expect some changes in future releases.
Code can be reviewed commit by commit

Model

Main model object.

{
  "name": "devfile-94c37pcwf49pcsy7",
  "namespace": "opentlc-mgr",
  "id": "id-8th8js34s6doo3q7",
  "devfile": {
    "metadata": {
      "name": "wksp-custom"
    },
    "apiVersion": "1.0.0"
  },
  "links": [
    {
      "href": "https://che-che.apps.cluster-f3d8.f3d8.example.opentlc.com/api/devfile/id-8th8js34s6doo3q7",
      "method": "GET",
      "rel": "self",
      "produces": "application/json"
    }
  ]
}

you can see such parts

Field Description
id Uniquely identifying persistent devfile
name Short human readable name of persistent devfile
description A long explanation about how this concrete persistent devfile is used.
namespace Che namespace to which this persistent devfile belongs to
devfile Content of devfile that is matched Devfile schema 1.0
link Weblinks related to this persistent devfile

Such rest methods was implemented:
Знімок екрана 2020-09-16 о 10 58 08

  • As you can see there are two POST methods. One devfile/devfile/ is used to create persistent devfile from yaml. The name would be generated randomly.
  • For compatibility reasons method GET /devfile left untouched. It returns devfile 1.0 schema. Method GET /devfile/list is used to enumerate and search for devfiles.

TODO for Phase 2

Screenshot/screencast of this PR

What issues does this PR fix or reference?

#16981

How to test this PR?

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@che-bot che-bot added kind/task Internal things, technical debt, and to-do tasks to be performed. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. labels Sep 11, 2020
@eclipse-che eclipse-che deleted a comment from che-bot Sep 17, 2020
@eclipse-che eclipse-che deleted a comment from che-bot Sep 17, 2020
@eclipse-che eclipse-che deleted a comment from che-bot Sep 17, 2020
@eclipse-che eclipse-che deleted a comment from che-bot Sep 17, 2020
@eclipse-che eclipse-che deleted a comment from che-bot Sep 17, 2020
@eclipse-che eclipse-che deleted a comment from che-bot Sep 17, 2020
@eclipse-che eclipse-che deleted a comment from che-bot Sep 17, 2020
@eclipse-che eclipse-che deleted a comment from che-bot Sep 17, 2020
@eclipse-che eclipse-che deleted a comment from che-bot Sep 17, 2020
@eclipse-che eclipse-che deleted a comment from che-bot Sep 17, 2020
Signed-off-by: Sergii Kabashniuk <skabashniuk@redhat.com>
Signed-off-by: Sergii Kabashniuk <skabashniuk@redhat.com>
Signed-off-by: Sergii Kabashniuk <skabashniuk@redhat.com>
Signed-off-by: Sergii Kabashniuk <skabashniuk@redhat.com>
Signed-off-by: Sergii Kabashniuk <skabashniuk@redhat.com>
@che-bot
Copy link
Contributor

che-bot commented Sep 30, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

Signed-off-by: Sergii Kabashniuk <skabashniuk@redhat.com>
@che-bot
Copy link
Contributor

che-bot commented Sep 30, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

}

@POST
@Consumes({APPLICATION_JSON})
Copy link
Member

Choose a reason for hiding this comment

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

why not accept yaml here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see no use-case for that. Do you?

Copy link
Member

Choose a reason for hiding this comment

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

I don't know. Hard to imagine all use-cases. I guess we can add it in the future, if need raises

Signed-off-by: Sergii Kabashniuk <skabashniuk@redhat.com>
Signed-off-by: Sergii Kabashniuk <skabashniuk@redhat.com>
@skabashnyuk
Copy link
Contributor Author

@sparkoo @mshaposhnik @metlos @sleshchenko I think I've addressed your comments. Noticeable commits:

  • Applying reviewers suggestions d790930
  • Applying reviewers suggestions 50e9f09
  • Added explanation of what UserDevfile.namespace is f8cb092
  • Cover the possibility of using invalid search and order filed names a7f9eb3

@che-bot
Copy link
Contributor

che-bot commented Oct 1, 2020

✅ E2E Happy path tests succeed 🎉

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

Signed-off-by: Sergii Kabashniuk <skabashniuk@redhat.com>
@che-bot
Copy link
Contributor

che-bot commented Oct 5, 2020

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

ℹ️ Use comment "[crw-ci-test]" to rerun happy path E2E test.

@skabashnyuk
Copy link
Contributor Author

[crw-ci-test]

@che-bot
Copy link
Contributor

che-bot commented Oct 5, 2020

✅ E2E Happy path tests succeed 🎉

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

Copy link
Member

@sleshchenko sleshchenko left a comment

Choose a reason for hiding this comment

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

Sorry for the delay, I did not manage to redo the review in detail but I believe this PR should be good to merge once other reviewers approve it. So, feel free to merge without my approval )

Signed-off-by: Sergii Kabashniuk <skabashniuk@redhat.com>
@skabashnyuk
Copy link
Contributor Author

[ci-build]

Signed-off-by: Sergii Kabashniuk <skabashniuk@redhat.com>
@che-bot
Copy link
Contributor

che-bot commented Oct 5, 2020

✅ E2E Happy path tests succeed 🎉

See Details

Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)

@skabashnyuk
Copy link
Contributor Author

[ci-build]

@skabashnyuk
Copy link
Contributor Author

ci-build

@skabashnyuk
Copy link
Contributor Author

ci-build

@skabashnyuk
Copy link
Contributor Author

[ci-build]

2 similar comments
@skabashnyuk
Copy link
Contributor Author

[ci-build]

@skabashnyuk
Copy link
Contributor Author

[ci-build]

@skabashnyuk skabashnyuk merged commit f703f6f into eclipse-che:master Oct 6, 2020
@skabashnyuk skabashnyuk deleted the che16981_model2 branch October 6, 2020 10:01
@che-bot che-bot removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Oct 6, 2020
@che-bot che-bot added this to the 7.20 milestone Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants