-
Notifications
You must be signed in to change notification settings - Fork 337
Load account ID before uploading cron triggers #2023
Conversation
The error happens because wrangler is loading the global account ID when it isn't set in config.toml, and the test expects it to error instead:
I'm not sure how to fix this. I can't just change the test to expect this to pass, or it will fail for people running |
Something is wrong here. This test was passing before: https://github.com/cloudflare/wrangler/blob/99473b72b72f6251155f089f32fa8eeccbd1875f/src/settings/toml/tests/deployments.rs#L1072 |
... but it doesn't :/
|
I think I know the issue you're having. These tests don't run the entire publish step, they just test |
@jspspike thanks, that was helpful! Here's what I've tried after that:
|
In particular there's a lot of global state around @nilslice @nataliescottdavidson @jspspike do one of you have suggestions? |
A really awful hack I thought of is to add a new |
This turned out to be both broken and racy 😢 |
If this is the only test that is failing, then this change should make it so that you don't need an |
962e02f
to
b031fba
Compare
Ok, I got this working without too many hacks. The way it works is by forcing tests to explicitly write out the
|
b031fba
to
3a71a04
Compare
3a71a04
to
834ed71
Compare
It's not valid to have an empty ID. Make sure it's loaded rather than failing with an invalid request.
This depends on the implicit global state of the user running the test. Make sure it's consistent both between runs and between different users. This also explicitly set `account_id` for tests that depend on it; previously, the tests depended on it not mattering whether there was an account_id or not.
c9905ac
to
9a6fce1
Compare
Fixes #2021.