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
Consider scenario of shell scripts running many ocm processes in a loop / in parallel.
config.Save should be atomic (write temp file -> os.Rename) to avoid partially corrupted partial file from being read by concurrent processes.
We should make sure this scenario can't hammer SSO with too many requests.
If token saved by ocm login is fresh, we do zero requests to SSO.
Currently most commands update the file with fresh tokens. They do this at the end, if successful.
Thus, if OCM API is consistently erroring for some reason (whether outage or bad use), request rate from ocm to SSO could spike to an attempt every execution. Can we move saving tokes to immediately after obtaining them?
ocm list ... commands don't save tokens.
If SSO itself is erroring, ideally we should obey some SSO rate limit / backoff across ocm executions. This would require saving backoff timestamp to file? Complex to do right, not sure worth doing.
The text was updated successfully, but these errors were encountered:
[based on looking at code, conclusions untested]
Consider scenario of shell scripts running many
ocm
processes in a loop / in parallel.config.Save
should be atomic (write temp file ->os.Rename
) to avoid partially corrupted partial file from being read by concurrent processes.We should make sure this scenario can't hammer SSO with too many requests.
ocm login
is fresh, we do zero requests to SSO.ocm
to SSO could spike to an attempt every execution. Can we move saving tokes to immediately after obtaining them?ocm list ...
commands don't save tokens.ocm
executions. This would require saving backoff timestamp to file? Complex to do right, not sure worth doing.The text was updated successfully, but these errors were encountered: