Skip to content

Conversation

@schloerke
Copy link
Collaborator

@schloerke schloerke commented Dec 9, 2024

Fixes #337

Example usage:

from posit.connect import Client

client = Client()

runtime_caches = client.system.caches.runtime.find()
first_runtime_cache = runtime_caches[0]

# Remove the cache
task = first_runtime_cache.destroy(dry_run=True)

# Wait for the task to finish
task.wait_for()

@schloerke schloerke self-assigned this Dec 9, 2024
@schloerke schloerke added enhancement New feature or request sdk Used for automation labels Dec 9, 2024
@github-actions
Copy link

github-actions bot commented Dec 12, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
2014 1852 92% 0% 🟢

New Files

File Coverage Status
src/posit/connect/system.py 97% 🟢
TOTAL 97% 🟢

Modified Files

File Coverage Status
src/posit/connect/client.py 99% 🟢
src/posit/connect/groups.py 79% 🟢
src/posit/connect/jobs.py 0% 🟢
src/posit/connect/users.py 96% 🟢
TOTAL 69% 🟢

updated for commit: d40657c by action🐍

@schloerke schloerke marked this pull request as ready for review December 12, 2024 21:37
@schloerke schloerke requested a review from tdstein as a code owner December 12, 2024 21:37
@schloerke schloerke marked this pull request as draft December 12, 2024 21:46
@schloerke
Copy link
Collaborator Author

schloerke commented Dec 12, 2024

  • Dry run should return None

@schloerke schloerke marked this pull request as ready for review December 13, 2024 15:30
Co-Authored-By: Taylor Steinberg <[email protected]>
Co-Authored-By: Taylor Steinberg <[email protected]>
Copy link
Collaborator

@tdstein tdstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done! I would like to understand why the cache isn't being created when deploying content earlier than 2024.05.0, but that shouldn't block this change.

@schloerke schloerke merged commit 380a3ca into main Dec 13, 2024
35 checks passed
@schloerke schloerke deleted the schloerke/system-cache-runtime branch December 13, 2024 20:38
tdstein added a commit that referenced this pull request Dec 16, 2024
Original request:
#352 (review)

I like it. So I updated as many as I could where I didn't have to guess
at the intent. `Sessions` is still used by other classes that use
`.params`.

Given all `Paginator` instances could use context, I switched those as
well.

---------

Co-authored-by: Taylor Steinberg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request sdk Used for automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add System Runtime Caches endpoint bindings

3 participants