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

Use specific Host class #26 #27

Merged
merged 1 commit into from
Mar 14, 2024
Merged

Use specific Host class #26 #27

merged 1 commit into from
Mar 14, 2024

Conversation

oneiros
Copy link
Collaborator

@oneiros oneiros commented Feb 16, 2024

This should fix #26

Please see theforeman/foreman-packaging#10374 for all the details.

And take special notice of this comment here about a possible caveat.

Copy link

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

This is probably ok, but it made me wonder about a DB migration. Looking at the migration:

add_column :hosts, :hdm_proxy_id, :integer

Shouldn't this use add_foreign_key? Probably with on_delete: :nullify.

Looking at https://api.rubyonrails.org/v7.1.3/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-add_foreign_key it's in addition to an add_column statement, so should be a new migration instead of changing the old one.

Still, that was an issue before this and still is one after. So 👍 to this.

@tuxmea
Copy link
Member

tuxmea commented Feb 20, 2024

@oneiros have you seen @ekohl 's comment?
Are we OK to merge this?

oneiros added a commit that referenced this pull request Feb 28, 2024
@oneiros
Copy link
Collaborator Author

oneiros commented Feb 28, 2024

Are we OK to merge this?

Yes. The comment is unrelated, but sensible. I added a separate PR here #28.

@tuxmea tuxmea merged commit 6051a1e into main Mar 14, 2024
6 checks passed
@tuxmea tuxmea deleted the issue-26 branch March 14, 2024 13:54
@bastelfreak bastelfreak added the bug Something isn't working label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Foreman HDM does not build on latest foreman version
4 participants