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: fails to publish due to empty migrations #1937
fix: fails to publish due to empty migrations #1937
Conversation
🦋 Changeset detectedLatest commit: 62d2792 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
`/accounts/:accountId/workers/services/:scriptName/environments/:environment/bindings`, | ||
"GET", | ||
() => [] | ||
); | ||
setMockResponse( | ||
`/accounts/:accountId/workers/services/:scriptName/environments/:environment/routes`, | ||
"GET", | ||
() => [] | ||
); | ||
setMockResponse( | ||
`/accounts/:accountId/workers/services/:scriptName/environments/:environment`, | ||
"GET", | ||
() => mockServiceMetadata.default_environment | ||
); | ||
setMockResponse( | ||
`/accounts/:accountId/workers/scripts/:scriptName/schedules`, | ||
"GET", | ||
() => { | ||
return { | ||
schedules: [], | ||
}; | ||
} | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow up: I noticed that if these endpoints return anything other than an array, empty or otherwise, it is not handled well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has this been resolved? Can we handle this better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently the API returns empty arrays if there is nothing. An API error itself is handled higher up the functionality, before it hits the config generator.
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/3144516609/npm-package-wrangler-1937 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/1937/npm-package-wrangler-1937 Or you can use npx https://prerelease-registry.developers.workers.dev/runs/3144516609/npm-package-wrangler-1937 dev path/to/script.js Additional artifacts:npm install https://prerelease-registry.developers.workers.dev/runs/3144516609/npm-package-cloudflare-pages-shared-1937 |
Codecov Report
@@ Coverage Diff @@
## main #1937 +/- ##
==========================================
- Coverage 75.22% 75.12% -0.11%
==========================================
Files 116 116
Lines 7907 7931 +24
Branches 2057 2067 +10
==========================================
+ Hits 5948 5958 +10
- Misses 1959 1973 +14
|
The Durable Objects migrations will no longer show in the auto generated config file.
61c1734
to
42cfd8d
Compare
Oops the Date needs to be mocked. |
The Durable Objects migrations will no longer show in the auto generated config file.