Skip to content

Commit c438610

Browse files
committed
Merge branch 'develop' into fb-leap-33/taxonomy-labels
2 parents 523c0b1 + adc2475 commit c438610

File tree

33 files changed

+444
-160
lines changed

33 files changed

+444
-160
lines changed

.github/workflows/invite-check.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ env:
99
INVITE_LINK: 'https://slack.labelstud.io/'
1010

1111
jobs:
12-
check:
12+
check_link:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Check if the invite link is valid
@@ -27,17 +27,20 @@ jobs:
2727
env:
2828
SLACK_BOT_TOKEN: ${{ secrets.SLACK_LS_BOT_TOKEN }}
2929

30+
check_domains:
31+
runs-on: ubuntu-latest
32+
steps:
3033
- name: Check if the invite link has teamDomains arg
3134
id: invite_link_has_teamdomains
3235
run: |
3336
grep -Eo '(&quot;|")teamSignupDomains(&quot;|")\s*:\s*\[\]' <(
3437
curl --silent --location ${{ env.INVITE_LINK }} -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:96.0) Gecko/20100101 Firefox/96.0' -H "Accept: application/json"
3538
)
36-
- name: Notify to Slack
37-
if: always() && steps.invite_link_has_teamdomains.outcome == 'failure'
38-
uses: slackapi/slack-github-action@v1.24
39-
with:
40-
channel-id: '${{ secrets.SLACK_LS_MONITORING_CHANNEL }}'
41-
slack-message: "Our <${{ env.INVITE_LINK }}|public invite link> was configured to allow signups only from a list of allowed domains:\n1. Go to <https://label-studio.slack.com/admin/settings|Workspace settings>, next to `Joining This Workspace`, click `Expand`.\n2. Delete all domains from the list, select `Allow invitations` and click `Save`."
42-
env:
43-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_LS_BOT_TOKEN }}
39+
# - name: Notify to Slack
40+
# if: always() && steps.invite_link_has_teamdomains.outcome == 'failure'
41+
# uses: slackapi/slack-github-action@v1.24
42+
# with:
43+
# channel-id: '${{ secrets.SLACK_LS_MONITORING_CHANNEL }}'
44+
# slack-message: "Our <${{ env.INVITE_LINK }}|public invite link> was configured to allow signups only from a list of allowed domains:\n1. Go to <https://label-studio.slack.com/admin/settings|Workspace settings>, next to `Joining This Workspace`, click `Expand`.\n2. Delete all domains from the list, select `Allow invitations` and click `Save`."
45+
# env:
46+
# SLACK_BOT_TOKEN: ${{ secrets.SLACK_LS_BOT_TOKEN }}

docs/scripts/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
var breadcrumb = require('./breadcrumb')(hexo);
1+
var breadcrumb = require("./breadcrumb")(hexo);
2+
var removeContent = require("./removeContent")(hexo);
23

3-
hexo.extend.helper.register('breadcrumb', breadcrumb, {async: true});
4+
hexo.extend.helper.register("breadcrumb", breadcrumb, { async: true });
5+
hexo.extend.helper.register("removeContent", removeContent, { async: true });

docs/scripts/removeContent.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
var HTMLParser = require('node-html-parser');
1+
var HTMLParser = require("node-html-parser");
22

3-
hexo.extend.filter.register('after_render:html', function(data) {
3+
module.exports = function (ctx) {
4+
return function includeTag(content) {
5+
const { config } = ctx;
46

5-
const { config } = this;
7+
/* If you’re on the OSS site, remove every `.enterprise-only` element. Opposite for the ENT site */
8+
const classToRemove =
9+
config.theme_config.tier === "opensource"
10+
? ".enterprise-only"
11+
: ".opensource-only";
612

7-
/* If you’re on the OSS site, remove every `.enterprise-only` element. Opposite for the ENT site */
8-
const classToRemove = config.theme_config.tier === "opensource" ? ".enterprise-only" : ".opensource-only";
13+
const template = HTMLParser.parse(content);
914

10-
const template = HTMLParser.parse(data);
15+
template.querySelectorAll(classToRemove).forEach((x) => x.remove());
1116

12-
template.querySelectorAll(classToRemove).forEach(x=> x.remove());
17+
content = template.toString();
1318

14-
data = template.toString();
15-
16-
return data;
17-
})
19+
return content;
20+
};
21+
};

docs/source/guide/helm_values.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ Parameters specific to the `app` portion of the Label Studio deployment.
174174
| `app.nginx.livenessProbe.periodSeconds` | Nginx sidecar container: How often (in seconds) to perform the probe | `5` |
175175
| `app.nginx.livenessProbe.successThreshold` | Nginx sidecar container: Minimum consecutive successes for the probe to be considered successful after having failed | `1` |
176176
| `app.nginx.livenessProbe.timeoutSeconds` | Nginx sidecar container: Number of seconds after which the probe times out | `3` |
177-
| `app.nginx.readinessProbe.enabled` | Nginx sidecar container: Enable redinessProbe | `true` |
178-
| `app.nginx.readinessProbe.path` | Nginx sidecar container: Path for reasinessProbe | `/version` |
177+
| `app.nginx.readinessProbe.enabled` | Nginx sidecar container: Enable readinessProbe | `true` |
178+
| `app.nginx.readinessProbe.path` | Nginx sidecar container: Path for readinessProbe | `/version` |
179179
| `app.nginx.readinessProbe.failureThreshold` | Nginx sidecar container: When a probe fails, Kubernetes will try failureThreshold times before giving up | `2` |
180180
| `app.nginx.readinessProbe.initialDelaySeconds` | Nginx sidecar container: Number of seconds after the container has started before probe initiates | `60` |
181181
| `app.nginx.readinessProbe.periodSeconds` | Nginx sidecar container: How often (in seconds) to perform the probe | `10` |
@@ -294,8 +294,9 @@ Parameters specific to the `rqworkers` service of your Label Studio Enterprise d
294294
## The `global.extraEnvironmentVars` usage
295295

