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

Idempotent mediator invitation url #113

Closed
wants to merge 3 commits into from

Conversation

chumbert
Copy link

@chumbert chumbert commented Sep 6, 2021

Intermediary PR to make sure everything fits before proposing this on aca-py main repo.

Connection to the mediator is now established using the url stored at provision-time. If the invitation is changed, the new one is stored and used.

A new connection is still established at each start.

@chumbert chumbert self-assigned this Sep 6, 2021
@dbluhm
Copy link
Collaborator

dbluhm commented Sep 8, 2021

If the invite is the same as last time, don't we want to skip creation of a new connection?

aries_cloudagent/core/conductor.py Outdated Show resolved Hide resolved
aries_cloudagent/commands/provision.py Outdated Show resolved Hide resolved
@chumbert
Copy link
Author

Thanks for the review guys. This is the kind of feedback I was looking for since I'm still not fully acquainted with aca-py. I will submit an update next week.

@dbluhm
Copy link
Collaborator

dbluhm commented Sep 10, 2021

@chumbert it may make sense to address #117 in this PR as well

To ease Aca-py's deployment in scenarios where command line arguments
cannot be changed easily, make `--mediatior-invitation` and
`--mediator-connections-invite` available to the `provision` command.

`provision` stores the mediator invite to be used by `start` command. If
the invitation changed, `start` updates the stored invite and uses the
new one.

Signed-off-by: Clément Humbert <[email protected]>
@chumbert chumbert force-pushed the idempotent-mediator-invitation-url branch from 2a14100 to eeb1fbf Compare September 13, 2021 09:54
Whenever the conductor needs to setup a new mediation connection (eg:
the invitation url provided by the command line arguments has changed),
clear the old default mediator settings prior to setting up the new
connection and default mediator.

Signed-off-by: Clément Humbert <[email protected]>
@chumbert
Copy link
Author

chumbert commented Sep 13, 2021

Connections are not created at each start anymore (implements #111).

Default mediator configuration is cleared before establishing a new mediation connection and setting it as default (fixes #117).

Copy link
Collaborator

@dbluhm dbluhm left a comment

Choose a reason for hiding this comment

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

Looks good!

@chumbert
Copy link
Author

Thanks for the review, I'll open a PR on the original repo.

@chumbert chumbert closed this Sep 14, 2021
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.

3 participants