Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…t-python into per_tenant_logging
  • Loading branch information
shaangill025 committed Oct 16, 2023
2 parents 8d8859f + a7d2833 commit 834cb62
Show file tree
Hide file tree
Showing 69 changed files with 2,638 additions and 1,180 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ test-reports
.python-version
docker
env
.venv
4 changes: 4 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ build:
sphinx:
builder: dirhtml
configuration: docs/conf.py

python:
install:
- requirements: docs/requirements.txt
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,7 @@ async with profile.session() as session:
- Various documentation and bug fixes
- Add admin routes for fetching and accepting the ledger transaction author agreement [#144](https://github.com/hyperledger/aries-cloudagent-python/pull/144)
- Add support for receiving connection-less proof presentations [#296](https://github.com/hyperledger/aries-cloudagent-python/pull/296)
- Set attachment id explicitely in unbound proof request [#289](https://github.com/hyperledger/aries-cloudagent-python/pull/289)
- Set attachment id explicitly in unbound proof request [#289](https://github.com/hyperledger/aries-cloudagent-python/pull/289)
- Add create-proposal admin endpoint to the present-proof protocol [#288](https://github.com/hyperledger/aries-cloudagent-python/pull/288)
- Remove old anon/authcrypt support [#282](https://github.com/hyperledger/aries-cloudagent-python/pull/282)
- Allow additional endpoints to be specified [#276](https://github.com/hyperledger/aries-cloudagent-python/pull/276)
Expand Down
4 changes: 2 additions & 2 deletions Endorser.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

ACA-Py supports an [Endorser Protocol](https://github.com/hyperledger/aries-rfcs/pull/586), that allows an un-privileged agent (an "Author") to request another agent (the "Endorser") to sign their transactions so they can write these transactions to the ledger. This is required on Indy ledgers, where new agents will typically be granted only "Author" privileges.

Transaction Endorsement is built into the protocols for Schema, Credential Definition and Revocation, and endorsements can be explicitely requested, or ACA-Py can be configured to automate the endorsement workflow.
Transaction Endorsement is built into the protocols for Schema, Credential Definition and Revocation, and endorsements can be explicitly requested, or ACA-Py can be configured to automate the endorsement workflow.

## Setting up Connections between Authors and Endorsers

Expand All @@ -12,7 +12,7 @@ Once the connection is established and `active`, the "role" (either Author or En

## Requesting Transaction Endorsement

Transaction Endorsement is built into the protocols for Schema, Credential Definition and Revocation. When executing one of the endpoints that will trigger a ledger write, an endorsement protocol can be explicitely requested by specifying the `connection_id` (of the Endorser connection) and `create_transaction_for_endorser`.
Transaction Endorsement is built into the protocols for Schema, Credential Definition and Revocation. When executing one of the endpoints that will trigger a ledger write, an endorsement protocol can be explicitly requested by specifying the `connection_id` (of the Endorser connection) and `create_transaction_for_endorser`.

(Note that endorsement requests can be automated, see the secion on "Configuring ACA-Py" below.)

Expand Down
19 changes: 0 additions & 19 deletions NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -355,25 +355,6 @@ THE SOFTWARE.
-----------------------------------------------------------------
-----------------------------------------------------------------

=> msgpack

Copyright (C) 2008-2011 INADA Naoki <[email protected]>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-----------------------------------------------------------------
-----------------------------------------------------------------

=> requests

Copyright (C) 2019 Kenneith Reitz
Expand Down
19 changes: 19 additions & 0 deletions UpgradingACA-Py.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,25 @@ is high (such as a "resave connections" upgrade to a deployment with many, many
connections), you may want to do a test upgrade offline first, to see if there
is likely to be a service disruption during the upgrade. Plan accordingly!

## Tagged upgrades
Upgrades are defined in the [Upgrade Definition YML file], in addition to specifying upgrade actions by version they can also be specified by named tags. Unlike version based upgrades where all applicable version based actions will be performed based upon sorted order of versions, with named tags only actions corresponding to provided tags will be performed. Note: `--force-upgrade` is required when running name tags based upgrade [i.e. provding `--named-tag`]

Tags are specfied in YML file as below:
```
fix_issue_rev_reg:
fix_issue_rev_reg_records: true
```

Example
```
./scripts/run_docker upgrade --force-upgrade --named-tag fix_issue_rev_reg
In case, running multiple tags [say test1 & test2]:
./scripts/run_docker upgrade --force-upgrade --named-tag test1 --named-tag test2
```



## Exceptions

There are a couple of upgrade exception conditions to consider, as outlined
Expand Down
4 changes: 3 additions & 1 deletion aries_cloudagent/commands/default_version_upgrade_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ v0.7.1:
v0.7.0:
update_existing_records: false
v0.6.0:
update_existing_records: false
update_existing_records: false
fix_issue_rev_reg:
fix_issue_rev_reg_records: true
2 changes: 1 addition & 1 deletion aries_cloudagent/commands/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def execute(argv: Sequence[str] = None):
settings = get_settings(args)
common_config(settings)

# set ledger to read only if explicitely specified
# set ledger to read only if explicitly specified
settings["ledger.read_only"] = settings.get("read_only_ledger", False)

# Create the Conductor instance
Expand Down
42 changes: 41 additions & 1 deletion aries_cloudagent/commands/tests/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,44 @@ async def test_upgrade_callable(self):
}
)

async def test_upgrade_callable_named_tag(self):
version_storage_record = await self.storage.find_record(
type_filter="acapy_version", tag_query={}
)
await self.storage.delete_record(version_storage_record)
with async_mock.patch.object(
test_module,
"wallet_config",
async_mock.CoroutineMock(
return_value=(
self.profile,
async_mock.CoroutineMock(did="public DID", verkey="verkey"),
)
),
), async_mock.patch.object(
test_module.yaml,
"safe_load",
async_mock.MagicMock(
return_value={
"v0.7.2": {
"resave_records": {
"base_record_path": [
"aries_cloudagent.connections.models.conn_record.ConnRecord"
]
},
"update_existing_records": True,
},
"fix_issue_rev_reg": {"fix_issue_rev_reg_records": True},
}
),
):
await test_module.upgrade(
settings={
"upgrade.named_tags": ["fix_issue_rev_reg"],
"upgrade.force_upgrade": True,
}
)

async def test_upgrade_x_same_version(self):
version_storage_record = await self.storage.find_record(
type_filter="acapy_version", tag_query={}
Expand Down Expand Up @@ -169,7 +207,9 @@ async def test_upgrade_missing_from_version(self):
"upgrade.config_path": "./aries_cloudagent/commands/default_version_upgrade_config.yml",
}
)
assert "No upgrade from version found in wallet or" in str(ctx.exception)
assert "Error during upgrade: No upgrade from version or tags found" in str(
ctx.exception
)

async def test_upgrade_x_callable_not_set(self):
version_storage_record = await self.storage.find_record(
Expand Down
Loading

0 comments on commit 834cb62

Please sign in to comment.