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

Fixes grant server updating grant status before site is ready #1823

Open
wants to merge 2 commits into
base: v2
Choose a base branch
from

Conversation

fgiorgetti
Copy link
Member

  • AccessGrant status.redeemed count was being increased before generateLinkConfig was able to resolve endpoints, returning the "Could not resolve any endpoints for requested link" error and exhausting the AccessGrant before it is actually consumed
  • Fixed null pointer issue found (eventually) while deleting a namespace for an active site

* AccessGrant status.redeemed count was being increased before
  generateLinkConfig was able to resolve endpoints, returning the
  "Could not resolve any endpoints for requested link" error and
  exhausting the AccessGrant before it is actually consumed
* Fixed null pointer issue found (eventually) while deleting a
  namespace for an active site
@fgiorgetti fgiorgetti requested a review from grs December 6, 2024 20:20
@fgiorgetti
Copy link
Member Author

fgiorgetti commented Dec 6, 2024

@grs I have noticed the problem above while testing an automated setup/teardown scenario.
Basically I got checkAndUpdateAccessToken called after the generator (which now writes to a buffer first).
This way, if the generator fails, the accessgrant.status.redeemed count is not increased.
It seems to work, but I am not sure, though, if that is the best to do here. Maybe the accessgrant should be moved to
ready, only after the site endpoints are also defined.

@grs
Copy link
Member

grs commented Dec 9, 2024

@grs I have noticed the problem above while testing an automated setup/teardown scenario. Basically I got checkAndUpdateAccessToken called after the generator (which now writes to a buffer first). This way, if the generator fails, the accessgrant.status.redeemed count is not increased. It seems to work, but I am not sure, though, if that is the best to do here. Maybe the accessgrant should be moved to ready, only after the site endpoints are also defined.

What I've been doing is waiting until both the site and the grant are ready before trying to create a token.

I think you ask two good questions here but I need a bit of time to think about them.

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