Skip to content

Commit

Permalink
Merge pull request #2 from accredible/sync_master_with_upstream
Browse files Browse the repository at this point in the history
Sync master with upstream
  • Loading branch information
michael-accredible authored Feb 5, 2025
2 parents 5498519 + 9790bd8 commit e8cd8fb
Show file tree
Hide file tree
Showing 92 changed files with 1,776 additions and 309 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
.github/workflows @toptal/rogue-one
* @toptal/sre
42 changes: 42 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: 2
registries:
toptal-github:
type: "git"
url: "https://github.com"
username: "x-access-token"
password: "${{secrets.DEPENDABOT_GITHUB_TOKEN}}"

updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: "weekly"
day: "wednesday"
time: "07:00"
pull-request-branch-name:
separator: "-"
labels:
- "no-jira"
- "ruby"
- "dependencies"
reviewers:
- "toptal/sre"
registries:
- toptal-github
insecure-external-code-execution: allow
open-pull-requests-limit: 3
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "wednesday"
time: "07:00"
pull-request-branch-name:
separator: "-"
labels:
- "no-jira"
- "dependencies"
- "gha"
reviewers:
- "toptal/sre"
open-pull-requests-limit: 3
71 changes: 34 additions & 37 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,63 @@
name: CI

on: [push, pull_request]
on:
push:
branches: [master]
pull_request:
types: [
synchronize, # PR was updated
opened, # PR was open
reopened # PR was reopened
]

jobs:
ruby-2:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [2.6, 2.7]
gemfile: [rails.5.2.activerecord, rails.6.0.activerecord, rails.6.1.activerecord]
name: ${{ matrix.ruby }}-${{ matrix.gemfile }}

env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile

steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@9de0f78f306e4ebc0838f057e6b754364685e759
with:
stack-version: 7.10.1
port: 9250
- name: Tests
run: bundle exec rspec

ruby-3:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [ '3.0', 3.1 ]
gemfile: [ rails.6.1.activerecord, rails.7.0.activerecord ]
ruby: [ '3.0', '3.1', '3.2', '3.3' ]
gemfile: [rails.6.1.activerecord, rails.7.0.activerecord, rails.7.1.activerecord, rails.7.2.activerecord]
exclude:
- ruby: '3.0'
gemfile: rails.7.2.activerecord
name: ${{ matrix.ruby }}-${{ matrix.gemfile }}

env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile

services:
redis:
# Docker Hub image
image: redis
ports:
- '6379:6379'
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@9de0f78f306e4ebc0838f057e6b754364685e759
with:
stack-version: 7.10.1
port: 9250
- name: Start containers
run: |
docker compose up elasticsearch_test -d
sleep 15
- name: Tests
run: bundle exec rspec

rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.0
bundler-cache: true
- run: bundle exec rubocop --format simple
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ inherit_from: .rubocop_todo.yml

AllCops:
NewCops: enable
TargetRubyVersion: 2.6
TargetRubyVersion: 3.0

Layout/AccessModifierIndentation:
EnforcedStyle: outdent
Expand Down Expand Up @@ -59,3 +59,6 @@ Metrics/ModuleLength:
Exclude:
- 'lib/chewy/rake_helper.rb'
- '**/*_spec.rb'

Style/ArgumentsForwarding:
Enabled: false
134 changes: 134 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,140 @@

### Bugs Fixed

