Skip to content

Comments

Update Astro IDE export command to fetch project url from API#1943

Merged
pritt20 merged 2 commits intomainfrom
fix_ide_project_url
Oct 3, 2025
Merged

Update Astro IDE export command to fetch project url from API#1943
pritt20 merged 2 commits intomainfrom
fix_ide_project_url

Conversation

@pritt20
Copy link
Contributor

@pritt20 pritt20 commented Sep 24, 2025

Description

This PR changes update Astro IDE export command to fetch project url from API and if it fails to do so, we fallback to constructing the project url at Astro CLI level.

🎟 Issue(s)

Related #XXX

🧪 Functional Testing

Tested the change locally and Astro CLI was able to fetch the project url from API as expected.

📋 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

@coveralls-official
Copy link

coveralls-official bot commented Sep 24, 2025

Pull Request Test Coverage Report for Build 75959dbb-ffb5-4695-8d84-ed1fd01d8754

Details

  • 0 of 32 (0.0%) changed or added relevant lines in 2 files are covered.
  • 4 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.009%) to 38.142%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cloud/ide/project.go 0 9 0.0%
astro-client-core/api.gen.go 0 23 0.0%
Files with Coverage Reduction New Missed Lines %
astro-client-core/api.gen.go 2 0.16%
docker/docker.go 2 46.81%
Totals Coverage Status
Change from base Build 04c39e19-4d56-4706-a6ef-480413713603: -0.009%
Covered Lines: 23775
Relevant Lines: 62333

💛 - Coveralls

if err == nil && projectResp != nil && projectResp.JSON200 != nil && projectResp.JSON200.Url != nil && *projectResp.JSON200.Url != "" {
url = *projectResp.JSON200.Url
} else {
// Fallback to constructing the URL if API URL is unavailable
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer we just not open the project in the browser if we can't get an URL, or we still run the risk of sending the user to a stale URL.

@pritt20 pritt20 merged commit 475c662 into main Oct 3, 2025
4 of 6 checks passed
@pritt20 pritt20 deleted the fix_ide_project_url branch October 3, 2025 16:19
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