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

stack.yaml: Bump cardano-node to 1.28.0 tag #2778

Merged
merged 23 commits into from
Jul 30, 2021
Merged

Conversation

rvl
Copy link
Contributor

@rvl rvl commented Jul 26, 2021

Issue Number

ADP-1025

Overview

Comments

@rvl rvl requested a review from Anviking July 26, 2021 15:25
@Anviking Anviking changed the base branch from master to rvl/fix-cabal-build July 26, 2021 15:36
@Anviking Anviking force-pushed the rvl/adp-1025/bump-snapshot branch from 0cd24a2 to f4a2720 Compare July 26, 2021 15:51
Base automatically changed from rvl/fix-cabal-build to master July 26, 2021 16:26
@Anviking
Copy link
Member

Anviking commented Jul 26, 2021

This version of stackage.nix does not know about the Stackage resolver lts-18.4.
You may need to update haskell.nix to one that includes a newer stackage.nix.

@rvl If you want to keep the 18.4 resolver I think either you our some guidance is needed here. I tried to bump haskell.nix, but don't think it worked:

$ ./nix/regenerate.sh --cache /dev/null
cannot build derivation '/nix/store/af4csla0ggb54vi7dgy0l77b5hxw3cyj-nix-tools-regenerate.drv': 1 dependencies couldn't be built
error: build of '/nix/store/af4csla0ggb54vi7dgy0l77b5hxw3cyj-nix-tools-regenerate.drv' failed
./nix/regenerate.sh: line 8: --cache: command not found

I could try switching to an older LTS if you want though.

@Anviking
Copy link
Member

Anviking commented Jul 26, 2021

Actually, CI pushed 1749f8d, but there are now some of these errors in buildkite:

building '/nix/store/37incwn192cw67gldl9lz89p78w4hi4k-haskell-project-plan-to-nix-pkgs.drv'...
--
  | warning: SQLite database '/nix/var/nix/db/db.sqlite' is busy
  | error: while evaluating the attribute 'NIX_GHC_LIBDIR' of the derivation 'cardano-wallet-shell' at /nix/store/r2ygiv90x2qg2bpxilzabfad1ixnprv6-nixpkgs-unstable-src/pkgs/stdenv/generic/make-derivation.nix:201:11:

Some of the other errors I should probably be able to figure out…

@rvl
Copy link
Contributor Author

rvl commented Jul 27, 2021

Yeah there were evaluation errors because some necessary packages were removed from the snapshot:

in job ‘macos.checks.cardano-wallet-cli.unit’:
The Haskell package set does not contain the package: ntp-client (build dependency).
If you are using Stackage, make sure that you are using a snapshot that contains the package.
Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.

Fixed now.

@rvl rvl force-pushed the rvl/adp-1025/bump-snapshot branch 4 times, most recently from 82346ea to da4dbb4 Compare July 28, 2021 08:59
@rvl rvl self-assigned this Jul 28, 2021
@rvl rvl force-pushed the rvl/adp-1025/bump-snapshot branch 2 times, most recently from cda903c to ab7c1fb Compare July 28, 2021 11:16
@Anviking Anviking force-pushed the rvl/adp-1025/bump-snapshot branch from ab7c1fb to c55b1ff Compare July 28, 2021 12:04
@Anviking Anviking force-pushed the rvl/adp-1025/bump-snapshot branch from 73bc7b8 to d7120d0 Compare July 28, 2021 12:19
@Anviking
Copy link
Member

bors r+

iohk-bors bot added a commit that referenced this pull request Jul 28, 2021
2778: stack.yaml: Bump cardano-node to 1.28.0 tag r=Anviking a=rvl

### Issue Number

ADP-1025

### Overview

- [x] Bump stack.yaml resolver to input-output-hk/cardano-haskell#50
- [x] Update cabal.project
- [x] Fix type errors resulting from LTS-18.4 bump.
- [ ] Does ` nix-shell nix/cabal-shell.nix --run "scripts/buildkite/cabal-ci.sh build"` still work?

### Comments

- [Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-2763)


Co-authored-by: Rodney Lorrimar <[email protected]>
Co-authored-by: Johannes Lund <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 28, 2021

Build failed:

#expected

@Anviking
Copy link
Member

bors r+

iohk-bors bot added a commit that referenced this pull request Jul 28, 2021
2778: stack.yaml: Bump cardano-node to 1.28.0 tag r=Anviking a=rvl

