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

python3Packages.jenkinsapi: fix build #91673

Merged
merged 1 commit into from Sep 13, 2020
Merged

Conversation

rski
Copy link
Contributor

@rski rski commented Jun 27, 2020

nix-env -f default.nix -iA python38Packages.jenkinsapi now works.

Here is a list of all the things done:

  • fixed the dependency list which was not enough
  • changed checkPhase. This called python setup.py test by default,
    which is very much not what jenkinsapi does upstream. This resulted in
    simple_post_logger.py being imported, which called serve_forever(),
    manifesting as a hang
  • tox decided to install pbr every time and fails and also tried to
    run tests across multiple python versions, so I just made checkPhase
    call pylint/pycodestyle/py.test directly.
  • disabled systests which try to run jenkins
  • disabled misc broken tests. There are some calls in them that should
    have been mocked but the mocks don't take effect for some reason,
    resulting in failed requests to localhost.
Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@jonringer
Copy link
Contributor

@rski thanks for opening your first PR on nixpkgs! :)

@rski
Copy link
Contributor Author

rski commented Jul 8, 2020

@jonringer very gentle poke, just making sure this hasn't fallen through the cracks.

@rski rski requested a review from jonringer July 29, 2020 22:21
Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

I went on family vacation right after posting the other comment.

To comply with CONTRIBUTING.md please have the commit message name be of the format

<pkg-name>: <subject-line>

for more examples, please look at https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md#submitting-changes

in your case, the commit message should be:

python3Packages.jenkinsapi: fix build

pkgs/development/python-modules/jenkinsapi/default.nix Outdated Show resolved Hide resolved
@rski rski changed the title jenkinsapi: fix python38Packages.jenkinsapi python3Packages.jenkinsapi: fix build Aug 3, 2020
@rski rski force-pushed the jenkinsapi branch 2 times, most recently from ff19b41 to 2187060 Compare August 3, 2020 14:52
@rski
Copy link
Contributor Author

rski commented Aug 3, 2020

@jonringer thanks for the comments, I've incorporated the suggestions. I hope I am not coming off as pushy, I'm certainly not expecting anything immediately. I was just making sure this was not buried under a huge pile of incoming PR volume 😃

@risicle
Copy link
Contributor

risicle commented Sep 6, 2020

WFM, non-nixos linux x86_64.

On macos (tested 10.14), it seems requests-kerberos is broken, so its inclusion as a build dependency prevents this from being "fixed" on darwin.

You could either disable the tests for darwin (doCheck = !stdenv.isDarwin, include a comment why) or narrow down and disable the tests that require requests-kerberos if there's a clear distinction, and selectively enable them on non-darwin.

Either way, rebase this to an updated master and we'll look at getting it merged.

@rski
Copy link
Contributor Author

rski commented Sep 12, 2020

@risicle Thanks for the review! I ended up disabling the tests completely on macOS and rebased to master

nix-env -f default.nix -iA python38Packages.jenkinsapi now works.

Here is a list of all the things done:
- fixed the dependency list which was lacking some packages
- changed checkPhase. This called python setup.py test by default,
which is very much not what jenkinsapi does upstream. This resulted in
simple_post_logger.py being imported, which called serve_forever(),
manifesting as a hang
- tox decided to install pbr every time and fails and also tried to
run tests across multiple python versions, so I just made checkPhase
call pylint/pycodestyle/py.test directly.
- disabled systests which try to run jenkins
- disabled misc broken tests. There are some calls in them that should
have been mocked but the mocks don't take effect for some reason,
resulting in failed requests to localhost.
- removed needless inputs. nose and unittest2 are not needed, not even
in python2
- disabled tests on darwin, as requests-kerberos is apparently broken
Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

LGTM

Result of nixpkgs-review pr 91673 1

3 packages built:
  • python27Packages.jenkinsapi
  • python37Packages.jenkinsapi
  • python38Packages.jenkinsapi

@jonringer jonringer merged commit 5e891fd into NixOS:master Sep 13, 2020
@rski rski deleted the jenkinsapi branch July 5, 2021 04:39
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