Repository navigation
Let chat and one-click installs wait for address variables - #1450
Merged
Merged
Conversation
The post-approve picker and setup_install_connector send no secrets, so Telegram (bot token in the path), Shopify, Odoo and WooCommerce were refused with "... is required to install". Create the connector waiting for those values instead; the setup link asks for them and saving them rebuilds the address from the catalog template. Other installs keep the refusal.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The post-approve app picker (#1441) and the chat tool
setup_install_connectorfailed for every app whose API address contains a variable:telegram-bot: the bot token is in the path, and secrets are never taken from the chat.shopify,odooandwoocommerce: the store or instance address.importAdapterrefused these installs with "X is required to install … part of the API address". Telegram is the picker's default example, so most picks failed.Change
importAdaptertakes a new option,addressMayWait. With it, the connector is created even when an address variable is missing:needs_inputand names the missing variable;/connectors/setup/<slug>?connector=…) asks for it;PUT /connectors/:id/env-varsrebuilds the address from the catalog template;ConnectorSetupService.installpasses the option. That covers both chat installs and the post-approve picker. The dashboard install form keeps the refusal, so it still names the missing variable while the user is on the form.Cloud and self-hosted
The behaviour is the same in both modes. The picker exists only on Cloud; chat setup exists in both.
Tests
Run in
packages/backend:npx jest --maxWorkers=4 src/adapters/connector-setup.service.spec.ts src/adapters/adapters.service.spec.ts src/auth/login.controller.spec.ts: 3 suites, 192 tests passed.needs_inputwith a setup link.importAdapterstill refuses.addressMayWait, the connector is created with no probe call, and a pasted full URL is still refused.npx tsc --noEmit -p tsconfig.json: passed.npx eslinton the four changed files: clean.