Skip to content

Conversation

@ehelms
Copy link
Member

@ehelms ehelms commented Nov 2, 2025

No description provided.

@ehelms ehelms force-pushed the add-iop branch 5 times, most recently from bfdcd43 to 2fd7276 Compare November 4, 2025 01:51
@ehelms ehelms marked this pull request as ready for review November 4, 2025 16:45
@ehelms ehelms force-pushed the add-iop branch 2 times, most recently from 71ce03e to 4cf96ac Compare November 25, 2025 20:35
@ehelms ehelms force-pushed the add-iop branch 6 times, most recently from ddfec69 to eb1df00 Compare December 11, 2025 20:38
@ehelms
Copy link
Member Author

ehelms commented Dec 12, 2025

@evgeni Could you check just the github action part of the commit (eb1df00) to make sure it matches with how you think we should use matrix?

Comment on lines 49 to 51
iop:
- enabled
- disabled
Copy link
Member

Choose a reason for hiding this comment

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

This will run IoP enabled tests for every combination, thus doubling the matrix. Do we need that?

See how we used security and database with a single entry in the matrix itself and then special additions via include (resulting in one additional job)

Copy link
Member Author

Choose a reason for hiding this comment

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

See how we used security and database with a single entry in the matrix itself and then special additions via include (resulting in one additional job)

I saw it but I did not understand it.

Copy link
Member

Choose a reason for hiding this comment

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

Want an explanation?

Comment on lines +114 to +116
- name: Enable iop
if: matrix.iop == 'enabled'
run: |
./foremanctl deploy --add-feature iop
Copy link
Member

Choose a reason for hiding this comment

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

calls to foremanctl deploy are expensive (adds ca 2 minutes to the execution), so I wonder if it'd be smarter to have fewer of those "add optional feature" steps and use something like {{ matrix.iop == 'enabled' && '--add-feature iop' || '' }} inside an existing step

@evgeni
Copy link
Member

evgeni commented Dec 12, 2025

@evgeni Could you check just the github action part of the commit (eb1df00) to make sure it matches with how you think we should use matrix?

I think it can be optimized, posted comments how :)

@ehelms ehelms force-pushed the add-iop branch 5 times, most recently from a200e68 to ffcfc02 Compare December 15, 2025 16:58
@ehelms
Copy link
Member Author

ehelms commented Dec 15, 2025

@evgeni For now, I want to keep the same behavior of not supporting remote database yet. Looking at Obsah, I don't think that's possible but I wanted you to check me on that. I need to forbid:

  • database_mode == external and 'iop' in enabled_features

forbidden_if looks like it only allows the first parameter to have a value. Do I read that correctly?

Signed-off-by: Eric D. Helms <ericdhelms@gmail.com>
Signed-off-by: Eric D. Helms <ericdhelms@gmail.com>
Signed-off-by: Eric D. Helms <ericdhelms@gmail.com>
Signed-off-by: Eric D. Helms <ericdhelms@gmail.com>
@ehelms ehelms force-pushed the add-iop branch 2 times, most recently from d5bfe6f to 1b2bf3f Compare December 17, 2025 21:29
@evgeni
Copy link
Member

evgeni commented Dec 18, 2025

@evgeni For now, I want to keep the same behavior of not supporting remote database yet. Looking at Obsah, I don't think that's possible but I wanted you to check me on that. I need to forbid:

* database_mode == external and 'iop' in enabled_features

forbidden_if looks like it only allows the first parameter to have a value. Do I read that correctly?

That's correct, today we can only forbid "if param P has value Y you can't set params A and B at all"

You could add a check, that's more flexible than what you get at the obsah level?

@ehelms
Copy link
Member Author

ehelms commented Dec 18, 2025

You could add a check, that's more flexible than what you get at the obsah level?

I could... just less clear then when do we do parameter validation at the CLI level and when do we do it at the checks level.

@evgeni
Copy link
Member

evgeni commented Dec 18, 2025

Sure, yeah.

We could easily enhance obsah to reject things like "if A=1 then B can't be 2", but in your case you need "if A=1 then 2 cant be IN B", and I'm not sure how to nicely express that in metadata

@ehelms
Copy link
Member Author

ehelms commented Dec 18, 2025

Here is my attempt to implement that structure: theforeman/obsah#104

@ehelms ehelms force-pushed the add-iop branch 3 times, most recently from 95c8203 to acbe14a Compare December 18, 2025 19:44
Copy link
Contributor

@pablomh pablomh left a comment

Choose a reason for hiding this comment

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

Builds and creates running services :)

iop_advisor_container_image: "quay.io/iop/advisor-backend"
iop_advisor_container_tag: "foreman-3.16"

iop_advisor_database_name: advisor_db
Copy link
Contributor

Choose a reason for hiding this comment

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

All of these vars can be deleted as they are in src/vars/database_iop.yml.

Copy link
Member Author

Choose a reason for hiding this comment

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

Role defaults are not the same as playbook defaults. We try to follow Ansible best practices by ensuring these are defined at the role level. We then define them at a higher level for our use case to provide coordination of values and advanced workflows.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great! Very good to know. I'll try to implement the same reasoning in #356.

iop_inventory_container_image: "quay.io/iop/host-inventory"
iop_inventory_container_tag: "foreman-3.16"

iop_inventory_database_name: inventory_db
Copy link
Contributor

Choose a reason for hiding this comment

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

All of these vars can be deleted as they are in src/vars/database_iop.yml.

iop_remediation_container_image: "quay.io/iop/remediations"
iop_remediation_container_tag: "foreman-3.16"

iop_remediation_database_name: remediations_db
Copy link
Contributor

Choose a reason for hiding this comment

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

All of these vars can be deleted as they are in src/vars/database_iop.yml.

iop_vmaas_container_image: "quay.io/iop/vmaas"
iop_vmaas_container_tag: "foreman-3.16"

iop_vmaas_database_name: vmaas_db
Copy link
Contributor

Choose a reason for hiding this comment

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

All of these vars can be deleted as they are in src/vars/database_iop.yml.

iop_vulnerability_container_image: "quay.io/iop/vulnerability-engine"
iop_vulnerability_container_tag: "foreman-3.16"

iop_vulnerability_database_name: vulnerability_db
Copy link
Contributor

Choose a reason for hiding this comment

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

All of these vars can be deleted as they are in src/vars/database_iop.yml.

ehelms added 2 commits January 6, 2026 10:10
Signed-off-by: Eric D. Helms <ericdhelms@gmail.com>
@ehelms ehelms changed the title Add core services for iop Add IOP Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants