From 69cafee156d088ef4de0fca0fc4dfbc53ecb3678 Mon Sep 17 00:00:00 2001 From: Troy McConaghy Date: Wed, 17 May 2017 15:20:20 +0200 Subject: [PATCH 1/5] Add steps to Release_Process.md, to update Docker image version for k8s --- Release_Process.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Release_Process.md b/Release_Process.md index e4a988a1..be4c448a 100644 --- a/Release_Process.md +++ b/Release_Process.md @@ -10,6 +10,7 @@ that [major version 0.x does not export a stable API](http://semver.org/#spec-it A minor release is preceeded by a feature freeze and created from the 'master' branch. This is a summary of the steps we go through to release a new minor version of BigchainDB Server. 1. Update the `CHANGELOG.md` file in master +1. In `k8s/bigchaindb/bigchaindb-dep.yaml`, find the line of the form `image: bigchaindb/bigchaindb:0.8.1` and change the version number to the new version number, e.g. `0.9.0`. (This is the Docker image that Kubernetes should pull from Docker Hub.) Commit that change to master 1. Create and checkout a new branch for the minor release, named after the minor version, without a preceeding 'v', e.g. `git checkout -b 0.9` (*not* 0.9.0, this new branch will be for e.g. 0.9.0, 0.9.1, 0.9.2, etc. each of which will be identified by a tagged commit) 1. In `bigchaindb/version.py`, update `__version__` and `__short_version__`, e.g. to `0.9` and `0.9.0` (with no `.dev` on the end) 1. Commit that change, and push the new branch to GitHub @@ -26,8 +27,11 @@ A patch release is similar to a minor release, but piggybacks on an existing min 1. Check out the minor release branch, e.g. `0.9` 1. Apply the changes you want, e.g. using `git cherry-pick`. 1. Update the `CHANGELOG.md` file -1. Increment the patch version in `bigchaindb/version.py`, e.g. "0.9.1" -1. Commit that change, and push the updated branch to GitHub +1. Increment the patch version in `bigchaindb/version.py`, e.g. `0.9.1` +1. Commit that change +1. In `k8s/bigchaindb/bigchaindb-dep.yaml`, find the line of the form `image: bigchaindb/bigchaindb:0.9.0` and change the version number to the new version number, e.g. `0.9.1`. (This is the Docker image that Kubernetes should pull from Docker Hub.) +1. Commit that change +1. Push the updated minor release branch to GitHub 1. Follow steps outlined in [Common Steps](#common-steps) 1. Cherry-pick the `CHANGELOG.md` update commit (made above) to the `master` branch From c6133c827d51edb5c10a8577b15b37ecf982b5d2 Mon Sep 17 00:00:00 2001 From: Troy McConaghy Date: Wed, 17 May 2017 14:29:37 +0200 Subject: [PATCH 2/5] docs: updated link to JS/nodejs driver --- docs/server/source/drivers-clients/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/server/source/drivers-clients/index.rst b/docs/server/source/drivers-clients/index.rst index 0bfde7ad..ef749d55 100644 --- a/docs/server/source/drivers-clients/index.rst +++ b/docs/server/source/drivers-clients/index.rst @@ -20,7 +20,7 @@ Community-Driven Libraries and Tools Some of these projects are a work in progress, but may still be useful. -* `Javascript transaction builder `_ +* `JavaScript / Node.js driver `_ * `Haskell transaction builder `_ * `Go driver `_ * `Java driver `_ From cda8259e5704b0d03568d602d7f039c5219bf518 Mon Sep 17 00:00:00 2001 From: Rodolphe Marques Date: Wed, 24 May 2017 12:38:34 +0200 Subject: [PATCH 3/5] Fixed typos --- bigchaindb/backend/query.py | 4 ++-- bigchaindb/core.py | 2 +- bigchaindb/models.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bigchaindb/backend/query.py b/bigchaindb/backend/query.py index 8245fb3d..9b2197a5 100644 --- a/bigchaindb/backend/query.py +++ b/bigchaindb/backend/query.py @@ -229,7 +229,7 @@ def get_assets(connection, asset_ids): """Get a list of assets from the assets table. Args: - asset_ids (list): a of list of ids for the assets to be retrieved from + asset_ids (list): a list of ids for the assets to be retrieved from the database. Returns: @@ -293,7 +293,7 @@ def get_last_voted_block_id(connection, node_pubkey): node_pubkey (str): base58 encoded public key. Returns: - The last block id the node has voted on. If the node didn't cast + The id of the last block the node has voted on. If the node didn't cast any vote then the genesis block id is returned. """ diff --git a/bigchaindb/core.py b/bigchaindb/core.py index 1cd21222..b2c8d398 100644 --- a/bigchaindb/core.py +++ b/bigchaindb/core.py @@ -648,7 +648,7 @@ class Bigchain(object): asset_ids (:obj:`list` of :obj:`str`): A list of asset_ids to retrieve from the database. - Returs: + Returns: list: The list of assets returned from the database. """ return backend.query.get_assets(self.connection, asset_ids) diff --git a/bigchaindb/models.py b/bigchaindb/models.py index c77c3338..58743939 100644 --- a/bigchaindb/models.py +++ b/bigchaindb/models.py @@ -106,7 +106,7 @@ class Transaction(Transaction): if tx_dict['operation'] in [Transaction.CREATE, Transaction.GENESIS]: # TODO: Maybe replace this call to a call to get_asset_by_id asset = list(bigchain.get_assets([tx_dict['id']]))[0] - asset.pop('id') + del asset['id'] tx_dict.update({'asset': asset}) return cls.from_dict(tx_dict) From ae564974561e4de29d8469252aff69ef073432bd Mon Sep 17 00:00:00 2001 From: Leo Arias Date: Fri, 19 May 2017 15:37:38 -0600 Subject: [PATCH 4/5] set the version of the snap using git tags closes #1436 --- snap/snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index aa3a9bca..4fe5618f 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: bigchaindb -version: master +version: git summary: a scalable blockchain database description: | With high throughput, sub-second latency and powerful functionality to From e9979dda85732eb3134fd0a670c9a92ed3c29e25 Mon Sep 17 00:00:00 2001 From: Rodolphe Marques Date: Wed, 24 May 2017 17:05:43 +0200 Subject: [PATCH 5/5] fixed typos --- bigchaindb/models.py | 13 ++++++------- tests/test_block_model.py | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/bigchaindb/models.py b/bigchaindb/models.py index 58743939..8ca79b67 100644 --- a/bigchaindb/models.py +++ b/bigchaindb/models.py @@ -351,7 +351,7 @@ class Block(object): def decouple_assets(self): """ - Extracts the assets from the `CREATE` transactions in the block. + Extracts the assets from the ``CREATE`` transactions in the block. Returns: tuple: (assets, block) with the assets being a list of dicts and @@ -372,9 +372,9 @@ class Block(object): @staticmethod def couple_assets(block_dict, assets): """ - Give a block_dict with not assets (as returned from a database call) - and a list of assets, reconstruct the original block by puting the - assets back into the `CREATE` transactions in the block. + Given a block_dict with no assets (as returned from a database call) + and a list of assets, reconstruct the original block by putting the + assets back into the ``CREATE`` transactions in the block. Args: block_dict (:obj:`dict`): The block dict as returned from a @@ -391,15 +391,14 @@ class Block(object): for transaction in block_dict['block']['transactions']: if transaction['operation'] in [Transaction.CREATE, Transaction.GENESIS]: - transaction.update({'asset': assets.get(transaction['id'], - None)}) + transaction.update({'asset': assets.get(transaction['id'])}) return block_dict @staticmethod def get_asset_ids(block_dict): """ Given a block_dict return all the asset_ids for that block (the txid - of CREATE transactions). Usefull to know which assets to retrieve + of CREATE transactions). Useful to know which assets to retrieve from the database to reconstruct the block. Args: diff --git a/tests/test_block_model.py b/tests/test_block_model.py index 0824c40f..6e14d293 100644 --- a/tests/test_block_model.py +++ b/tests/test_block_model.py @@ -220,7 +220,7 @@ class TestBlockModel(object): block_dict_reconstructed = Block.couple_assets(block_dict, assets_from_block) - # check that the reconstructed block is the as the original block + # check that the reconstructed block is the same as the original block assert block == Block.from_dict(block_dict_reconstructed) def test_get_asset_ids(self, b):