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
{{ message }}
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.
If I change my username I'd like to keep my functions. This may involve storing the GitHub user ID which can't change. I expect this to affect the router, auth and dashboard along with all the other functions in the flow.
Current Behaviour
If I change my user name on GitHub, I expect to keep my functions, but currently they get orphaned/lost because we can't map to the new username.
Possible Solution
Steps to Reproduce (for bugs)
Register as "username1"
Push a function
Rename to "username2"
Access dashboard for username2 and see no functions
Context
Do we want a migration script to back-fill GitHub user IDs after this work is done?
Is this data public? @martindekov can you link to your previous script that we used for migration?
The text was updated successfully, but these errors were encountered:
I don't find any low-level information how it's implemented, so these are my assumpitons:
should be similar to how shell reads env-vars; not sure if they can be red with os.Getenv() which AFAIK is cheap
env-vars should live for the entire time a pod is running and be recreated after restart
If we create a separate map function, being the configMap pod, it can serve all other functions, returning the value of username variable.
We still have the problem with some allowed symbols in usernames, that can't be used as env-var keys, but they are minimised (much less restrictions as for a pod name). What we can do is:
use unique mapping function to resolve that
restrict some very corner-case symbols in usernames, like !?*#@, etc
The use of the userid in the function name / user deployment means we will also avoid any clashes that arise from similar prefixes.
I.e. alexellis has a function uk-homepage
Then alexellis-uk (another username) publishes a function named homepage
In this instance the second user would overwrite the first user's deployment. For this reason we need to use the unique userid as the prefix for all user-artefacts in the cluster.
To go further, in K8s some objects cannot be prefixed with a number, so we'd have to go for "f-userid-name" for instance giving:
f-123-uk-homepage and f-124-uk-homepage meaning we have no clashes.
alexellis
changed the title
Move to user-id vs. username for user deployments
Move to user-id vs. username for user deployments to avoid potential clashes
Feb 6, 2019
Expected Behaviour
If I change my username I'd like to keep my functions. This may involve storing the GitHub user ID which can't change. I expect this to affect the router, auth and dashboard along with all the other functions in the flow.
Current Behaviour
If I change my user name on GitHub, I expect to keep my functions, but currently they get orphaned/lost because we can't map to the new username.
Possible Solution
Steps to Reproduce (for bugs)
Context
Do we want a migration script to back-fill GitHub user IDs after this work is done?
Is this data public? @martindekov can you link to your previous script that we used for migration?
The text was updated successfully, but these errors were encountered: