Repository navigation
Conversation
The calculator matched products by a substring of their category path
("Deploio / 1) Resources"). The product data is about to drop the "N) "
ordering prefixes and rename "Deploio" to "Deploio (PaaS)"
(ninech/odoo-connector#162), which would leave nearly every slot
without a price.
Slots now reference a category slug, and `categories` in
_data/pricing.yml maps each slug to every full category path it stands
for. Listing old and new paths side by side lets a rename be prepared
ahead of time; the old path can be dropped once the rename is live.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
raphaelknecht
left a comment
Contributor
There was a problem hiding this comment.
Checked the mapping against the live product list from calculator.nineapis.ch: every current category path (Deploio, all On-Demand Services, Object Storage) is listed exactly as it appears there, and the renamed paths are prepared next to them. Ran the tests on the branch: 18 pass, the 2 failures are the known Economy vs. Single database ones from develop. Looks good from our side.
Two small follow-ups, neither blocking:
- Once the rename in odoo-connector#162 is live, the old paths should be removed. The comment in
pricing.ymlsays so, but a follow-up issue would make sure it actually happens. - No checks run on this repo, which is probably why the 2 failing tests on
developwent unnoticed. Worth fixing them in a separate PR, and maybe runningnode --testin CI.
One thing I couldn't verify: I don't have access to odoo-connector#162. If the rename also touches On-Demand Services or Object Storage (not only the N) prefixes and Deploio), those paths would be missing here.
Contributor
|
I've passed this PR on to @snitzelbread (Julian from Renuo) for review. |
The calculator API is dropping the Odoo product id, display_name and all
sh_* bundle fields (bundle_products, sh_product_id, sh_qty). Specs (RAM,
vCPU, storage, nodes) now come from `includes` ({product_id, quantity});
the included product's name is looked up in the same API response, so the
existing name patterns keep working. The display_name fallback is gone
(it always equalled name).
The fixture is converted to that shape and lists the included products.
Against the live API, old and new code build identical catalogs (de/en).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
The pricing calculator finds its products by a substring of the category path from
calculator.nineapis.ch(e.g.Deploio / 1) Resources). The product data is about to change those paths (ninech/odoo-connector#162):N)ordering prefixes are removed (1) Resources→Resources,6) Search→Search, …)DeploiobecomesDeploio (PaaS)Without this change, almost every slot would lose its product (app sizes, KVS, search, static egress, IPv4, block storage, Grafana) and show
–.What
_data/pricing.ymlgets acategoriesmap: slug → list of full category paths. Slots refer to a slug (category: deploio_resources) instead of a path fragment.categ_idpath equals one of the listed paths, so a short name can no longer match the wrong category by accident.Also: specs from
includes(second commit)The calculator API will also drop the Odoo product
id,display_nameand allsh_*bundle fields (bundle_products,sh_product_id,sh_qty, …). Products list what they include asincludes: [{product_id, quantity}], and the included products are part of the same response.productSpecsreadsincludesand looks up each included product's name in the response, so the existing patterns (RAM,(GB),vCPU,Block Storage,OpenSearch) keep working unchanged.display_namefallback for slot names is gone (it always equalledname).id,display_nameandsh_*.Tests
categoriesDeploio (PaaS)), every slot still resolves to the same catalogmissingSlotscalculator.nineapis.ch: no missing slots, before or after the rename, same catalog either wayNote:
the page starts with the default presetandone app with a small database matches the design estimatealready fail ondevelop. Sincecd5c73e(Change Locales) the label readsEconomyinstead ofSingle database. This PR does not touch that.🤖 Generated with Claude Code