Commit Graph

5512 Commits

Author SHA1 Message Date
Bruno Prieto cea43da13f Organize filter inputs by group, similar to fieldset
Menu tag is deprecated, li elements are only valid inside ul or ol elements
2025-03-13 22:36:12 +01:00
Mike Dalessio 9a75ca4986 Merge pull request #301 from basecamp/flavorjones-structured-log-tenant
Structured logs for controller actions now contain the tenant
2025-03-13 17:22:54 -04:00
Mike Dalessio e08f073d73 Structured logs for controller actions now contain the tenant 2025-03-13 17:21:31 -04:00
Bruno Prieto fdd3fb53c0 Label tag don't need a for attribute if it has a input as a children
Then input ids aren't required
2025-03-13 22:20:40 +01:00
Bruno Prieto 8a9d57e4c8 Show filter inputs for screen readers 2025-03-13 21:53:53 +01:00
Bruno Prieto bcda67e114 Div is not a valid parent for list of li elements 2025-03-13 21:25:26 +01:00
Bruno Prieto 4425e0d16a Hide bubbles for SR users for now 2025-03-13 21:24:30 +01:00
Mike Dalessio f4c7167316 Merge pull request #299 from basecamp/flavorjones-fix-assignment-notif-recip
fix: Send assignment notifications only to the assignee
2025-03-13 12:29:37 -04:00
Mike Dalessio 3e374f4661 fix: Send assignment notifications only to the assignee(s)
ref: https://37s.fizzy.37signals.com/buckets/693169850/bubbles/999008619
2025-03-13 12:16:47 -04:00
Kevin McConnell eabcc1d477 Use Docker Hub for deployments 2025-03-13 15:19:00 +00:00
Mike Dalessio 482aa90243 logging: suppress unstructured log lines 2025-03-13 09:46:14 -04:00
Mike Dalessio ed92687f4c logging: revert changes 2025-03-13 09:41:31 -04:00
Mike Dalessio 019a27787c logging: try just setting log level 2025-03-13 09:38:54 -04:00
Mike Dalessio 3c2e7b8ae3 logging: suppress log entries that are not structured
Borrowed from the BC4 configuration.
2025-03-13 09:31:11 -04:00
Mike Dalessio d1329e7985 dep: update active_record_tenanted to fix console issue
ref: https://37s.fizzy.37signals.com/buckets/693169862/bubbles/999008674
2025-03-12 13:26:09 -04:00
Mike Dalessio 325c49ec2a doc: adding beta+production tenant URLs to the README 2025-03-12 12:18:28 -04:00
Mike Dalessio 31bbb6c76f deploy: keeping beta to one tenant 2025-03-12 12:14:53 -04:00
Mike Dalessio a337294650 deploy: update beta hosts for multi-tenancy 2025-03-12 11:56:58 -04:00
Mike Dalessio 5ea619fb8a doc: update README with the development-tenant URL
and a note about db:fixtures:load
2025-03-12 10:51:34 -04:00
Mike Dalessio dcb8d52dcd dep: bump active_record-tenanted for a db:fixture:load fix 2025-03-12 09:54:39 -04:00
Mike Dalessio 52a1b49155 Merge pull request #295 from basecamp/flavorjones-update-ar-tenanted-for-trim-job-fix
dep: update active_record-tenanted
2025-03-12 09:37:53 -04:00
Mike Dalessio 11df869dfc dep: update active_record-tenanted
for the fix in https://github.com/basecamp/active_record-tenanted/pull/45
2025-03-12 09:34:03 -04:00
Mike Dalessio eb96412465 The 404 page is in the new Rails style, and lists the tenants 2025-03-12 08:40:11 -04:00
Mike Dalessio bb5ed28130 kamal-proxy: add fizzy.37signals.com so we can return 404
instead of the TLD handshake error now seen
2025-03-12 08:29:40 -04:00
Mike Dalessio dbe783c182 Final version of the tenancy migration script. 2025-03-12 08:27:30 -04:00
Mike Dalessio a945f29e29 Merge pull request #279 from basecamp/flavorjones-tenant-v4
Introduce tenanting (v3)
2025-03-12 08:26:57 -04:00
Mike Dalessio d8075b74b7 hack: to handle tenantname.fizzy.37signals.com
Let's do the needful thing for now, and clean it up once the gem has
exposed the tenant resolver as a config in a cleaner way.
2025-03-12 07:53:31 -04:00
Mike Dalessio 300dffd376 Script and configuration for a multi-tenant migration
ref: https://3.basecamp.com/2914079/buckets/37331921/messages/8422006338

The script takes advantage of the fact that we can bind to the
existing untenanted database by adding it explicitly (and temporarily)
as a readonly shard to the database.yml, and so in the script
with_original_db is connected to the original database.

storage/tenants/%{tenant}/ is now the root directory for all
state stored for a particular tenant, including active storage and the
database.

We leave the existing files and production database in place after the
migration, in case we need to roll back (by reverting the code and
config).

We also don't do a granular active storage blob copy, since the
attachments are mostly on Account (and not on Bubble). Instead we
hardlink the blobs on disk (so we don't take up additional space with
duplicates).

