-
Notifications
You must be signed in to change notification settings - Fork 192
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
BREAKING CHANGE(schema): split authentication.fields into inputFieds and outputFields (PDE-5589 ) #972
Conversation
… zapier-platform-major-release-17.0.0-dev
…thub.com/zapier/zapier-platform into zapier-platform-major-release-17.0.0-dev
@@ -32,7 +32,8 @@ module.exports = { | |||
|
|||
// Define any input app's auth requires here. The user will be prompted to enter | |||
// this info when they connect their account. | |||
fields: [], | |||
inputFields: [], |
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.
Bit of a weird scenario,
- Leaving
fields
as is ( not replacing with inputFields ) results in this error
✔ package size should not change much (70764 -> 70508 bytes) (248ms)
basic-auth
Validating project locally
┌────────────────────┬─────────────────────────────────────────────────────────────────┬─────────────────────────────────────────────────────────────────────────┐
│ Property │ Message │ Links │
├────────────────────┼─────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────┤
│ App.authentication │ additionalProperty "fields" exists in instance when not allowed │ https://platform.zapier.com/cli_docs/schema#authenticationschema@[16](https://github.com/zapier/zapier-platform/actions/runs/13375926420/job/37355062393#step:5:17).3.0 │
- But updating to
inputFields
causes this error
› Error: "https://zapier.com/api/platform/cli/check" returned "400" saying
› "App must validate against schema before running app checks"
Going to reach out to team on best approach here, I think I may need to leave the "fields" as is and update it's description to "DEPRECATED"?
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.
I'll dig up some older PRs to see how fields are deprecated and do the same here
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.
Okay,
- Marked "fields" as deprecated following this PR
- Created a ticket to update
example-apps
after this MR, from testing I am still getting weError: "https://zapier.com/api/platform/cli/check" returned "400"
if they are updated in this PR. I think this is because the major version needs to be published first but that's a guess. - Created ticket to remove "authentication.fields"
0c5e160
to
be18f29
Compare
@Natay Good start. Reading the requirement again, it seems the auth
Apologies for leading you on to use same for both, but we would need to break the Also before this is merged, we need to update the backend to support both auth |
@kola-er thank you! Would it make sense to include
Also, should we update legacy-scripting-runner as well?
|
…thub.com/zapier/zapier-platform into PDE-5589_split_authentication_fields_into_input_and_output
Backend MR to support inputFields and outputFields |
@@ -519,7 +516,7 @@ class InvokeCommand extends BaseCommand { | |||
); | |||
} | |||
const authData = await this.promptForAuthFields( | |||
appDefinition.authentication.fields, | |||
appDefinition.authentication.inputFields, |
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.
zapier invoke
is still gaining adoption. It would hurt if it started breaking. So I'd like the invoke
command to continue working on previous versions of platform-core for at least some time. Maybe we could do something like:
appDefinition.authentication.inputFields, | |
appDefinition.authentication.fields || appDefinition.authentication.inputFields, |
And add this back at line 336-338:
if (field.computed) {
continue;
}
Fixes the issue: authentication.fields are a combination of input fields (e.g. subdomain or API key - which the user needs to enter), and output fields (computed: true - which we expect authentication procedure to return). Coda, Slack