Skip to content

Conversation

@ckunki
Copy link
Collaborator

@ckunki ckunki commented Apr 30, 2024

Closes #14

def _timestamp_name() -> str:
username = getpass.getuser()
timestamp = f'{datetime.now().timestamp():.0f}'
return f"{username}-{timestamp}"
Copy link
Collaborator

@tkilias tkilias May 7, 2024

Choose a reason for hiding this comment

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

This still can break for long user names, we need to shorten it differently. Furthermore, we still should mention from where the DB is from. So, mu suggestion would be something like the following

{Timestamp}{project_short_tag}_{username} and this overall string truncated to length

@tomuben what is the max length for the DB name in SaaS

Copy link
Contributor

Choose a reason for hiding this comment

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

    input_parameter_limits = {
        "max_database_name_length": 20,  # in characters
        "max_cluster_name_length": 40,  # in characters
        "autostop_min_idle_time": 15,  # in minutes
        "autostop_max_idle_time": 10000,  # in minutes
        "autostop_default_idle_time": 120,
    }

Copy link
Collaborator

Choose a reason for hiding this comment

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

thx

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ckunki maybe we put the unshortened name as main cluster name

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

On the other hand, I wonder if the user name is helpful in CI builds.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think, the user name was runner, this would indicate the CI

@ckunki ckunki merged commit 9067e7a into main May 8, 2024
@ckunki ckunki deleted the feature/#14-fixture-operational_saas_database_id branch May 8, 2024 08:03
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.

Create pytest fixture for creating a database with polling until db is operational

5 participants