Setting DISCOURSE_S3_REGION: whatever no longer works

My rebuild with a Digital Ocean Spaces S3 setup started failing with this error:

, [2024-11-07T19:09:38.615466 #1]  INFO -- : > cd /var/www/discourse && sudo -E -u discourse bundle exec rake s3:upload_assets                                                   
rake aborted!                                                                                                                                                                     
ArgumentError: Cannot set dual-stack in combination with a custom endpoint. (ArgumentError)
                                                                                         
          raise ArgumentError, "Cannot set dual-stack in combination with a custom endpoint."                                                                                     
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-s3-1.143.0/lib/aws-sdk-s3/endpoint_provider.rb:34:in `resolve_endpoint'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-s3-1.143.0/lib/aws-sdk-s3/plugins/endpoints.rb:37:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-core-3.191.3/lib/seahorse/client/plugins/endpoint.rb:47:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-core-3.191.3/lib/aws-sdk-core/plugins/param_validator.rb:26:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/aws-sdk-s3-1.143.0/lib/aws-sdk-s3/plugins/sse_cpk.rb:24:in `call'

But omitting setting it to whatever makes the build fail like this:

                                                                                         
I, [2024-11-07T19:15:31.060936 #1]  INFO -- : > cd /var/www/discourse && sudo -E -u discourse bundle exec rake s3:upload_assets                                                   
ERROR: Ensure S3 is configured in config/discourse.conf or environment vars              
I, [2024-11-07T19:15:36.056204 #1]  INFO -- :                                            
                                                                                         
                                           

I found this:

and this:

Maybe S3_REGION should be cleared if an endpoint is set here?

@Falco I think this is in your wheelhouse.

2 posts were merged into an existing topic: Rebuild issue: [Cannot set dual-stack in combination with a custom endpoint.]