AI with with new quota faills to rebuild

I guess this is more or less bug thingy, but what so ever. Few moments ago rebuilding failed. Without Discourse AI it went thru.

This was the first strange one, but I don’t think it’s relevant.


I, [2025-01-21T10:15:39.800894 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle install --jobs $(($(nproc) - 1)) --retry 3'
WARN: Unresolved or ambiguous specs during Gem::Specification.reset:
      stringio (>= 0)
      Available/installed versions of this gem:
      - 3.1.2
      - 3.1.1
WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'
Please report a bug if this causes problems.

Here it starts

I, [2025-01-21T10:16:08.572988 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
Plugin name is 'discourse-microsoft-auth', but plugin directory is named 'discourse-plugin-office365-auth'
rake aborted!
ActiveRecord::DuplicateMigrationNameError:  (ActiveRecord::DuplicateMigrationNameError)

Multiple migrations have the name EnablePgVectorExtension.

And lastly we got this lesser informative part:

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 990 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", "tag"=>"migrate", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap failed with exit code 1

I don’t think this is connected, but because this isn’t coming from themes, but plugins, and this started at same time — for me, anyway.

Solved shows two marks:

I would start by removing plugins to see when it starts working

20 minutes per plugin… I know so much it is not conflict with other AI-plugins. Testing that was over one hours downtime.

But sure, I’ll do it. And yet everything else works but DAI.

Now the job is done. I understand why it is how it is, but we need some other way to struggle with plugins. Sure, different containers, but…

Anyway. It is a conflict between Discourse AI, after the quota system came, and Discourse AI Topic Summary 🤖 — another must be disabled when rebuilding.

So, I leave you guys discussing with @merefield who will do and what.

Can you share any error please?

Not out of the box more than I had in OP.

Error is from Microsoft Auth?

Oh wait “stringio” … : :thinking:

Do you mean that directory name thing? Afaik it is totally meaningless and has been there ages.

I know so much that

  • I can’t rebuild if both are enabled
  • if only other is enabled and no matter wich one, any other plugins doesn’t matter, and I can rebuild
  • this started when DAI got its quota

Because I wrote my own AI plugins, I do not have an instance with both, so hard for me to repro.

That said, rebuilding my Production instance with AI Topic Summary to see if there is something odd.

This might be it … I’ll change the name!

I believe that was it, should be resolved now.

1 Like

It did.

Thanks!

1 Like

Great! FYI this was definitely my fault and not that of DAI.

I did a refactor release of AI Topic Summary just before which ironically didn’t have much to do with that migration, I just bundled it. The release added proper CI and Zeitwerk conformance.