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

fix firefox sync-server #52654

Closed
wants to merge 3 commits into from
Closed

fix firefox sync-server #52654

wants to merge 3 commits into from

Conversation

tg-x
Copy link
Member

@tg-x tg-x commented Dec 22, 2018

Motivation for this change

pythonPackages.serversyncstorage has been broken,
this PR fixes it by disabling tests and removing a conflicting WSGIProxy dependency only used by tests

tested running services.firefox.syncserver, the service starts and shows the 'it works' status page

fixes #38830

Things done
  • 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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

Two packages are missing a meta section. Please add one.
Also, add a pythonPackages. prefix to the commit messages.

pkgs/development/python-modules/syncserver/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/mozsvc/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/syncserver/default.nix Outdated Show resolved Hide resolved
@tg-x
Copy link
Member Author

tg-x commented Dec 25, 2018

applied the suggested changes

propagatedBuildInputs = [
pyramid sqlalchemy simplejson mozsvc cornice pyramid_hawkauth pymysql
pymysqlsa umemcache WSGIProxy requests pybrowserid
pymysqlsa umemcache requests pybrowserid
webtest
Copy link
Member

Choose a reason for hiding this comment

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

If webtest is a test dependency, why is it here anyway?

broken = true; # 2018-11-04
postPatch = ''
# conflict between WSGIProxy & WSGIProxy2 required by webtest
# (which is required by pyramid_hawkauth)
Copy link
Member

Choose a reason for hiding this comment

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

This comment does not make sense

doCheck = false; # lazy packager
propagatedBuildInputs = [ pyramid simplejson konfig ];

meta = with stdenv.lib; {
homepage = https://github.com/mozilla-services/mozservices;
homepage = "https://github.com/mozilla-services/mozservices";
Copy link
Member

Choose a reason for hiding this comment

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

no quotes

meta = with stdenv.lib; {
description = "Run-Your-Own Firefox Sync Server";
homepage = "https://github.com/mozilla-services/syncserver";
platforms = platforms.unix;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
platforms = platforms.unix;

meta = with stdenv.lib; {
description = "The SyncServer server software, as used by Firefox Sync";
homepage = "https://github.com/mozilla-services/server-syncstorage";
platforms = platforms.unix;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
platforms = platforms.unix;

This is set automatically by buildPython*.


# since we disabled tests (which would need WSGIProxy)
# lets get rid of the rest of the test dependencies as well:
sed -i "s/unittest2.*//; s/webtest.*//; s/testfixtures.*//" requirements.txt
Copy link
Member

Choose a reason for hiding this comment

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

I don't see a need for patching requirements.txt. Then you can use substituteInPlace after all.

@Nadrieril
Copy link
Contributor

I have tried to run it on my server, and it compiles, but running syncserver crashes with pyramid.exceptions.ConfigurationError: 'acl' is not supported. This exception is raised from the cornice package, which has version 3.4.2 in nixpkgs but is required version 0.17 from serversyncstorage.

@Nadrieril Nadrieril mentioned this pull request Jan 27, 2019
10 tasks
@Nadrieril
Copy link
Contributor

I have made a PR that fixes this: #54739.
I have tested it in production and it seems to work well.

@tg-x
Copy link
Member Author

tg-x commented Jan 27, 2019

great, then this one can be closed

@tg-x tg-x closed this Jan 27, 2019
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.

Syncserver compilation failed
5 participants