-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some more validations #2309
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
0791df6
to
435738d
Compare
# while developping with the Framework. | ||
_projects_src: >- | ||
{{ | ||
cifmw_reproducer_default_repositories | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we worry about default values for this var here? IIRC it defaults to upstream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to extend the whole thing. For now, it doesn't check the value, but only the consistency. It's weak, to be fair, and we probably want/need something better here, to ensure we're in the right context.
I don't know if we could get anything from within zuul env showing "where" we run, and create some "validation map" stating something like this:
cifmw_src_base_validation:
upstream:
src_base: https://github.com/openstack-k8s-operators
branch: main
downstream_trunk:
src_base: /home/zuul/src/....
branch: trunk # whatever it should be
downstream_18_proposed:
src_base: https://github.com/openstack-k8s-operators.
branch: 18.0-proposed # whatever it should be
That would really consolidate the whole thing. Any thoughts? Of course, it must be extensible in an easy way, to be future proof (new branch, new entry in the mapping).
- name: Assert everything comes from the same source | ||
ansible.builtin.assert: | ||
that: | ||
- _src_name | length == 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
length == 1
, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woops, right.
Ensure we're consuming projects from the same source.
435738d
to
880931c
Compare
IMHO it's a good opportunity to extract the validations in their own role. @lewisdenny you created the initial validations.yml in the reproducer role - any thoughts on extracting them all in a "cifmw_validations" or something like that, with dedicated tasks files maybe? Of course, we'll have to keep some parameters allowing to disable the validations - maybe per "validation groups". We can discuss this and, if you're willing to tackle that, we can do some proper handover :) |
Yeah it would be nice to support some different types/groups of validations, a role would be best. Let's get a Jira card created and we can flesh it out :) |
This PR is stale because it has been for over 15 days with no activity. |
Ensure we're consuming projects from the same source.