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

Test matrix of ruby/rails versions on different Databases #4666

Merged
merged 2 commits into from
Oct 12, 2022

Conversation

elia
Copy link
Member

@elia elia commented Oct 10, 2022

Summary

Continuing from #4652, most of the work done by @cpfergus1, I'm just taking this through the finish line

  • parameterize the main job
  • add matrixes to better cover what we officially support
  • try to be efficient and avoid combinatorial explosion (i.e. skip combos sufficiently covered by other jobs)
  • this doesn't consider ruby versions older than 2.7 although the gemspec allows installing solidus with 2.5

Probably @solidusio/core-team should decide on how to interpret semver with regards to EOL dependencies such as Ruby and Rails, my suggestion would be to automatically drop support for versions that are no longer maintained.

Open to suggestions on how to streamline the matrixes 👂

ℹ️ The higher amount of runs increases the chance to incur into a flakey, this is not a fault of more coverage per-se but something to be aware of, and possibly motivation to fix them

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

  • I have written a thorough PR description.
  • I have kept my commits small and atomic.
  • I have used clear, explanatory commit messages.

The following are not always needed (cross them out if they are not):

  • I have added automated tests to cover my changes.
  • I have attached screenshots to demo visual changes.
  • I have opened a PR to update the guides.
  • I have updated the readme to account for my changes.

We're seeing weird errors on ruby 3 which might come from specs stored
with a slightly different and older YAML format.

```
Fetching https://github.com/jejacks0n/teaspoon.git
Warning: Permanently added the ECDSA host key for IP address '140.82.114.3' to the list of known hosts.
Fetching gem metadata from https://rubygems.org/............
--- ERROR REPORT TEMPLATE -------------------------------------------------------

```
ArgumentError: undefined class/module YAML::
  /usr/local/lib/ruby/site_ruby/3.0.0/rubygems/specification.rb:1263:in `load'
  /usr/local/lib/ruby/site_ruby/3.0.0/rubygems/specification.rb:1263:in `_load'
  /usr/local/lib/ruby/site_ruby/3.0.0/bundler.rb:563:in `load'
  /usr/local/lib/ruby/site_ruby/3.0.0/bundler.rb:563:in `load_marshal'
