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

Use Activesupport All #164

Merged
merged 2 commits into from
Dec 16, 2021
Merged

Use Activesupport All #164

merged 2 commits into from
Dec 16, 2021

Conversation

tongueroo
Copy link
Contributor

@tongueroo tongueroo commented Dec 16, 2021

  • should help prevent issues where activesupport adds new dependencies required when using components separately

This is a 🐞 bug fix.

  • I've added tests (if it's a bug, feature or enhancement)
  • I've adjusted the documentation (if it's a feature or enhancement)
  • The test suite passes (run bundle exec rspec to verify this)

Summary

Bummer. Looks like activesupport 7.0 is causing some issues:

Essentially, a new IsolatedExecutionState component needs to be required now.

require "active_support/isolated_execution_state"

Bug only appears when requiring activesupport components individually. It's pretty hard for the activesupport developers to account for these types of issues as they probably have edge versions of activesupport running. It's understandable.

Think it's more practical to require "active_support/all" in terraspace. This mitigates possible future issues generally.

Context

Related to a few reports:

Appreciate the constructive reports.

How to Test

This is how it was tested. Spun up a new cloud9 machine. Install terraform and terraspace and tested on a fresh environment:

Install tfenv:

git clone https://github.com/tfutils/tfenv.git ~/.tfenv
echo 'export PATH="$HOME/.tfenv/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
type tfenv
tfenv install latest
tfenv use latest
terraform version

Install ruby 2.7 and use as default

ruby -v
rvm list
rvm install 2.7.5
rvm list
rvm --default use 2.7.5

Install terraspace. Note: configured ~/.gemrc to speed up the gem installation process.

cat << EOF > ~/.gemrc
---
:backtrace: false
:bulk_threshold: 1000
:sources:
- https://rubygems.org
:update_sources: true
:verbose: true
benchmark: false
install: "--no-document"
update: "--no-document"
EOF
gem install terraspace

Deploy terraspace demo s3 bucket example:

terraspace new project infra --examples
cd infra/
terraspace up demo -y
terraspace down demo -y

Version Changes

Patch

* should help prevent issues where activesupport adds new dependencies
  required when using components separately
@tongueroo tongueroo merged commit 87b4df1 into master Dec 16, 2021
@tongueroo tongueroo deleted the activesupport branch December 16, 2021 12:46
@tongueroo
Copy link
Contributor Author

Released in 0.6.21

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.

1 participant