Skip to content

Commit d916473

Browse files
committed
Merge branch 'develop' into 'fb-leap-1983/conditional-taxonomy'
Workflow run: https://github.com/HumanSignal/label-studio/actions/runs/14635829496
2 parents d70e3bf + 36eaffd commit d916473

File tree

220 files changed

+6898
-4506
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+6898
-4506
lines changed

.github/workflows/build_pypi.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ env:
6464
PYTHON_VERSION_FILE: "pyproject.toml"
6565
FRONTEND_MONOREPO_DIR: "web"
6666
NODE: "18"
67+
POETRY_VERSION: 2.1.2
6768

6869
jobs:
6970
pypi:
@@ -112,9 +113,7 @@ jobs:
112113
run: yarn version:libs
113114

114115
- name: "Install poetry"
115-
env:
116-
POETRY_VERSION: ${{ vars.POETRY_VERSION }}
117-
run: pipx install "poetry==${POETRY_VERSION}"
116+
run: pipx install "poetry==${{ env.POETRY_VERSION }}"
118117

119118
- name: "Set up Python"
120119
id: setup_python

.github/workflows/build_pypi_nightly.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
104104
- name: Create Nightly Release
105105
id: create_release
106-
uses: softprops/[email protected].1
106+
uses: softprops/[email protected].2
107107
with:
108108
token: ${{ secrets.GIT_PAT }}
109109
body_path: ${{ github.workspace }}-CHANGELOG.txt
@@ -141,7 +141,7 @@ jobs:
141141
id: slack_notify_ops_release
142142
uses: slackapi/[email protected]
143143
with:
144-
channel-id: '${{ vars.SLACK_CH_RELEASE_TRAIN }}'
144+
channel-id: 'C01RJV08UJK'
145145
slack-message: |
146146
❌ Nightly PyPI build failed! <!subteam^${{ vars.SLACK_GR_DEVOPS }}>
147147

.github/workflows/docker-build.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ env:
2121
DOCKER_CLI_EXPERIMENTAL: enabled
2222
IMAGE_NAME: "${{ vars.DOCKERHUB_ORG }}/label-studio"
2323
DOCKER_IMAGE_TAG_CHECK_NAME: "Docker image tag"
24+
POETRY_VERSION: 2.1.2
2425

2526
jobs:
2627
docker_build_and_push:
@@ -145,7 +146,7 @@ jobs:
145146
build-args: |
146147
BRANCH_OVERRIDE=${{ inputs.branch_name }}
147148
VERSION_OVERRIDE=${{ steps.version.outputs.build_version }}
148-
POETRY_VERSION=${{ vars.POETRY_VERSION }}
149+
POETRY_VERSION=${{ env.POETRY_VERSION }}
149150
150151
- name: Create Docker image tag Check
151152
uses: actions/github-script@v7
@@ -187,4 +188,7 @@ jobs:
187188
uses: slackapi/[email protected]
188189
with:
189190
channel-id: 'C01RJV08UJK'
190-
payload: "{\"text\": \":alert:<!subteam^${{ vars.SLACK_GR_DEVOPS }}>\\n*Branch: ${{ inputs.branch_name }}*\\n*Build status: <https://github.com/${{ env.GITHUB_REPOSITORY }}/actions/runs/${{ env.GITHUB_RUN_ID }}|FAILED>*\\n*Commit: <https://github.com/${{ env.GITHUB_REPOSITORY }}/commit/${{ steps.version.outputs.sha }}|${{ steps.version.outputs.sha }}>*\"}"
191+
slack-message: |
192+
❌ Docker build failed for *develop* branch! <!subteam^${{ vars.SLACK_GR_DEVOPS }}>
193+
194+
><https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|[Workflow run]>

.github/workflows/fm-command.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
if: github.event.client_payload.slash_command.args.unnamed.arg1 == 'sync'
1414
uses: ./.github/workflows/follow-merge-upstream-repo-sync-v2.yml
1515
with:
16-
branch_name: ${{ github.event.client_payload.pull_request.head.ref }}
16+
branch_name: ${{ github.event.client_payload.slash_command.args.unnamed.arg2 || github.event.client_payload.pull_request.head.ref }}
1717
secrets: inherit
1818

1919
help:
@@ -30,5 +30,5 @@ jobs:
3030
body: |
3131
> Command | Description
3232
> --- | ---
33-
> /fm sync | Sync upstream prs and merge with pull request base
33+
> /fm sync <Optional branch override> | Sync upstream prs and merge with pull request base
3434
reactions: hooray

.github/workflows/follow-merge-upstream-repo-sync-v2.yml

+61-44
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ concurrency:
1717
group: ${{ github.workflow }}-${{ inputs.branch_name }}
1818
cancel-in-progress: true
1919

20+
env:
21+
POETRY_VERSION: 2.1.2
22+
2023
jobs:
2124
sync:
2225
name: Sync PR
@@ -43,12 +46,37 @@ jobs:
4346
repository: HumanSignal/actions-hub
4447
path: ./.github/actions-hub
4548

49+
- name: Team details
50+
id: team_details
51+
uses: ./.github/actions-hub/actions/team-details
52+
with:
53+
jira-server: "${{ vars.JIRA_SERVER }}"
54+
jira-username: "${{ secrets.JIRA_USERNAME }}"
55+
jira-token: "${{ secrets.JIRA_TOKEN }}"
56+
github_token: "${{ secrets.GIT_PAT }}"
57+
continue-on-error: true
58+
59+
- name: Git Configure
60+
uses: ./.github/actions-hub/actions/git-configure
61+
with:
62+
username: "${{ steps.team_details.outputs.github-username }}"
63+
64+
- name: Get Upstream PRs
65+
uses: ./.github/actions-hub/actions/follow-merge-upstream-prs
66+
id: upstream-prs
67+
with:
68+
branch_name: "${{ inputs.branch_name }}"
69+
poetry_repositories: "label-studio-sdk"
70+
infra_repositories: ""
71+
github_token: "${{ secrets.GIT_PAT }}"
72+
4673
- name: Find or Create branch
4774
uses: ./.github/actions-hub/actions/github-find-or-create-branch
4875
id: get-branch
4976
with:
5077
github_token: ${{ secrets.GIT_PAT }}
51-
branch_name: "${{ inputs.branch_name }}"
78+
base_branch_name: "${{ steps.upstream-prs.outputs.base_branch_name }}"
79+
branch_name: "${{ steps.upstream-prs.outputs.branch_name }}"
5280

5381
- name: Checkout
5482
uses: actions/checkout@v4
@@ -64,33 +92,8 @@ jobs:
6492
repository: HumanSignal/actions-hub
6593
path: ./.github/actions-hub
6694

67-
- name: Get Upstream PRs
68-
uses: ./.github/actions-hub/actions/follow-merge-upstream-prs
69-
id: upstream-prs
70-
with:
71-
branch_name: "${{ inputs.branch_name }}"
72-
poetry_repositories: "label-studio-sdk"
73-
infra_repositories: ""
74-
github_token: "${{ secrets.GIT_PAT }}"
75-
76-
- name: Git Configure
77-
uses: ./.github/actions-hub/actions/git-configure
78-
with:
79-
username: ${{ github.event.client_payload.actor || steps.upstream-prs.outputs.author_username }}
80-
81-
- name: Git Merge
82-
id: merge
83-
continue-on-error: true
84-
uses: ./.github/actions-hub/actions/git-merge
85-
with:
86-
base_branch: ${{ steps.upstream-prs.outputs.base_branch_name }}
87-
head_branch: ${{ steps.get-branch.outputs.branch_name }}
88-
our_files: "pyproject.toml poetry.lock web/package.json web/yarn.lock"
89-
9095
- name: "Install poetry"
91-
env:
92-
POETRY_VERSION: ${{ vars.POETRY_VERSION }}
93-
run: pipx install "poetry==${POETRY_VERSION}"
96+
run: pipx install "poetry==${{ env.POETRY_VERSION }}"
9497

9598
- name: "Set up Python"
9699
id: setup_python
@@ -119,6 +122,15 @@ jobs:
119122
git status -s
120123
git commit --allow-empty -m "${COMMIT_MESSAGE}" -m "${COMMIT_MESSAGE_WORKFLOW_LINK}"
121124
125+
- name: Git Merge
126+
id: merge
127+
continue-on-error: true
128+
uses: ./.github/actions-hub/actions/git-merge
129+
with:
130+
base_branch: ${{ steps.upstream-prs.outputs.base_branch_name }}
131+
head_branch: ${{ steps.get-branch.outputs.branch_name }}
132+
our_files: "pyproject.toml poetry.lock web/package.json web/yarn.lock"
133+
122134
- name: Git Push
123135
uses: ./.github/actions-hub/actions/git-push
124136

@@ -150,27 +162,12 @@ jobs:
150162
pullrequest_number: "${{ steps.get-pr.outputs.number }}"
151163
labels: "FM Stale"
152164

153-
- name: Merge Stale PR (Dry run)
154-
if: steps.upstream-prs.outputs.status == 'stale'
155-
continue-on-error: true
156-
shell: bash
157-
env:
158-
GIT_PAT: ${{ secrets.GIT_PAT }}
159-
BRANCH_NAME: "origin/${{ steps.get-branch.outputs.branch_name }}"
160-
BASE_BRANCH_NAME: "origin/${{ steps.upstream-prs.outputs.base_branch_name }}"
161-
run: |
162-
if git diff --quiet "${BASE_BRANCH_NAME}..${BRANCH_NAME}"; then
163-
echo "No changes detected."
164-
else
165-
echo "Changes detected in PR."
166-
fi
167-
168165
- name: Convert to ready for review
169-
if: steps.upstream-prs.outputs.status == 'merged'
166+
if: steps.upstream-prs.outputs.status == 'merged' || steps.upstream-prs.outputs.status == 'stale'
170167
id: ready-for-review-pr
171168
shell: bash
172169
env:
173-
GIT_PAT: ${{ secrets.GIT_PAT }}
170+
GIT_PAT: "${{ secrets.GIT_PAT }}"
174171
run: |
175172
echo "$GIT_PAT" | gh auth login --with-token
176173
gh api graphql -F id='${{ steps.get-pr.outputs.node_id }}' -f query='
@@ -183,6 +180,26 @@ jobs:
183180
}
184181
'
185182
183+
- name: Merge Stale PR
184+
if: steps.upstream-prs.outputs.status == 'stale'
185+
continue-on-error: true
186+
shell: bash
187+
env:
188+
GIT_PAT: "${{ secrets.GIT_PAT }}"
189+
BRANCH_NAME: "origin/${{ steps.get-branch.outputs.branch_name }}"
190+
BASE_BRANCH_NAME: "origin/${{ steps.upstream-prs.outputs.base_branch_name }}"
191+
PR_NUMBER: "${{ steps.get-pr.outputs.number }}"
192+
TITLE: "${{ steps.get-pr.outputs.title }}"
193+
run: |
194+
if git diff --quiet "${BASE_BRANCH_NAME}..${BRANCH_NAME}"; then
195+
echo "No changes detected."
196+
echo "Merging PR as a Stale."
197+
echo "$GIT_PAT" | gh auth login --with-token
198+
gh pr merge "${PR_NUMBER}" --squash --admin --subject "${TITLE} (stale) (#${PR_NUMBER})"
199+
else
200+
echo "Changes detected in PR."
201+
fi
202+
186203
- name: Enable AutoMerge
187204
if: steps.upstream-prs.outputs.status == 'merged'
188205
continue-on-error: true

.github/workflows/test_conda.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
env:
1111
CACHE_NAME_PREFIX: v1
12+
POETRY_VERSION: 2.1.2
1213

1314
jobs:
1415
conda:
@@ -47,9 +48,7 @@ jobs:
4748
activate-environment: test-environment
4849

4950
- name: "Install poetry"
50-
env:
51-
POETRY_VERSION: ${{ vars.POETRY_VERSION }}
52-
run: pipx install "poetry==${POETRY_VERSION}"
51+
run: pipx install "poetry==${{ env.POETRY_VERSION }}"
5352

5453
- name: "Set up Python"
5554
id: setup_python

.github/workflows/test_migrations.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ env:
1616
LABEL_STUDIO_TEST_ENVIRONMENT: false
1717
SENTRY_RATE: 0
1818
JSON_LOG: 0
19+
POETRY_VERSION: 2.1.2
1920

2021
jobs:
2122
sqlite-migrations:
@@ -35,9 +36,7 @@ jobs:
3536
ref: ${{ inputs.ref }}
3637

3738
- name: "Install poetry"
38-
env:
39-
POETRY_VERSION: ${{ vars.POETRY_VERSION }}
40-
run: pipx install "poetry==${POETRY_VERSION}"
39+
run: pipx install "poetry==${{ env.POETRY_VERSION }}"
4140

4241
- name: "Set up Python"
4342
id: setup_python
@@ -100,9 +99,7 @@ jobs:
10099
fetch-depth: 0
101100

102101
- name: "Install poetry"
103-
env:
104-
POETRY_VERSION: ${{ vars.POETRY_VERSION }}
105-
run: pipx install "poetry==${POETRY_VERSION}"
102+
run: pipx install "poetry==${{ env.POETRY_VERSION }}"
106103