```
@elia elia force-pushed the elia+cpfergus1/matrix-ci branch from 6ac152c to 5254c38 Compare October 10, 2022 12:59
@kennyadsl
Copy link
Member

A duration of 9m 38s for all those combinations is definitely acceptable.

We will discuss the EOL thing during the next core team meeting @elia, thanks!

@kennyadsl kennyadsl merged commit d4a0a39 into solidusio:master Oct 12, 2022
@kennyadsl kennyadsl deleted the elia+cpfergus1/matrix-ci branch October 12, 2022 11:08
@waiting-for-dev waiting-for-dev added the changelog:repository Changes to the repository not within any gem label Dec 13, 2022
@kennyadsl kennyadsl mentioned this pull request Dec 20, 2022
7 tasks
waiting-for-dev added a commit to nebulab/solidus that referenced this pull request Jan 26, 2023
From solidusio#4666 all CI jobs have
been running with the legacy event system. We were defaulting the
`legacy` parameter to `0`, which we copied over to the
`USE_LEGACY_EVENTS` environment variable. However, the test suite was
checking for the mere existence of the environment variable to select
the legacy adapter and not for an actual `1` value.

We are now:

- Renaming the `legacy` parameter to `legacy_events` to be clearer.
- Making the parameter a boolean one, defaulting to false.
- Checking that `USE_LEGACY_EVENTS` is the string `"true"` before
  selecting the legacy adapter.
- Using the legacy adapter for the job on Ruby 2.7 & Rails 6.0.
waiting-for-dev added a commit to nebulab/solidus that referenced this pull request Jan 26, 2023
From solidusio#4666 all CI jobs have
been running with the legacy event system. We were defaulting the
`legacy` parameter to `0`, which we copied over to the
`USE_LEGACY_EVENTS` environment variable. However, the test suite was
checking for the mere existence of the environment variable to select
the legacy adapter and not for an actual `1` value.

We are now:

- Renaming the `legacy` parameter to `legacy_events` to be clearer.
- Making the parameter a boolean one, defaulting to false.
- Checking that `USE_LEGACY_EVENTS` is the string `"true"` before
  selecting the legacy adapter.
- Using the legacy adapter for the job on Ruby 2.7 & Rails 6.0.
- Adding `-legacy_events` to the job name when selected.
github-actions bot pushed a commit that referenced this pull request Jan 30, 2023
From #4666 all CI jobs have
been running with the legacy event system. We were defaulting the
`legacy` parameter to `0`, which we copied over to the
`USE_LEGACY_EVENTS` environment variable. However, the test suite was
checking for the mere existence of the environment variable to select
the legacy adapter and not for an actual `1` value.

We are now:

- Renaming the `legacy` parameter to `legacy_events` to be clearer.
- Making the parameter a boolean one, defaulting to false.
- Checking that `USE_LEGACY_EVENTS` is the string `"true"` before
  selecting the legacy adapter.
- Using the legacy adapter for the job on Ruby 2.7 & Rails 6.0.
- Adding `-legacy_events` to the job name when selected.

(cherry picked from commit f109039)
waiting-for-dev added a commit to nebulab/solidus that referenced this pull request Jan 30, 2023
From solidusio#4666 all CI jobs have
been running with the legacy event system. We were defaulting the
`legacy` parameter to `0`, which we copied over to the
`USE_LEGACY_EVENTS` environment variable. However, the test suite was
checking for the mere existence of the environment variable to select
the legacy adapter and not for an actual `1` value.

We are now:

- Renaming the `legacy` parameter to `legacy_events` to be clearer.
- Making the parameter a boolean one, defaulting to false.
- Checking that `USE_LEGACY_EVENTS` is the string `"true"` before
  selecting the legacy adapter.
- Using the legacy adapter for the job on Ruby 2.7 & Rails 6.0.
- Adding `-legacy_events` to the job name when selected.
waiting-for-dev added a commit to nebulab/solidus that referenced this pull request Jan 30, 2023
From solidusio#4666 all CI jobs have
been running with the legacy event system. We were defaulting the
`legacy` parameter to `0`, which we copied over to the
`USE_LEGACY_EVENTS` environment variable. However, the test suite was
checking for the mere existence of the environment variable to select
the legacy adapter and not for an actual `1` value.

We are now:

- Renaming the `legacy` parameter to `legacy_events` to be clearer.
- Making the parameter a boolean one, defaulting to false.
- Checking that `USE_LEGACY_EVENTS` is the string `"true"` before
  selecting the legacy adapter.
- Using the legacy adapter for the job on Ruby 2.7 & Rails 6.0.
- Adding `-legacy_events` to the job name when selected.
waiting-for-dev added a commit to nebulab/solidus that referenced this pull request Feb 6, 2023
Since solidusio#4666, all jobs have been
running with the paperclip adapter.

The reason is that when the `paperclip` parameter was `false` on
CircleCI, that translated into the `DISABLE_ACTIVE_STORAGE` env var being
the string `"false"`. As we were checking for the mere presence of
`DISABLE_ACTIVE_STORAGE`, it always evaluated to `true`.

Fixes solidusio#4901
github-actions bot pushed a commit that referenced this pull request Feb 7, 2023
Since #4666, all jobs have been
running with the paperclip adapter.

The reason is that when the `paperclip` parameter was `false` on
CircleCI, that translated into the `DISABLE_ACTIVE_STORAGE` env var being
the string `"false"`. As we were checking for the mere presence of
`DISABLE_ACTIVE_STORAGE`, it always evaluated to `true`.

Fixes #4901

(cherry picked from commit af5904b)
github-actions bot pushed a commit that referenced this pull request Feb 7, 2023
Since #4666, all jobs have been
running with the paperclip adapter.

The reason is that when the `paperclip` parameter was `false` on
CircleCI, that translated into the `DISABLE_ACTIVE_STORAGE` env var being
the string `"false"`. As we were checking for the mere presence of
`DISABLE_ACTIVE_STORAGE`, it always evaluated to `true`.

Fixes #4901

(cherry picked from commit af5904b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:repository Changes to the repository not within any gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants