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

Feed Regeneration Crash #24

Closed
davefp opened this issue Oct 9, 2019 · 0 comments · Fixed by #25
Closed

Feed Regeneration Crash #24

davefp opened this issue Oct 9, 2019 · 0 comments · Fixed by #25

Comments

@davefp
Copy link

davefp commented Oct 9, 2019

Expected behaviour

The feed regen task bin/tootctl feeds build --all should complete successfully

Actual behaviour

The task bin/tootctl feeds build --all crashes with the following stack trace:

Traceback (most recent call last):
	32: from bin/tootctl:5:in `<main>'
	31: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
	30: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
	29: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
	28: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
	27: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
	26: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
	25: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
	24: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
	23: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
	22: from /home/mastodon/live/lib/mastodon/feeds_cli.rb:39:in `build'
	21: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/relation/batches.rb:135:in `find_in_batches'
	20: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/relation/batches.rb:222:in `in_batches'
	19: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/relation/batches.rb:222:in `loop'
	18: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/relation/batches.rb:238:in `block in in_batches'
	17: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/relation/batches.rb:136:in `block in find_in_batches'
	16: from /home/mastodon/live/lib/mastodon/feeds_cli.rb:44:in `block in build'
	15: from /home/mastodon/live/lib/mastodon/feeds_cli.rb:44:in `each'
	14: from /home/mastodon/live/lib/mastodon/feeds_cli.rb:45:in `block (2 levels) in build'
	13: from /home/mastodon/live/app/workers/regeneration_worker.rb:10:in `perform'
	12: from /home/mastodon/live/app/services/precompute_feed_service.rb:5:in `call'
	11: from /home/mastodon/live/app/lib/feed_manager.rb:129:in `populate_feed'
	10: from /home/mastodon/live/app/lib/feed_manager.rb:129:in `loop'
	 9: from /home/mastodon/live/app/lib/feed_manager.rb:135:in `block in populate_feed'
	 8: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/relation/delegation.rb:71:in `each'
	 7: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/relation/delegation.rb:71:in `each'
	 6: from /home/mastodon/live/app/lib/feed_manager.rb:136:in `block (2 levels) in populate_feed'
	 5: from /home/mastodon/live/app/lib/feed_manager.rb:164:in `filter_from_home?'
	 4: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/core.rb:167:in `find'
	 3: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/querying.rb:5:in `find'
	 2: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/relation/finder_methods.rb:69:in `find'
	 1: from /home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/relation/finder_methods.rb:435:in `find_with_ids'
/home/mastodon/live/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/relation/finder_methods.rb:447:in `find_one': You are passing an instance of ActiveRecord::Base to `find`. Please pass the id of the object by calling `.id`. (ArgumentError)

Steps to reproduce the problem

From the project root, run bin/tootctl feeds build --all.

Specifications

This was found in v1.0.1+2.9.3, running on Ubuntu 16.04.6 LTS

I've got a fix for this that I'm going to post shortly

Gargron pushed a commit to mastodon/mastodon that referenced this issue Nov 7, 2019
This was [causing an issue with feed regeneartion in tootctl](hometown-fork#24), and @davefp fixed the issue.
doubanius pushed a commit to doubanius/mastodon that referenced this issue Nov 10, 2019
* Bump @babel/preset-react from 7.0.0 to 7.6.3 (mastodon#12315)

Bumps [@babel/preset-react](https://github.com/babel/babel) from 7.0.0 to 7.6.3.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](babel/babel@v7.0.0...v7.6.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump sass from 1.23.1 to 1.23.3 (mastodon#12314)

Bumps [sass](https://github.com/sass/dart-sass) from 1.23.1 to 1.23.3.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/master/CHANGELOG.md)
- [Commits](sass/dart-sass@1.23.1...1.23.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump glob from 7.1.4 to 7.1.5 (mastodon#12312)

Bumps [glob](https://github.com/isaacs/node-glob) from 7.1.4 to 7.1.5.
- [Release notes](https://github.com/isaacs/node-glob/releases)
- [Changelog](https://github.com/isaacs/node-glob/blob/master/changelog.md)
- [Commits](isaacs/node-glob@v7.1.4...v7.1.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump tesseract.js from 2.0.0-alpha.16 to 2.0.0-beta.2 (mastodon#12311)

Bumps [tesseract.js](https://github.com/naptha/tesseract.js) from 2.0.0-alpha.16 to 2.0.0-beta.2.
- [Release notes](https://github.com/naptha/tesseract.js/releases)
- [Commits](naptha/tesseract.js@v2.0.0-alpha.16...v2.0.0-beta.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump @babel/preset-env from 7.6.0 to 7.7.1 (mastodon#12318)

Bumps [@babel/preset-env](https://github.com/babel/babel) from 7.6.0 to 7.7.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](babel/babel@v7.6.0...v7.7.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump @babel/runtime from 7.6.0 to 7.7.1 (mastodon#12317)

Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.6.0 to 7.7.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.7.1/packages/babel-runtime)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump sass-loader from 7.1.0 to 8.0.0 (mastodon#12027)

* Bump sass-loader from 7.1.0 to 8.0.0

Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 7.1.0 to 8.0.0.
- [Release notes](https://github.com/webpack-contrib/sass-loader/releases)
- [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md)
- [Commits](webpack-contrib/sass-loader@v7.1.0...v8.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* bump webpack

* Fix various issues with account migration (mastodon#12301)

* Fix being able to follow oneself by moving to an account that was following the old one

* Add specs

* Add spec to catch MoveWorker issue with local followers following both accounts

* Fix move worker breaking when a local account follows both source and target accounts

* Fix migration from remote to local account not sending Undo Follow

* Fix show_reblogs not being preserved for moved account's followers

* Minor improvements to poll composing UI (mastodon#12319)

- Disable the “add option” button instead of hiding it
- Allow poll option inputs to scale to full width

* Fix WebUI allowing to upload more items than the limit (mastodon#12300)

Until this patch, drag'n'drop and copy-paste allowed to start uploading as
long as the number of *finished* uploads was below the limit.

* Fix relationship caches being broken as result of a follow request (mastodon#12299)

* Fix type mismatch (mastodon#12324)

This was [causing an issue with feed regeneartion in tootctl](hometown-fork#24), and @davefp fixed the issue.

* Fix win95 profile page style

* Increase profile page max width

* Revert "Increase profile page max width"

This reverts commit 4b10c37.
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 a pull request may close this issue.

1 participant