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

Base staging configuration on the production one #5463

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

javierm
Copy link
Member

@javierm javierm commented Apr 1, 2024

References

Objectives

  • Make it easier to add changes that affect both the production and staging environment
  • Make it easier to upgrade to new versions of Rails

Notes

Back in pull request #4875, we said:

After these changes, the staging and production environments are mostly identical, and we could simply require the production environment configuration in the staging.rb file. We aren't doing so because we're doing changes affecting the preproduction environment and, since [Consul Democracy] installations might have customized these files, it would be hard for them to deal with all those changes at once.

We've released a couple of version Consul Democracy since then, so now we can do the same for the staging environment without existing installations having to deal with too many changes.

Release notes

⚠️ Other than the standard production, development and test environments, Consul Democracy offers the option to setup staging and preproduction environments. If you're using the staging environment, note we're now base the staging configuration on the production one. If your config/environments/staging.rb is not identical to your config/environments/production.rb, you'll have to change the former in order to include the differences (we've already included the difference related to the log_level). If you've customized these environments using the config/environments/custom/staging.rb or config/environments/custom/production.rb files, you might need to change the former to take this change into account. If you aren't using the staging environment, ignore this warning.

There was only one different line between these two lines, and we really
want these two files to be as similar as possible, so testing on a
staging server we get the same results we'll get on production.

This duplication made it easy to forget to update the staging.rb file
when updating the production.rb, particularly when upgrading to a new
version of Rails, which automatically changes the production.rb file but
not the staging.rb one.

So, now that we're getting ready to upgrade to Rails 7.0, we're basing
the staging configuration on the production one, just like we based the
preproduction configuration on the staging one in commit 7b91adb.
@javierm javierm self-assigned this Apr 1, 2024
@javierm javierm added this to Reviewing in Consul Democracy Apr 1, 2024
@javierm javierm mentioned this pull request Apr 1, 2024
@taitus taitus self-assigned this Apr 3, 2024
Consul Democracy automation moved this from Reviewing to Testing Apr 3, 2024
@javierm javierm merged commit 3969f81 into master Apr 3, 2024
15 checks passed
Consul Democracy automation moved this from Testing to Release 2.2.0 Apr 3, 2024
@javierm javierm deleted the simplify_staging_environment branch April 3, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Release 2.2.0
Consul Democracy
  
Release 2.2.0
Development

Successfully merging this pull request may close these issues.

None yet

2 participants