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

fix(w3up-client): authorize agent to use space #115

Merged
merged 1 commit into from
Dec 20, 2024
Merged

Conversation

fforbeck
Copy link
Member

We need to save the space before setting it as the current space, otherwise the authorization flow will fail because the agent won't be allowed to use that space.

image

@fforbeck fforbeck requested a review from alanshaw December 20, 2024 11:48
@fforbeck fforbeck self-assigned this Dec 20, 2024
Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

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

I don't think this is the right place for this. This needs to be done in createSpace, before authorizeContentServe is called.

However I don't really understand why it was not already saved as part of provisioning?

@fforbeck
Copy link
Member Author

I don't think this is the right place for this. This needs to be done in createSpace, before authorizeContentServe is called.

However I don't really understand why it was not already saved as part of provisioning?

The provisioning only happens if the user passes the account which is optional. That's why it is not saved (just caught this case while testing the create space in the Console App).
Makes sense, I will move it to the createSpace function before the authorizeContentServe.

@fforbeck fforbeck requested a review from alanshaw December 20, 2024 12:03
Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

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

I guess my question is more, why is the console creating ephemeral spaces - not passing account?

@fforbeck
Copy link
Member Author

I guess my question is more, why is the console creating ephemeral spaces - not passing account?

Got it. That happens because the Console implements the provisioning & recovery logic on the client side, we didn't have this provisioning logic on the w3up-client before. Now that we have it we could update the Console. I have a ticket to tackle this: storacha/project-tracking#237, but it will require some additional changes in the createSpace to pass the provider. I won't include that in this PR.

@fforbeck fforbeck merged commit 3719670 into main Dec 20, 2024
3 checks passed
fforbeck pushed a commit that referenced this pull request Dec 20, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.1.2](client-v1.1.1...client-v1.1.2)
(2024-12-20)


### Fixes

* **w3up-client:** authorize agent to use space
([#115](#115))
([3719670](3719670))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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