Skip to content
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

Add Templates for Exoscale DBaaS products #71

Merged
merged 4 commits into from
Dec 14, 2022
Merged

Conversation

glrf
Copy link
Contributor

@glrf glrf commented Dec 13, 2022

Summary

Adds Templates for Exoscale DBaaS products.

As there are over 100 DB/Plan combination (and in turn over 100 distinct products in the Billing DB) I extended the template selection to allow for only one template per DB type. This shouldn't impact the current billing behavior as we will do longest prefix match.

Checklist

  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog
  • Update tests.

@glrf glrf added the enhancement New feature or request label Dec 13, 2022
@glrf glrf self-assigned this Dec 13, 2022
@glrf glrf force-pushed the feat/dbaas-templates branch 2 times, most recently from 147714d to 7d4c752 Compare December 14, 2022 08:14
@glrf glrf force-pushed the feat/dbaas-templates branch from 7d4c752 to 405babe Compare December 14, 2022 10:31
@glrf glrf marked this pull request as ready for review December 14, 2022 10:47
@glrf glrf requested a review from bastjan December 14, 2022 10:47
@glrf
Copy link
Contributor Author

glrf commented Dec 14, 2022

@bastjan I requested a review from you so that the APPUiO team is aware of this change in template matching. I don't think it should break anything :)

Copy link
Contributor

@zugao zugao left a comment

Choose a reason for hiding this comment

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

If I understand correctly this PR should have all plans from Exoscale DBaaS. If that's the case then there are much more plans to be added aka templates.

Update: Sry I miss read the PR. Those were golden tests. Is there a way to test the template?

Copy link
Contributor

@bastjan bastjan left a comment

Choose a reason for hiding this comment

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

Should work for us (APPUiO Cloud)!

@@ -41,13 +41,24 @@ func ItemDescriptionTemplateRendererFromFS(fs fs.FS, extension string) (*ItemDes

// RenderItemDescription renders an item description. Uses the `.ProductRef.Source` as the key to look which template to use.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer some documentation on the fuzzy matching here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair point, missed that, thanks. Will add that

invoice/desctmpl/renderer_test.go Outdated Show resolved Hide resolved
Co-authored-by: Sebastian Widmer <sebastian.widmer@vshn.net>
@glrf
Copy link
Contributor Author

glrf commented Dec 14, 2022

Update: Sry I miss read the PR. Those were golden tests. Is there a way to test the template?

Well there are golden tests. Or what do you mean with test?

@zugao
Copy link
Contributor

zugao commented Dec 14, 2022

Update: Sry I miss read the PR. Those were golden tests. Is there a way to test the template?

Well there are golden tests. Or what do you mean with test?

I meant a real test (e2e) or it's not feasible with this repo?

@glrf
Copy link
Contributor Author

glrf commented Dec 14, 2022

We don't do Odoo e2e tests no.

Copy link
Contributor

@zugao zugao left a comment

Choose a reason for hiding this comment

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

LGTM

@glrf glrf merged commit a3953e1 into master Dec 14, 2022
@glrf glrf deleted the feat/dbaas-templates branch December 14, 2022 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants