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

mongodb: initial user creation #679

Merged
merged 5 commits into from
Mar 22, 2024

Conversation

samjwillis97
Copy link
Contributor

Addressing issue #672.

This allows the creation of an initial user with password in MongoDB.

@domenkozar
Copy link
Member

Nice! Could you write a little test so we can be aire it works?

See .test.sh files in other examples.

@samjwillis97
Copy link
Contributor Author

Sure can 😄

@samjwillis97
Copy link
Contributor Author

I've added a test for MongoDB with initial user creation, let me know if there are any other changes

@stig
Copy link
Contributor

stig commented Jun 23, 2023

I'm giving this a spin locally :-)

Copy link
Contributor

@stig stig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested this locally and it works for my use case 👍🏼

@samjwillis97
Copy link
Contributor Author

Thats great to hear, I'm glad

@domenkozar
Copy link
Member

It seems that the tests are stuck, maybe you can take a look?

@samjwillis97
Copy link
Contributor Author

I think its still in the build step.. the nscloud-arm64 failed whilst building 2 hours in

@samjwillis97
Copy link
Contributor Author

So it looks like it was the build step, both macos-latest and self-hosted, macOS tests passed, but the ubuntu-latest and nscloud-arm64 ran out of space whilst building 😕

@domenkozar
Copy link
Member

I pushed a fix to main, could you rebase and let's see if it works?

@samjwillis97
Copy link
Contributor Author

just rebased it, ready to give it another go 🤞

@samjwillis97
Copy link
Contributor Author

Looks like we're getting the same failures 😞
Would it be an option to build mongo out of the actions and push up to cachix? Although when there are changes to the mongo package this problem will arise again..

@domenkozar
Copy link
Member

Let's try giving it more space, could you add this action instead of my rm -rf /opt hack?

- name: Maximize build space
        uses: easimon/maximize-build-space@master
        with:
          remove-dotnet: true
          remove-android: true
          remove-codeql: true

@samjwillis97
Copy link
Contributor Author

Alright, thats in there now

@domenkozar
Copy link
Member

/Users/runner/work/_temp/01d09040-1cc8-4083-b06d-97ad163b6af8.sh: line 2: free: command not found

@domenkozar
Copy link
Member

Do you need help here?

@samjwillis97
Copy link
Contributor Author

I need to get my head back into this and have a look around with what we can do, I will let you know how I go

@samjwillis97
Copy link
Contributor Author

Finally getting back into this. Turns out the maximize-build-space action only support linux as mentioned in this issue easimon/maximize-build-space#7

It was the ubuntu-latest and nscloud-arm64 that have been running out of storage, so we could conditionally run the action for ubuntu-latest runners? This still doesn't solve for nscloud-arm64 which looks to start with 55GB space which I would have thought was plenty 😞

I'm also a bit confused about the ubuntu-latest runners because none of their tests passed either, but I'm unable to find a clear reason for the failure - the logs I have looked through are pretty clear, was it potentially caused by the actions being cancelled? or am I missing something?

@domenkozar
Copy link
Member

Maybe the issue is that $TMP or something gets filled in? Most likely if it happens during the build.

@domenkozar
Copy link
Member

Could you rebase and let's give it another go?

@domenkozar
Copy link
Member

@samjwillis97 could you rebase again please? :)

@samjwillis97
Copy link
Contributor Author

I'll give it a go today :)

@domenkozar
Copy link
Member

building '/nix/store/k5h9y3g5gs1r54wihhwpg1hi32yw7jp9-mongodb-6.0.12.drv'...
error: builder for '/nix/store/k5h9y3g5gs1r54wihhwpg1hi32yw7jp9-mongodb-6.0.12.drv' failed with exit code 2;
       last 10 log lines:
       > src/mongo/util/ctype.h:190:40: error: ‘kPrint’ is not a member of ‘mongo::ctype::detail’
       >   190 |     return detail::isMember(c, detail::kPrint);
       >       |                                        ^~~~~~
       > src/mongo/util/ctype.h: In function ‘constexpr bool mongo::ctype::isPunct(char)’:
       > src/mongo/util/ctype.h:193:40: error: ‘kPunct’ is not a member of ‘mongo::ctype::detail’
       >   193 |     return detail::isMember(c, detail::kPunct);
       >       |                                        ^~~~~~
       > scons: *** [build/nixos/mongo/db/query/analyze_regex.o] Error 1
       > scons: building terminated because of errors.
       > build/nixos/mongo/db/query/analyze_regex.o failed: Error 1
       For full logs, run 'nix log /nix/store/k5h9y3g5gs1r54wihhwpg1hi32yw7jp9-mongodb-6.0.12.drv'.

@domenkozar
Copy link
Member

Do you know if mongodb is fixed now?

@samjwillis97
Copy link
Contributor Author

I'm not sure.. I just had a quick look through nixpkgs issues and couldn't see any talk around mongodb 6 being broken, but it was bumped from 6.0.12 to 6.0.13 just 5 days ago

@domenkozar
Copy link
Member

Could you rebase, maybe it will finally build :)

@samjwillis97
Copy link
Contributor Author

We can only hope at this point 🤞

@domenkozar
Copy link
Member

@samjwillis97 is seems like you'll need to run pre-commit run -a

@domenkozar domenkozar merged commit bb1164f into cachix:main Mar 22, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants