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
Removing hard-coded email #10125
Conversation
jest.config.js
Outdated
| @@ -17,6 +17,11 @@ module.exports = { | |||
| '!**/__stories__/**', | |||
| '!app/javascript/storybook-static/**/*.js', | |||
| ], | |||
| transform: { | |||
| '\\.jsx?(\\.erb)?$': 'babel-jest', | |||
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 %>" | |||
There was a problem hiding this comment.
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();There was a problem hiding this comment.
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.
app/javascript/chat/chat.jsx
Outdated
| @@ -130,7 +131,9 @@ export default class Chat extends Component { | |||
|
|
|||
| setupObserver(this.observerCallback); | |||
|
|
|||
| this.subscribePusher(`private-message-notifications--${appName}-${currentUserId}`); | |||
| this.subscribePusher( | |||
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
|
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. |
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 |
There was a problem hiding this 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.
|
Seems like builds are still failing because of DB issues when the ERB loader runs. 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 |
|
@Rafi993 is there anything blocking this apart from the failed build? Let us know if you need further help |
|
@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 |
|
I moved |
|
@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! |
@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. |
There was a problem hiding this 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
|
Thanks @Rafi993 🎉 |
What type of PR is this?
Description
Removing hardcoded email yo@dev.to
Related Tickets & Documents
Closes #9826
Added tests?
Added to documentation?
What gif best describes this PR or how it makes you feel?