107104
- name: "Set up Python"
108105
id: setup_python

.github/workflows/tests.yml

+5-10
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
env:
1111
NODE: '18'
1212
CACHE_NAME_PREFIX: v1
13+
POETRY_VERSION: 2.1.2
1314

1415
jobs:
1516
run_pytest_sqlite:
@@ -46,9 +47,7 @@ jobs:
4647
ref: ${{ inputs.head_sha }}
4748

4849
- name: "Install poetry"
49-
env:
50-
POETRY_VERSION: ${{ vars.POETRY_VERSION }}
51-
run: pipx install "poetry==${POETRY_VERSION}"
50+
run: pipx install "poetry==${{ env.POETRY_VERSION }}"
5251

5352
- name: "Set up Python ${{ matrix.python-version }}"
5453
id: setup_python
@@ -133,9 +132,7 @@ jobs:
133132
ref: ${{ inputs.head_sha }}
134133

135134
- name: "Install poetry"
136-
env:
137-
POETRY_VERSION: ${{ vars.POETRY_VERSION }}
138-
run: pipx install "poetry==${POETRY_VERSION}"
135+
run: pipx install "poetry==${{ env.POETRY_VERSION }}"
139136

140137
- name: "Set up Python ${{ matrix.python-version }}"
141138
id: setup_python
@@ -166,7 +163,7 @@ jobs:
166163

167164
- name: Upload coverage to Codecov
168165
if: ${{ github.event.pull_request.head.repo.fork == false && github.event.pull_request.user.login != 'dependabot[bot]' }}
169-
uses: codecov/[email protected].0
166+
uses: codecov/[email protected].2
170167
with:
171168
name: codecov-python-${{ matrix.python-version }}
172169
flags: pytests
@@ -212,9 +209,7 @@ jobs:
212209
ref: ${{ inputs.head_sha }}
213210

214211
- name: "Install poetry"
215-
env:
216-
POETRY_VERSION: ${{ vars.POETRY_VERSION }}
217-
run: pipx install "poetry==${POETRY_VERSION}"
212+
run: pipx install "poetry==${{ env.POETRY_VERSION }}"
218213

219214
- name: "Set up Python ${{ matrix.python-version }}"
220215
id: setup_python

.github/workflows/update_pip_dependency.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
concurrency:
99
group: ${{ github.workflow }}-${{ github.event.client_payload.branch_name || 'schedule' }}
1010

11+
env:
12+
POETRY_VERSION: 2.1.2
13+
1114
jobs:
1215
open:
1316
name: Sync PR
@@ -29,9 +32,7 @@ jobs:
2932
git config --global user.email '[email protected]'
3033
3134
- name: "Install poetry"
32-
env:
33-
POETRY_VERSION: ${{ vars.POETRY_VERSION }}
34-
run: pipx install "poetry==${POETRY_VERSION}"
35+
run: pipx install "poetry==${{ env.POETRY_VERSION }}"
3536

3637
- name: "Set up Python"
3738
id: setup_python

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# syntax=docker/dockerfile:1
22
ARG NODE_VERSION=18
33
ARG PYTHON_VERSION=3.12
4-
ARG POETRY_VERSION=2.0.1
4+
ARG POETRY_VERSION=2.1.2
55
ARG VERSION_OVERRIDE
66
ARG BRANCH_OVERRIDE
77

@@ -135,7 +135,7 @@ RUN --mount=type=cache,target="/var/cache/apt",sharing=locked \
135135
set -eux; \
136136
apt-get update; \
137137
apt-get upgrade -y; \
138-
apt-get install --no-install-recommends -y libexpat1 \
138+
apt-get install --no-install-recommends -y libexpat1 libgl1-mesa-glx libglib2.0-0 \
139139
gnupg2 curl; \
140140
apt-get autoremove -y
141141

Dockerfile.development

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# syntax=docker/dockerfile:1
22
ARG NODE_VERSION=18
33
ARG PYTHON_VERSION=3.12
4-
ARG POETRY_VERSION=2.0.1
4+
ARG POETRY_VERSION=2.1.2
55
ARG VERSION_OVERRIDE
66
ARG BRANCH_OVERRIDE
77

docs/netlify.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ force = true
5454

5555
[[redirects]]
5656
from = "/guide/script_examples"
57-
to = "/guide/plugin_examples"
57+
to = "/plugins"
5858
status = 301
5959
force = true
6060

0 commit comments

Comments
 (0)