Skip to content
This repository was archived by the owner on Aug 3, 2023. It is now read-only.

Ensure KV subcommands check for presence of required fields in wrangler.toml#665

Merged
gabbifish merged 6 commits into
masterfrom
gabbi/fix-#607
Sep 23, 2019
Merged

Ensure KV subcommands check for presence of required fields in wrangler.toml#665
gabbifish merged 6 commits into
masterfrom
gabbi/fix-#607

Conversation

@gabbifish

@gabbifish gabbifish commented Sep 23, 2019

Copy link
Copy Markdown
Contributor

This PR closes #607.

UPDATE: this PR is no longer WIP; we do not need to validate account_id anymore (scope of ticket has changed as per maintainer meeting 09.23.19).

previously:
It is still considered a WIP given that this only checks for the absence of required fields like account_id for KV subcommands; it does not implement things like account_id validity checking. Do we still want to implement account_id validity checking? I am still keen to get this logic in before 1.4.0 because I don't want KV users to get confused about the error messages referenced in #607; so, I'm okay without account_id validity checking for now.

@gabbifish gabbifish added status - needs review regression Something is broken, but works in previous releases labels Sep 23, 2019
@gabbifish gabbifish added this to the 1.4.0 milestone Sep 23, 2019
@gabbifish gabbifish modified the milestones: 1.4.0, KV Additions Sep 23, 2019
@gabbifish gabbifish changed the title [WIP] Ensure KV subcommands check for presence of required fields in wrangler.toml Ensure KV subcommands check for presence of required fields in wrangler.toml Sep 23, 2019
Comment thread src/commands/kv/mod.rs Outdated
missing_fields.push("account_id")
};
if target.name.is_empty() {
missing_fields.push("name")

@ashleymichal ashleymichal Sep 23, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

idk if this makes sense here. namespace, key, and bulk commands don't need your worker script name. sync does, but it should only be run on publish, which has its own validate logic.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this makes sense. Happy to remove this!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oh wait, isn't name required when you create a KV namespace?

@gabbifish gabbifish merged commit 81d11a8 into master Sep 23, 2019
@ashleygwilliams ashleygwilliams deleted the gabbi/fix-#607 branch September 24, 2019 00:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

regression Something is broken, but works in previous releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide better messaging when account_id is missing

3 participants