-
Notifications
You must be signed in to change notification settings - Fork 2
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
📢 Announcement: aws-activejob-sqs 1.0.0 release and upgrade information 📢 #16
Comments
Thanks! We have this working in our staging environment WITHOUT Rails. Here's the steps we needed to do the upgrade.
Aws::ActiveJob::SQS.configure do |config|
config.queues = { default: { url: ENV['JOB_AWS_SQS_URL'] } }
end
Aws::ActiveJob::SQS::LambdaHandler.job_handler(event: event, context: context) |
Thank you for writing the migration guide. I have one piece of feedback regarding the poller executable name change. For my team, it would have been helpful to have a more gradual approach to changing the command name. Specifically, I would have preferred if you:
The reason is that we cannot always make the gem update and command name changes atomic in our deployment process. Having both commands available during the transition period would have made the migration smoother and safer. |
That's great feedback - thank you. |
What about a patch version to version 0? But it sounds like you've already completed the migration @ohbarye? Sorry about the rough edge. If that's the case, maybe no changes necessary. |
This breaking change doesn't seem that rough to me. Couldn't anyone just temporarily copy the executable into their project and name it whatever they want? Maybe I'm missing something. |
Ah, no, our migration has not yet been completed. We're still discussing how to update. I apologize for writing in a way that is difficult to understand.
Thank you for your suggestion! I would appreciate it if you could proceed in that way. |
Do you mean by creating a binstub of both Anyway, I wonder if total cost is lower if upstream temporarily provides compatibility than if all gem users try this kind of workaround. |
I was imagining copying the old executable into your project and giving it the new name. Your updated project could have the new executable with the new name. Both versions of your project would then launch from the same name. Hopefully there's a way to deploy your code and the gems they need at the same time. Your project might be more complicated however. |
I've released a new 0.x patch: 0.1.2 that has both the old and new executable names that should hopefully help make migrations easier. |
I'm delighted with that. Thank you! |
Describe the issue
We're happy to announce the 1.0 release of aws-activejob-sqs with the following new features:
retry_standard_errors
withpoller_error_handler
. (Aws::Rails::SqsActiveJob#execute captures StandardError which is too wide #6)See the updated README and API documentation for information on using the new features!
Breaking changes and migration guide
The 1.0 release contains a few breaking changes that may require code or configuration changes. If you are not ready to update, you can pin your version with `gem 'aws-activejob-sqs', '~> 0'. If you run into issues while upgrading, please feel free to open an issue or respond to this one.
Namespace change: Aws::Rails::SqsActiveJob → Aws::ActiveJob::SQS
The namespace has been changed to reflect the gem name and follow Ruby standards. For most users this should just require changing in code configuration from
Aws::Rails::SqsActiveJob.configure
toAws::ActiveJob::SQS.configure
.Poller Executable name change aws_sqs_active_job → aws_active_job_sqs
To better reflect the gem name and the new namespace, we've updated the poller executable's name to
aws_active_job_sqs
. Wherever you were starting your poller(s), you'll need to update to use the new name. Version 0.1.2 has both the old and new executable names to make migration easier.Default config file name: aws_sqs_active_job.yml → aws_active_job_sqs.yml
To better reflect the gem name and new namespace, we've updated the default config file name
when using rails to
config/aws_active_job_sqs.yml
orconfig/aws_active_job_sqs/<Rails.env>.yml
. You can either rename existingaws_sqs_active_job.yml
files or use theAWS_ACTIVE_JOB_SQS_CONFIG_FILE
environment variable to specify a different location.Queue url is now a subkey
With the introduction of queue specific configuration in 1.0, queue
url
must now be configured as a sub key on the queue:Or in code:
Changes in poller error handling: retry_standard_errors replaced with poller_error_handler
With the 1.0 release, error handling in the poller has been updated to be more flexible and to allow user configured error handlers. The
retry_standard_errors
configuration (and cli option) have been replaced by thepoller_error_handler
which allows user a user defined error handler to be called for any StandardErrors produced by job execution. The default behavior has changed from retrying StandardErrors raised during job execution to leaving the message on the queue and initiating shutdown of the poller. To change this behavior, configure apoller_error_handler
. For more information about error handling, see: READEME#Retry Behavior and Handling ErrorsOther module/class renames
Aws::ActiveJob::SQS::LambdaHandler.job_handler
.deduplicate_without
method used to configure deduplication keys on jobs has moved to its own module. You will now need toinclude Aws::ActiveJob::SQS::Deduplication
in jobs that usededupliate_without
.Links
https://github.com/aws/aws-activejob-sqs-ruby/blob/main/README.md
The text was updated successfully, but these errors were encountered: