mirror of https://github.com/mastodon/mastodon
				
				
				
			gh-readonly-queue/main/pr-36652-8e4c9cf933dfff4847ba2add6c4f87c79026dea5
				
					renovate/opentelemetry-ruby-(non-major)
				
					gh-readonly-queue/main/pr-36668-cf87da25add5fa9c7771cd5bbcac316d5180b96c
				
					gh-readonly-queue/main/pr-36657-966aaaaf56cd55d311bc5968a1654f6621fbe8df
				
					gh-readonly-queue/main/pr-36699-5b880a20468b47c600d61f3497fe6b4e4edc2440
				
					main
				
					redesign/link-paste-quote-placeholder
				
					renovate/reduxjs-toolkit-2.x-lockfile
				
					renovate/sidekiq-8.x-lockfile
				
					new-coc
				
					fix/quote-post-privacy
				
					renovate/dotenv-17.x
				
					renovate/shoulda-matchers-7.x-lockfile
				
					refactor/media-modal
				
					stable-4.5
				
					renovate/net-http-0.x
				
					dion/implement-css-theme-tokens-as-theme
				
					dion/implement-css-theme-tokens
				
					renovate/aws-sdk-s3-1.x-lockfile
				
					renovate/major-react-monorepo
				
					dion/add-fetch-all-alert-placeholder
				
					fixes/rename-feed-setting-values
				
					renovate/pino-10.x
				
					stable-4.4
				
					renovate/pino-http-11.x
				
					fixes/allow-quote-empty-text
				
					renovate/eslint-plugin-jsdoc-60.x
				
					stable-4.2
				
					stable-4.3
				
					fixes/apply-filters-to-search-results
				
					feat/donation-modal
				
					feature-link-rel-nopreview
				
					revert-context
				
					feat/thunk-conditional-dispatch
				
					refactor/tanstack-router
				
					fixes/httplog-debug
				
					features/extend-quote-edit-notification
				
					refactor/combine-action-bars
				
					backports/4.4-reserved-usernames
				
					refactor/compose-state
				
					dion/fix-duplicated-scroll-context-logic
				
					feature-preview-fep-b2b8
				
					fixes/cancel-follow-request
				
					feature-thread-pagination
				
					fixes/pending-hashtags-count
				
					hacks/mailer-cutoff
				
					features/ruby-vite-name-lookup
				
					feature-avatar-color-extraction
				
					feature-starter-packs
				
					investigations/e2e-failures
				
					dion/add-mutual-info-to-hover-card
				
					feature-quotes-web
				
					fix-accidental-new-tab-on-scroll
				
					stable-4.1
				
					remove-rails-delegate
				
					debug/ghost-followers-synchronization
				
					feature-streaming-profile
				
					fixes/account-note
				
					fixes/recheck-suspensions
				
					feat/fasp_trends
				
					updates/vips
				
					features/split-in-app-notif
				
					refactor/modal-stack
				
					tests/media-description-modal
				
					fixes/out-of-order-private-posts
				
					fixes/thread-resolve-worker-skip_fetching
				
					replace-oj-with-json
				
					refactor-status-content-typescript
				
					fixes/embed-requestAnimationFrame
				
					features/lock-icon-on-hover-card
				
					feature-admin-report-forward
				
					feature-reports-batch-actions
				
					fix-admin-dashboard-slow
				
					fix-future-date-trend
				
					redesign/content-warning-filters-4.3
				
					fixes/filtered-follows
				
					remove/trendable-provider-attribution
				
					activitypub/summary-over-name
				
					build-stable-nightly
				
					fixes/notification-excerpt-paragraph
				
					fixes/mastodon-setup-task-redis
				
					fixes/regexp-timeout-optional
				
					fixes/small-otp-secret-length-4.1
				
					fixes/small-otp-secret-length-4.2
				
					fixes/dashboard-quick-access-overflow
				
					fixes/middle-column-size
				
					fix-context-socialweb-miscellany
				
					fixes/detect-missing-indexes2
				
					cleanup/simplify-css
				
					feature-post-layout
				
					features/media-description-in-embedded-status
				
					design/notifications-grid
				
					fix-lookup-domain
				
					flaky-conversations-test
				
					fixes/crash-orphaned-notification
				
					fixes/report-links
				
					features/filtered-dismiss-accept-all
				
					feat/clean-up-notifications
				
					fixes/everyone-role-n+1
				
					redesign/notification-request
				
					experimental/notification-groups-api-shape
				
					spike/resolve-urls-on-click
				
					cleanup/drop-atomuri
				
					fixes/dismissing-notification-requests-dismisses-too-much
				
					revert-system-check
				
					feature-redirect
				
					fix-unusable-hashtag
				
					tests/flaky-tests-performance-logs
				
					feature-grouped-notifications-ui
				
					fix-mute-buttons
				
					features/local-preview-cards-2nd-take
				
					fix-conversations-background
				
					revert-severed-relationships-feature
				
					features/local-preview-cards
				
					stable-3.5
				
					stable-4.0
				
					stable-3.4
				
					releases/v3.5.17
				
					releases/v4.1.13
				
					releases/v4.2.5
				
					version/v4.3.0-alpha.1
				
					fix/build-env
				
					feature-color-scheme
				
					revert/follow-back-mutual
				
					gh-readonly-queue/main/pr-28626-1ad908e0c08c236389967d86b4f238f428de9fef
				
					fixes/per-user-authorized-fetch
				
					fixes/import-many-follows-overlap
				
					fix-web-thread-sort
				
					test-new-container-build
				
					fixes/24px-icons
				
					features/registration-invite-api
				
					fixes/service-worker-caching
				
					fixes/account-refresh-link-verification
				
					feature-like
				
					tests/introduce-error
				
					fixes/lint-fix
				
					fixes/object-has-own-polyfill
				
					fixes/audio-passthrough
				
					fixes/audit-log-external-confirmation
				
					features/banners
				
					refactor/search-query-parser
				
					remove-profile-directory
				
					redesign/notification-settings
				
					feature-separate-hashtags
				
					fixes/self-destruct-throttle
				
					fixes/subdomain-block-4.1.6
				
					redesign/hashtag-column-follow-button
				
					feature-trend-highlights
				
					revert-23460-fixes/activitypub-hashtag
				
					pg15
				
					prevent-unauthenticated-access-tag-timeline
				
					support-rich-oembed
				
					fix-caniuselite-lockfile
				
					track_unsalvageable_errors
				
					add-publish-button-text-site-setting
				
					nolan/button-a11y
				
					i18n/manage-translations
				
					deps/shakapacker
				
					rubocop-fixes
				
					react18
				
					stable-3.3
				
					stable-3.2
				
					stable-3.1
				
					stable-3.0
				
					stable-2.9
				
					stable-2.8
				
					stable-2.7
				
					stable-2.5
				
					stable-2.6
				
					stable-2.4
				
			
			
				
					
						v0.1.2
					
				
					
						v0.1.1
					
				
					
						v0.1.0
					
				
					
						v0.6
					
				
					
						v0.7
					
				
					
						v0.8
					
				
					
						v0.9
					
				
					
						v0.9.9
					
				
					
						v1.0
					
				
					
						v1.1
					
				
					
						v1.1.1
					
				
					
						v1.1.2
					
				
					
						v1.2
					
				
					
						v1.2.1
					
				
					
						v1.2.2
					
				
					
						v1.3
					
				
					
						v1.3.1
					
				
					
						v1.3.2
					
				
					
						v1.3.3
					
				
					
						v1.4.1
					
				
					
						v1.4.2
					
				
					
						v1.4.3
					
				
					
						v1.4.4
					
				
					
						v1.4.5
					
				
					
						v1.4.6
					
				
					
						v1.4.7
					
				
					
						v1.4rc1
					
				
					
						v1.4rc2
					
				
					
						v1.4rc3
					
				
					
						v1.4rc4
					
				
					
						v1.4rc5
					
				
					
						v1.4rc6
					
				
					
						v1.5.0
					
				
					
						v1.5.0rc1
					
				
					
						v1.5.0rc2
					
				
					
						v1.5.0rc3
					
				
					
						v1.5.1
					
				
					
						v1.6.0
					
				
					
						v1.6.0rc1
					
				
					
						v1.6.0rc2
					
				
					
						v1.6.0rc3
					
				
					
						v1.6.0rc4
					
				
					
						v1.6.0rc5
					
				
					
						v1.6.1
					
				
					
						v2.0.0
					
				
					
						v2.0.0rc1
					
				
					
						v2.0.0rc2
					
				
					
						v2.0.0rc3
					
				
					
						v2.0.0rc4
					
				
					
						v2.1.0
					
				
					
						v2.1.0rc1
					
				
					
						v2.1.0rc2
					
				
					
						v2.1.0rc3
					
				
					
						v2.1.0rc4
					
				
					
						v2.1.0rc5
					
				
					
						v2.1.0rc6
					
				
					
						v2.1.1
					
				
					
						v2.1.2
					
				
					
						v2.1.3
					
				
					
						v2.2.0
					
				
					
						v2.2.0rc1
					
				
					
						v2.2.0rc2
					
				
					
						v2.3.0
					
				
					
						v2.3.0rc1
					
				
					
						v2.3.0rc2
					
				
					
						v2.3.0rc3
					
				
					
						v2.3.1
					
				
					
						v2.3.1rc1
					
				
					
						v2.3.1rc2
					
				
					
						v2.3.1rc3
					
				
					
						v2.3.2
					
				
					
						v2.3.2rc1
					
				
					
						v2.3.2rc2
					
				
					
						v2.3.2rc3
					
				
					
						v2.3.2rc4
					
				
					
						v2.3.2rc5
					
				
					
						v2.3.3
					
				
					
						v2.4.0
					
				
					
						v2.4.0rc1
					
				
					
						v2.4.0rc2
					
				
					
						v2.4.0rc3
					
				
					
						v2.4.0rc4
					
				
					
						v2.4.0rc5
					
				
					
						v2.4.1
					
				
					
						v2.4.1rc1
					
				
					
						v2.4.1rc2
					
				
					
						v2.4.1rc3
					
				
					
						v2.4.1rc4
					
				
					
						v2.4.2
					
				
					
						v2.4.2rc1
					
				
					
						v2.4.2rc2
					
				
					
						v2.4.2rc3
					
				
					
						v2.4.3
					
				
					
						v2.4.3rc1
					
				
					
						v2.4.3rc2
					
				
					
						v2.4.3rc3
					
				
					
						v2.4.4
					
				
					
						v2.4.5
					
				
					
						v2.5.0
					
				
					
						v2.5.0rc1
					
				
					
						v2.5.0rc2
					
				
					
						v2.5.1
					
				
					
						v2.5.2
					
				
					
						v2.6.0
					
				
					
						v2.6.0rc1
					
				
					
						v2.6.0rc2
					
				
					
						v2.6.0rc3
					
				
					
						v2.6.0rc4
					
				
					
						v2.6.1
					
				
					
						v2.6.2
					
				
					
						v2.6.3
					
				
					
						v2.6.4
					
				
					
						v2.6.5
					
				
					
						v2.7.0
					
				
					
						v2.7.0rc1
					
				
					
						v2.7.0rc2
					
				
					
						v2.7.0rc3
					
				
					
						v2.7.1
					
				
					
						v2.7.2
					
				
					
						v2.7.3
					
				
					
						v2.7.4
					
				
					
						v2.8.0
					
				
					
						v2.8.0rc1
					
				
					
						v2.8.0rc2
					
				
					
						v2.8.0rc3
					
				
					
						v2.8.1
					
				
					
						v2.8.2
					
				
					
						v2.8.3
					
				
					
						v2.8.4
					
				
					
						v2.9.0
					
				
					
						v2.9.0rc1
					
				
					
						v2.9.0rc2
					
				
					
						v2.9.1
					
				
					
						v2.9.2
					
				
					
						v2.9.3
					
				
					
						v2.9.4
					
				
					
						v3.0.0
					
				
					
						v3.0.0rc1
					
				
					
						v3.0.0rc2
					
				
					
						v3.0.0rc3
					
				
					
						v3.0.1
					
				
					
						v3.0.2
					
				
					
						v3.1.0
					
				
					
						v3.1.0rc1
					
				
					
						v3.1.0rc2
					
				
					
						v3.1.1
					
				
					
						v3.1.2
					
				
					
						v3.1.3
					
				
					
						v3.1.4
					
				
					
						v3.1.5
					
				
					
						v3.2.0
					
				
					
						v3.2.0rc1
					
				
					
						v3.2.0rc2
					
				
					
						v3.2.1
					
				
					
						v3.2.2
					
				
					
						v3.3.0
					
				
					
						v3.3.0rc1
					
				
					
						v3.3.0rc2
					
				
					
						v3.3.0rc3
					
				
					
						v3.3.1
					
				
					
						v3.3.2
					
				
					
						v3.3.3
					
				
					
						v3.4.0
					
				
					
						v3.4.0rc1
					
				
					
						v3.4.0rc2
					
				
					
						v3.4.1
					
				
					
						v3.4.10
					
				
					
						v3.4.2
					
				
					
						v3.4.3
					
				
					
						v3.4.4
					
				
					
						v3.4.5
					
				
					
						v3.4.6
					
				
					
						v3.4.7
					
				
					
						v3.4.8
					
				
					
						v3.4.9
					
				
					
						v3.5.0
					
				
					
						v3.5.0rc1
					
				
					
						v3.5.0rc2
					
				
					
						v3.5.0rc3
					
				
					
						v3.5.1
					
				
					
						v3.5.10
					
				
					
						v3.5.11
					
				
					
						v3.5.12
					
				
					
						v3.5.13
					
				
					
						v3.5.14
					
				
					
						v3.5.15
					
				
					
						v3.5.16
					
				
					
						v3.5.17
					
				
					
						v3.5.18
					
				
					
						v3.5.19
					
				
					
						v3.5.2
					
				
					
						v3.5.3
					
				
					
						v3.5.4
					
				
					
						v3.5.5
					
				
					
						v3.5.6
					
				
					
						v3.5.7
					
				
					
						v3.5.8
					
				
					
						v3.5.9
					
				
					
						v4.0.0
					
				
					
						v4.0.0rc1
					
				
					
						v4.0.0rc2
					
				
					
						v4.0.0rc3
					
				
					
						v4.0.0rc4
					
				
					
						v4.0.1
					
				
					
						v4.0.10
					
				
					
						v4.0.11
					
				
					
						v4.0.12
					
				
					
						v4.0.13
					
				
					
						v4.0.14
					
				
					
						v4.0.15
					
				
					
						v4.0.2
					
				
					
						v4.0.3
					
				
					
						v4.0.4
					
				
					
						v4.0.5
					
				
					
						v4.0.6
					
				
					
						v4.0.7
					
				
					
						v4.0.8
					
				
					
						v4.0.9
					
				
					
						v4.1.0
					
				
					
						v4.1.0rc1
					
				
					
						v4.1.0rc2
					
				
					
						v4.1.0rc3
					
				
					
						v4.1.1
					
				
					
						v4.1.10
					
				
					
						v4.1.11
					
				
					
						v4.1.12
					
				
					
						v4.1.13
					
				
					
						v4.1.14
					
				
					
						v4.1.15
					
				
					
						v4.1.16
					
				
					
						v4.1.17
					
				
					
						v4.1.18
					
				
					
						v4.1.19
					
				
					
						v4.1.2
					
				
					
						v4.1.20
					
				
					
						v4.1.21
					
				
					
						v4.1.22
					
				
					
						v4.1.23
					
				
					
						v4.1.24
					
				
					
						v4.1.25
					
				
					
						v4.1.3
					
				
					
						v4.1.4
					
				
					
						v4.1.5
					
				
					
						v4.1.6
					
				
					
						v4.1.7
					
				
					
						v4.1.8
					
				
					
						v4.1.9
					
				
					
						v4.2.0
					
				
					
						v4.2.0-beta1
					
				
					
						v4.2.0-beta2
					
				
					
						v4.2.0-beta3
					
				
					
						v4.2.0-rc1
					
				
					
						v4.2.0-rc2
					
				
					
						v4.2.1
					
				
					
						v4.2.10
					
				
					
						v4.2.11
					
				
					
						v4.2.12
					
				
					
						v4.2.13
					
				
					
						v4.2.14
					
				
					
						v4.2.15
					
				
					
						v4.2.16
					
				
					
						v4.2.17
					
				
					
						v4.2.18
					
				
					
						v4.2.19
					
				
					
						v4.2.2
					
				
					
						v4.2.20
					
				
					
						v4.2.21
					
				
					
						v4.2.22
					
				
					
						v4.2.23
					
				
					
						v4.2.24
					
				
					
						v4.2.25
					
				
					
						v4.2.26
					
				
					
						v4.2.27
					
				
					
						v4.2.3
					
				
					
						v4.2.4
					
				
					
						v4.2.5
					
				
					
						v4.2.6
					
				
					
						v4.2.7
					
				
					
						v4.2.8
					
				
					
						v4.2.9
					
				
					
						v4.3.0
					
				
					
						v4.3.0-beta.1
					
				
					
						v4.3.0-beta.2
					
				
					
						v4.3.0-rc.1
					
				
					
						v4.3.1
					
				
					
						v4.3.10
					
				
					
						v4.3.11
					
				
					
						v4.3.12
					
				
					
						v4.3.13
					
				
					
						v4.3.14
					
				
					
						v4.3.2
					
				
					
						v4.3.3
					
				
					
						v4.3.4
					
				
					
						v4.3.5
					
				
					
						v4.3.6
					
				
					
						v4.3.7
					
				
					
						v4.3.8
					
				
					
						v4.3.9
					
				
					
						v4.4.0
					
				
					
						v4.4.0-beta.1
					
				
					
						v4.4.0-beta.2
					
				
					
						v4.4.0-rc.1
					
				
					
						v4.4.1
					
				
					
						v4.4.2
					
				
					
						v4.4.3
					
				
					
						v4.4.4
					
				
					
						v4.4.5
					
				
					
						v4.4.6
					
				
					
						v4.4.7
					
				
					
						v4.4.8
					
				
					
						v4.5.0-beta.1
					
				
					
						v4.5.0-beta.2
					
				
					
						v4.5.0-rc.1
					
				
					
						v4.5.0-rc.2
					
				
			
		${ noResults }
		
	
		
			5 Commits (aafe55af8110a7005eed6d8fc9b918f74acac561)
		
	
	
		
	
	| Author | SHA1 | Message | Date | 