### Issue Number

ADP-1025

### Overview

- [x] Bump stack.yaml resolver to input-output-hk/cardano-haskell#50
- [x] Update cabal.project
- [x] Fix type errors resulting from LTS-18.4 bump.
- [x] Does ` nix-shell nix/cabal-shell.nix --run "scripts/buildkite/cabal-ci.sh build"` still work?

### Comments

- [Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-2763)


Co-authored-by: Rodney Lorrimar <[email protected]>
Co-authored-by: Johannes Lund <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 28, 2021

Build failed:

#2785

@Anviking Anviking force-pushed the rvl/adp-1025/bump-snapshot branch from 7f059ee to b77c054 Compare July 28, 2021 15:49
@Anviking
Copy link
Member

bors r+

iohk-bors bot added a commit that referenced this pull request Jul 28, 2021
2778: stack.yaml: Bump cardano-node to 1.28.0 tag r=Anviking a=rvl

### Issue Number

ADP-1025

### Overview

- [x] Bump stack.yaml resolver to input-output-hk/cardano-haskell#50
- [x] Update cabal.project
- [x] Fix type errors resulting from LTS-18.4 bump.
- [x] Does ` nix-shell nix/cabal-shell.nix --run "scripts/buildkite/cabal-ci.sh build"` still work?

### Comments

- [Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-2763)


Co-authored-by: Rodney Lorrimar <[email protected]>
Co-authored-by: Johannes Lund <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 28, 2021

Build failed:

unpacking sources
unpacking source archive /nix/store/lfdap8q2f5d4vq3x3nxy7pq581zr693f-cardano-wallet-launcher-test-unit-x86_64-w64-mingw32-2021.6.11-x86_64-w64-mingw32
source root is cardano-wallet-launcher-test-unit-x86_64-w64-mingw32-2021.6.11-x86_64-w64-mingw32
building
================================================================================
RUNNING TESTS for cardano-wallet-launcher-test-unit-x86_64-w64-mingw32-2021.6.11-check-x86_64-w64-mingw32 via wine64
================================================================================
Copying extra test libraries ...
Copying library dependencies...
Could not load wine-gecko. HTML rendering will be disabled.
Native IE detected, not doing registration
wine: configuration in '/build' has been updated.
002a:err:module:import_dll Library libstdc++-6.dll (which is needed by L"Z:\\nix\\store\\51vhwb1fdckhx4xiammryf97ip8m3h9d-cardano-wallet-launcher-test-unit-x86_64-w64-mingw32-2021.6.11\\bin\\unit.exe") not found
002a:err:module:attach_dlls Importing dlls for L"Z:\\nix\\store\\51vhwb1fdckhx4xiammryf97ip8m3h9d-cardano-wallet-launcher-test-unit-x86_64-w64-mingw32-2021.6.11\\bin\\unit.exe" failed, status c0000135
builder for '/nix/store/7ssdwhn0gani60q7pwkw13aavbm4ygw1-cardano-wallet-launcher-test-unit-x86_64-w64-mingw32-2021.6.11-check-x86_64-w64-mingw32.drv' failed with exit code 53

#expected

@rvl
Copy link
Contributor Author

rvl commented Jul 29, 2021

For some reason, the executables have gained a dependency on libstdc++.
So when we try to run the executables under wine for testing, it complains about a missing DLL.
Under Windows you generally need the DLLs either next to the EXE, or in some place like C:\WINDOWS.

@Anviking
Copy link
Member

It still says "cached failure" on the windows builds 🤔 Shouldn't it have re-run?

Anviking and others added 11 commits July 29, 2021 23:04
Replace deleteCascadeWhere with deleteCascade

deleteCascadeWhere is deprecated with the suggestion:
> You can now set cascade behavior directly on entities in the quasiquoter.
https://hackage.haskell.org/package/persistent-2.13.0.2/docs/Database-Persist-Class-DeleteCascade.html

We do have OnDeleteCascade in our TH files. So it sounds like this
should still cascade correctly.

I also tested manually on alonzo testnet, with a custom wallet build for
access to W.deleteWallet (normally the entire db is deleted, but this
function is not called)

1. Restore wallet with funds
2. Inspect sqlite DB manually
3. W.deleteWallet
4. Inspect sqlite DB manually

The results were:
In step 2 there were several checkpoints. In step 4 they were gone.

