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

Ruby 3.1 #429

Merged
merged 4 commits into from
Jan 23, 2024
Merged

Ruby 3.1 #429

merged 4 commits into from
Jan 23, 2024

Conversation

jrafanie
Copy link
Member

@jrafanie jrafanie commented Dec 18, 2023

Start the switch to ruby 3.1.

  • use ruby 3.1 with explicit minimum of 0.37.0 qpid_proton from epel8/9
  • drop qpid_proton sources
  • use yaml unsafe load when reading the sti loader yaml as we control the file and it intentionally contains all of our code constants.

Part of ManageIQ/manageiq#22696

I was able to get this working on mac with colima:

  • bin/build_container_image
  • docker run -v /tmp/options:/root/OPTIONS:z manageiq/rpm_build:latest build --build-type nightly

I modified the options.yml locally to build and use this PR via the options.yml:
ManageIQ/manageiq#22808. That PR temporarily included the qpid proton bump from ManageIQ/manageiq#22271.

The latest epel8/9 has qpid_proton 0.37.0+ that works with ruby 3.1.

Part of ManageIQ/manageiq#22696
@jrafanie jrafanie changed the title Ruby 3.1 - WIP [WIP] Ruby 3.1 Dec 18, 2023
@miq-bot miq-bot added the wip label Dec 18, 2023
We control the creation of the sti loader yaml file and the intention of this file
is to contain the file paths and constants defined in them so it is expected to
contain constants not previously permitted.
@jrafanie jrafanie removed the wip label Jan 3, 2024
@jrafanie jrafanie changed the title [WIP] Ruby 3.1 Ruby 3.1 Jan 3, 2024
@@ -104,7 +104,7 @@ def plugin_paths

def fixup_sti_loader!
sti_loader_yml_path = miq_dir.join("tmp/cache/sti_loader.yml")
sti_loader = YAML.load_file(sti_loader_yml_path)
sti_loader = YAML.unsafe_load(File.read(sti_loader_yml_path))
Copy link
Member Author

Choose a reason for hiding this comment

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

note, unsafe_load_file didn't exist in all versions of psych so I use the more verbose but backward compatible code.

@@ -49,7 +49,6 @@ rpm_repository:
:python-pylxca: !ruby/regexp /.+-2\.1\.1.+/
:python-unittest2: !ruby/regexp /.+-1\.1\.0.+/
:python-vspk: !ruby/regexp /.+-5\.3\.2.+/
:qpid-proton: !ruby/regexp /.+-0\.30\.0.+/
Copy link
Member

Choose a reason for hiding this comment

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

do we intend to backport this to quinteros? (I don't think we wanted to, but just checking)

Copy link
Member Author

@jrafanie jrafanie Jan 3, 2024

Choose a reason for hiding this comment

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

We haven't decided if we're shipping 3.1 now or later. It's still TBD.

@@ -30,7 +30,7 @@ Requires: python3-pylxca
Requires: cyrus-sasl
Requires: cyrus-sasl-plain
Requires: python3-vspk
Requires: qpid-proton-c
Requires: qpid-proton-c >= 0.37.0
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Requires: qpid-proton-c >= 0.37.0
Requires: qpid-proton-c >= 0.37.0

We'll need to drop the dnf epel exclude since it previously excluded qpid-proton.
Therefore, users will either need to run this manually or we'll provide a script
that will do it:

```
dnf config-manager --setopt=epel.exclude= --save
```

See the discussion in ManageIQ/manageiq-appliance-build#559 (comment)
@miq-bot
Copy link
Member

miq-bot commented Jan 3, 2024

Checked commits jrafanie/manageiq-rpm_build@e3b63b6~...868ddf7 with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
4 files checked, 1 offense detected

**

  • 💣 💥 🔥 🚒 - Linter/Yaml - missing config files

@Fryguy Fryguy self-assigned this Jan 17, 2024
@bdunne bdunne merged commit 1f5a629 into ManageIQ:master Jan 23, 2024
3 checks passed
@bdunne bdunne assigned bdunne and unassigned Fryguy Jan 23, 2024
@jrafanie jrafanie deleted the ruby31 branch January 24, 2024 15:38
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