Skip to content
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

MONGOID-5656 - Fix broken FLE spec in mongoid/tasks/database_rake_spec #5690

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

johnnyshields
Copy link
Contributor

@johnnyshields johnnyshields commented Aug 27, 2023

I am pretty sure this spec related to FLE is broken and Mongoid is skipping it in test runs.

This PR does not fix the missed spec run (I will raise a separate PR which adds it into Github actions), but does fix the spec itself.

You can see the failure here: https://github.com/tablecheck/mongoid-ultra/actions/runs/5989956616/job/16246745994

There are two problems:

  1. The DB client for encrypted is not configured correctly.
  2. OptionParser#order! is choking on RSpec's default --pattern option. This might be somewhat environment specific, but AFAIK RSpec injects this automatically.

@johnnyshields johnnyshields changed the title Fix broken mongoid/tasks/database_rake_spec Fix broken FLE spec in mongoid/tasks/database_rake_spec Aug 27, 2023
@johnnyshields johnnyshields changed the title Fix broken FLE spec in mongoid/tasks/database_rake_spec MONGOID-5656 - Fix broken FLE spec in mongoid/tasks/database_rake_spec Aug 27, 2023
@johnnyshields
Copy link
Contributor Author

johnnyshields commented Aug 27, 2023

@jamis @comandeo can you try running rspec spec/mongoid/tasks/database_rake_spec.rb with FLE options enabled locally? It appears to be breaking because it can't find the db client named encrypted. It appears that specs even like db:setup and db:test:prepare break when using FLE because they are trying to create indexes some model which uses client encrypted.

(Note the specs will succeed if you don't have FLE enabled.)

I think I'm out of my depth on this one.

@johnnyshields johnnyshields marked this pull request as draft August 27, 2023 12:57
@johnnyshields johnnyshields marked this pull request as ready for review November 9, 2023 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant