-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat: add CLI flag and environment variable to enable legacy API tokens #7388
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
Conversation
Add CLI flag and environment variable to enable legacy API token authentication. * Add `--enable-legacy-api-token` flag to `label_studio/core/argparser.py`. * Add `LABEL_STUDIO_ENABLE_LEGACY_API_TOKEN` environment variable to `label_studio/core/settings/base.py`. * Update `docs/source/guide/start.md` to include the new flag and environment variable. * Modify `label_studio/server.py` to enable legacy API tokens if the flag or environment variable is set. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/HumanSignal/label-studio?shareId=XXXX-XXXX-XXXX-XXXX).
👷 Deploy request for label-studio-docs-new-theme pending review.Visit the deploys page to approve it
|
👷 Deploy request for heartex-docs pending review.Visit the deploys page to approve it
|
🔍 Existing Issues For ReviewYour pull request is modifying functions with the following pre-existing issues: 📄 File: label_studio/server.py
Did you find this useful? React with a 👍 or 👎 |
✅ Deploy Preview for label-studio-storybook ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Fixes #7355 |
…acy API token support * **Argument Parser** - Add `--enable-legacy-api-token` flag to the argument parser in `label_studio/core/argparser.py` * **Settings** - Add `LABEL_STUDIO_ENABLE_LEGACY_API_TOKEN` environment variable in `label_studio/core/settings/base.py` - Set default value to `False` * **Documentation** - Update `docs/source/guide/start.md` to include `--enable-legacy-api-token` and `LABEL_STUDIO_ENABLE_LEGACY_API_TOKEN` * **Organization Functions** - Update `label_studio/organizations/functions.py` to set `legacy_api_tokens_enabled` based on the flag or environment variable * **Server Initialization** - Pass `enable_legacy_api_token` input argument to `create_organization` in `label_studio/server.py`
@pakelley Please feel free to make any edits you like if you want to change anything - since I am Out-of-Office for the next couple days |
Head branch was pushed to by a user without write access
@pakelley I fixed merge conflicts merging with |
@benglewis I'm still seeing this in the tests:
Mind checking again that this is set? For what it's worth, we're cutting a new release tomorrow and I'd love to get this in before the cut 🙂 |
@pakelley I believe that in this repository, the GitHub Actions workflows are not designed to work for people who are not HumanSignal employees. Instead, I saw that with my co-worker ( @ddishi ) what @bmartel did with his code was to create a parallel Pull Request (#7000) with the same code which he synchronized and used that to check the GitHub Actions workflows. Hopefully this makes it possible to merge this 🙏 |
I see, thanks for your patience here @benglewis ! I've created #7413 . I'll figure out how we can either make this process easier or at least add it to CONTRIBUTING.md for now. |
@pakelley Great. Thank you 🙌 . I see that you merged the parallel PR - is it possible to merge this PR too? |
@benglewis I'm closing this one since the commits from this PR were all merged as part of #7413 |
Hi @benglewis ! Could you email me regarding this PR? [email protected] thanks! |
Add CLI flag and environment variable to enable legacy API token authentication.
--enable-legacy-api-token
flag tolabel_studio/core/argparser.py
.LABEL_STUDIO_ENABLE_LEGACY_API_TOKEN
environment variable tolabel_studio/core/settings/base.py
.docs/source/guide/start.md
to include the new flag and environment variable.label_studio/server.py
to enable legacy API tokens if the flag or environment variable is set.For more details, open the Copilot Workspace session.