eclipse-csi / otterdog

OtterDog is a tool to manage GitHub organizations at scale using a configuration as code approach. It is actively used by the Eclipse Foundation to manage its numerous projects hosted on GitHub.
https://otterdog.readthedocs.org
Eclipse Public License 2.0
24 stars 4 forks source link

Playground should support 'vendor/otterdog-defaults/otterdog-defaults.libsonnet' #315

Closed koppor closed 2 weeks ago

koppor commented 2 weeks ago

At https://github.com/winery/.eclipsefdn/blob/eea562ab0d785552d75f237a0484016dcbff03dd/otterdog/winery.jsonnet, the first line is

local orgs = import 'vendor/otterdog-defaults/otterdog-defaults.libsonnet';

I copy and paste the full jsonnet file into https://otterdog.eclipse.org/projects/automotive.winery/playground

I get

Error: RUNTIME ERROR: File not found vendor/otterdog-defaults/otterdog-defaults.libsonnet
    playground.jsonnet:1:14-75  thunk <orgs> from <$>
    playground.jsonnet:3:1-5    
    During evaluation   

I was assuming that a working file is also working the playground.

netomi commented 2 weeks ago

the playground sets up the default config by default, thats the first line here:

image

koppor commented 2 weeks ago

the playground sets up the default config by default, thats the first line here:

Sure.

I think, I need to contact eclipse-winery-bot and you why they chose another import :p. (Source of contributors: https://github.com/winery/.eclipsefdn/commits/eea562ab0d785552d75f237a0484016dcbff03dd/)


I thought, I could play around with my config in the playground. But, maybe, this is not an aim of the playground.

netomi commented 2 weeks ago

you can play around with your config in the playground, just leave out the first line and keep the one that is preconfigured in the playground. The actual default config is present here: https://github.com/EclipseFdn/otterdog-defaults/blob/main/otterdog-defaults.libsonnet is versioned and needs to be downloaded before use. So the playground sets up everything for you. I can try to keep the name the same so that you more easily can copy in the full config, but so far that was not the goal, but rather to test out snippets quickly.

netomi commented 2 weeks ago

ok I managed to change the filenames in the playground so that you can test out your existing config unmodified:

image

will deploy that soon.

netomi commented 2 weeks ago

Its now live.