You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we will only ask Github for the license again if its > 2 hours since the last fetch.
This sometimes causes issues where a user tries to run a stata action locally, but is not logged in to the Github Desktop app. The fetch fails because of lack of auth, and the old license file is used, and its timestamp updated. So we will not attempt to fetch again for 2 hours, even though the user may have now logged in to Github Desktop.
Ideally, we'd know if the license was expired on fetch, but we can't know that without running a stata job.
One may be to detect if the failure to fetch the license was due to auth failure, or some other reason. If due to auth, we could not update the file timestamp (or possibly update it with a very short time, e.g. 2 min), to trigger re-fetching much sooner.
The text was updated successfully, but these errors were encountered:
Longer term, I think the current implementation is overly complicated for something that only changes once per year. An alternative would be to add an opensafely stata-license command, which fetches and verifies the current license, and stores it locally somewhere (this being the hard bit).
We can then handle license expired errors and prompt the user to a) ensure they are logged in to github and b) run opensafely stata-license to get the latest version. We could then also easily support setting the license manually with something like opensafely stata-license MYLICENSE
Currently, we will only ask Github for the license again if its > 2 hours since the last fetch.
This sometimes causes issues where a user tries to run a stata action locally, but is not logged in to the Github Desktop app. The fetch fails because of lack of auth, and the old license file is used, and its timestamp updated. So we will not attempt to fetch again for 2 hours, even though the user may have now logged in to Github Desktop.
Ideally, we'd know if the license was expired on fetch, but we can't know that without running a stata job.
One may be to detect if the failure to fetch the license was due to auth failure, or some other reason. If due to auth, we could not update the file timestamp (or possibly update it with a very short time, e.g. 2 min), to trigger re-fetching much sooner.
The text was updated successfully, but these errors were encountered: