Skip to content

Add jupyterhub/events/server_action/v1.json schema #7

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions jupyterhub/events/server_action/v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$id": "https://schema.jupyter.org/jupyterhub/events/server-action/v1",
"title": "JupyterHub server events",
"type": "object",
"version": 1,
"description": "Record actions on user servers made via JupyterHub.\n\nJupyterHub can perform various actions on user servers via \ndirect interaction from users, or via the API. This event is \nrecorded whenever either of those happen.\n\nLimitations:\n\n1. This does not record all server starts / stops, only those\n explicitly performed by JupyterHub. For example, a user's server\n can go down because the node it was running on dies. That will\n not cause an event to be recorded, since it was not initiated\n by JupyterHub. In practice this happens often, so this is not\n a complete record.\n2. Events are only recorded when an action succeeds.\n",
"properties": {
"action": {
"description": "Action performed by JupyterHub.\n\nThis is a required field.\n\nPossibl Values:\n\n1. start\n A user's server was successfully started\n\n2. stop\n A user's server was successfully stopped\n",
"enum": [
"start",
"stop"
]
},
"servername": {
"description": "Name of the server this action was performed on.\n\nJupyterHub supports each user having multiple servers with\narbitrary names, and this field specifies the name of the\nserver.\n\nThe 'default' server is denoted by the empty string\n",
"type": "string"
},
"username": {
"description": "Name of the user whose server this action was performed on.\n\nThis is the normalized name used by JupyterHub itself,\nwhich is derived from the authentication provider used but \nmight not be the same as used in the authentication provider.\n",
"type": "string"
}
},
"required": [
"action",
"username",
"servername"
]
}
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ path = "jupyter_schemas.py"

[tool.hatch.build.targets.wheel.shared-data]
"jupyter_server" = "share/jupyter/schema/jupyter_server"
"jupyterhub" = "share/jupyter/schema/jupyterhub"

[tool.hatch.envs.default]
dependencies = ["coverage[toml]>=6.5", "pytest"]
Expand Down