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

Removing hard-coded email #10125

Merged
merged 4 commits into from Oct 20, 2020
Merged

Removing hard-coded email #10125

merged 4 commits into from Oct 20, 2020

Conversation

Rafi993
Copy link
Contributor

@Rafi993 Rafi993 commented Sep 1, 2020

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Removing hardcoded email yo@dev.to

Related Tickets & Documents

Closes #9826

Added tests?

  • yes
  • no, because they aren't needed
  • no, because I need help

Added to documentation?

  • docs.forem.com
  • readme
  • no documentation needed

What gif best describes this PR or how it makes you feel?

Happy

@pr-triage pr-triage bot added the PR: draft bot applied label for PR's that are a work in progress label Sep 1, 2020
jest.config.js Outdated
@@ -17,6 +17,11 @@ module.exports = {
'!**/__stories__/**',
'!app/javascript/storybook-static/**/*.js',
],
transform: {
'\\.jsx?(\\.erb)?$': 'babel-jest',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was experimenting the possibility of using jsx.erb and still making jest tests pass

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks to this usabilityhub/rails-erb-loader#48 (comment) (but the tests are failing now)

Copy link
Contributor Author

@Rafi993 Rafi993 Sep 1, 2020

Choose a reason for hiding this comment

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

I was trying to import jsx.erb in a js file. This might be wrong. (I probably misunderstood how this loader works) or the order of loader might be wrong.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the help @rhymes and @nickytonline

Copy link
Contributor Author

@Rafi993 Rafi993 Sep 1, 2020

Choose a reason for hiding this comment

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

I usually put things down in the pr when I'm solving an issue so that person reviewing the pr later might know what was I thinking when I was doing something. Please feel free to ignore the comments that I add in the draft PR and thanks for the help @rhymes (you are awesome).

Copy link
Contributor

Choose a reason for hiding this comment

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

You can import an erb file when webpack builds the frontend bundles as it will be able to convert it to JS via the webpack erb-loader loader. For jest though, things only run through Babel which is why the tests fail when an ERB template is referenced. See rails/webpacker#815. It looks like someone create a package for jest to handle this, https://www.npmjs.com/package/jest-erb-transformer . I'm not sure if we want to go in that direction though. I'm going to dig a bit into this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using jsx.erb might result in some weird issues with respect to tooling (eslint might not be able to parse those files). There might exist some solution for that.

@@ -74,7 +74,7 @@ const ChatChannelSettingsSection = ({
/>
<ModFaqSection
currentMembershipRole={currentMembership.role}
email="yo@dev.to"
email="<%= email_link %>"
Copy link
Contributor

Choose a reason for hiding this comment

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

I thought about this and instead of placing the ERB template here, make the pack file that loads chat the ERB template, as pack files are typically not tested. It can be passed in as a prop to the <Chat /> component like this. This will remove the need to transform ERB files in jest and will also make testing easier as it's just a prop.

import { h, render } from 'preact';
import Chat from '../chat/chat';
import { Snackbar } from '../Snackbar/Snackbar';

function loadElement() {
  const root = document.getElementById('chat');

  if (root) {
    render(<Snackbar lifespan="3" />, document.getElementById('snack-zone'));
    render(<Chat {...root.dataset} modFaqEmail="<%= email_link %>" />, root);

    const placeholder = document.getElementById('chat_placeholder');

    if (placeholder) {
      root.removeChild(placeholder);
    }
  }
}

window.InstantClick.on('change', () => {
  loadElement();
});

loadElement();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought about this and instead of placing the ERB template here, make the pack file that loads chat the ERB template, as pack files are typically not tested. It can be passed in as a prop to the <Chat /> component like this. This will remove the need to transform ERB files in jest and will also make testing easier as it's just a prop.

import { h, render } from 'preact';
import Chat from '../chat/chat';
import { Snackbar } from '../Snackbar/Snackbar';

function loadElement() {
  const root = document.getElementById('chat');

  if (root) {
    render(<Snackbar lifespan="3" />, document.getElementById('snack-zone'));
    render(<Chat {...root.dataset} modFaqEmail="<%= email_link %>" />, root);

    const placeholder = document.getElementById('chat_placeholder');

    if (placeholder) {
      root.removeChild(placeholder);
    }
  }
}

window.InstantClick.on('change', () => {
  loadElement();
});

loadElement();

This is much better solution and it also removes lot other issues that might arise when mixing jsx and erb.

@@ -130,7 +131,9 @@ export default class Chat extends Component {

setupObserver(this.observerCallback);

this.subscribePusher(`private-message-notifications--${appName}-${currentUserId}`);
this.subscribePusher(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think code climate is failing because of this extra line added by the prettier

Copy link
Contributor

Choose a reason for hiding this comment

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

That's fine, we can override it on our end.

@Rafi993 Rafi993 marked this pull request as ready for review September 1, 2020 17:03
@pr-triage pr-triage bot added PR: unreviewed bot applied label for PR's with no review and removed PR: draft bot applied label for PR's that are a work in progress labels Sep 1, 2020
@Rafi993
Copy link
Contributor Author

Rafi993 commented Sep 1, 2020

The tests fails for some reason even though the app works. I couldn't figure out why might be related to this issue usabilityhub/rails-erb-loader#63

@Rafi993
Copy link
Contributor Author

Rafi993 commented Sep 1, 2020

The tests fails for some reason even though the app works. I couldn't figure out why might be related to this issue usabilityhub/rails-erb-loader#63

I'll try to figure what I can do about that.

@Rafi993
Copy link
Contributor Author

Rafi993 commented Sep 1, 2020

The tests fails for some reason even though the app works. I couldn't figure out why might be related to this issue usabilityhub/rails-erb-loader#63

The weird thing is that it does not fail in local because of this but fails in CI. Even-though code in pack folder is not covered by tests

Copy link
Contributor

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

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

I've merged latest of master into your branch. The build failures looked to be unrelated to your changes even though webpacker failed.

@pr-triage pr-triage bot added PR: partially-approved bot applied label for PR's where a single reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Sep 1, 2020
@nickytonline nickytonline requested review from a team and Ridhwana and removed request for a team September 1, 2020 18:38
@nickytonline
Copy link
Contributor

nickytonline commented Sep 1, 2020

Seems like builds are still failing because of DB issues when the ERB loader runs. Still investigating. @rhymes, from what I found on SO, it seems to be a DB migration issue. I imagine DB migrations run after the webpack build?

ERROR in ./app/javascript/packs/Chat.jsx.erb
Module build failed (from ./node_modules/rails-erb-loader/index.js):
Error: rails-erb-loader failed with code: 1
    at ChildProcess.<anonymous> (/home/travis/build/forem/forem/node_modules/rails-erb-loader/index.js:128:16)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
/home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:65:in `exec': PG::UndefinedTable: ERROR:  relation "users" does not exist (ActiveRecord::StatementInvalid)
LINE 8:  WHERE a.attrelid = '"users"'::regclass
                            ^
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:65:in `block (2 levels) in query'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:64:in `block in query'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract_adapter.rb:722:in `block (2 levels) in log'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract_adapter.rb:721:in `block in log'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract_adapter.rb:712:in `log'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:63:in `query'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql_adapter.rb:820:in `column_definitions'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:114:in `columns'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/schema_cache.rb:76:in `columns'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/schema_cache.rb:82:in `columns_hash'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:488:in `load_schema!'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/attributes.rb:247:in `load_schema!'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/attribute_decorators.rb:50:in `load_schema!'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:478:in `block in load_schema'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:475:in `synchronize'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:475:in `load_schema'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:352:in `columns_hash'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1216:in `arel_column'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1203:in `block in arel_columns'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1196:in `each'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1196:in `flat_map'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1196:in `arel_columns'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1187:in `build_select'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1071:in `build_arel'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1016:in `arel'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/finder_methods.rb:317:in `block in exists?'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation.rb:839:in `skip_query_cache_if_necessary'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/finder_methods.rb:317:in `exists?'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/querying.rb:21:in `exists?'
	from /home/travis/build/forem/forem/app/models/site_config.rb:14:in `<class:SiteConfig>'
	from /home/travis/build/forem/forem/app/models/site_config.rb:4:in `<main>'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.0/lib/zeitwerk/kernel.rb:27:in `require'
	from (erb):11:in `<main>'
	from /home/travis/.rvm/rubies/ruby-2.7.1/lib/ruby/2.7.0/erb.rb:905:in `eval'
	from /home/travis/.rvm/rubies/ruby-2.7.1/lib/ruby/2.7.0/erb.rb:905:in `result'
	from /home/travis/build/forem/forem/node_modules/rails-erb-loader/erb_transformer.rb:19:in `<main>'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/commands/runner/runner_command.rb:42:in `perform'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/command/base.rb:69:in `perform'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/command.rb:46:in `invoke'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/commands.rb:18:in `<main>'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `block in require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:291:in `load_dependency'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `require'
	from bin/rails:4:in `<main>'
/home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:65:in `exec': ERROR:  relation "users" does not exist (PG::UndefinedTable)
LINE 8:  WHERE a.attrelid = '"users"'::regclass
                            ^
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:65:in `block (2 levels) in query'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:64:in `block in query'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract_adapter.rb:722:in `block (2 levels) in log'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract_adapter.rb:721:in `block in log'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract_adapter.rb:712:in `log'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:63:in `query'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql_adapter.rb:820:in `column_definitions'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:114:in `columns'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/schema_cache.rb:76:in `columns'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/schema_cache.rb:82:in `columns_hash'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:488:in `load_schema!'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/attributes.rb:247:in `load_schema!'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/attribute_decorators.rb:50:in `load_schema!'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:478:in `block in load_schema'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:475:in `synchronize'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:475:in `load_schema'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:352:in `columns_hash'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1216:in `arel_column'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1203:in `block in arel_columns'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1196:in `each'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1196:in `flat_map'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1196:in `arel_columns'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1187:in `build_select'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1071:in `build_arel'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1016:in `arel'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/finder_methods.rb:317:in `block in exists?'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation.rb:839:in `skip_query_cache_if_necessary'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/finder_methods.rb:317:in `exists?'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/querying.rb:21:in `exists?'
	from /home/travis/build/forem/forem/app/models/site_config.rb:14:in `<class:SiteConfig>'
	from /home/travis/build/forem/forem/app/models/site_config.rb:4:in `<main>'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.0/lib/zeitwerk/kernel.rb:27:in `require'
	from (erb):11:in `<main>'
	from /home/travis/.rvm/rubies/ruby-2.7.1/lib/ruby/2.7.0/erb.rb:905:in `eval'
	from /home/travis/.rvm/rubies/ruby-2.7.1/lib/ruby/2.7.0/erb.rb:905:in `result'
	from /home/travis/build/forem/forem/node_modules/rails-erb-loader/erb_transformer.rb:19:in `<main>'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/commands/runner/runner_command.rb:42:in `perform'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/command/base.rb:69:in `perform'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/command.rb:46:in `invoke'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/commands.rb:18:in `<main>'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `block in require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:291:in `load_dependency'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `require'
	from bin/rails:4:in `<main>'
The command "bundle exec rails webpacker:compile" exited with 1.
4.66s

@pr-triage pr-triage bot added PR: unreviewed bot applied label for PR's with no review and removed PR: partially-approved bot applied label for PR's where a single reviewer approves changes labels Sep 11, 2020
@rhymes
Copy link
Contributor

rhymes commented Oct 1, 2020

@Rafi993 is there anything blocking this apart from the failed build? Let us know if you need further help

@Rafi993
Copy link
Contributor Author

Rafi993 commented Oct 1, 2020

@Rafi993 is there anything blocking this apart from the failed build? Let us know if you need further help

Thank you @rhymes I don't think there is any other issue other than failing build.

@rhymes
Copy link
Contributor

rhymes commented Oct 1, 2020

@Rafi993 I rebased this on top of master to bring in the latest changes, that will hopefully fixs the build as well :D

@Rafi993
Copy link
Contributor Author

Rafi993 commented Oct 1, 2020

@Rafi993 I rebased this on top of master to bring in the latest changes, that will hopefully fixs the build as well :D

Awesome, thank you

@Rafi993 Rafi993 requested a review from a team as a code owner October 2, 2020 05:55
@Rafi993
Copy link
Contributor Author

Rafi993 commented Oct 2, 2020

I moved bundle exec rails webpacker:compile after bundle exec rails db:schema:load in .travis.yml file and the build passed I'm not sure if that is ok. Any thoughts @rhymes ?

@maestromac
Copy link
Member

@Rafi993 I don't think we should change the bundle order here unless it's legitimately failing. Would you mind reverting that? aside from that, the feature LGTM!

@Rafi993
Copy link
Contributor Author

Rafi993 commented Oct 14, 2020

Seems like builds are still failing because of DB issues when the ERB loader runs. Still investigating. @rhymes, from what I found on SO, it seems to be a DB migration issue. I imagine DB migrations run after the webpack build?

ERROR in ./app/javascript/packs/Chat.jsx.erb
Module build failed (from ./node_modules/rails-erb-loader/index.js):
Error: rails-erb-loader failed with code: 1
    at ChildProcess.<anonymous> (/home/travis/build/forem/forem/node_modules/rails-erb-loader/index.js:128:16)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
/home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:65:in `exec': PG::UndefinedTable: ERROR:  relation "users" does not exist (ActiveRecord::StatementInvalid)
LINE 8:  WHERE a.attrelid = '"users"'::regclass
                            ^
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:65:in `block (2 levels) in query'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:64:in `block in query'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract_adapter.rb:722:in `block (2 levels) in log'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract_adapter.rb:721:in `block in log'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract_adapter.rb:712:in `log'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:63:in `query'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql_adapter.rb:820:in `column_definitions'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:114:in `columns'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/schema_cache.rb:76:in `columns'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/schema_cache.rb:82:in `columns_hash'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:488:in `load_schema!'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/attributes.rb:247:in `load_schema!'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/attribute_decorators.rb:50:in `load_schema!'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:478:in `block in load_schema'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:475:in `synchronize'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:475:in `load_schema'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:352:in `columns_hash'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1216:in `arel_column'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1203:in `block in arel_columns'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1196:in `each'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1196:in `flat_map'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1196:in `arel_columns'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1187:in `build_select'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1071:in `build_arel'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1016:in `arel'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/finder_methods.rb:317:in `block in exists?'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation.rb:839:in `skip_query_cache_if_necessary'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/finder_methods.rb:317:in `exists?'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/querying.rb:21:in `exists?'
	from /home/travis/build/forem/forem/app/models/site_config.rb:14:in `<class:SiteConfig>'
	from /home/travis/build/forem/forem/app/models/site_config.rb:4:in `<main>'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.0/lib/zeitwerk/kernel.rb:27:in `require'
	from (erb):11:in `<main>'
	from /home/travis/.rvm/rubies/ruby-2.7.1/lib/ruby/2.7.0/erb.rb:905:in `eval'
	from /home/travis/.rvm/rubies/ruby-2.7.1/lib/ruby/2.7.0/erb.rb:905:in `result'
	from /home/travis/build/forem/forem/node_modules/rails-erb-loader/erb_transformer.rb:19:in `<main>'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/commands/runner/runner_command.rb:42:in `perform'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/command/base.rb:69:in `perform'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/command.rb:46:in `invoke'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/commands.rb:18:in `<main>'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `block in require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:291:in `load_dependency'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `require'
	from bin/rails:4:in `<main>'
/home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:65:in `exec': ERROR:  relation "users" does not exist (PG::UndefinedTable)
LINE 8:  WHERE a.attrelid = '"users"'::regclass
                            ^
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:65:in `block (2 levels) in query'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:64:in `block in query'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract_adapter.rb:722:in `block (2 levels) in log'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract_adapter.rb:721:in `block in log'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract_adapter.rb:712:in `log'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:63:in `query'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/postgresql_adapter.rb:820:in `column_definitions'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:114:in `columns'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/schema_cache.rb:76:in `columns'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/schema_cache.rb:82:in `columns_hash'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:488:in `load_schema!'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/attributes.rb:247:in `load_schema!'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/attribute_decorators.rb:50:in `load_schema!'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:478:in `block in load_schema'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:475:in `synchronize'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:475:in `load_schema'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/model_schema.rb:352:in `columns_hash'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1216:in `arel_column'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1203:in `block in arel_columns'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1196:in `each'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1196:in `flat_map'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1196:in `arel_columns'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1187:in `build_select'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1071:in `build_arel'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/query_methods.rb:1016:in `arel'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/finder_methods.rb:317:in `block in exists?'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation.rb:839:in `skip_query_cache_if_necessary'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/relation/finder_methods.rb:317:in `exists?'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/querying.rb:21:in `exists?'
	from /home/travis/build/forem/forem/app/models/site_config.rb:14:in `<class:SiteConfig>'
	from /home/travis/build/forem/forem/app/models/site_config.rb:4:in `<main>'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.0/lib/zeitwerk/kernel.rb:27:in `require'
	from (erb):11:in `<main>'
	from /home/travis/.rvm/rubies/ruby-2.7.1/lib/ruby/2.7.0/erb.rb:905:in `eval'
	from /home/travis/.rvm/rubies/ruby-2.7.1/lib/ruby/2.7.0/erb.rb:905:in `result'
	from /home/travis/build/forem/forem/node_modules/rails-erb-loader/erb_transformer.rb:19:in `<main>'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/commands/runner/runner_command.rb:42:in `perform'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/command/base.rb:69:in `perform'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/command.rb:46:in `invoke'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/commands.rb:18:in `<main>'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `block in require'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:291:in `load_dependency'
	from /home/travis/build/forem/forem/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `require'
	from bin/rails:4:in `<main>'
The command "bundle exec rails webpacker:compile" exited with 1.
4.66s

@maestromac it was indeed failing due to the order as mentioned above. I tried reverting it and ran commands the order it is in .travisyml in local and it was failing.

Copy link
Contributor

@Ridhwana Ridhwana left a comment

Choose a reason for hiding this comment

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

This looks good to merge

@pr-triage pr-triage bot added PR: partially-approved bot applied label for PR's where a single reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Oct 20, 2020
@Ridhwana Ridhwana merged commit e3076a0 into forem:master Oct 20, 2020
@pr-triage pr-triage bot added PR: merged bot applied label for PR's that are merged and removed PR: partially-approved bot applied label for PR's where a single reviewer approves changes labels Oct 20, 2020
@Ridhwana
Copy link
Contributor

Thanks @Rafi993 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged bot applied label for PR's that are merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ChatChannelSettingsSection component: remove hardcoded email
5 participants