Skip to content

Conversation

@injoongy
Copy link
Contributor

Change Summary

A user reported that when using the GitHub integration to launch their app, it kept failing because it kept prompting for Tigris bucket creation and getting stuck on the terms of service agreement. Deploying/launching through flyctl was unaffected, and worked fine.

What and Why:
This was failing in the scanner/rails.go file. We had logic for checking a few different things about a user's Rails app, and if any were true, we'd automatically enable Tigris. They were:

  • aws-sdk-s3 in Gemfile/Gemfile.lock
  • :active_storage_attachments found in any db/migrate/*.rb
  • config/storage.yml exists, then parse and look for service: S3
  • sqlite3 being present in the Dockerfile and SKIP_EXTENSIONS being unset

The user sent over their Dockerfile, which had sqlite3 in it, and they also confirmed that they had old migration files that related to Active Storage. I'm fairly confident the presence of sqlite3 is what's biting them here (I'm less sure about the Active Storage stuff).

I've added changes here to try and correct these issues:

  • Removed the os.Getenv("SKIP_EXTENSIONS") conditional line so that Tigris isn't enabled automatically if that env var isn't set (and I'd assume it's not set for most people).
  • Added a nested conditional to only enable Tigris if Active Storage is currently not local-only.
  • Updated logic to parse YAML a little better.

Screenshots:

I was able to reproduce the issue with a starter Rails app:
image

Stop inferring object storage from Dockerfile sqlite3 package presence, which caused false positives in GitHub launch flows. Refine Active Storage migration detection to skip object storage when production.rb explicitly uses local/test storage, and make storage.yml S3 detection robust across YAML map decode shapes while still ignoring commented entries.
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 this pull request may close these issues.

1 participant