New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 832580 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature

Blocked on:
issue 833946



Sign in to add a comment

Make it possible to add custom validation routine for configs to PRESUBMIT.py

Project Member Reported by serg...@chromium.org, Apr 13 2018

Issue description

For instance, V8 would like to validate cr-buildbucket.cfg to ensure that

  mixins: "multibot"

is never combined with any platform mixins:

  mixins: "linux64"
  mixins: "win64"
  mixins: "mac64"

because it already includes "linux64" and should someone try to add this mixin with "win64" or "mac64", it will cause Buildbucket to silently fail to schedule builds because we don't have non-Linux multibot machines in our pool.

From config service, we'd love some kind of API to generate a JSON representation of the same config such that we can parse it and add custom rules. Alternative solution would be to keep a copy of the generated Python protobuf lib, but is likely to get out of sync at some point.
 
Labels: -Restrict-View-Google

Comment 2 by no...@chromium.org, Apr 17 2018

Blockedon: 833946
Cc: vadimsh@chromium.org smut@chromium.org tandrii@chromium.org
very interesting use case. It never occurred to me that clients of the configs might have a certain validation logic of their own.

perhaps this fastest way to fix this is to ensure this use case is supported in the new high-level LUCI config format, which is basically Skylark. You can define constrained rules/functions and use them exclusively in your configs.
This is most interesting idea. How will Skylark be integrated with current system? Is there a design doc and/or bug to track?

Comment 4 by no...@chromium.org, Apr 18 2018

Labels: Type-Feature
the blocking bug 833946 and what it refers to answers the question. It is the bug to track.

Comment 5 by estaab@chromium.org, May 22 2018

Status: Available (was: Untriaged)

Sign in to add a comment