Skip to content

Commit

Permalink
Merge #1624 #1627
Browse files Browse the repository at this point in the history
1624: Fix migration error on checkpoint table r=rvl a=rvl

### Issue Number

Relates to #1577 / ADP-83 and  #1621.

### Overview

Fix migration error on checkpoint table found in nightly tests.

SQLite doesn't support removing columns, so we put them back as "unused" fields (https://www.sqlite.org/lang_altertable.html#altertableishard).


1627: Bump version from 2020.4.28 to 2020.5.6 r=rvl a=rvl

- Updates the cabal package versions from 2020.4.28 to 2020.5.6.
- A few shell script tweaks to the release script.


Co-authored-by: Rodney Lorrimar <[email protected]>
  • Loading branch information
iohk-bors[bot] and rvl authored May 6, 2020
3 parents 2d18950 + d2248ed + 6e47dd7 commit cf3d9c9
Show file tree
Hide file tree
Showing 19 changed files with 53 additions and 55 deletions.
2 changes: 1 addition & 1 deletion lib/byron/cardano-wallet-byron.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cardano-wallet-byron
version: 2020.4.28
version: 2020.5.6
synopsis: Wallet backend protocol-specific bits implemented using byron nodes
description: Please see README.md
homepage: https://github.com/input-output-hk/cardano-wallet
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/cardano-wallet-cli.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cardano-wallet-cli
version: 2020.4.28
version: 2020.5.6
synopsis: Utilities for a building Command-Line Interfaces
homepage: https://github.com/input-output-hk/cardano-wallet
author: IOHK Engineering Team
Expand Down
2 changes: 1 addition & 1 deletion lib/core-integration/cardano-wallet-core-integration.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cardano-wallet-core-integration
version: 2020.4.28
version: 2020.5.6
synopsis: Core integration test library.
description: Shared core functionality for our integration test suites.
homepage: https://github.com/input-output-hk/cardano-wallet
Expand Down
2 changes: 1 addition & 1 deletion lib/core/cardano-wallet-core.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cardano-wallet-core
version: 2020.4.28
version: 2020.5.6
synopsis: The Wallet Backend for a Cardano node.
description: Please see README.md
homepage: https://github.com/input-output-hk/cardano-wallet
Expand Down
4 changes: 4 additions & 0 deletions lib/core/src/Cardano/Wallet/DB/Sqlite.hs
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,8 @@ mkCheckpointEntity wid wal =
, checkpointEpochStability = coerce (bp ^. #getEpochStability)
, checkpointActiveSlotCoeff =
W.unActiveSlotCoefficient (bp ^. #getActiveSlotCoefficient)
, checkpointFeePolicyUnused = ""
, checkpointTxMaxSizeUnused = 0
}
utxo =
[ UTxO wid sl (TxId input) ix addr coin
Expand Down Expand Up @@ -776,8 +778,10 @@ checkpointFromEntity cp utxo s =
bh
(BlockId genesisHash)
genesisStart
_feePolicyUnused
slotLength
epochLength
_txMaxSizeUnused
epochStability
activeSlotCoeff
) = cp
Expand Down
2 changes: 2 additions & 0 deletions lib/core/src/Cardano/Wallet/DB/Sqlite/TH.hs
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,10 @@ Checkpoint
checkpointBlockHeight Word32 sql=block_height
checkpointGenesisHash BlockId sql=genesis_hash
checkpointGenesisStart UTCTime sql=genesis_start
checkpointFeePolicyUnused Text sql=fee_policy
checkpointSlotLength Word64 sql=slot_length
checkpointEpochLength Word32 sql=epoch_length
checkpointTxMaxSizeUnused Word16 sql=tx_max_size
checkpointEpochStability Word32 sql=epoch_stability
checkpointActiveSlotCoeff Double sql=active_slot_coeff

Expand Down
2 changes: 1 addition & 1 deletion lib/jormungandr/cardano-wallet-jormungandr.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cardano-wallet-jormungandr
version: 2020.4.28
version: 2020.5.6
synopsis: Wallet backend protocol-specific bits implemented using Jörmungandr
description: Please see README.md
homepage: https://github.com/input-output-hk/cardano-wallet
Expand Down
2 changes: 1 addition & 1 deletion lib/launcher/cardano-wallet-launcher.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cardano-wallet-launcher
version: 2020.4.28
version: 2020.5.6
synopsis: Utilities for a building commands launcher
homepage: https://github.com/input-output-hk/cardano-wallet
author: IOHK Engineering Team
Expand Down
2 changes: 1 addition & 1 deletion lib/test-utils/cardano-wallet-test-utils.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: cardano-wallet-test-utils
version: 2020.4.28
version: 2020.5.6
synopsis: Shared utilities for writing unit and property tests.
description: Shared utilities for writing unit and property tests.
homepage: https://github.com/input-output-hk/cardano-wallet
Expand Down
2 changes: 1 addition & 1 deletion lib/text-class/text-class.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: text-class
version: 2020.4.28
version: 2020.5.6
synopsis: Extra helpers to convert data-types to and from Text
homepage: https://github.com/input-output-hk/cardano-wallet
author: IOHK Engineering Team
Expand Down
2 changes: 1 addition & 1 deletion nix/.stack.nix/cardano-wallet-byron.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nix/.stack.nix/cardano-wallet-cli.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nix/.stack.nix/cardano-wallet-core-integration.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nix/.stack.nix/cardano-wallet-core.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nix/.stack.nix/cardano-wallet-jormungandr.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nix/.stack.nix/cardano-wallet-launcher.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nix/.stack.nix/cardano-wallet-test-utils.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nix/.stack.nix/text-class.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 31 additions & 39 deletions scripts/make_release.sh
Original file line number Diff line number Diff line change
@@ -1,73 +1,65 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p nix coreutils gnugrep
#! nix-shell -i bash -p nix coreutils gnugrep gnused

set -euo pipefail

# A handy utility for filling in the github RELEASE_TEMPLATE.
# Since we are using nix, this script shoud work whether on linux or mac.
#
# NOTE: This script will target the LATEST wiki version. Make sure the wiki hasn't changed undesirably since
# the release tag.
# NOTE: This script will target the LATEST wiki version. Make sure the
# wiki hasn't changed undesirably since the release tag.
#
# Usage:
# cd cardano-wallet # (only works from here!)
# export GITHUB_API_TOKEN="..."
# ./scripts/make_release.sh
#

###############################################################
################################################################################
# Release-specific parameters (Change when you bump the version)
GIT_TAG="v2020-04-28"
CABAL_VERSION="2020.4.28"
GIT_TAG="v2020-05-06"
CABAL_VERSION="2020.5.6"

OLD_GIT_TAG="v2020-04-07"
OLD_CABAL_VERSION="2020.4.7"
OLD_GIT_TAG="v2020-04-28"
OLD_CABAL_VERSION="2020.4.28"

JORM_TAG="v0.8.15"
CARDANO_NODE_TAG="1.9.3"
###############################################################
TMP_CWD=$(pwd)
JORM_TAG="v0.8.18"
CARDANO_NODE_TAG="1.11.0"
################################################################################
OLD_DATE="${OLD_GIT_TAG//v}"
CHANGELOG=GENERATED_CHANGELOG.md
OUT=GENERATED_RELEASE_NOTES-$GIT_TAG.md
REPO="input-output-hk/cardano-wallet"
TMP_WIKI_DIR=/tmp/cardano-wallet-script
rm -rf $TMP_WIKI_DIR
mkdir $TMP_WIKI_DIR
echo $TMP_WIKI_DIR
cd $TMP_WIKI_DIR
git clone https://github.com/$REPO.wiki.git
cd cardano-wallet.wiki

WIKI_COMMIT=$(git log -n 1 --pretty=format:%H)

cd $TMP_CWD
echo "cd $TMP_CWD"
WIKI_COMMIT=$(git ls-remote https://github.com/$REPO.wiki.git HEAD | cut -f1)

echo ""
echo "Replacing $OLD_CABAL_VERSION with $CABAL_VERSION"
find nix -name "*.nix" -type f | xargs sed -i "s/$OLD_CABAL_VERSION/$CABAL_VERSION/"
find lib -name "*.cabal" -type f | xargs sed -i "s/$OLD_CABAL_VERSION/$CABAL_VERSION/"
sed -i "s/$OLD_CABAL_VERSION/$CABAL_VERSION/" \
$(git ls-files '*.nix'; git ls-files '*.cabal')
echo "Looking for remaining references to old version:"
echo "$(git grep $OLD_CABAL_VERSION)"
git grep $OLD_CABAL_VERSION
echo ""

echo "Generating changelog..."
./scripts/make_changelog $OLD_DATE > $CHANGELOG
echo ""
echo "Filling in template..."
sed -e "
s/{{GIT_TAG}}/$GIT_TAG/g
s/{{JORM_TAG}}/$JORM_TAG/g
s/{{CARDANO_NODE_TAG}}/$CARDANO_NODE_TAG/g
s/{{CABAL_VERSION}}/$CABAL_VERSION/g
s/{{DOCKER_WIKI_COMMIT}}/$WIKI_COMMIT/g
s/{{JORM_CLI_WIKI_COMMIT}}/$WIKI_COMMIT/g
s/{{BYRON_CLI_WIKI_COMMIT}}/$WIKI_COMMIT/g
" .github/RELEASE_TEMPLATE.md | sed -e "/{{CHANGELOG}}/r $CHANGELOG" > $OUT
sed -e "s/{{GIT_TAG}}/$GIT_TAG/g" \
-e "s/{{JORM_TAG}}/$JORM_TAG/g" \
-e "s/{{CARDANO_NODE_TAG}}/$CARDANO_NODE_TAG/g" \
-e "s/{{CABAL_VERSION}}/$CABAL_VERSION/g" \
-e "s/{{DOCKER_WIKI_COMMIT}}/$WIKI_COMMIT/g" \
-e "s/{{JORM_CLI_WIKI_COMMIT}}/$WIKI_COMMIT/g" \
-e "s/{{BYRON_CLI_WIKI_COMMIT}}/$WIKI_COMMIT/g" \
-e "/{{CHANGELOG}}/r $CHANGELOG" \
-e "/{{CHANGELOG}}/d" \
.github/RELEASE_TEMPLATE.md > $OUT

read -p "Do you want to create a commit and release-tag? (y/n)" -n 1 -r
echo # (optional) move to a new line
read -p "Do you want to create a commit and release-tag? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
git commit -am "Bump version from $OLD_CABAL_VERSION to $CABAL_VERSION"
msg="Bump version from $OLD_CABAL_VERSION to $CABAL_VERSION"
git diff --quiet || git commit -am "$msg"
git tag -s -m $GIT_TAG $GIT_TAG
fi

0 comments on commit cf3d9c9

Please sign in to comment.