296296
The `global.extraEnvironmentVars` section can be used to configure environment properties of Label Studio.
297-
Any key value put under this section translates to environment variables
298-
used to control Label Studio's configuration. Every key is upper-cased before setting the environment variable.
297+
298+
Any key value put under this section translates to environment variables used to control Label Studio's configuration. Every key is upper-cased before setting the environment variable.
299+
299300
An example:
300301

301302
```yaml
@@ -304,11 +305,16 @@ global:
304305
PG_USER: labelstudio
305306
```
306307
308+
!!! note
309+
If you are deploying to a production environment, you should set `SSRF_PROTECTION_ENABLED: true`. See [Secure Label Studio](security#Enable-SSRF-protection-for-production-environments).
310+
311+
307312
## The `global.featureFlags` usage
308313

309314
The `global.featureFlags` section can be used to set feature flags of Label Studio.
310-
Any key value put under this section translates to environment variables
311-
used to control Label Studio's feature flags configuration. Every key should start from `ff_` or `fflag_` in lower case.
315+
316+
Any key value put under this section translates to environment variables used to control Label Studio's feature flags configuration. Every key should start from `ff_` or `fflag_` in lower case.
317+
312318
An example:
313319

314320
```yaml

docs/source/guide/install_enterprise_k8s.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,10 +309,13 @@ global:
309309

310310
4. Install or upgrade Label Studio Enterprise using Helm.
311311

312-
### Use Helm to install Label Studio Enterprise on your Kubernetes cluster
312+
## Use Helm to install Label Studio Enterprise on your Kubernetes cluster
313313

314314
Use Helm to install Label Studio Enterprise on your Kubernetes cluster. Provide your custom resource definitions YAML file. Specify any environment variables that you need to set for your Label Studio Enterprise installation using the `--set` argument with the `helm install` command.
315315

316+
!!! note
317+
If you are deploying to a production environment, you should set the `SSRF_PROTECTION_ENABLED: true` environment variable. See [Secure Label Studio](security#Enable-SSRF-protection-for-production-environments).
318+
316319
From the command line, run the following:
317320
```shell
318321
helm install <RELEASE_NAME> heartex/label-studio -f ls-values.yaml

docs/source/guide/install_k8s.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,13 @@ global:
150150

151151
4. Install or upgrade Label Studio using Helm.
152152

153-
### Use Helm to install Label Studio on your Kubernetes cluster
153+
## Use Helm to install Label Studio on your Kubernetes cluster
154154

155155
Use Helm to install Label Studio on your Kubernetes cluster. Provide your custom resource definitions YAML file. Specify any environment variables that you need to set for your Label Studio installation using the `--set` argument with the `helm install` command.
156156

157+
!!! note
158+
If you are deploying to a production environment, you should set the `SSRF_PROTECTION_ENABLED: true` environment variable. See [Secure Label Studio](security#Enable-SSRF-protection-for-production-environments).
159+
157160
From the command line, run the following:
158161

159162
```shell

docs/source/guide/security.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ If you're using Label Studio Enterprise, you can further secure user access in m
6161

6262
Access to the REST API is restricted by user role and requires an access token that is specific to a user account. Access tokens can be reset at any time from the Label Studio UI or using the API.
6363

64+
## Enable SSRF protection for production environments
65+
66+
When deploying Label Studio into a production environment, set the `SSRF_PROTECTION_ENABLED` environment variable to `true`.
67+
68+
This variable is disabled by default to support users who are working with data in their local environments. However, it should be enabled in production usage.
69+
70+
6471
## Secure access to data in Label Studio
6572

6673
Data in Label Studio is stored in one or two places, depending on your deployment configuration.

docs/source/guide/ts+video.md

Lines changed: 0 additions & 79 deletions
This file was deleted.

docs/themes/v2/layout/page.ejs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
<% const showToc = pageContainsHeadings && tocPageTypes %>
55

6+
<% const formattedContent = removeContent(page.content) %>
7+
68
<div class="content-grid">
79
<div class="content-markdown">
810
<% if(page.type && page.parent !== undefined) { %>
@@ -11,18 +13,18 @@
1113
<% if (page.title.trim()) { %>
1214
<%- partial("component/heading", {text: page.title, size: "XLarge", tag: "h1", customClass: "home-page-title"}) %>
1315
<% } %>
14-
<%- page.content %>
16+
<%- formattedContent %>
1517
</div>
1618
<div class="page-rightsidebar">
1719
<% if (showToc) { %>
1820
<div class="toc">
1921
<%- partial("component/text", {text: "In this article", tag: "h3", size: "Eyebrow"}) %>
20-
<%- toc(page.content, {max_depth: 2, list_number: false, class: "toc-list"}) %>
22+
<%- toc(formattedContent, {max_depth: 2, list_number: false, class: "toc-list"}) %>
2123
</div>
2224
<% } %>
2325
<div class="toc-enterprise-cta">
2426
<span class="toc-enterprise-cta-copy">Try Enterprise Cloud for free</span>
2527
<%- partial("component/button", { url: "https://humansignal.com/free-trial", label: "Get Started", theme: "Tertiary" }) %>
2628
</div>
2729
</div>
28-
</div>
30+
</div>

label_studio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
package_name = 'label-studio'
55

66
# Package version
7-
__version__ = '1.10.1dev'
7+
__version__ = '1.9.2dev'
88

99
# pypi info
1010
__latest_version__ = None

0 commit comments

Comments
 (0)