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

[ActiveRecord] Fix DB connection issues during assets:precompile #3470

Merged

Conversation

codealchemy
Copy link
Contributor

@codealchemy codealchemy commented Feb 14, 2022

Closes #3469

When initializing abstract (ActiveRecord) models, #table_exists? is used and calls through the connection, which (in the case of a precompile step) can raise errors other than the ActiveRecord::NoDatabaseError that's currently handled.

I believe this should cover all PostgreSQL and MySQL connection errors handled by Rails.

When initializing abstract (ActiveRecord) models, #table_exists? is used and calls through the connection, which (in the case of a precompile step) can raise errors other than the ActiveRecord::NoDatabaseError that's currently handled.
@coveralls
Copy link

coveralls commented Feb 14, 2022

Pull Request Test Coverage Report for Build 1843895617

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 95.889%

Totals Coverage Status
Change from base Build 1834034935: 0.0%
Covered Lines: 3685
Relevant Lines: 3843

💛 - Coveralls

@mshibuya mshibuya merged commit d96def6 into railsadminteam:master Feb 15, 2022
@mshibuya
Copy link
Member

Looks great, thanks 🙌

@ha4gu
Copy link

ha4gu commented Feb 15, 2022

Now bin/rails assets:precompile works, thank you so much!

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.

3.0.0.rc try to access to the database when asset precompiling if it has config.model configuration
4 participants