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

Hotfix: Refactor Earth Engine API Calls for Improved Asynchronous Handling #174

Merged
merged 2 commits into from
Apr 26, 2024

Conversation

dhakalaashish
Copy link
Contributor

This PR addresses the issue encountered in Vercel's serverless environment where .node-xmlhttprequest-sync-12 errors occurred due to implicit synchronous filesystem operations. By refactoring the ee.Date(...).getInfo() calls to use explicit promise-based asynchronous handling, we prevent unauthorized filesystem writes and align with Node.js's non-blocking I/O model. This change ensures our integration with Google Earth Engine is robust against the ephemeral and read-only nature of Vercel's filesystem. The update mitigates the risk of hitting EROFS: read-only file system errors, enhancing the stability and reliability of our deployment in production environments. This hotfix is critical for uninterrupted service delivery and optimal performance of our geo-event processing tasks.

- Implement promise-based async handling for ee.Date(...).getInfo() to align with Node.js async patterns and avoid implicit filesystem writes in Vercel's read-only environment.
- Prevent EROFS: read-only file system errors by managing asynchronous flow explicitly, eliminating dependencies on synchronous requests or filesystem operations in serverless deployments.
Copy link

vercel bot commented Apr 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
fire-alert ❌ Failed (Inspect) Apr 26, 2024 11:34am

@dhakalaashish dhakalaashish changed the base branch from develop to main April 26, 2024 11:33
Copy link
Member

@shyambhongle shyambhongle left a comment

Choose a reason for hiding this comment

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

Looks good to merge !

@dhakalaashish dhakalaashish merged commit e6e146d into main Apr 26, 2024
0 of 2 checks passed
@dhakalaashish dhakalaashish deleted the hotfix/refactor-earthengine-api branch April 26, 2024 11:42
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