CONFIG_INVALID: Project demo-shop has no data.userPool configured, but data.sources.users exists
Asked 4,720 views2 answers
13votes
Added @user:standard to a scenario. The run stops before the first step:
text
✖ CONFIG_INVALID: Project demo-shop has no data.userPool configured.
hint: Add data.userPool: { dataset: users, roleColumn: role } to sdods.project.yaml.
The confusing part is that data.sources.users is declared and works — Given I load dataset "users" row 0 loads accounts fine in another scenario. So the runner can obviously find the accounts. What is the second block for?
data.sources says where rows come from. data.userPool says which of those datasets is accounts and which column holds the role. They are separate because most datasets are not accounts, and the pool needs to be told, not to guess.
roleColumn defaults to role, leaseStore to file and leaseTtlMs to ten minutes, so the two-line version in the hint is enough to start.
What the pool reads out of each row: username and password as the credential, and an id taken from the id column, falling back to username, falling back to the row position. Give the rows a stable id — the lock file is named after it, and a pool whose ids move when the file is sorted is a pool whose leases mean nothing.
Also add standard to tags.roles or lint rejects the tag before any of this matters.
After you add it, confirm the block actually landed where you think:
bash
sdods config show -p demo-shop -e staging
The resolved project tree prints data.userPool with the defaults filled in. I had mine indented one level too deep under sources and the yaml was valid, just wrong.