|---|---|---|---|
| 
							
							
								 | 
						0717d9b3e6 | 
							
							
								
								Set snowflake IDs for backdated statuses (#5260)
							
							
							
							
							
							
							
							- Rename Mastodon::TimestampIds into Mastodon::Snowflake for clarity - Skip for statuses coming from inbox, aka delivered in real-time - Skip for statuses that claim to be from the future  | 
						
							8 years ago | 
| 
							
							
								 | 
						eb5ac23434 | 
							
							
								
								Clean up code style of Mastodon::TimestampId module (#5232)
							
							
							
							
							
							
							
							* Clean up code style of Mastodon::TimestampId module * Update brakeman config  | 
						
							8 years ago | 
| 
							
							
								 | 
						468523f4ad | 
							
							
								
								Non-Serial ("Snowflake") IDs (#4801)
							
							
							
							
							
							
							
							* Use non-serial IDs
This change makes a number of nontrivial tweaks to the data model in
Mastodon:
* All IDs are now 8 byte integers (rather than mixed 4- and 8-byte)
* IDs are now assigned as:
  * Top 6 bytes: millisecond-resolution time from epoch
  * Bottom 2 bytes: serial (within the millisecond) sequence number
  * See /lib/tasks/db.rake's `define_timestamp_id` for details, but
    note that the purpose of these changes is to make it difficult to
    determine the number of objects in a table from the ID of any
    object.
* The Redis sorted set used for the feed will have values used to look
  up toots, rather than scores. This is almost always the same as the
  existing behavior, except in the case of boosted toots. This change
  was made because Redis stores scores as double-precision floats,
  which cannot store the new ID format exactly. Note that this doesn't
  cause problems with sorting/pagination, because ZREVRANGEBYSCORE
  sorts lexicographically when scores are tied. (This will still cause
  sorting issues when the ID gains a new significant digit, but that's
  extraordinarily uncommon.)
Note a couple of tradeoffs have been made in this commit:
* lib/tasks/db.rake is used to enforce many/most column constraints,
  because this commit seems likely to take a while to bring upstream.
  Enforcing a post-migrate hook is an easier way to maintain the code
  in the interim.
* Boosted toots will appear in the timeline as many times as they have
  been boosted. This is a tradeoff due to the way the feed is saved in
  Redis at the moment, but will be handled by a future commit.
This would effectively close Mastodon's #1059, as it is a
snowflake-like system of generating IDs. However, given how involved
the changes were simply within Mastodon, it may have unexpected
interactions with some clients, if they store IDs as doubles
(or as 4-byte integers). This was a problem that Twitter ran into with
their "snowflake" transition, particularly in JavaScript clients that
treated IDs as JS integers, rather than strings. It therefore would be
useful to test these changes at least in the web interface and popular
clients before pushing them to all users.
* Fix JavaScript interface with long IDs
Somewhat predictably, the JS interface handled IDs as numbers, which in
JS are IEEE double-precision floats. This loses some precision when
working with numbers as large as those generated by the new ID scheme,
so we instead handle them here as strings. This is relatively simple,
and doesn't appear to have caused any problems, but should definitely
be tested more thoroughly than the built-in tests. Several days of use
appear to support this working properly.
BREAKING CHANGE:
The major(!) change here is that IDs are now returned as strings by the
REST endpoints, rather than as integers. In practice, relatively few
changes were required to make the existing JS UI work with this change,
but it will likely hit API clients pretty hard: it's an entirely
different type to consume. (The one API client I tested, Tusky, handles
this with no problems, however.)
Twitter ran into this issue when introducing Snowflake IDs, and decided
to instead introduce an `id_str` field in JSON responses. I have opted
to *not* do that, and instead force all IDs to 64-bit integers
represented by strings in one go. (I believe Twitter exacerbated their
problem by rolling out the changes three times: once for statuses, once
for DMs, and once for user IDs, as well as by leaving an integer ID
value in JSON. As they said, "If you’re using the `id` field with JSON
in a Javascript-related language, there is a very high likelihood that
the integers will be silently munged by Javascript interpreters. In most
cases, this will result in behavior such as being unable to load or
delete a specific direct message, because the ID you're sending to the
API is different than the actual identifier associated with the
message." [1]) However, given that this is a significant change for API
users, alternatives or a transition time may be appropriate.
1: https://blog.twitter.com/developer/en_us/a/2011/direct-messages-going-snowflake-on-sep-30-2011.html
* Restructure feed pushes/unpushes
This was necessary because the previous behavior used Redis zset scores
to identify statuses, but those are IEEE double-precision floats, so we
can't actually use them to identify all 64-bit IDs. However, it leaves
the code in a much better state for refactoring reblog handling /
coalescing.
Feed-management code has been consolidated in FeedManager, including:
* BatchedRemoveStatusService no longer directly manipulates feed zsets
* RemoveStatusService no longer directly manipulates feed zsets
* PrecomputeFeedService has moved its logic to FeedManager#populate_feed
(PrecomputeFeedService largely made lots of calls to FeedManager, but
didn't follow the normal adding-to-feed process.)
This has the effect of unifying all of the feed push/unpush logic in
FeedManager, making it much more tractable to update it in the future.
Due to some additional checks that must be made during, for example,
batch status removals, some Redis pipelining has been removed. It does
not appear that this should cause significantly increased load, but if
necessary, some optimizations are possible in batch cases. These were
omitted in the pursuit of simplicity, but a batch_push and batch_unpush
would be possible in the future.
Tests were added to verify that pushes happen under expected conditions,
and to verify reblog behavior (both on pushing and unpushing). In the
case of unpushing, this includes testing behavior that currently leads
to confusion such as Mastodon's #2817, but this codifies that the
behavior is currently expected.
* Rubocop fixes
I could swear I made these changes already, but I must have lost them
somewhere along the line.
* Address review comments
This addresses the first two comments from review of this feature:
https://github.com/tootsuite/mastodon/pull/4801#discussion_r139336735
https://github.com/tootsuite/mastodon/pull/4801#discussion_r139336931
This adds an optional argument to FeedManager#key, the subtype of feed
key to generate. It also tests to ensure that FeedManager's settings are
such that reblogs won't be tracked forever.
* Hardcode IdToBigints migration columns
This addresses a comment during review:
https://github.com/tootsuite/mastodon/pull/4801#discussion_r139337452
This means we'll need to make sure that all _id columns going forward
are bigints, but that should happen automatically in most cases.
* Additional fixes for stringified IDs in JSON
These should be the last two. These were identified using eslint to try
to identify any plain casts to JavaScript numbers. (Some such casts are
legitimate, but these were not.)
Adding the following to .eslintrc.yml will identify casts to numbers:
~~~
  no-restricted-syntax:
  - warn
  - selector: UnaryExpression[operator='+'] > :not(Literal)
    message: Avoid the use of unary +
  - selector: CallExpression[callee.name='Number']
    message: Casting with Number() may coerce string IDs to numbers
~~~
The remaining three casts appear legitimate: two casts to array indices,
one in a server to turn an environment variable into a number.
* Only implement timestamp IDs for Status IDs
Per discussion in #4801, this is only being merged in for Status IDs at
this point. We do this in a migration, as there is no longer use for
a post-migration hook. We keep the initialization of the timestamp_id
function as a Rake task, as it is also needed after db:schema:load (as
db/schema.rb doesn't store Postgres functions).
* Change internal streaming payloads to stringified IDs as well
This is equivalent to 
							
						 | 
						
							8 years ago | 
| 
							
							
								 | 
						9ead3d1cdb | 
							
							
								
								[nanobox] Adjustments for Nanobox development (#3295)
							
							
							
							
							
							
							
							Because Nanobox doesn't run data components in the same container as the code, there are a few tweaks that need to be made in the configuration to get WebPack to work properly in development mode. The same differences lead to needing to use `DATABASE_URL` by default in the `.env` file for Rails to work correctly. Limitations of our `.env` loader for Node.js mean the `.env` file needs to be compiled everywhere in order to work, so we compile it in development, now, too. Also, all the `.env.production` tweaks have been consolidated into a single command. Finally, since Nanobox actually creates the database when it sets up the database server, using the existence of the database alone to determine whether to migrate or setup is insufficient. So we add a condition to `rake db:migrate:setup` to check whether any migrations have run - if the database doesn't exist yet, `db:setup` will be called; if it does, but no migrations have been run, `db:migrate` and `db:seed` are called instead (the same basic idea as what `db:setup` does, but it skips `db:create`, which will only cause problems with an existing DB); otherwise, only `db:migrate` is called. None of these changes should affect development, and all are designed not to interfere with existing behaviors in other environments.  | 
						
							9 years ago | 
| 
							
							
								 | 
						256e3adc1d | 
							
							
								
								Add Support for Nanobox (#1709)
							
							
							
							
							
							
							
							* Nanobox Support
- Added support for running Mastodon using Nanobox, both for local development, and for deployment to production
- Dev mode tested and is working properly
- Deployment is undergoing test as of this writing. If it works, this line will be amended to state success; if not, one or more subsequent commits will provide fixes.
* [nanobox] Resolve Deploy Issues
Everything seems to work except routing to the streaming API. Will investigate with the Nanobox staff and make fix commits if needed.
Changes made:
- Also need `NODE_ENV` in production
- Node runs on `:4000`
- Use `envsubst` to commit `.env.production` values, since `dotEnv` packages don't always support referencing other variables
- Can't precompile assets after `transform` hook, but do this locally so it only has to be done once.
- Rails won't create `production.log` on its own, so we do this ourselves.
- Some `start` commands run from `/data/` for some reason, so use absolute paths in command arguments
* [nanobox] Update Ruby version
* [nanobox] Fix db.rake Ruby code style issues
* [nanobox] Minor Fixes
Some minor adjustments to improve functionality:
- Fixed routing to `web.stream` instances
- Adjust `.env.nanobox` to properly generate a default `SMTP_FROM_ADDRESS` via `envsubst`
- Update Nginx configs to properly support the needed HTTP version and headers for proper functionality (the streaming API doesn't work without some of these settings in place)
* [nanobox] Move usage info to docs repo
* [nanobox] Updates for 1.2.x
- Need to leave out `pkg-config` since Nanobox deploys without Ruby's headers - create a gem group to exclude the gem during Nanobox installs, but allow it to remain part of the default set otherwise
- Update cron jobs to cover new/updated Rake tasks
- Update `.env.nanobox` to include latest defaults and additions
* [nanobox] Fix for nokogumbo, added in 1.3.x
Apparently, nokogumbo (pulled in by sanitize, added with `OEmbed Support for PreviewCard` (#2337) - 
							
						 | 
						
							9 years ago |