Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to SQLAlchemy 2.0 #16

Merged
merged 3 commits into from
Nov 28, 2023
Merged

Upgrade to SQLAlchemy 2.0 #16

merged 3 commits into from
Nov 28, 2023

Conversation

duynguyen158
Copy link
Contributor

@duynguyen158 duynguyen158 commented Nov 28, 2023

Description

Upgrades SQLAlchemy to 2.0 and SQLModel to 0.0.12.

Terraform

❯ poe terraform dev plan
Poe => terraform -chdir=terraform/stages/dev plan
module.db.random_password.training_job_site_password["afro-la"]: Refreshing state... [id=none]
module.db.random_password.training_job_site_password["dallas-free-press"]: Refreshing state... [id=none]
module.db.random_password.reader_password: Refreshing state... [id=none]
data.aws_ssm_parameter.credentials_admin: Reading...
data.aws_ssm_parameter.credentials_admin: Read complete after 0s [id=/dev/article-rec/admin/all/database-credentials]
module.db.postgresql_database.db: Refreshing state... [id=dev]
module.db.postgresql_role.training_job: Refreshing state... [id=dev_training_job]
module.db.postgresql_role.reader: Refreshing state... [id=dev_reader]
module.db.aws_ssm_parameter.reader_credentials: Refreshing state... [id=/dev/article-rec/reader/all/database-credentials]
module.db.postgresql_role.training_job_site["afro-la"]: Refreshing state... [id=dev_training_job_afro_la]
module.db.postgresql_role.training_job_site["dallas-free-press"]: Refreshing state... [id=dev_training_job_dallas_free_press]
module.db.aws_ssm_parameter.training_job_site_credentials["afro-la"]: Refreshing state... [id=/dev/article-rec/afro-la/training-job/database-credentials]
module.db.aws_ssm_parameter.training_job_site_credentials["dallas-free-press"]: Refreshing state... [id=/dev/article-rec/dallas-free-press/training-job/database-credentials]
module.db.postgresql_extension.pgvector: Refreshing state... [id=dev.vector]
module.db.postgresql_grant.training_job_table_privileges["DELETE"]: Refreshing state... [id=dev_training_job_dev_public_table_recommendation_embedding_page_article_execution]
module.db.postgresql_grant.training_job_table_privileges["SELECT"]: Refreshing state... [id=dev_training_job_dev_public_table_recommendation_embedding_page_article_execution]
module.db.postgresql_grant.reader_table_privileges["SELECT"]: Refreshing state... [id=dev_reader_dev_public_table_recommendation_embedding_page_article_execution]
module.db.postgresql_grant.training_job_table_privileges["UPDATE"]: Refreshing state... [id=dev_training_job_dev_public_table_page_article]
module.db.postgresql_grant.training_job_table_privileges["INSERT"]: Refreshing state... [id=dev_training_job_dev_public_table_recommendation_embedding_page_article_execution]

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # module.db.postgresql_grant.training_job_table_privileges["DELETE"] must be replaced
-/+ resource "postgresql_grant" "training_job_table_privileges" {
      ~ id                = "dev_training_job_dev_public_table_recommendation_embedding_page_article_execution" -> (known after apply)
      ~ privileges        = [ # forces replacement
          - "INSERT",
          - "SELECT",
          - "UPDATE",
            # (1 unchanged element hidden)
        ]
        # (6 unchanged attributes hidden)
    }

  # module.db.postgresql_grant.training_job_table_privileges["INSERT"] must be replaced
-/+ resource "postgresql_grant" "training_job_table_privileges" {
      ~ id                = "dev_training_job_dev_public_table_recommendation_embedding_page_article_execution" -> (known after apply)
      ~ privileges        = [ # forces replacement
          - "DELETE",
          - "SELECT",
          - "UPDATE",
            # (1 unchanged element hidden)
        ]
        # (6 unchanged attributes hidden)
    }

  # module.db.postgresql_grant.training_job_table_privileges["SELECT"] must be replaced
-/+ resource "postgresql_grant" "training_job_table_privileges" {
      ~ id                = "dev_training_job_dev_public_table_recommendation_embedding_page_article_execution" -> (known after apply)
      ~ privileges        = [ # forces replacement
          - "DELETE",
          - "INSERT",
          - "UPDATE",
            # (1 unchanged element hidden)
        ]
        # (6 unchanged attributes hidden)
    }

  # module.db.postgresql_grant.training_job_table_privileges["UPDATE"] must be replaced
-/+ resource "postgresql_grant" "training_job_table_privileges" {
      ~ id                = "dev_training_job_dev_public_table_page_article" -> (known after apply)
      ~ privileges        = [ # forces replacement
          - "DELETE",
          - "INSERT",
          - "SELECT",
            # (1 unchanged element hidden)
        ]
        # (6 unchanged attributes hidden)
    }

Plan: 4 to add, 0 to change, 4 to destroy.

Alembic

No changes.

Testing

All tests passed.

@duynguyen158 duynguyen158 merged commit bf7ad76 into dev Nov 28, 2023
1 check passed
@duynguyen158 duynguyen158 deleted the sqla-2 branch November 28, 2023 15:54
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.

1 participant