Increase Panda grace period to 24 hours #4405
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this change?
The alt text helper in Composer depends on Grid API calls authenticated via Panda. This means after an hour, the alt text helper breaks when the cookie expires. (See this issue from 2015! https://github.com/guardian/workflow/issues/425)
For other API calls within Composer, we are mitigating this problem by extending the Panda grace period (e.g. https://github.com/guardian/flexible-content/pull/4903).
We'd ultimately like all Panda-authed tools to have a 24 hour grace period to allow users to continue using the tool uninterrupted for a working day.
(Detailed background in this Google doc)
How should a reviewer test this change?
It's complicated!
Within the Grid itself
Chrome
The Pandular iframe-based session refresh still works in Chrome, so you will effectively have a never-ending session and you can't easily test this behaviour.
Safari
Safari no longer allows us to send the third-party cookie to Google within the iframe so pandular so does not work. So, before this change, you should see the following after an hour:
After this change, it should carry on working for another 23 hours.
Alternatively, you can test the API call from Composer as described below. Composer has no iframe refresh mechanism (see https://github.com/guardian/flexible-content/issues/1522, opened in 2015 and never closed).
Integration with Composer alt text helper
grid.api.uri
in~/.gu/flexible-composerbackend.properties
to https://api.media.local.dev-gutools.co.ukgutoolsAuth-assym
to the clipboard from Chrome Dev Tools and then doingTested? Documented?