Skip to content

Python SR/MR cluster management#135

Merged
mitchell-elholm merged 3 commits intomainfrom
Python_CM
May 16, 2025
Merged

Python SR/MR cluster management#135
mitchell-elholm merged 3 commits intomainfrom
Python_CM

Conversation

@mitchell-elholm
Copy link
Copy Markdown
Contributor

@mitchell-elholm mitchell-elholm commented May 14, 2025

  • Modifies Python cluster management to incorporate new API and to match documentation.
  • Adds test cluster cleanup

By submitting this pull request, I confirm that my contribution is made under
the terms of the MIT-0 license.

Thank you for your contribution!

Copy link
Copy Markdown
Collaborator

@trstephen-amazon trstephen-amazon left a comment

Choose a reason for hiding this comment

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

Overall LGTM but I guess CI found some issues with dict lookups in f-strings (thank you CI!)

Delete all clusters that are:
1. Not already deleting; and,
2. Tagged with 'Repo=aws-samples/aurora-dsql-samples'; and,
3. Tagged with 'Name=Python*'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

not blocking: could even be a bit stricter here and check Python-CM-Example-*

@trstephen-amazon
Copy link
Copy Markdown
Collaborator

aha, issue with the original commit was the f-string escapes are only supported in 3.12 (docs, h/t @danielfrankcom )

Our CI is using 3.10 and the readme wants Python >= 3.8 so we need to rationalize the code, readme, and CI on a min version.

@danielfrankcom
Copy link
Copy Markdown
Contributor

danielfrankcom commented May 14, 2025

A possible way to determine a sensible Python version would be to figure out the minimum version supported by all Python drivers which we have samples for. I know Psycopg3 had a clear list of supported/tested Python versions when I was working on that sample.

Using a single Python version across all Python samples in the project would help us keep track of these kinds of issues.

if cluster['status'] in ['DELETED', 'DELETING']:
continue

# Check tags to identify test clusters
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

not blocking: the updated SDK should already have tags in the GetCluster response

https://docs.aws.amazon.com/aurora-dsql/latest/APIReference/API_GetCluster.html

@mitchell-elholm
Copy link
Copy Markdown
Contributor Author

mitchell-elholm commented May 15, 2025

A possible way to determine a sensible Python version would be to figure out the minimum version supported by all Python drivers which we have samples for. I know Psycopg3 had a clear list of supported/tested Python versions when I was working on that sample.

Using a single Python version across all Python samples in the project would help us keep track of these kinds of issues.

The latest version of Psycopg3 requires minimum 3.10, I don't remember any discussion about this but I'm guessing it's not a coincidence that we chose 3.10 in the CI. Psycopg2 only requires 3.8 though.

Our READMEs should be double-checked to verify they match this.

Copy link
Copy Markdown
Collaborator

@trstephen-amazon trstephen-amazon left a comment

Choose a reason for hiding this comment

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

🚢

@mitchell-elholm mitchell-elholm merged commit 967c6a4 into main May 16, 2025
3 checks passed
@mitchell-elholm mitchell-elholm deleted the Python_CM branch May 16, 2025 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants