#30 Gating example YAML is not clear enough to me
Closed 4 years ago by psss. Opened 4 years ago by churchyard.

I'm looking at https://docs.fedoraproject.org/en-US/ci/gating/#_enable and I have 3 questions:

  • the file content appears to be duplicated. is that intentional or a bug?
  • how do I I gate for multiple tests, just repeat the line in rules?
  • are all the ! tags necessary or sugar?

The content is not completely duplicated, there is a different decision_context. One is for bodhi_update_push_testing and the other for bodhi_update_push_stable. Adding a new test should be done by adding a new line under rules. Regarding the exclamation marks, I'm not sure, but I guess they are required.

What is the difference between bodhi_update_push_testing and bodhi_update_push_stable for rawhide gating?

@churchyard that is a question for the bodhi maintainers, as they implement the gate :) I do not know :(

For rawhide gating you want to use bodhi_update_push_stable since the update gets created directly in the Testing status, so it ever only gets pushed to -stable.

For stable branch you want both though as the update will be pushed first to -testing then to -stable.

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

4 years ago

Gating docs updated to make this more clear: 05e7698

That now made it less clear on how do I enable both at the same time.

What about adding something like this below the examples?

In order to enable both gates, simply concatenate both examples above.

Would that make it clear?

I guess it would. I wonder whether there is some nicer way, but if not, concentrating would do.

@pingou, @mvadkert, is it possible to enable both gates like this?

--- !Policy
product_versions:
  - fedora-*
decision_context:
  - bodhi_update_push_testing
  - bodhi_update_push_stable
rules:
  - !PassingTestCaseRule {test_case_name: org.centos.prod.ci.pipeline.allpackages-build.package.test.functional.complete}

Or is it necessary to copy & paste the whole thing?

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

4 years ago

@gnaponie hi, do you know please the answer to the above question? ^

@lholecek do you know the answer to the above question? ^ :)

I wonder whether there is a specification somewhere or this one example is the only documentation we have.

Documentation for policies is at https://docs.pagure.org/greenwave/policies.html.

Currently, a policy cannot have multiple decision contexts.

Looks like it would be really useful to implement this. I've created issue for this (https://pagure.io/greenwave/issue/467).

Metadata Update from @psss:
- Issue assigned to psss

4 years ago

Added subject_type and hint for concatenation in 09d7d4f.

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

4 years ago

Login to comment on this ticket.

Metadata