* [#964](https://github.com/toptal/chewy/pull/964): Fix `delayed_sidekiq` worker to handle UUID primary keys correctly.

## 8.0.0-beta (2024-08-27)

### New Features

* [#962](https://github.com/toptal/chewy/pull/962): ElasticSearch v.8 support added

* `delete_all_enabled` setting introduced to align Chewy.massacre with wildcard indices deletion disabled in ES 8 by default

### Changes

### Bugs Fixed

## 7.6.0 (2024-05-03)

### Changes

* [#933](https://github.com/toptal/chewy/pull/933): Relax allowed `elasticsearch` dependency versions. ([@mjankowski][])

### Bugs Fixed
* [#937](https://github.com/toptal/chewy/pull/937): Fix for race condition while using the `delayed_sidekiq` strategy. Also, fix for Redis bloating in case of reindexing error ([@skcc321](https://github.com/skcc321))

* [#947](https://github.com/toptal/chewy/pull/947): Fix intermittent time-based failure in delayed sidekiq spec. ([@mjankowski][])

## 7.5.1 (2024-01-30)

### New Features

* [#925](https://github.com/toptal/chewy/pull/925): Add configuration option for default scope cleanup behavior. ([@barthez][])

### Changes

### Bugs Fixed

## 7.5.0 (2024-01-15)

### New Features

* [#894](https://github.com/toptal/chewy/pull/894): Way of cleaning redis from artifacts left by `delayed_sidekiq` strategy which could potentially cause flaky tests. ([@Drowze](https://github.com/Drowze))
* [#919](https://github.com/toptal/chewy/pull/919): Add pre-request filter ([@konalegi][https://github.com/konalegi])

## 7.4.0 (2023-12-13)

### New Features

### Changes

* [#911](https://github.com/toptal/chewy/pull/911): Remove ruby 2.x. ([@konalegi][https://github.com/konalegi])

### Bugs Fixed

## 7.3.6 (2023-12-13)

### New Features

* [#890](https://github.com/toptal/chewy/pull/890): Add the [`knn`](https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html) option to the request. ([@jkostolansky][])

### Changes

### Bugs Fixed

## 7.3.5 (2023-12-06)

### New Features

* [#907](https://github.com/toptal/chewy/pull/907): Fix deprecation warning in LogSubscriber for Rails 7.1 ([@alejandroperea](https://github.com/alejandroperea))

### Changes

### Bugs Fixed

## 7.3.4 (2023-08-29)

### New Features

* [#888](https://github.com/toptal/chewy/pull/892): Rake task to create missing indexes ([@konalegi](https://github.com/konalegi))

### Changes

### Bugs Fixed

## 7.3.3 (2023-07-07)

### New Features

* [#888](https://github.com/toptal/chewy/pull/888/files): Skip journal creation on import ([@konalegi](https://github.com/konalegi))

### Changes

### Bugs Fixed

## 7.3.2 (2023-04-20)

### New Features

### Changes

### Bugs Fixed

* [#861](https://github.com/toptal/chewy/pull/861): Fix bug in mock_elasticsearch_response_sources ([@lafeber](https://github.com/lafeber))

## 7.3.1 (2023-04-20)

### Bugs Fixed

* [#874](https://github.com/toptal/chewy/pull/874): Fix `chewy:journal:clean` task for ruby 3.x. ([@muk-ai](https://github.com/muk-ai))
* [#882](https://github.com/toptal/chewy/pull/882): Fix memory leak during `chewy:reset` for ruby 3.2 ([@konalegi](https://github.com/konalegi))

## 7.3.0 (2023-04-03)

### New Features

* [#869](https://github.com/toptal/chewy/pull/869): New strategy - `delayed_sidekiq`. Allow passing `strategy: :delayed_sidekiq` option to `SomeIndex.import([1, ...], strategy: :delayed_sidekiq)`. The strategy is compatible with `update_fields` option as well. ([@skcc321][])
* [#879](https://github.com/toptal/chewy/pull/879): Configure CI to check for ruby 3.2 compatibility. ([@konalegi][])

### Changes

### Bugs Fixed

* [#856](https://github.com/toptal/chewy/pull/856): Fix return value of subscribed_task_stats used in rake tasks. ([@fabiormoura][])

## 7.2.7 (2022-11-15)

### New Features

* [#857](https://github.com/toptal/chewy/pull/857): Allow passing `wait_for_completion`, `request_per_second` and `scroll_size` options to `chewy:journal:clean` rake task and `delete_all` query builder method. ([@konalegi][])([@barthez][])

### Changes

### Bugs Fixed

* [#863](https://github.com/toptal/chewy/pull/863): Fix `crutches` call doesn't respect `update_fields` option. ([@skcc321][])

## 7.2.6 (2022-06-13)

### New Features
Expand Down
8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
source 'https://rubygems.org'

gemspec

gem 'activerecord'

gem 'activejob', require: false
Expand All @@ -18,5 +16,7 @@ gem 'guard-rspec'
gem 'redcarpet'
gem 'yard'

gem 'rexml' if RUBY_VERSION >= '3.0.0'
gem 'ruby2_keywords' if RUBY_VERSION < '2.7'
gem 'rexml'

eval_gemfile 'gemfiles/base.gemfile'
gemspec
Loading

0 comments on commit e8cd8fb

Please sign in to comment.