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

nixos/gitea: fix mysql issue, add mysql socket auth, and add a nixos test #49814

Merged
merged 3 commits into from Nov 8, 2018

Conversation

aanderse
Copy link
Member

@aanderse aanderse commented Nov 6, 2018

Motivation for this change

My gitea instance has been crashing every few nights because the systemd service is assuming a postgresql database.

Things done
  • fixed the issue causing my gitea instance to crash on start sometimes because it is using a mysql database
  • added mysql socket authentication
  • added a nixos test for gitea
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

ping @disassembler @etu

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: gitea

Partial log (click to expand)

these paths will be fetched (14.81 MiB download, 63.53 MiB unpacked):
  /nix/store/7c7g2h30snvmw4a2wjspjgwal469x0k5-gitea-1.5.2-bin
  /nix/store/jcjcgvqznzm5lclckwswp1557fd64cna-gitea-1.5.2-data
copying path '/nix/store/jcjcgvqznzm5lclckwswp1557fd64cna-gitea-1.5.2-data' from 'https://cache.nixos.org'...
copying path '/nix/store/7c7g2h30snvmw4a2wjspjgwal469x0k5-gitea-1.5.2-bin' from 'https://cache.nixos.org'...
/nix/store/7c7g2h30snvmw4a2wjspjgwal469x0k5-gitea-1.5.2-bin

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: gitea

Partial log (click to expand)

code.gitea.io/gitea/routers/api/v1/repo
code.gitea.io/gitea/routers
code.gitea.io/gitea/routers/api/v1/user
code.gitea.io/gitea/routers/api/v1/admin
code.gitea.io/gitea/routers/api/v1/org
code.gitea.io/gitea/routers/admin
code.gitea.io/gitea/routers/api/v1
code.gitea.io/gitea/routers/routes
builder for '/nix/store/64ay7qkdrv53b2bsrz2n0bfq22x0a3zp-gitea-1.5.2.drv' failed with exit code 46
error: build of '/nix/store/64ay7qkdrv53b2bsrz2n0bfq22x0a3zp-gitea-1.5.2.drv' failed

@aanderse
Copy link
Member Author

aanderse commented Nov 6, 2018

Note failure on aarch64-linux isn't unexpected... #45968

Anyone know why that isn't unexpected? Can we fix it?

@GrahamcOfBorg test gitea

@etu
Copy link
Contributor

etu commented Nov 6, 2018

@aanderse I was thinking, not related to the aarch64-failure. But maybe we should have a test machine in the same test file for postgres as well? Just to make sure that both works?

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: gitea

Partial log (click to expand)

/nix/store/7c7g2h30snvmw4a2wjspjgwal469x0k5-gitea-1.5.2-bin

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: gitea

Partial log (click to expand)

        /nix/store/2jz7z8f6xnx1cv8vr6fmf21y96fg86ri-go-1.11/share/go/src/cmd/compile/internal/gc/pgen.go:223 +0x70
cmd/compile/internal/gc.funccompile(0x4000678160)
        /nix/store/2jz7z8f6xnx1cv8vr6fmf21y96fg86ri-go-1.11/share/go/src/cmd/compile/internal/gc/pgen.go:209 +0xbc
cmd/compile/internal/gc.Main(0x7b9238)
        /nix/store/2jz7z8f6xnx1cv8vr6fmf21y96fg86ri-go-1.11/share/go/src/cmd/compile/internal/gc/main.go:637 +0x2664
main.main()
        /nix/store/2jz7z8f6xnx1cv8vr6fmf21y96fg86ri-go-1.11/share/go/src/cmd/compile/main.go:51 +0x8c
code.gitea.io/gitea/vendor/github.com/RoaringBitmap/roaring
builder for '/nix/store/64ay7qkdrv53b2bsrz2n0bfq22x0a3zp-gitea-1.5.2.drv' failed with exit code 43
error: build of '/nix/store/64ay7qkdrv53b2bsrz2n0bfq22x0a3zp-gitea-1.5.2.drv' failed

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: tests.gitea

Partial log (click to expand)

Cannot nix-instantiate `tests.gitea' because:
error: attribute 'gitea' in selection path 'tests.gitea' not found

@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: tests.gitea

Partial log (click to expand)

Cannot nix-instantiate `tests.gitea' because:
error: attribute 'gitea' in selection path 'tests.gitea' not found

@aanderse
Copy link
Member Author

aanderse commented Nov 7, 2018

Still working on postgres test as it errors out in the pre-start script. More to come.

@aanderse
Copy link
Member Author

aanderse commented Nov 8, 2018

@GrahamcOfBorg test postgresql

Something funny going on with my machine...

@GrahamcOfBorg
Copy link

Success on aarch64-linux

Attempted: tests.postgresql

No partial log is available.

@GrahamcOfBorg
Copy link

Success on x86_64-linux

Attempted: tests.postgresql

No partial log is available.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: gitea

Partial log (click to expand)

/nix/store/7c7g2h30snvmw4a2wjspjgwal469x0k5-gitea-1.5.2-bin

@aanderse
Copy link
Member Author

aanderse commented Nov 8, 2018

@GrahamcOfBorg test gitea

@GrahamcOfBorg
Copy link

Success on x86_64-linux

Attempted: tests.gitea

No partial log is available.

@GrahamcOfBorg
Copy link

Success on aarch64-linux

Attempted: tests.gitea

No partial log is available.

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: gitea

Partial log (click to expand)

code.gitea.io/gitea/vendor/github.com/go-macaron/cache/memcache
code.gitea.io/gitea/vendor/gopkg.in/testfixtures.v2
code.gitea.io/gitea/modules/cache
code.gitea.io/gitea/modules/highlight
code.gitea.io/gitea/modules/base
code.gitea.io/gitea/modules/options
code.gitea.io/gitea/modules/markup
code.gitea.io/gitea/modules/markup/markdown
builder for '/nix/store/64ay7qkdrv53b2bsrz2n0bfq22x0a3zp-gitea-1.5.2.drv' failed with exit code 47
error: build of '/nix/store/64ay7qkdrv53b2bsrz2n0bfq22x0a3zp-gitea-1.5.2.drv' failed

@aanderse
Copy link
Member Author

aanderse commented Nov 8, 2018

@etu if you're happy with this I'll look for someone to merge.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: gitea

Partial log (click to expand)

these paths will be fetched (19.92 MiB download, 99.66 MiB unpacked):
  /nix/store/7c7g2h30snvmw4a2wjspjgwal469x0k5-gitea-1.5.2-bin
  /nix/store/jcjcgvqznzm5lclckwswp1557fd64cna-gitea-1.5.2-data
  /nix/store/zma4ryc9awzsqgslnwxfczgl2b5xmc4v-git-2.19.1
copying path '/nix/store/jcjcgvqznzm5lclckwswp1557fd64cna-gitea-1.5.2-data' from 'https://cache.nixos.org'...
copying path '/nix/store/zma4ryc9awzsqgslnwxfczgl2b5xmc4v-git-2.19.1' from 'https://cache.nixos.org'...
copying path '/nix/store/7c7g2h30snvmw4a2wjspjgwal469x0k5-gitea-1.5.2-bin' from 'https://cache.nixos.org'...
/nix/store/7c7g2h30snvmw4a2wjspjgwal469x0k5-gitea-1.5.2-bin

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: gitea

Partial log (click to expand)

code.gitea.io/gitea/vendor/github.com/stretchr/testify/assert
code.gitea.io/gitea/vendor/gopkg.in/macaron.v1
code.gitea.io/gitea/vendor/github.com/keybase/go-crypto/openpgp
code.gitea.io/gitea/vendor/github.com/RoaringBitmap/roaring
code.gitea.io/gitea/modules/setting
code.gitea.io/gitea/modules/base
code.gitea.io/gitea/modules/mailer
code.gitea.io/gitea/modules/auth/oauth2
builder for '/nix/store/64ay7qkdrv53b2bsrz2n0bfq22x0a3zp-gitea-1.5.2.drv' failed with exit code 49
error: build of '/nix/store/64ay7qkdrv53b2bsrz2n0bfq22x0a3zp-gitea-1.5.2.drv' failed

@aanderse aanderse changed the title gitea: fix mysql issue, add mysql socket auth, and add a nixos test nixos/gitea: fix mysql issue, add mysql socket auth, and add a nixos test Nov 8, 2018
@c0bw3b c0bw3b merged commit 6399b10 into NixOS:master Nov 8, 2018
@aanderse aanderse deleted the gitea branch November 9, 2018 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants