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.git-annex-adapter: fix build #45061

Merged
merged 1 commit into from Aug 17, 2018

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Aug 15, 2018

Motivation for this change

git-annex version 6.20180719 enhances the output of git-annex info
with a description and UUID of the repository which broke the testcase
test_process_annex_info_batch which parses the output of the info
command.

The testcase has been fixed accordingly and the patch was filed upstream
here: alpernebbi/git-annex-adapter#6

I rechecked the functionality in a simple python environment with the
following expression:

with import ./. {};
python3.withPackages (ps: with ps; [ git-annex-adapter ])

And tested the main in a Python REPL within the environment.

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)
  • Fits CONTRIBUTING.md.

patches = [
./not-a-git-repo-testcase.patch
(fetchpatch {
Copy link
Member

Choose a reason for hiding this comment

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

Please add a comment explaining the reason for the patch and a link to upstream. Would also be nice for the other patches.

@timokau
Copy link
Member

timokau commented Aug 15, 2018

This isn't python3 only right? If that is the case, the commit message should have the pythonPackages prefix.

@GrahamcOfBorg build python2Packages.git-annex-adapter python3Packages.git-annex-adapter

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python3Packages.git-annex-adapter

The following builds were skipped because they don't evaluate on x86_64-linux: python2Packages.git-annex-adapter

Partial log (click to expand)

./nix/store/vydv641m4qrlsdhcd537qkw00q843cr5-python3-3.6.6/lib/python3.6/subprocess.py:766: ResourceWarning: subprocess 1801 is still running
  ResourceWarning, source=self)
./nix/store/vydv641m4qrlsdhcd537qkw00q843cr5-python3-3.6.6/lib/python3.6/subprocess.py:766: ResourceWarning: subprocess 1988 is still running
  ResourceWarning, source=self)
................
----------------------------------------------------------------------
Ran 27 tests in 2.764s

OK
/nix/store/s4l3lsg5h72wdi3xk765x4zxb91yrd7h-python3.6-git-annex-adapter-0.2.0

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: python2Packages.git-annex-adapter, python3Packages.git-annex-adapter

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: python3Packages.git-annex-adapter

The following builds were skipped because they don't evaluate on x86_64-darwin: python2Packages.git-annex-adapter

Partial log (click to expand)

  File "/nix/store/v02kjyb7x10f6afynvmzd5sa1rhfnp4f-python3-3.6.6/lib/python3.6/subprocess.py", line 1344, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'rev': 'rev'

----------------------------------------------------------------------
Ran 27 tests in 7.865s

FAILED (errors=1)
builder for '/nix/store/6shr4pgpgpa9x237s59mahmi5xxj348z-python3.6-git-annex-adapter-0.2.0.drv' failed with exit code 1
error: build of '/nix/store/6shr4pgpgpa9x237s59mahmi5xxj348z-python3.6-git-annex-adapter-0.2.0.drv' failed

@Ma27 Ma27 force-pushed the fix-python-git-annex-adapter branch from 923d6fb to f842715 Compare August 15, 2018 12:36
@Ma27
Copy link
Member Author

Ma27 commented Aug 15, 2018

@timokau I documented each of the patches now. Python2 isn't supported by the expression ATM.

@timokau
Copy link
Member

timokau commented Aug 15, 2018

Okay. what about the darwin failure?

@Ma27
Copy link
Member Author

Ma27 commented Aug 15, 2018

I'll look into it. But please keep in mind that I don't have a machine to actually test/debug the error. We may want to disable the darwin build temporarily as this patch fixes the Linux build at least.

But let's see when I know more:)

@timokau
Copy link
Member

timokau commented Aug 15, 2018

Yes, I understand. Since its not a regression (quite the opposite), I wouldn't mind if you disable the darwin build for now.

@alpernebbi
Copy link

alpernebbi commented Aug 15, 2018

Hi, upstream author here. I merged the relevant patch (7fb27a5 in my repo).

The darwin build fails probably because I (wrongly) assumed everything would have rev and ran a test with it. Let me fix it real quick.

Edit: I've committed 0b60b45 which should fix it (but I can't test it right now).

@Ma27
Copy link
Member Author

Ma27 commented Aug 15, 2018

thanks! I'll apply the patch for the darwin build:)

@Ma27 Ma27 force-pushed the fix-python-git-annex-adapter branch from f842715 to af23709 Compare August 15, 2018 15:54
@Ma27
Copy link
Member Author

Ma27 commented Aug 15, 2018

@timokau I applied the fix for Darwin, let's see if that helps
@alpernebbi thanks a lot for your help!
@GrahamcOfBorg build python3Packages.git-annex-adapter

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: python3Packages.git-annex-adapter

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python3Packages.git-annex-adapter

Partial log (click to expand)

./nix/store/vydv641m4qrlsdhcd537qkw00q843cr5-python3-3.6.6/lib/python3.6/subprocess.py:766: ResourceWarning: subprocess 1801 is still running
  ResourceWarning, source=self)
./nix/store/vydv641m4qrlsdhcd537qkw00q843cr5-python3-3.6.6/lib/python3.6/subprocess.py:766: ResourceWarning: subprocess 1988 is still running
  ResourceWarning, source=self)
................
----------------------------------------------------------------------
Ran 27 tests in 2.120s

OK
/nix/store/s4l3lsg5h72wdi3xk765x4zxb91yrd7h-python3.6-git-annex-adapter-0.2.0

@timokau
Copy link
Member

timokau commented Aug 15, 2018

Thank you @alpernebbi for the fix and @Ma27 for indulging all my requests :) LGTM now.

It looks like you may not have ofBorg permission for darwin (see trusted vs known users in the ofBorg repo).
@GrahamcOfBorg build python3Packages.git-annex-adapter

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python3Packages.git-annex-adapter

Partial log (click to expand)

./nix/store/vydv641m4qrlsdhcd537qkw00q843cr5-python3-3.6.6/lib/python3.6/subprocess.py:766: ResourceWarning: subprocess 1801 is still running
  ResourceWarning, source=self)
./nix/store/vydv641m4qrlsdhcd537qkw00q843cr5-python3-3.6.6/lib/python3.6/subprocess.py:766: ResourceWarning: subprocess 1988 is still running
  ResourceWarning, source=self)
................
----------------------------------------------------------------------
Ran 27 tests in 2.816s

OK
/nix/store/s4l3lsg5h72wdi3xk765x4zxb91yrd7h-python3.6-git-annex-adapter-0.2.0

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: python3Packages.git-annex-adapter

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Unexpected error: command failed with exit code 1 on x86_64-darwin (full log)

Attempted: python3Packages.git-annex-adapter

Partial log (click to expand)

  /nix/store/8qd7jmm2vzxs73apmrl09w2vh9019ina-python3.6-git-annex-adapter-0.2.0.drv
building '/nix/store/f1xpaa9aib0qim6czqwji58ywlqqdrq0-0b60b4577528b309f6ac9d47b55a00dbda9850ea.patch.drv'...

trying https://github.com/alpernebbi/git-annex-adapter/commit/0b60b4577528b309f6ac9d47b55a00dbda9850ea.patch
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   939    0   939    0     0   5216      0 --:--:-- --:--:-- --:--:--  5216
fixed-output derivation produced path '/nix/store/570596rigl5dcr8xxl7ia1rb145x6l3w-0b60b4577528b309f6ac9d47b55a00dbda9850ea.patch' with sha256 hash '0z608hpmyzv1mm01dxr7d6bi1hc77h4yafghkynmv99ijgnm1qk7' instead of the expected hash '0yh66gial6bx7kbl7s7lkzljnkpgvgr8yahqqcq9z76d0w752did'
cannot build derivation '/nix/store/8qd7jmm2vzxs73apmrl09w2vh9019ina-python3.6-git-annex-adapter-0.2.0.drv': 1 dependencies couldn't be built
error: build of '/nix/store/8qd7jmm2vzxs73apmrl09w2vh9019ina-python3.6-git-annex-adapter-0.2.0.drv' failed

# https://logs.nix.ci/?key=nixos/nixpkgs.45061&attempt_id=271763ba-2ae7-4098-b469-b82b1d8edb9b
(fetchpatch {
url = "https://github.com/alpernebbi/git-annex-adapter/commit/0b60b4577528b309f6ac9d47b55a00dbda9850ea.patch";
sha256 = "0yh66gial6bx7kbl7s7lkzljnkpgvgr8yahqqcq9z76d0w752did";
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this hash is wrong.

`git-annex` version 6.20180719 enhances the output of `git-annex info`
with a description and UUID of the repository which broke the testcase
`test_process_annex_info_batch` which parses the output of the info
command.

The testcase has been fixed accordingly and the patch was filed upstream
here: alpernebbi/git-annex-adapter#6

I rechecked the functionality in a simple python environment with the
following expression:

```
with import ./. {};
python3.withPackages (ps: with ps; [ git-annex-adapter ])
```

Furthermore I tested the main functionality in a Python REPL within the environment.

The Darwin patch fixes tests that rely on `rev`, a binary which is
distributed in the `utillinux` package and not available on Nix with
Darwin.

To make the purpose of the patches for future contributors clear I
documented the purpose for each patch.
@Ma27 Ma27 force-pushed the fix-python-git-annex-adapter branch from af23709 to 1022c3c Compare August 16, 2018 08:20
@Ma27
Copy link
Member Author

Ma27 commented Aug 17, 2018

@timokau, can this be merged, please? :)

@timokau
Copy link
Member

timokau commented Aug 17, 2018

Thanks for the notification, for some reason github doesn't send emails on force-pushes :/

@GrahamcOfBorg build python3Packages.git-annex-adapter

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: python3Packages.git-annex-adapter

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: python3Packages.git-annex-adapter

Partial log (click to expand)

./nix/store/v02kjyb7x10f6afynvmzd5sa1rhfnp4f-python3-3.6.6/lib/python3.6/subprocess.py:766: ResourceWarning: subprocess 40050 is still running
  ResourceWarning, source=self)
./nix/store/v02kjyb7x10f6afynvmzd5sa1rhfnp4f-python3-3.6.6/lib/python3.6/subprocess.py:766: ResourceWarning: subprocess 40188 is still running
  ResourceWarning, source=self)
...........s....
----------------------------------------------------------------------
Ran 27 tests in 7.736s

OK (skipped=1)
/nix/store/91lh2pjji5y32rny3w51j7vjz86yq7aq-python3.6-git-annex-adapter-0.2.0

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python3Packages.git-annex-adapter

Partial log (click to expand)

./nix/store/vydv641m4qrlsdhcd537qkw00q843cr5-python3-3.6.6/lib/python3.6/subprocess.py:766: ResourceWarning: subprocess 1800 is still running
  ResourceWarning, source=self)
./nix/store/vydv641m4qrlsdhcd537qkw00q843cr5-python3-3.6.6/lib/python3.6/subprocess.py:766: ResourceWarning: subprocess 1987 is still running
  ResourceWarning, source=self)
................
----------------------------------------------------------------------
Ran 27 tests in 7.406s

OK
/nix/store/s4l3lsg5h72wdi3xk765x4zxb91yrd7h-python3.6-git-annex-adapter-0.2.0

@timokau
Copy link
Member

timokau commented Aug 17, 2018

Thank you!

@timokau timokau merged commit 8c43a3e into NixOS:master Aug 17, 2018
@Ma27 Ma27 deleted the fix-python-git-annex-adapter branch August 17, 2018 14:05
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