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

Bump rails from 5.2.4.5 to 6.0.3.6 #798

Merged
merged 6 commits into from
Apr 16, 2021
Merged

Conversation

eitoball
Copy link
Member

@eitoball eitoball commented Apr 3, 2021

Fixes #801

@eitoball eitoball self-assigned this Apr 3, 2021
@eitoball eitoball marked this pull request as ready for review April 3, 2021 08:03
commands:
upgrade_nodejs_and_install_yarn:
command: |
/usr/bin/curl -sLO https://rpm.nodesource.com/pub_10.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this definitely idempotent? It’ll get run on every deploy.

Copy link
Member Author

Choose a reason for hiding this comment

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

No. I added test to check if version 10.x of node is installed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Cool. You might also be able to do something with the yum support in ebextensions to make it a little simpler.

Copy link
Contributor

Choose a reason for hiding this comment

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

# available at https://guides.rubyonrails.org/i18n.html.

en:
hello: "Hello world"
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this won’t conflict with our existing translations?

Copy link
Member Author

@eitoball eitoball Apr 4, 2021

Choose a reason for hiding this comment

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

It seems that it doesn't.

[1] pry(main)> I18n.default_locale
=> :"en-US"
[2] pry(main)> I18n.t('bgeigie_imports.delete.delete_this_import')
=> "Delete this Import"
[3] pry(main)> I18n.locale = :ja
=> :ja
[4] pry(main)> I18n.t('bgeigie_imports.delete.delete_this_import')
=> "このインポートを削除する"
[5] pry(main)> I18n.t('hello')
=> "こんにちは"
[6] pry(main)> I18n.locale = :'en-US'
=> :"en-US"
[7] pry(main)> I18n.t('hello')
=> "Hello"
[8] pry(main)> I18n.locale = :en
=> :en
[9] pry(main)> I18n.t('hello')
=> "Hello world"
[10] pry(main)> I18n.t('bgeigie_imports.delete.delete_this_import')
=> "Delete this Import"

2.1 Configure the I18n Module
says in the following, but I don't understand what it means..

The i18n library takes a pragmatic approach to locale keys...

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I realized also our acceptance specs would fail if it was a problem. Looks good!

@eitoball eitoball force-pushed the bump-rails-to-6.0.3.6 branch from 8449f62 to 0cadf23 Compare April 4, 2021 02:42
@eitoball eitoball force-pushed the bump-rails-to-6.0.3.6 branch 2 times, most recently from 56f25e9 to 761ef79 Compare April 15, 2021 11:35
nodesource: https://rpm.nodesource.com/pub_10.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm
container_commands:
01_upgrade_nodejs:
command: yum -y install nodejs
Copy link
Contributor

Choose a reason for hiding this comment

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

did yum package not work? Says on https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html rpm should get done first

Comment on lines 4 to 8
container_commands:
01_upgrade_nodejs:
command: yum -y install nodejs
02_install_yarn:
command: npm install --global yarn
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
container_commands:
01_upgrade_nodejs:
command: yum -y install nodejs
02_install_yarn:
command: npm install --global yarn
packages:
rpm:
nodesource: https://rpm.nodesource.com/pub_10.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm
yum:
nodejs: []
commands:
install_yarn:
command: npm install --global yarn

Pretty sure this will work. Maybe not a big difference but seems cleaner.

Copy link
Contributor

@matschaffer matschaffer left a comment

Choose a reason for hiding this comment

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

Looks good overall. Did you want to handle the deprecation warnings as a followup PR?

@eitoball eitoball force-pushed the bump-rails-to-6.0.3.6 branch from 761ef79 to 4fcced9 Compare April 15, 2021 20:36
nodesource: https://rpm.nodesource.com/pub_10.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm
yum:
nodejs: []
container_commands:
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this needs to be container commands, but probably fine.

commands happens before the new app bundle is downloaded, container_commands happens after.

@eitoball eitoball force-pushed the bump-rails-to-6.0.3.6 branch from 4fcced9 to 3751b5d Compare April 15, 2021 22:53
@eitoball
Copy link
Member Author

Did you want to handle the deprecation warnings as a followup PR?

Yep. I will create another PR to fix those warnings.

@matschaffer matschaffer merged commit df0afea into master Apr 16, 2021
@matschaffer matschaffer deleted the bump-rails-to-6.0.3.6 branch April 16, 2021 05:20
@eitoball eitoball mentioned this pull request Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rails 6 upgrade
2 participants