Skip to content

Commit e4db4fa

Browse files
authored
ci: add 2025.07.0 release to text matrix (#424)
Also fixes the tests on system caches. There are some weird state behaviors happening when clearing out the cache, so it's best to just ensure the cache API is responding correctly for now.
1 parent 3c71a54 commit e4db4fa

File tree

4 files changed

+30
-40
lines changed

4 files changed

+30
-40
lines changed

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ CURRENT_YEAR ?= $(shell date +%Y)
77
# Quarto settings
88
QUARTO ?= quarto
99
# quartodoc doesn't like py3.8; Run using `--with` as it can conflict with the project's dependencies
10-
QUARTODOC ?= --no-cache --with "quartodoc==0.8.1" quartodoc
10+
QUARTODOC ?= --no-cache --with "quartodoc==0.11.1" quartodoc
1111

1212
# Netlify settings
1313
NETLIFY_SITE_ID ?= 5cea1f56-7935-4387-975a-18a7905d15ee

integration/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ PYTEST_ARGS ?= "-s"
2626

2727
# Versions
2828
CONNECT_VERSIONS := \
29+
2025.07.0 \
2930
2025.06.0 \
3031
2025.05.0 \
3132
2025.04.0 \

integration/compose.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ services:
2727
- CONNECT_BOOTSTRAP_ENABLED=true
2828
- CONNECT_BOOTSTRAP_SECRETKEY=${CONNECT_BOOTSTRAP_SECRETKEY}
2929
- CONNECT_APPLICATIONS_PACKAGEAUDITINGENABLED=true
30+
- CONNECT_TENSORFLOW_ENABLED=false
3031
networks:
3132
- test
3233
privileged: true

integration/tests/posit/connect/test_system.py

Lines changed: 27 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -11,62 +11,50 @@
1111

1212

1313
@pytest.mark.skipif(
14-
# Added to the v2023.05.0 milestone
15-
# https://github.com/rstudio/connect/pull/23148
16-
CONNECT_VERSION < version.parse("2023.05.0"),
14+
CONNECT_VERSION < version.parse("2024.05.0"),
1715
reason="Cache runtimes not implemented",
1816
)
1917
class TestSystem:
2018
@classmethod
2119
def setup_class(cls):
2220
cls.client = Client()
23-
assert cls.client.content.count() == 0
24-
cls.content_item = cls.client.content.create(name="Content_A")
25-
26-
# Copied from from integration/tests/posit/connect/test_packages.py
27-
def _deploy_python_bundle(self):
21+
cls.content = cls.client.content.create(name=cls.__name__)
2822
path = Path("../../../resources/connect/bundles/example-flask-minimal/bundle.tar.gz")
2923
path = (Path(__file__).parent / path).resolve()
30-
bundle = self.content_item.bundles.create(str(path))
24+
bundle = cls.content.bundles.create(str(path))
3125
task = bundle.deploy()
3226
task.wait_for()
3327

34-
def _remove_all_caches(self):
35-
caches: list[SystemRuntimeCache] = self.client.system.caches.runtime.find()
36-
for cache in caches:
37-
assert isinstance(cache, SystemRuntimeCache)
38-
none_val = cache.destroy(dry_run=True)
39-
assert none_val is None
40-
task: Task = cache.destroy()
41-
assert isinstance(task, Task)
42-
task.wait_for()
43-
assert len(self.client.system.caches.runtime.find()) == 0
44-
4528
@classmethod
4629
def teardown_class(cls):
47-
cls.content_item.delete()
48-
assert cls.client.content.count() == 0
30+
cls.content.delete()
4931

5032
def test_runtime_caches(self):
51-
# Get current caches
52-
caches: list[SystemRuntimeCache] = self.client.system.caches.runtime.find()
53-
assert isinstance(caches, list)
33+
runtimes = self.client.system.caches.runtime.find()
34+
assert len(runtimes) > 0
5435

55-
# Remove all caches
56-
self._remove_all_caches()
36+
def test_runtime_cache_destroy(self):
37+
# Find existing runtime caches
38+
runtimes: list[SystemRuntimeCache] = self.client.system.caches.runtime.find()
39+
assert len(runtimes) > 0
5740

58-
# Deploy a new cache
59-
self._deploy_python_bundle()
41+
# Get the first cache for testing
42+
cache = runtimes[0]
43+
assert isinstance(cache, SystemRuntimeCache)
6044

61-
# Check if the cache is deployed
62-
caches = self.client.system.caches.runtime.find()
45+
# Test dry run destroy (should return None and not actually destroy)
46+
result = cache.destroy(dry_run=True)
47+
assert result is None
6348

64-
# Barret 2024/12:
65-
# Caches only showing up in Connect versions >= 2024.05.0
66-
# I do not know why.
67-
# Since we are not logic testing Connect, we can confirm our code works given more recent versions of Connect.
68-
if CONNECT_VERSION >= version.parse("2024.05.0"):
69-
assert len(caches) > 0
49+
# Verify cache still exists after dry run
50+
runtimes_after_dry_run = self.client.system.caches.runtime.find()
51+
assert len(runtimes_after_dry_run) == len(runtimes)
52+
53+
# Test actual destroy
54+
task: Task = cache.destroy()
55+
assert isinstance(task, Task)
56+
task.wait_for()
7057

71-
# Remove all caches
72-
self._remove_all_caches()
58+
# Verify cache was removed
59+
runtimes_after_destroy = self.client.system.caches.runtime.find()
60+
assert len(runtimes_after_destroy) == len(runtimes) - 1

0 commit comments

Comments
 (0)