Skip to content

Upgrade to rails 7.1 (To Rails8 phase2 step1)#2547

Merged
jacopen merged 10 commits intomainfrom
rails8-phase1-step1
Jun 22, 2025
Merged

Upgrade to rails 7.1 (To Rails8 phase2 step1)#2547
jacopen merged 10 commits intomainfrom
rails8-phase1-step1

Conversation

@takaishi
Copy link
Contributor

No description provided.

- Add ADR-001 Rails 8 upgrade plan with phased approach
- Create comprehensive upgrade checklist with Phase 1 analysis
- Document deprecated features, gem compatibility, and custom config inventory
- Add Phase 1 discovered issues with prioritized fix tasks
- Update CLAUDE.md with task-based development process

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@gitops-for-cloudnativedays gitops-for-cloudnativedays bot added the reviewapps Build ReviewApp environment automatically if this label is granted label Jun 21, 2025
takaishi and others added 4 commits June 21, 2025 19:32
- Update Rails from 7.0 → 7.1
- Fix pundit_user method in speakers controller (conference vs conference_id)
- Add CSV library require to Talk model
- Add Prometheus metrics error handling
- Add middleware require statements for Rails 7.1 autoloading
- Update Japanese localization settings
- Update configuration files for Rails 7.1

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Rails 7.1 has deprecated the singular fixture_path in favor of an array.
Updated spec/rails_helper.rb to use config.fixture_paths with an array
instead of the deprecated config.fixture_path.

This resolves the deprecation warning:
"Rails 7.1 has deprecated the singular fixture_path in favour of an array"

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Fixed two issues caused by Rails 7.1 upgrade:

1. **f.object nil issue**: Added safe navigation operators (&.) to prevent
   NoMethodError when f.object is nil in nested forms. This was caused by
   Rails 7.1 changes in FormBuilder inheritance for fields_for.

2. **Default talk object**: Updated SpeakerForm#load to create a default
   Talk object when none exist, ensuring form fields render properly.

3. **Duplicate id warning**: Fixed duplicate :id key in check_box_tag
   attributes in _talk_fields.html.erb line 57.

All speaker dashboard edit tests now pass without warnings.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Added default_url_options to all environments to fix the error:
"Missing host to link to\! Please provide the :host parameter,
set default_url_options[:host], or set :only_path to true"

Changes:
- test.rb: Added localhost:3000 for testing
- development.rb: Added localhost:3000 for development
- production.rb: Added configurable host with MAILER_HOST env var

This fixes ActionMailer URL generation in Rails 7.1 which requires
explicit host configuration for mailer templates that generate URLs.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@takaishi takaishi force-pushed the rails8-phase1-step1 branch from e36a821 to d29091b Compare June 21, 2025 10:32
gitops-for-cloudnativedays bot added a commit to cloudnativedaysjp/dreamkast-infra that referenced this pull request Jun 21, 2025
commit: cloudnativedaysjp/dreamkast@e36a821
action URL: https://github.com/cloudnativedaysjp/dreamkast/actions/runs/15794833226

Co-authored-by: gitops-for-cloudnativedays[bot] <113280573+gitops-for-cloudnativedays[bot]@users.noreply.github.com>
gitops-for-cloudnativedays bot added a commit to cloudnativedaysjp/dreamkast-infra that referenced this pull request Jun 21, 2025
commit: cloudnativedaysjp/dreamkast@d29091b
action URL: https://github.com/cloudnativedaysjp/dreamkast/actions/runs/15794838524

Co-authored-by: gitops-for-cloudnativedays[bot] <113280573+gitops-for-cloudnativedays[bot]@users.noreply.github.com>
@github-actions
Copy link

Simplecov Report

Covered Threshold
64.42% 60%

- Restore CORS configuration with specific domain allowlist
- Re-add Amazon SQS queue adapter for background job processing
- Re-add SES email delivery method for production mail sending
- Restore environment-specific URL routing for review apps and staging
- Re-add internationalization settings for custom locale files
- Add back OmniAuth failure handling configuration