W.deleteWallet does not directly delete anything from the checkpoints
table.

So it seems to work.
The stack build wants Typeable on the NetworkDiscriminant type variable.
The failure were most definitely just caused by some underlying
generator being changed from the dependency bumps.
This is rather messy. gcc puts it's libraries into a architecture
specific subdirectory which makes this rather fragile.  On top of
that the library we depend on brings in more dependencies.

We have a slightly similar situation with remote-iserv, which we
can find in the remote-iserv.postInstall of the haskell.nix
overlays/windows.nix.  The solution there is to just take the
glob all approach and find all .dlls and copy them, not the
prettiest but a workable for a tool like remote-iserv.  In this
case we might want to do something smarter akin to the following
pseudo code:

  candidatePackage = [ pkgs.libsodium-vrf pkgs.buildPackages.gcc.cc ... ]
  knownDlls = concat [ find pkg -name "*.dll" | pkg <- candidatePackage ]
  projectDlls = <paths to all already pacakged dlls and exes>
  for dll in projectDlls; do
    for dep in $(strings dll | grep ".dll"); do
      match = grep "$dep\$" knownDlls
      if match; then
        ln -s $match $out/bin
      fi
    done
  done
@rvl rvl force-pushed the rvl/adp-1025/bump-snapshot branch from a6feacf to 9a4fded Compare July 29, 2021 15:08
@rvl
Copy link
Contributor Author

rvl commented Jul 29, 2021

bors r+

iohk-bors bot added a commit that referenced this pull request Jul 29, 2021
2778: stack.yaml: Bump cardano-node to 1.28.0 tag r=rvl a=rvl

### Issue Number

ADP-1025

### Overview

- [x] Bump stack.yaml resolver to input-output-hk/cardano-haskell#50
- [x] Update cabal.project
- [x] Fix type errors resulting from LTS-18.4 bump.
- [x] Does ` nix-shell nix/cabal-shell.nix --run "scripts/buildkite/cabal-ci.sh build"` still work?

### Comments

- [Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-2763)


Co-authored-by: Rodney Lorrimar <[email protected]>
Co-authored-by: Johannes Lund <[email protected]>
Co-authored-by: Moritz Angermann <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 29, 2021

Build failed:

src/Cardano/Wallet.hs:969:1: error: deleteWallet is unused
--
  |  
  | 967 ┃     -> WalletId
  | 968 ┃     -> ExceptT ErrNoSuchWallet IO ()
  | 969 ┃ deleteWallet ctx wid = db & \DBLayer{..} -> do
  | 970 ┃     mapExceptT atomically $ removeWallet wid
  | 971 ┃   where
  |  
  | Delete this definition or add ‘Cardano.Wallet.deleteWallet’ as a root to fix this error.

These should be fixed with 50b4589. They don't appear in the non-bors buildkite build. Is the cache simply messed up, or something?

#2785

@Anviking
Copy link
Member

Anviking commented Jul 29, 2021

Also, seems like we still have

Copying extra test libraries ...
Copying library dependencies...
Could not load wine-gecko. HTML rendering will be disabled.
Native IE detected, not doing registration
wine: configuration in '/build' has been updated.
002a:err:module:import_dll Library libstdc++-6.dll (which is needed by L"Z:\\nix\\store\\51vhwb1fdckhx4xiammryf97ip8m3h9d-cardano-wallet-launcher-test-unit-x86_64-w64-mingw32-2021.6.11\\bin\\unit.exe") not found
002a:err:module:attach_dlls Importing dlls for L"Z:\\nix\\store\\51vhwb1fdckhx4xiammryf97ip8m3h9d-cardano-wallet-launcher-test-unit-x86_64-w64-mingw32-2021.6.11\\bin\\unit.exe" failed, status c0000135
builder for '/nix/store/7ssdwhn0gani60q7pwkw13aavbm4ygw1-cardano-wallet-launcher-test-unit-x86_64-w64-mingw32-2021.6.11-check-x86_64-w64-mingw32.drv' failed with exit code 53

So my 9a4fded didn't work ☹️

But, ah, I might just have gotten the component name wrong?

This should hopefully ensure Moritz's fix also applies to the
cardano-launcher:unit failure.