Finally, we're manually adding the kamal-proxy hosts to the deploy
file, so that we can generate letsencrypt certs for the
subdomains. This is only intended to be a short-term solution, we'll
want something like a wildcard cert before we go live.
2025-03-12 07:53:31 -04:00
Mike Dalessio 4af0fe01d6 Update recurring jobs to iterate over all tenants 2025-03-12 07:53:31 -04:00
Mike Dalessio ca77968e55 Work around Rails' shard swapping lock in the Solid Cache config
Because solid cache started using shard swapping when given a
`database:` key in https://github.com/rails/solid_cache/pull/219, and
Rails doesn't distinguish which database is being swapped and which
was locked.

Hopefully I can make a change upstream that will enable swap locking
only for a specific databases. Until then, let's just use a slightly
more verbose configuration to work around it.
2025-03-12 07:53:31 -04:00
Mike Dalessio d9ece38753 Make the application multi-tenant 2025-03-12 07:53:31 -04:00
Mike Dalessio b90cc9bd06 dep: bundle update rails and rack 2025-03-12 07:53:31 -04:00
Mike Dalessio 37c8ca1b65 dep: add active_record-tenanting 2025-03-12 07:53:28 -04:00
Kevin McConnell f50a880d6b Avoid double render in Avatars#show
After sending the conditional 304 response, we were still attempting to
render the response, which is unnecessary.
2025-03-12 09:05:50 +00:00
Mike Dalessio e0fa376d4f Update scoreable to return a large positive number when score==0 (#290)
Avoid infinite activity score orders

Items with a zero activity score were getting an activity sorting score
of -infinity, because we base the value on log2(score). Adjusting the
calculation avoids this edge case, by always basing the sorting score on
a non-zero number.

---------

Co-authored-by: Kevin McConnell <kevin@37signals.com>
2025-03-11 07:39:17 -04:00
Mike Dalessio 7420adb2c4 Merge pull request #288 from basecamp/flavorjones-20250310-bundle-update
dep: bundle update
2025-03-10 13:00:09 -04:00
Mike Dalessio 232e5e4ed2 lint: tell brakeman 7 to ignore the class eval in has_markdown 2025-03-10 12:56:36 -04:00
Mike Dalessio f1ec43db28 dep: bundle update
except Rails
2025-03-10 12:53:21 -04:00
Mike Dalessio 9c26633673 Inject the GITHUB_TOKEN secret into the container builder 2025-03-10 12:32:32 -04:00
Mike Dalessio 40256a4420 Merge pull request #249 from basecamp/dependabot/bundler/net-imap-0.5.6
Bump net-imap from 0.5.5 to 0.5.6
2025-03-10 12:20:07 -04:00
Mike Dalessio 2a4b85007d Merge pull request #286 from basecamp/dependabot/bundler/rack-3.1.11
Bump rack from 3.1.8 to 3.1.11
2025-03-10 12:19:38 -04:00
Mike Dalessio fa0f8fa2b1 Merge pull request #287 from basecamp/dependabot/bundler/uri-1.0.3
Bump uri from 1.0.2 to 1.0.3
2025-03-10 12:19:28 -04:00
Mike Dalessio f339105593 Merge pull request #285 from basecamp/flavorjones-structured-logging
Configure structured JSON logging
2025-03-10 12:19:19 -04:00
dependabot[bot] d3d4b4c85b Bump uri from 1.0.2 to 1.0.3
Bumps [uri](https://github.com/ruby/uri) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/ruby/uri/releases)
- [Commits](https://github.com/ruby/uri/compare/v1.0.2...v1.0.3)

---
updated-dependencies:
- dependency-name: uri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-10 16:16:53 +00:00
dependabot[bot] 9c6405e524 Bump net-imap from 0.5.5 to 0.5.6
Bumps [net-imap](https://github.com/ruby/net-imap) from 0.5.5 to 0.5.6.
- [Release notes](https://github.com/ruby/net-imap/releases)
- [Commits](https://github.com/ruby/net-imap/compare/v0.5.5...v0.5.6)

---
updated-dependencies:
- dependency-name: net-imap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-10 16:16:34 +00:00
dependabot[bot] 14ecae6aef Bump rack from 3.1.8 to 3.1.11
Bumps [rack](https://github.com/rack/rack) from 3.1.8 to 3.1.11.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/v3.1.8...v3.1.11)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-10 16:16:03 +00:00
Mike Dalessio 2756a0ebc1 ci: Set access token to pull from the private repo 2025-03-10 12:12:56 -04:00
Mike Dalessio 989600c590 Configure structured JSON logging
This configuration is emulating what we do in HEY.
2025-03-10 12:12:56 -04:00
Kevin McConnell 6f1d200316 Use fixed date as well as time in test
Otherwise this will be affected by DST.
2025-03-10 16:12:22 +00:00
Mike Dalessio d9c9166dfb Merge pull request #260 from basecamp/dependabot/bundler/nokogiri-1.18.3
Bump nokogiri from 1.18.1 to 1.18.3
2025-03-10 12:02:38 -04:00