I, [2024-11-07T08:00:56.758061 #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."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && sudo -E -u discourse bundle exec rake s3:upload_assets failed with return #<Process::Status: pid 3349 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "cmd"=>["sudo -E -u discourse bundle exec rake s3:upload_assets", "sudo -E -u discourse bundle exec rake s3:expire_missing_assets"]}
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
567dc9e1f9a4e662de6024b8504915d8b6ef1ee2d9b4303af75323ba478679e4
I commented out these lines which makes the rebuild run successfully but the site stuck on splash I think because cannot load assets. Safe mode sameā¦
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?
EDIT: Oops. I thought Iād searched. Sorry Falco.
@martin usually what we do here is providing a GlobalSetting to disable the behavior that people running incompatible S3 clones can then opt-in to make it work.
IMO, the current behavior should stay as the default, but provide toggles to increase compatibility.
See prior art in DISCOURSE_S3_HTTP_CONTINUE_TIMEOUT, DISCOURSE_S3_INSTALL_CORS_RULE, etc.
Ah sorry my bad here everyone, these S3 clones always slip my mind. I actually had to fix this custom endpoint issue with Minio yesterday. I think the fix here can just to be never use dualstack if DISCOURSE_S3_ENDPOINT has been set since they are incompatible, and everyone here is seemingly using that.
Thatās because thereās a lot of stuff to keep in mind! And the spec tests, I think, would require those annoying stub_requests which I know I hate writing.
FWIW, that sounds right to me. And you could probably write tests for that that didntā require stubs for stub_requests.
This change has very likely caused a break to backups on several instances (with others not knowing that their instances arenāt backing up yet presumably).
That suggests to me the specs are not broad enough to capture all the real use cases and changes are passing that shouldnāt have?