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

Compability, Versioning and Upgrading Penthouse and Using Docker & CircleCI for Developer Experience #16

Merged
merged 12 commits into from
Jul 21, 2020

Conversation

simonireilly
Copy link

@simonireilly simonireilly commented Oct 25, 2019

This branch is a work in progress that will allow penthouse to be used with multiple versions of Rails.

Requirement

Working through these changes it's clear that there will be a little more work that needs to reach 5.2.0.

This diff command is really helpful for anyone looking to see the reason behind these changes:

git clone [email protected]:rails/rails.git
cd rails
git diff v5.1.5.rc1 v5.2.0.rc1 ./activerecord/lib/active_record/migration.rb

Major Changes

  • We can run everything in docker, see Dockerfile.test for how to inject Ruby, ActiveRecord and pg versions into the gemfile.
    • There is also a compose file for running this with a postgres sidecar which works, see the Makefile
  • database.test.yml and octopus.test.yml are commited to source control so no-one has to do manual setups when testing
  • I added an ActiveRecord logger in testing mode, this will make managing the gem and debugging much easier.
  • Now Ci is running (and passing) on CircleCI.
  • We now use the standardrb for linting.
  • Migrator was removed in ActiveRecord 5.2, it is now put on the MigrationContext. There is a version safe class module inclusion now in Penthouse.

Version Support

Testing has been set up to support ActiveRecord:

Post Merge

  • Drop codeship as a testing service
  • create a tagged release for supporting ActiveRecord 5.2

Seeking Feedback On

  • Additional test coverage wanted
  • Additional readme documentation

@simonireilly simonireilly changed the title [WIP] Compability, Versioning and Upgrading Penthouse Compability, Versioning and Upgrading Penthouse and Using Docker & CircleCI for Developer Experience Oct 26, 2019
@simonireilly
Copy link
Author

We should split out the CI upgrade and move it into it's own PR.

Then we can proceed with the refactor.

- run: RUBY_VERSION=2.4.1 RAILS_VERSION=5.1.7 PG_VERSION=0.21.0 bundle install
- run: RUBY_VERSION=2.4.1 RAILS_VERSION=5.1.7 PG_VERSION=0.21.0 bundle exec rspec
- run: rm Gemfile.lock
# Uncomment when adding support for greater rails versions
Copy link
Author

Choose a reason for hiding this comment

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

When we try and add support these versions might need bumped

spec.add_development_dependency 'activesupport', '~> 4.2.6'
spec.add_development_dependency 'activerecord', '~> 4.2.6'
spec.add_development_dependency 'pg', '~> 0.21.0'
spec.add_development_dependency "ar-octopus", "~> 0.10.2"
Copy link
Author

Choose a reason for hiding this comment

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

@ryantownsend this is the only change.

See the release thiagopradi/octopus@1c99859

Our version lock: https://github.com/shiftcommerce/flex-platform/blob/4e1e9040e31e95c8975ec23acc4c0e014feb5f1d/Gemfile#L38-L42

Looks like v0.9.2 could be an option aswell

Copy link
Author

Choose a reason for hiding this comment

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

Might make sense to perform the platform update first; then perform the Penthouse update

@simonireilly simonireilly merged commit 721f390 into master Jul 21, 2020
@simonireilly
Copy link
Author

Merged as I had only bumped a dev dependency.

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.

2 participants