Skip to content

Commit 4ce72ad

Browse files
authored
feat: Retire split-testing (#6542)
1 parent c2e18bc commit 4ce72ad

12 files changed

Lines changed: 57 additions & 630 deletions

File tree

.github/workflows/platform-docker-build-test-publish.yml

Lines changed: 9 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,6 @@ jobs:
5050
secrets: |
5151
github_private_cloud_token=${{ secrets.GH_PRIVATE_ACCESS_TOKEN }}
5252
53-
docker-build-split-testing:
54-
name: Build Split Testing Image
55-
uses: ./.github/workflows/.reusable-docker-build.yml
56-
with:
57-
target: private-cloud-unified
58-
image-name: flagsmith-private-cloud-split-testing
59-
build-args: |
60-
WITH=saml,auth-controller,ldap,workflows,licensing,split-testing
61-
secrets:
62-
secrets: |
63-
github_private_cloud_token=${{ secrets.GH_PRIVATE_ACCESS_TOKEN }}
64-
6553
docker-build-api-test:
6654
name: Build API Test Image
6755
uses: ./.github/workflows/.reusable-docker-build.yml
@@ -149,7 +137,7 @@ jobs:
149137
# Publish to Quay.io
150138

151139
docker-publish-quay-enterprise:
152-
needs: [ docker-build-private-cloud, run-e2e-tests ]
140+
needs: [docker-build-private-cloud, run-e2e-tests]
153141
uses: ./.github/workflows/.reusable-docker-publish.yml
154142
if: github.event_name == 'release'
155143
with:
@@ -161,7 +149,7 @@ jobs:
161149
secrets: inherit
162150

163151
docker-publish-quay-enterprise-api:
164-
needs: [ docker-build-private-cloud-api, run-e2e-tests ]
152+
needs: [docker-build-private-cloud-api, run-e2e-tests]
165153
uses: ./.github/workflows/.reusable-docker-publish.yml
166154
if: github.event_name == 'release'
167155
with:
@@ -173,7 +161,7 @@ jobs:
173161
secrets: inherit
174162

175163
docker-publish-quay-frontend:
176-
needs: [ docker-build-frontend, run-e2e-tests ]
164+
needs: [docker-build-frontend, run-e2e-tests]
177165
uses: ./.github/workflows/.reusable-docker-publish.yml
178166
if: github.event_name == 'release'
179167
with:
@@ -184,18 +172,6 @@ jobs:
184172
target-images: quay.io/${{ vars.QUAY_ORGANISATION_NAME }}/flagsmith-frontend
185173
secrets: inherit
186174

187-
docker-publish-quay-split-testing:
188-
needs: [ docker-build-split-testing, run-e2e-tests ]
189-
uses: ./.github/workflows/.reusable-docker-publish.yml
190-
if: github.event_name == 'release'
191-
with:
192-
target-registry-url: quay.io
193-
docker-username: ${{ vars.QUAY_PUBLISH_USERNAME }}
194-
docker-password-secret-name: QUAY_PUBLISH_PASSWORD
195-
source-images: ${{ needs.docker-build-split-testing.outputs.image }}
196-
target-images: quay.io/${{ vars.QUAY_ORGANISATION_NAME }}/flagsmith-split-testing
197-
secrets: inherit
198-
199175
update-charts:
200176
needs: [docker-publish-api, docker-publish-frontend, docker-publish-unified]
201177
runs-on: depot-ubuntu-latest
@@ -215,7 +191,7 @@ jobs:
215191
state: "open",
216192
}
217193
);
218-
194+
219195
for (const pr of prs) {
220196
const labels = pr.labels.map(label => label.name);
221197
if (labels.includes("yaml-updates")) {
@@ -248,20 +224,20 @@ jobs:
248224
- name: Open a PR bumping Flagsmith to ${{ github.event.release.tag_name }}
249225
uses: fjogeleit/yaml-update-action@main
250226
env:
251-
COMMIT_MESSAGE: 'deps: bump Flagsmith from ${{ steps.chart-yaml.outputs.appVersion }} to ${{ steps.version-trim.outputs.version }}'
227+
COMMIT_MESSAGE: "deps: bump Flagsmith from ${{ steps.chart-yaml.outputs.appVersion }} to ${{ steps.version-trim.outputs.version }}"
252228
with:
253229
token: ${{ secrets.FLAGSMITH_CHARTS_GITHUB_TOKEN }}
254230
repository: flagsmith/flagsmith-charts
255231
workDir: chart
256-
masterBranchName: 'main'
257-
targetBranch: 'main'
232+
masterBranchName: "main"
233+
targetBranch: "main"
258234
branch: deps/bump-flagsmith-${{ steps.version-trim.outputs.version }}
259235
commitChange: true
260236
createPR: true
261237
message: ${{ env.COMMIT_MESSAGE }}
262238
title: ${{ env.COMMIT_MESSAGE }}
263-
description: 'Automated PR generated by Flagsmith release [${{ github.event.release.tag_name }}](${{ github.event.release.url }}).'
264-
valueFile: 'charts/flagsmith/Chart.yaml'
239+
description: "Automated PR generated by Flagsmith release [${{ github.event.release.tag_name }}](${{ github.event.release.url }})."
240+
valueFile: "charts/flagsmith/Chart.yaml"
265241
changes: |
266242
{
267243
"appVersion": "${{ steps.version-trim.outputs.version }}"

.github/workflows/platform-pull-request.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -129,20 +129,6 @@ jobs:
129129
secrets: |
130130
github_private_cloud_token=${{ secrets.GH_PRIVATE_ACCESS_TOKEN }}
131131
132-
docker-build-split-testing:
133-
if: github.event.pull_request.draft == false && needs.permissions-check.outputs.can-write == 'true'
134-
needs: [permissions-check, docker-prepare-report-comment]
135-
name: Build Split Testing Image
136-
uses: ./.github/workflows/.reusable-docker-build.yml
137-
with:
138-
target: private-cloud-unified
139-
image-name: flagsmith-private-cloud-split-testing
140-
build-args: |
141-
WITH=saml,auth-controller,ldap,workflows,licensing,split-testing
142-
secrets:
143-
secrets: |
144-
github_private_cloud_token=${{ secrets.GH_PRIVATE_ACCESS_TOKEN }}
145-
146132
run-e2e-tests:
147133
if: github.event.pull_request.draft == false && !cancelled()
148134
needs: [permissions-check, docker-build-api, docker-build-e2e]

api/api/urls/v1.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -97,29 +97,3 @@
9797
re_path(r"^webhooks/", include("webhooks.urls", namespace="webhooks")),
9898
path("", include("projects.code_references.urls", namespace="code_references")),
9999
]
100-
101-
if settings.SPLIT_TESTING_INSTALLED:
102-
from split_testing.views import ( # type: ignore[import-not-found]
103-
ConversionEventTypeView,
104-
CreateConversionEventView,
105-
SplitTestViewSet,
106-
)
107-
108-
split_testing_router = routers.DefaultRouter()
109-
split_testing_router.register(r"", SplitTestViewSet, basename="split-tests")
110-
111-
urlpatterns += [
112-
re_path(
113-
r"^split-testing/", include(split_testing_router.urls), name="split-testing"
114-
),
115-
re_path(
116-
r"^split-testing/conversion-events/",
117-
CreateConversionEventView.as_view(),
118-
name="conversion-events",
119-
),
120-
path(
121-
"conversion-event-types/",
122-
ConversionEventTypeView.as_view(),
123-
name="conversion-event-types",
124-
),
125-
]

api/app/settings/common.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,10 +1403,6 @@
14031403
WEBHOOK_BACKOFF_BASE = env.int("WEBHOOK_BACKOFF_BASE", default=2)
14041404
WEBHOOK_BACKOFF_RETRIES = env.int("WEBHOOK_BACKOFF_RETRIES", default=3)
14051405

1406-
# Split Testing settings
1407-
SPLIT_TESTING_INSTALLED = importlib.util.find_spec("split_testing")
1408-
if SPLIT_TESTING_INSTALLED:
1409-
INSTALLED_APPS += ("split_testing",)
14101406

14111407
ENABLE_API_USAGE_ALERTING = env.bool("ENABLE_API_USAGE_ALERTING", default=False)
14121408

0 commit comments

Comments
 (0)