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

fix: Move alembic to project root #138

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

koxudaxi
Copy link
Collaborator

@koxudaxi koxudaxi commented Feb 4, 2025

No description provided.

@koxudaxi koxudaxi requested review from brenkao and willbakst February 4, 2025 03:06
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we git ignore .idea ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK, I will create a new PR to add it.

Copy link
Collaborator Author

@koxudaxi koxudaxi Feb 5, 2025

Choose a reason for hiding this comment

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

In Mirascope, We don't define the .idea.
I have deleted the directory.
https://github.com/Mirascope/mirascope/blob/9ef3af7e69d7dbb48ee460a671bf07e47759d551/.gitignore#L164-L169

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh hmmm...if its useful to keep then we can keep it. I don't use JetBrains so I was not sure.

@brenkao
Copy link
Collaborator

brenkao commented Feb 5, 2025

I went ahead and resolved merge conflicts due to some of my changes, take a look

Copy link

gitguardian bot commented Feb 5, 2025

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
15438009 Triggered Generic Private Key e0f410c lilypad/ee/free_tier_private_key.pem View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Copy link

cloudflare-workers-and-pages bot commented Feb 5, 2025

Deploying lilypad-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: b13b8c0
Status: ✅  Deploy successful!
Preview URL: https://1b8db73d.lilypad-website-et1.pages.dev
Branch Preview URL: https://move-alembic-to-project-root.lilypad-website-et1.pages.dev

View logs

@koxudaxi koxudaxi requested a review from brenkao February 7, 2025 01:11
@brenkao
Copy link
Collaborator

brenkao commented Feb 9, 2025

We also need to update main

def run_migrations() -> None:
    """Run the migrations in a separate process."""
    try:
        BASE_DIR = Path(__file__).resolve().parent
        result = subprocess.run(
            ["alembic", "upgrade", "head"],
            capture_output=True,
            text=True,
            check=True,
            cwd=BASE_DIR,
        )
        log.info(f"Migration output: {result.stdout}")
    except subprocess.CalledProcessError as e:
        log.error(f"Migration failed: {e.stderr}")

Remove the cwd, since we are running fastapi in the root of lilypad now

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.

2 participants