-
Notifications
You must be signed in to change notification settings - Fork 371
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
[#320] Improve docker support and developer experience #323
Merged
delano
merged 23 commits into
develop
from
320-better-dx-for-deploying-via-docker-image
Apr 30, 2024
Merged
[#320] Improve docker support and developer experience #323
delano
merged 23 commits into
develop
from
320-better-dx-for-deploying-via-docker-image
Apr 30, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rename config variables for host, SSL, Redis. Remove stathat integration. Update limits and descriptions. Fix typos and formatting issues. Remove unused incoming config.
Removed unused text configuration options and references to them from views and validation logic. The "paid_recipient_text" and "nonpaid_recipient_text" configuration values were no longer being utilized after removing support for distinguishing paid vs unpaid recipients. View and logic code was cleaned up to remove stray references. This simplifies configuration and avoids confusing or misleading strings being displayed to users.
Leave these to the redis tools.
This change updates the default port for the thin web server from 7143 to 3000 across config files and code examples. The original intention was to avoid clashing with other services running locally. With the advent of Container Technology, that's less common than it used to be. The port was changed to align with common conventions for development webservers. Specifying a well-known port will make the application easier for new developers to run locally, without needing to manually configure the port number.
In a much earlier rendition, we made reference to Etherpad as being an inspiration for our collaboration. Even at that time, including the license wasn't necessary so removing it altogether now for posterity.
For v0.13.0-RC3 release and add GitHub Container Registry instructions
Added detailed Docker setup and management instructions for local dev
Standardized environment variable names in configuration files and documentation for easier use and understanding. Renamed `ONETIMESECRET_*` variables to shorter names like `HOST`, `REDIS_URL` for readability. Updated Dockerfile and README with new names. This avoids duplication and improves the user experience with a more consistent interface.
This change handles Redis connection errors more gracefully. It exits directly when a connection cannot be established, and logs the specific error types instead of a generic message. This will make debugging connection issues easier. - Rescue Redis::CannotConnectError and exit immediately with a specific log message including the error class - Rescue other errors and log detail including error class before exiting non-zero
This change updates the Gemfile to specify Ruby version 3.2 or higher as our project's minimum required version. Ruby 3 introduced performance improvements and new features that will benefit our application. By raising our baseline Ruby version, we can take advantage of these enhancements while still supporting the latest release series.
This change replaces deprecated Redis pipelined calls with the modern multi/exec pipeline API when generating one-time values. By batching the sadd operations instead of sending individually, this improves throughput and latency of value generation especially under high load.
delano
added
dependencies
Pull requests that update a dependency file
documentation
tech debt
ruby3
Related to ruby version 3+
Bug fix
dx
Developer experience working with onetimesecret
labels
Apr 29, 2024
This change removes the social media follow links and versioning information from the site footer, as they were no longer relevant.
Set RUBY_YJIT_ENABLE to reduce Docker build time by enabling the Ruby JIT compiler. Build caching will now make incremental changes faster.
The monitored_link and display_icons view configuration settings were removed as they are no longer used. The settings controlled links and icons that were part of the previous UI but have since been removed.
Added return statements to email sending code to avoid exceptions on errors. This ensures attempted message sends will not cause further failures if an error occurs.
The logging code was updated to handle anonymous customers differently than authenticated ones when logging rate limit errors. For anonymous requests, the obscured customer ID is replaced with the string "anonymous" instead of attempting to obscure an empty email address. This avoids exceptions and provides clearer logs when anonymous users hit API limits.
delano
changed the title
Update config, normalize text, remove scripts, improve Redis handling, upgrade Ruby version, fix Redis pipeline usage, and more
[#320] Improve docker support and developer experience
Apr 30, 2024
Adds note about why we maintain support for EOL'd versions of Ruby. This also fixes the Github Action workflow failures.
PR Review
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug fix
bug
dependencies
Pull requests that update a dependency file
documentation
dx
Developer experience working with onetimesecret
Review effort [1-5]: 3
ruby3
Related to ruby version 3+
tech debt
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update config, normalize text, remove scripts, improve Redis handling, upgrade Ruby version, fix Redis pipeline usage, and more.
This pull request includes multiple commits that make various changes to the codebase. The changes include updating the config to rename variables and remove unused integration, normalizing text configuration, removing deprecated scripts, changing the default application port, removing references to deprecated config settings, removing an outdated license file, updating the README, updating environment variable names and documentation for consistency, improving Redis connection handling, upgrading the Ruby version requirement, and fixing Redis pipeline usage. These changes aim to improve the codebase, enhance performance, and ensure better maintainability.