Skip to content
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

Fix omit keyword usage in j2 templates #2438

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pablintino
Copy link
Collaborator

No description provided.

Copy link
Contributor

openshift-ci bot commented Oct 10, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from pablintino. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

Thanks for the PR! ❤️
I'm marking it as a draft, once your happy with it merging and the PR is passing CI, click the "Ready for review" button below.

@github-actions github-actions bot marked this pull request as draft October 10, 2024 11:18
@pablintino pablintino marked this pull request as ready for review October 10, 2024 11:22
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/958b59c4aad446db84155323f01d8b40

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 30m 07s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 16m 19s
cifmw-crc-podified-edpm-baremetal RETRY_LIMIT in 21m 32s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 7m 37s
✔️ cifmw-pod-k8s-snippets-source SUCCESS in 4m 02s
✔️ cifmw-pod-pre-commit SUCCESS in 7m 12s
✔️ cifmw-architecture-validate-hci SUCCESS in 4m 01s
✔️ build-push-container-cifmw-client SUCCESS in 36m 40s
✔️ cifmw-molecule-ci_gen_kustomize_values SUCCESS in 5m 03s

Copy link
Collaborator

@lewisdenny lewisdenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this one @pablintino

I have just left a query.

iface: {{ omit if ns.interfaces[network.network_name] is not defined else ns.interfaces[network.network_name] }}
{% else %}
iface: {{ omit if ns.interfaces[network.network_name] is not defined else network.network_name }}
iface: {{ network.network_name }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

iface: {{ omit if ns.interfaces[network.network_name] is not defined else ns.interfaces[network.network_name] }}
{% else %}
iface: {{ omit if ns.interfaces[network.network_name] is not defined else network.network_name }}
iface: {{ network.network_name }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a change in behavior, if it's intended we should list it in the commit message. Should ns.interfaces[network.network_name] be checked before setting iface or was this a typo in the original patch as well.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ask because on line 73 you check the state of ns.interfaces[network.network_name]

iface: {{ omit if ns.interfaces[network.network_name] is not defined else ns.interfaces[network.network_name] }}
{% else %}
iface: {{ omit if ns.interfaces[network.network_name] is not defined else network.network_name }}
iface: {{ network.network_name }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@lewisdenny lewisdenny self-assigned this Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants