Skip to content

Comments

Allow importing IDE projects to non-empty directories with user confirmation#1978

Merged
pritt20 merged 1 commit intomainfrom
fix_ide_import
Nov 3, 2025
Merged

Allow importing IDE projects to non-empty directories with user confirmation#1978
pritt20 merged 1 commit intomainfrom
fix_ide_import

Conversation

@pritt20
Copy link
Contributor

@pritt20 pritt20 commented Oct 31, 2025

Description

Previously, the astro ide project import command would fail if run in a non-empty directory, forcing users to create a new empty directory first. This change makes the experience more flexible by prompting users for confirmation before proceeding.

🎟 Issue(s)

Related #XXX

🧪 Functional Testing

Tested the change on locally:

~ astro ide project import
Current directory is not empty. Do you want to import the project here? /tmp/test (y/n) y
Only one Project was found. Using the following Project by default: 

 Project Name: test
 Project ID: cmhevveiz010501nlj05z8t8o

Successfully exported project from cmhevveiz010501nlj05z8t8o
~ astro ide project import
Current directory is not empty. Do you want to import the project here? /tmp/test/dags (y/n) n
Error: import canceled by user

📸 Screenshots

NA

📋 Checklist

  • Rebased from the main (or release if patching) branch (before testing)
  • Ran make test before taking out of draft
  • Ran make lint before taking out of draft
  • Added/updated applicable tests
  • Tested against Astro-API (if necessary).
  • Tested against Houston-API and Astronomer (if necessary).
  • Communicated to/tagged owners of respective clients potentially impacted by these changes.
  • Updated any related documentation

@schnie
Copy link
Member

schnie commented Oct 31, 2025

This is essentially the same pattern we use when you try to astro dev init in a directory that's not empty right?

@pritt20
Copy link
Contributor Author

pritt20 commented Nov 3, 2025

This is essentially the same pattern we use when you try to astro dev init in a directory that's not empty right?

Yes, we are using same pattern as astro dev init. There are use cases where users would like to re-use the same directory to import the updated project from Astro IDE.

@pritt20 pritt20 merged commit d9c6e47 into main Nov 3, 2025
6 of 7 checks passed
@pritt20 pritt20 deleted the fix_ide_import branch November 3, 2025 15:33
pritt20 added a commit that referenced this pull request Nov 3, 2025
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