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 foreman GH action workflow #924

Merged
merged 4 commits into from
Jan 25, 2024
Merged

Use foreman GH action workflow #924

merged 4 commits into from
Jan 25, 2024

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Jan 25, 2024

No description provided.

this limits us to Ruby < 3.2 tho, as rake 10 is not compatible with 3.2+
Copy link
Member

@chris1984 chris1984 left a comment

Choose a reason for hiding this comment

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

Thanks @evgeni will model the other hammer ones off this one. Learned a few things as well :)

@chris1984 chris1984 merged commit eaa57c4 into Katello:master Jan 25, 2024
5 of 7 checks passed
@evgeni
Copy link
Member Author

evgeni commented Jan 25, 2024

One thing you might want to do first (here) is to see whether all the dev deps are actually needed and/or exist in newer versions.

@chris1984
Copy link
Member

Sounds good, will start with that here

gem.add_development_dependency "rubocop-checkstyle_formatter"
gem.add_development_dependency 'minitest-spec-context', '~> 0.0.5'
gem.add_development_dependency 'mocha', '~> 2.0'
gem.add_development_dependency 'rake', '~> 10.0'
Copy link
Member

Choose a reason for hiding this comment

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

I think this broke on Jenkins:

21:27:43  /usr/local/rvm/gems/ruby-2.7.4@hammer-cli-katello-master-source-release-193-1-ruby-2-7/gems/bundler-2.4.22/lib/bundler/rubygems_integration.rb:308:in `block in replace_bin_path': can't find executable rake for gem rake. rake is not currently included in the bundle, perhaps you meant to add it to your Gemfile? (Gem::Exception)

Couldn't you have bumped to '~> 13.0`?

Copy link
Member Author

Choose a reason for hiding this comment

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

interesting. and no, see f66bd75

Copy link
Member Author

Choose a reason for hiding this comment

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

11+ does something that our tests start failing

Copy link
Member

Choose a reason for hiding this comment

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

Regardless, Jenkins still doesn't install the development dependencies so a test group is still useful. Or just list rake unconditionally in Gemfile.

Copy link
Member

Choose a reason for hiding this comment

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

11+ does something that our tests start failing

Yes, it starts displaying warnings.

I couldn't find the source of the incorrect interpolation warning, which certainly is a bug. I could trace it to https://github.com/theforeman/hammer-cli/blob/f38afde3e44667908ed39078c48fb26a2244aa8b/lib/hammer_cli/utils.rb#L15 but didn't find a stack trace of where it's called from. It appears (at least on Ruby 3.2) to end up calling string % nil which emits a warning.

I at least opened #925 for some other bugs I noticed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just to mention this here as well: I'd really try to use either unpinned rake or at least as Ewoud suggested ~> 13.0. Hammer core does this and it seems to be working for quite some time?

Copy link
Member

Choose a reason for hiding this comment

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

This gem raises many warnings, mostly about redefining environment, but also at least one string formatting warning.

Copy link
Member

Choose a reason for hiding this comment

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

I will bump it to ~> 13.0 as Ewoud suggested and see what else we can drop or bump from here

Copy link
Member

Choose a reason for hiding this comment

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

Regardless, Jenkins still doesn't install the development dependencies so a test group is still useful. Or just list rake unconditionally in Gemfile.

This is still true and nightlies for this package have been broken since. Is there still a desire for nightly packages?

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.

4 participants