#282 In `gating.yaml` the meaning of `decision_context` is unclear
Closed: Fixed 18 days ago by vmaljulin. Opened 2 years ago by lholecek.

Key decision_context in gating.yaml currently doesn't have any meaning but it needs to be defined (it's not optional).

Possible solutions:

  • Assign same meaning to it as in Greenwave policies. I.e. Greenwave only considers policies from gating.yaml matching the decision_context (value passed to /decision endpoint).
  • Make it invalid in gating.yaml.
  • Ignore it (make it optional for backwards compatibility).

Note, however we resolve this, this wiki page needs to be updated after this issue is closed.

Coming out of discussion with @lholecek and @gnaponie and @acorvin, we're going to go with option number 1, listed above.

FYI, this is related to #286

Metadata Update from @lholecek:
- Issue assigned to lholecek

2 years ago

Metadata Update from @lucarval:
- Issue status updated to: Open (was: Closed)

2 years ago

Re-opening this because docs were not updated as indicated by Ralph's comment.

@ralph, also noticed some oddities in the reporting. Could you provide more details?

See output of:

curl -H 'Content-Type: application/json' 'https://greenwave-web-greenwave.app.os.fedoraproject.org/api/v1.0/decision' --data-binary '{"product_version":"fedora-28","decision_context":"bodhi_update_push_stable","subject":[{"item":"python-ansi2html-1.5.1-3.fc28","type":"koji_build"},{"original_spec_nvr":"python-ansi2html-1.5.1-3.fc28"},{"item":"FEDORA-2018-8586a09c0d","type":"bodhi_update"}],"verbose":true}'

Compared to the defined gating.yaml: https://src.fedoraproject.org/rpms/python-ansi2html/blob/f28/f/gating.yaml

@ralph, also noticed some oddities in the reporting. Could you provide more details?

@lucarval The gating.yaml and policies were probably updated since your last comment. Do you remember what was the issue here specifically?

We should update the the Gating wiki page for Fedora. It currently states:

The decision_context is to be clarified.

The wiki page is now a Fedora doc, but it's still waiting to be "clarified"...

The decision_context (and newly decision_contexts) in gating.yaml has same meaning as in policies defined in Greenwave configuration:

This is an arbitrary string identifying the "context" of the decisions
where this policy is applicable. In other words, if Greenwave is making
decisions at gating points in a pipeline, this is how we identify which
gate we are talking about.

Greenwave only uses policies from gating.yaml which have same decision context as the one in current decision request (but see also related issue #603).

So, please send a PR for the doc explaining that. :)

Metadata Update from @vmaljulin:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

18 days ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #315 Merged 2 years ago