Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[che-dev] How to apply devfile overrides in the REST API
  • From: Lukas Krejci <lkrejci@xxxxxxxxxx>
  • Date: Fri, 1 Nov 2019 17:37:54 +0100
  • Autocrypt: addr=lkrejci@xxxxxxxxxx; keydata= mQENBF2dCOgBCAD5/JOv9+R+U/WliRugBDM39G42porWn4cxg3n0XnTsAPOGw4uEycm9qyYj PZ6Dx2/wWVFvjX1FOMFoSbiQF/7VsiafZy0g4a5J97SFTWZXwBqYqVInOfxHUFAegSqDEJ32 E7b8I/NivMl1/nIYgFogC1UJJ0TrfyjGeBKuXVPruTQeelqlQCi6Yoy43VoyZoWsYcrZQ9kc vDGvCAC2xkk42o8ARYuWNZkan8Q+KRLnroacAV07DslgTyBo1tobNw+uVzMhsbvK1HyVfjLt ceaBVFGy9CtTnZHY4zQ/aqjPdehZ6j53X7Mbzieckc81Rwm4PxojbWJ4pdVsjP2xHyTtABEB AAG0IUx1a2FzIEtyZWpjaSA8bGtyZWpjaUByZWRoYXQuY29tPokBVAQTAQgAPhYhBNUZeXTR D+fLJbwoiCLB0ImKMx/LBQJdnQjpAhsDBQkB4TOABQsJCAcCBhUKCQgLAgQWAgMBAh4BAheA AAoJECLB0ImKMx/LNh8IAJczCeBkCcGPTj+YVGvDR4Bs5YNv9FtNlrTI7J9MPx92QJRBYWfO REtHMBj0BaU663rJEA46Zr8rThAXWAAOKkUPWUZSqhzLSsbEeI2imtkADqDf9cpm5WtRnLoa t5L/EYRYhZjChnrCPaP9P+F5w5VtqepohvnRQiYeBPvzkQpkz0zyP/ynLT75mv4TJiUKrgQq zo+NRfCR/cpQna7cnT88FgDeMrI+qCBkIoLxiHjAKE9dTPHlyBPwb+f15WAOkoIYvvNWTZ5B MRAKMmYGm1PBh7zVzKGA/DTH3/rHlgzFeyksoDhPMdwSJuxlHztHwJQR+iixhWhPuQLi24xz F4y5AQ0EXZ0I6AEIAOKT6aZwXMRGUsU/aeuGP/i49BE9PoBXfcc94ReOHdpI7nPxH26YRras +SoYsFUl7WZiBoxtceLnP1mxLPXqlbKRCmCx7Td7LSB6btLiT6tc8rMmZ9CZMUd86DmAaEM8 yma+che9uSPdRFSOhI1V3mvHlslQ9O3UlGUWXY/G2v0T88lXsW874RXgtpnoMVArZmnkUzma 5ykTrz8+f1f/nPaJ3sPp6bMg56zW2NI2G+3wknu6c/QmRDXQ0XQUH4ZQ6Wd/Fjz2hdIpPyw4 e1b1OCVhkLsAOM5A9bMx7FBz1BYK+mc1mF+q58oKO3+gN0IVz8SPuhwKNc5cYIuvnMuSUGEA EQEAAYkBPAQYAQgAJhYhBNUZeXTRD+fLJbwoiCLB0ImKMx/LBQJdnQjoAhsMBQkB4TOAAAoJ ECLB0ImKMx/LIyoH/jXT2J4T4eNcNPUeCfHMCvitWW+Zf8l4gCWnxYJL2nieguc68sPDBXuT 36gSzWSncz0g+UqRysV69zY9ZdcuZrcNWQuo5RKVXUDKGZ+2iRGvKc0k4Cce4w4cO6iMeL7N Rm6VtmJ60bUUpQboPEzaxns5cqgRmJTsr9YVfeptrr1e9U5xIROILu4tJpK6DMgwTNC3EsVI N9GiFy+Kb44ccz7wKhBXKZe0ghiZzlsjpEeY/aijW6I48kO7xiYFM7DWySXHP5nnK5Nf0k7p WH2pd0YlG9IRni4Lts2ILmvZHrHN1PT75GRmVMosMrSh4Zv+r15z3Zvar0aiyoojZd3u/tc=
  • Delivered-to: che-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/che-dev>
  • List-help: <mailto:che-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/che-dev>, <mailto:che-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/che-dev>, <mailto:che-dev-request@eclipse.org?subject=unsubscribe>
  • User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

Hello folks,

in the platform team, we've been discussing how to best apply the
devfile values overrides to the workspace being created using the
factory API or workspace API.

We're investigating this for the upcoming issue
https://github.com/eclipse/che/issues/13617 which wants to apply
overrides to various parts of the devfile coming to/through the factory API.

Quick recap of what factory and workspace APIs do:

Factory API "materializes" a URL into a fully contained devfile - e.g.
it tries to find a devfile on the supplied URL, fetches all the
referenced content and inlines it. It can also synthesize a devfile if
none is found on the supplied URL. Such devfile can then be further
worked on.

Workspace API actually creates a workspace out of a devfile.

Now, there are essentially 3 places where the overriding logic may reside:

1) the factory API applies the overrides during the "materialization" of
the devfile

2) workspace API applies the overrides before a workspace is created

3) the client (dashboard, chectl) applies the overrides on a
materialized devfile obtained from the factory before it sends it to
workspace API.

Each approach has its pros and cons and we realized we could not pick
the obviously best approach out of the three.

My take on this is that I'd rule out the variant number 3, because,
applying the same logic, the whole of the factory API could be done on
the client side. I am more inclined towards applying the overrides on
the workspace API though, because that increases the reusability of a
single devfile - the users don't have to have several variants of a
devfile on the filesystem and can create multiple different workspaces
out of it. Having such ability on the factory API would merely make it
easier to create such multiple variants.

On the other hand, usecase mentioned in
https://github.com/eclipse/che/issues/13617#issuecomment-531758905
would call for the overrides to be applied on the factory API so that
direct links to customized workspaces could be created.

What are your thoughts about the options?


Thanks,

Lukas

Attachment: signature.asc
Description: OpenPGP digital signature


Back to the top