> 002a:err:module:import_dll Library libstdc++-6.dll (which is needed by L"Z:\\nix\\store\\51vhwb1fdckhx4xiammryf97ip8m3h9d-cardano-wallet-launcher-test-unit-x86_64-w64-mingw32-2021.6.11\\bin\\unit.exe") not found
> 002a:err:module:attach_dlls Importing dlls for L"Z:\\nix\\store\\51vhwb1fdckhx4xiammryf97ip8m3h9d-cardano-wallet-launcher-test-unit-x86_64-w64-mingw32-2021.6.11\\bin\\unit.exe" failed, status c0000135
> builder for '/nix/store/7ssdwhn0gani60q7pwkw13aavbm4ygw1-cardano-wallet-launcher-test-unit-x86_64-w64-mingw32-2021.6.11-check-x86_64-w64-mingw32.drv' failed with exit code 53
@Anviking Anviking force-pushed the rvl/adp-1025/bump-snapshot branch from 9a4fded to 3fa661f Compare July 29, 2021 16:18
@Anviking
Copy link
Member

bors try

iohk-bors bot added a commit that referenced this pull request Jul 29, 2021
@Anviking Anviking mentioned this pull request Jul 29, 2021
1 task
@Anviking
Copy link
Member

@rvl if you drop 0dff297 and clear the buildkite cache, I think this will work now!

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 29, 2021

try

Build succeeded:

@rvl rvl force-pushed the rvl/adp-1025/bump-snapshot branch from 0dff297 to 3fa661f Compare July 30, 2021 04:56
@rvl
Copy link
Contributor Author

rvl commented Jul 30, 2021

bors r+

iohk-bors bot added a commit that referenced this pull request Jul 30, 2021
2778: stack.yaml: Bump cardano-node to 1.28.0 tag r=rvl a=rvl

### Issue Number

ADP-1025

### Overview

- [x] Bump stack.yaml resolver to input-output-hk/cardano-haskell#50
- [x] Update cabal.project
- [x] Fix type errors resulting from LTS-18.4 bump.
- [x] Does ` nix-shell nix/cabal-shell.nix --run "scripts/buildkite/cabal-ci.sh build"` still work?

### Comments

- [Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-2763)


Co-authored-by: Rodney Lorrimar <[email protected]>
Co-authored-by: Johannes Lund <[email protected]>
Co-authored-by: Moritz Angermann <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 30, 2021

Build failed:

Failures:

  src/Test/Integration/Scenario/API/Shelley/StakePools.hs:524:5: 
  1) API Specifications, SHELLEY_STAKE_POOLS, STAKE_POOLS_JOIN_01 - Can rejoin another stakepool
       uncaught exception: IOException of type UserError
       user error (next delegation should contain exactly one element)

  To rerun use: --match "/API Specifications/SHELLEY_STAKE_POOLS/STAKE_POOLS_JOIN_01 - Can rejoin another stakepool/"

Randomized with seed 1581887176

Finished in 850.5086 seconds, used 775.3900 seconds of CPU time
859 examples, 1 failure, 45 pending

#2497

@rvl rvl merged commit 5b3b257 into master Jul 30, 2021
@rvl rvl deleted the rvl/adp-1025/bump-snapshot branch July 30, 2021 05:53
iohk-bors bot added a commit that referenced this pull request Jul 30, 2021
2763: Basic Alonzo support r=Anviking a=Anviking

# Issue Number

ADP-1025

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] Ensure the wallet can run in Alonzo
- [x] Get all integration tests green
- [x] Fix warnings
- [x] Cleanup
    - <s>[ ]Test that addresses don't affect the min ada value</s> Existing integration tests should be enough
    - [x] <s>Does it still work on testnet? -> The ledger function in question cannot know the current network, so would be highly surprising if it didn't work on testnet </s>
    - [x] Update MinUTxOValue properties to generate both ShelleyMA and Alonzo cases
    - [ ] Go through everything from start to finish 
- [x] Run integration tests on both Mary and alonzo
    - [x] Check that the Mary era is actually picked up, and it's not just running Alonzo twice
- <s>[ ] Using cardano-node 1.28.0 tag</s> -> #2778
- <s>[x] Cabal build also works</s> -> #2776

# Comments

- [Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-2763)
- [Cabal Nightly build](https://buildkite.com/input-output-hk/cardano-wallet-nightly/builds?branch=anviking%2FADP-952%2Falonzo) (use environment variable `step=cabal` when creating a new build)


Co-authored-by: Johannes Lund <[email protected]>
Co-authored-by: Rodney Lorrimar <[email protected]>
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.

2 participants