Rebuild failed S3 rake aborted

AI-generated summary

A user, AntiMetaman, reported a rebuild failure after updating Discourse, triggered by a recent JS->Ember change. The issue stemmed from an S3-related rake task that incorrectly returned values, causing the build to abort. IAmGav pointed to a recent PR (#14802) as the source, and cvx quickly submitted a fix in PR #14865, which martin merged. However, the rebuild still failed for AntiMetaman, prompting Simon_Manning to identify the root cause: the rake task’s logic was still flawed. cvx issued a corrected PR (#14874), but AntiMetaman continued to experience issues. Simon_Manning clarified that the fix hadn’t yet reached the tests-passed branch, and advised waiting for tests to complete (indicated by a green checkmark or red cross). cvx confirmed the fix was not yet in tests-passed. Eventually, AntiMetaman confirmed the rebuild succeeded, indicating the fix had propagated and resolved the issue.

Ok so my discourse has been running fine and I was on the latest version when someone told me that the JS-> Ember got added, so I need to rebuild.

http://forum.duelistsunite.org/NjA5ZGZhNjY4NzkxZTI3.txt

No changes were made. I simply did a rebuild. The app.yml has no changes. No additions to plugins.

That’s my discourse-doctor log.

2 Likes

this was recently merged

@cvx @martin

2 Likes

Thank you for reporting this! I opened a PR with a fix: FIX: Don't fail if `s3_install_cors_rule` is off by cvx · Pull Request #14865 · discourse/discourse · GitHub

4 Likes

Thank you, please let me know when it is merged and I can try to rebuild.

1 Like

Just waiting on Martin to review the PR.

Apologies, I’ve merged the PR now.

3 Likes

I’ve ran a rebuild but it still fails:

2 Likes

Any advice or updates on this would be appreciated.

1 Like

The error suggests that rake tasks cannot return so I think the merged fix referenced earlier is incorrect. I don’t have an environment set up to do any testing or create a pull request but I think using the following instead would fix this. (cc @martin)

Replacing lines 180 to 187:

  if !result
    puts "Skipping"
  else
    puts "Assets rules status: #{result[:assets_rules_status]}."
    puts "Backup rules status: #{result[:backup_rules_status]}."
    puts "Direct upload rules status: #{result[:direct_upload_rules_status]}."
  end
2 Likes

My bad! Fixed this (and other rake tasks) in FIX: `LocalJumpError` in rake tasks by cvx · Pull Request #14874 · discourse/discourse · GitHub

3 Likes

I’m afraid no dice yet. This is after the above merge.

1 Like

Note that rebuilding right now (at time of writing) will still fail if you’re on tests-passed as the tests haven’t completed yet. If you look at the commit page, you’ll see an orange dot to the left of the title indicating that the tests are still in progress:

When that changes to a green tick or (more likely) a red cross, the tests are complete. Then you can rebuild. (An experimental test will probably fail, hence the red cross, but that doesn’t affect tests-passed.)

Edit: Looking at the tests-passed branch as @cvx suggests is more useful. Looks like it’s good to go now.

3 Likes

It hasn’t made it yet to the tests-passed branch: GitHub - discourse/discourse at tests-passed · GitHub

4 Likes

Happy to report that it works!

7 Likes