These settings were incorrectly removed in commit 9647afc and are
essential for proper production functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
gitops-for-cloudnativedays bot added a commit to cloudnativedaysjp/dreamkast-infra that referenced this pull request Jun 22, 2025
commit: cloudnativedaysjp/dreamkast@1b4b614
action URL: https://github.com/cloudnativedaysjp/dreamkast/actions/runs/15801653320

Co-authored-by: gitops-for-cloudnativedays[bot] <113280573+gitops-for-cloudnativedays[bot]@users.noreply.github.com>
- Set Amazon SQS as the active job queue adapter in development.
- Change ActionMailer delivery method to SES and enable error reporting in development.
- Adjust CORS settings for Action Cable in development.
- Update file watcher to use EventedFileUpdateChecker in development.
- Modify production settings to conditionally enable local request consideration based on the REVIEW_APP environment variable.
- Enable public file server based on RAILS_SERVE_STATIC_FILES in production.
- Comment out force_ssl in production for flexibility.
- Set default_url_options for test and development environments to ensure proper URL generation.

These changes enhance the configuration for local development and production environments, improving functionality and error handling.
gitops-for-cloudnativedays bot added a commit to cloudnativedaysjp/dreamkast-infra that referenced this pull request Jun 22, 2025
commit: cloudnativedaysjp/dreamkast@59151c1
action URL: https://github.com/cloudnativedaysjp/dreamkast/actions/runs/15801700422

Co-authored-by: gitops-for-cloudnativedays[bot] <113280573+gitops-for-cloudnativedays[bot]@users.noreply.github.com>
- Changed the filtered parameter from :passw to :password in the filter_parameter_logging initializer to enhance clarity and security.

This update ensures that the logging configuration accurately reflects the intended sensitive parameter names.
gitops-for-cloudnativedays bot added a commit to cloudnativedaysjp/dreamkast-infra that referenced this pull request Jun 22, 2025
commit: cloudnativedaysjp/dreamkast@9bcb22b
action URL: https://github.com/cloudnativedaysjp/dreamkast/actions/runs/15801709265

Co-authored-by: gitops-for-cloudnativedays[bot] <113280573+gitops-for-cloudnativedays[bot]@users.noreply.github.com>
takaishi and others added 2 commits June 22, 2025 10:51
…se 2 Step 1 tasks

Mark all Phase 1 tasks (Ruby environment updates and issue fixes) and Phase 2 Step 1 (Rails 7.0 → 7.1 upgrade) as completed based on successful implementation.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@takaishi takaishi changed the title Rails8 phase1 step1 Rails8 phase2 step1 Jun 22, 2025
@takaishi takaishi changed the title Rails8 phase2 step1 Upgrade to rails 7.1 (To Rails8 phase2 step1) Jun 22, 2025
gitops-for-cloudnativedays bot added a commit to cloudnativedaysjp/dreamkast-infra that referenced this pull request Jun 22, 2025
commit: cloudnativedaysjp/dreamkast@e9ad041
action URL: https://github.com/cloudnativedaysjp/dreamkast/actions/runs/15801749959

Co-authored-by: gitops-for-cloudnativedays[bot] <113280573+gitops-for-cloudnativedays[bot]@users.noreply.github.com>
@github-actions
Copy link

@takaishi takaishi marked this pull request as ready for review June 22, 2025 01:57
@takaishi takaishi requested a review from a team June 22, 2025 01:57
Copy link
Collaborator

@jacopen jacopen left a comment

Choose a reason for hiding this comment

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

Review Appが上がってこないね・・・

@takaishi
Copy link
Contributor Author

起動した

@takaishi takaishi requested a review from jacopen June 22, 2025 09:00
@jacopen jacopen merged commit be6b428 into main Jun 22, 2025
7 checks passed
@jacopen jacopen deleted the rails8-phase1-step1 branch June 22, 2025 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewapps Build ReviewApp environment automatically if this label is granted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants