Skip to content

Add Chewy 7/ES 7 to Chewy 8/ES 8 migration guide#1010

Open
mattmenefee wants to merge 3 commits intotoptal:masterfrom
mattmenefee:chewy-v8-migration-guide
Open

Add Chewy 7/ES 7 to Chewy 8/ES 8 migration guide#1010
mattmenefee wants to merge 3 commits intotoptal:masterfrom
mattmenefee:chewy-v8-migration-guide

Conversation

@mattmenefee
Copy link
Contributor

@mattmenefee mattmenefee commented Mar 17, 2026

Summary

  • Add a Chewy 7 → 8 / ES 7 → 8 migration guide section to migration_guide.md covering Ruby/Rails version requirements, error class namespace changes, transport logger/tracer changes, Chewy.massacre restrictions, and ES 8 security defaults
  • Fix stale Elasticsearch::Transport::* namespace references in docs and YARD annotations to match the ES v8+ elastic-transport gem — code examples would fail if copied verbatim
  • Clean up punctuation and fix a broken rolling-upgrade link in existing migration guide sections

Closes #1004

Test plan

  • Migration guide steps are accurate for a Chewy 7 → 8 upgrade
  • Doc code examples use correct ES v8+ namespaces and work if copied verbatim
  • All links in migration_guide.md resolve correctly

@mattmenefee mattmenefee requested a review from a team as a code owner March 17, 2026 20:34
@mattmenefee mattmenefee changed the title Add migration guide and fix stale ES namespace references Add Chewy 7/ES 7 to Chewy 8/ES 8 migration guide Mar 17, 2026
@mattmenefee mattmenefee force-pushed the chewy-v8-migration-guide branch from 2fc70fc to c2d6944 Compare March 17, 2026 20:41
Copy link
Member

@bbatsov bbatsov left a comment

Choose a reason for hiding this comment

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

The migration guide itself is solid and useful content, nice work. A few things to address:

  • Changelog should use ## master (unreleased) instead of ## 8.0.2 (unreleased), and drop the empty sections. Version numbers are decided at release time.
  • The punctuation normalization across the older migration sections inflates the diff and makes the actual changes harder to review. I'd either drop it or at least put it in its own commit.
  • Speaking of which -- please split this into separate commits for each logical change: the new migration guide section, the namespace fixes in docs/YARD, the broken link fix, and any punctuation cleanup. Makes it much easier to review and bisect later.

In order to upgrade Chewy 7/Elasticsearch 7 to Chewy 8/Elasticsearch 8 in the most seamless manner you have to:

* Upgrade to the latest 7.x stable release (Chewy 7.6.0, Elasticsearch 7.17)
* Study carefully [Breaking changes in 8.0](https://www.elastic.co/guide/en/elasticsearch/reference/8.17/breaking-changes-8.0.html), make sure your application conforms.
Copy link
Contributor

Choose a reason for hiding this comment

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

This URL returns a 404, could you use the right URL?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry about that! I assumed that versions prior to v9.x had the same breaking changes page 🤦‍♂️

* Upgrade to Chewy 8.
* Perform a [rolling upgrade](https://www.elastic.co/guide/en/elasticsearch/reference/8.17/rolling-upgrades.html) of Elasticsearch.

## Chewy 6/Elasticsearch 6 to Chewy 7/Elasticsearch 7
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is better to revert all changes below this line. The important part is the v8 migration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I reverted most of the changes. I think it's important to keep the fix for the broken rolling upgrade link though.

The elasticsearch-ruby v8 gem reorganized its module hierarchy:
- The transport client moved from Elasticsearch::Transport::Client
  to Elasticsearch::Client
- Transport errors moved from Elasticsearch::Transport::Transport::Errors
  to Elastic::Transport::Transport::Errors

Update documentation and YARD annotations to reflect these changes.
@mattmenefee mattmenefee force-pushed the chewy-v8-migration-guide branch from c2d6944 to 6d1f0ea Compare March 18, 2026 15:19
The migration guide previously only covered up to the Chewy 6→7
upgrade path. This adds a comprehensive section for users upgrading
to Chewy 8 / Elasticsearch 8, covering:

- Minimum Ruby (3.2) and Rails (7.2) version requirements
- elasticsearch gem version bump (>= 8.14, < 9.0)
- Namespace changes from elasticsearch-transport to elastic-transport
- Transport logger/tracer configuration changes
- Chewy.massacre / delete_all restriction due to ES 8 defaults
- Elasticsearch 8 security-by-default considerations
- Recommended rolling upgrade procedure

Closes toptal#1004
@mattmenefee mattmenefee force-pushed the chewy-v8-migration-guide branch from 6d1f0ea to 5a9ae2f Compare March 18, 2026 15:22
Copy link
Contributor Author

@mattmenefee mattmenefee left a comment

Choose a reason for hiding this comment

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

@bbatsov I corrected the changelog attribution and split this into 2 commits - is that sufficient or should I move the broken link fix to a separate commit as well?

In order to upgrade Chewy 7/Elasticsearch 7 to Chewy 8/Elasticsearch 8 in the most seamless manner you have to:

* Upgrade to the latest 7.x stable release (Chewy 7.6.0, Elasticsearch 7.17)
* Study carefully [Breaking changes in 8.0](https://www.elastic.co/guide/en/elasticsearch/reference/8.17/breaking-changes-8.0.html), make sure your application conforms.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry about that! I assumed that versions prior to v9.x had the same breaking changes page 🤦‍♂️

* Upgrade to Chewy 8.
* Perform a [rolling upgrade](https://www.elastic.co/guide/en/elasticsearch/reference/8.17/rolling-upgrades.html) of Elasticsearch.

## Chewy 6/Elasticsearch 6 to Chewy 7/Elasticsearch 7
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I reverted most of the changes. I think it's important to keep the fix for the broken rolling upgrade link though.

@@ -1,5 +1,11 @@
# Changelog

## master (unreleased)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bbatsov I'm happy to remove the empty sections here, but note that this is inconsistent with most other changelog entries below

PR toptal#1003 added Ruby 4.0 support but the README still listed
3.2-3.4. Bump the documented range to 3.2-4.0 to match.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update the migration guide with instructions for migration from Chewy 7 to Chewy 8

3 participants