Skip to content

Commit f1603e2

Browse files
chore(clusters): deprecate clusters support
Cluster support was deprecated in GitLab 14.5 [1]. And disabled by default in GitLab 15.0 [2] * Update docs to mark clusters as deprecated * Remove testing of clusters * Add a `gitlab_version` pytest fixture [1] https://docs.gitlab.com/ee/api/project_clusters.html [2] https://gitlab.com/groups/gitlab-org/configure/-/epics/8
1 parent ffdef9b commit f1603e2

File tree

4 files changed

+28
-48
lines changed

4 files changed

+28
-48
lines changed

docs/api-objects.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ API examples
1111
gl_objects/emojis
1212
gl_objects/badges
1313
gl_objects/branches
14-
gl_objects/clusters
1514
gl_objects/messages
1615
gl_objects/ci_lint
1716
gl_objects/commits
@@ -63,3 +62,4 @@ API examples
6362
gl_objects/variables
6463
gl_objects/sidekiq
6564
gl_objects/wikis
65+
gl_objects/clusters

docs/gl_objects/clusters.rst

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
############
2-
Clusters
3-
############
1+
#####################
2+
Clusters (DEPRECATED)
3+
#####################
4+
5+
.. warning::
6+
Cluster support was deprecated in GitLab 14.5 and disabled by default as of
7+
GitLab 15.0
8+
49

510
Reference
611
---------

tests/functional/api/test_clusters.py

-44
This file was deleted.

tests/functional/conftest.py

+19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import dataclasses
12
import logging
23
import tempfile
34
import time
@@ -12,6 +13,24 @@
1213
from tests.functional import helpers
1314

1415

16+
@dataclasses.dataclass
17+
class GitlabVersion:
18+
major: int
19+
minor: int
20+
patch: str
21+
revision: str
22+
23+
def __post_init__(self):
24+
self.major, self.minor = int(self.major), int(self.minor)
25+
26+
27+
@pytest.fixture(scope="session")
28+
def gitlab_version(gl) -> GitlabVersion:
29+
version, revision = gl.version()
30+
major, minor, patch = version.split(".")
31+
return GitlabVersion(major=major, minor=minor, patch=patch, revision=revision)
32+
33+
1534
@pytest.fixture(scope="session")
1635
def fixture_dir(test_dir):
1736
return test_dir / "functional" / "fixtures"

0 commit comments

Comments
 (0)