-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Update new integration templates to use v2 manifests #12592
Conversation
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
Looks good to me
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.
👋 Bye, v1!
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.
Just 1 small comment!
..._checks_dev/datadog_checks/dev/tooling/templates/integration/logs/{check_name}/manifest.json
Show resolved
Hide resolved
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.
Left an initial pass. Once those are addressed I can help run ddev create
under various scenarios to make sure things look good before you merge 🙂
Excited to see V2 become the default!
...checks_dev/datadog_checks/dev/tooling/templates/integration/check/{check_name}/manifest.json
Outdated
Show resolved
Hide resolved
"type": "check", | ||
"is_public": false, | ||
"integration_id": "{integration_id}",{pricing_plan}{terms}{author_info} | ||
"manifest_version": "2.0.0", |
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.
pricing_plan
, terms
, and author_info
will need to continue living here. They should stay at the root of the manifest, probably below assets
.
Right now it seems they are just - https://i.imgflip.com/3loyed.jpg
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.
Wow a spoiler ... that's more heinous than force pushing to master
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.
Btw, spoiler alert for ^^ Don't open if you haven't seen Avengers Endgame 🙊 😇
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.
The damage is done my friend, I don't feel so good Mr. Muesch
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.
🤨 🤨 that quote appears to be a spoiler ❗ ❗ ❗
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 noticed two issues when testing, I left one inline about the author
section.
The other issue is that creating a marketplace integration spits out an error:
<integration> is already on version `2.0.0`
I believe you'll need to remove the automatic triggering of the migrate
command here - https://github.com/DataDog/integrations-core/blob/master/datadog_checks_dev/datadog_checks/dev/tooling/commands/create.py#L185-L186 (And likely can just remove that entire flag. I'm not sure how thats done in ddev
releases, so maybe just removing the code check and removing the flag later? I'll leave up to you 🙂 )
datadog_checks_dev/datadog_checks/dev/tooling/commands/create.py
Outdated
Show resolved
Hide resolved
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.
Couple things I noticed while testing creating a new integration in the marketplace folder:
- passing
-t tile
includes the fullintegration
key inside assets. While that was needed with manifest V1, one of the big benefits of V2 is not requiring that for tile only listings (and therefore not requiring fields likesource_type_name
. Can we update it so that only thecheck
type has thisintegration
section please? - The migrate v2 command looks like it was adding some more fields than are present here. A few I noticed were in the author section, the
vendor_id
andsales_email
-integrations-core/datadog_checks_dev/datadog_checks/dev/tooling/manifest_validator/v2/migration.py
Lines 180 to 191 in 10c94eb
elif repo_name == "marketplace": migrated_manifest.set_path("/author/vendor_id", TODO_FILL_IN) migrated_manifest.set_path("/author/sales_email", loaded_manifest.get_path("/terms/legal_email")) migrated_manifest.set_path("/pricing", loaded_manifest.get_path("/pricing")) migrated_manifest.set_path("/legal_terms", {}) migrated_manifest.set_path("/legal_terms/eula", loaded_manifest.get_path("/terms/eula")) for idx, _ in enumerate(migrated_manifest.get_path("/pricing") or []): migrated_manifest.set_path(f"/pricing/{idx}/product_id", TODO_FILL_IN) migrated_manifest.set_path(f"/pricing/{idx}/short_description", TODO_FILL_IN) migrated_manifest.set_path(f"/pricing/{idx}/includes_assets", True)
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.
As discussed offline @ofek I took a pass at making sure this was in line with other marketplace manifests. I left a minor commit but I think that this brings most of the major changes.
I think there's some quality-of-life things to figure out, because there still has to be manual tweaks to the generated manifest to get it to pass validations, but these modifications have to be made with more context about what the integration will do. As an example there's a generated empty dashboards
key. If that truly stays empty, it needs to just be removed, but IMO its better to include during generation to know it exists than to remove it right now.
All that to say, I think this is a great step towards getting every new thing on Manifest V2, and we can iteratively update the command with smaller improvements over time 🙂
* Update new integration templates to use v2 manifests * address * address * address * address * Minor tweaks to emails Co-authored-by: Nick <nicholas.muesch@datadoghq.com> fd736e2
* Update new integration templates to use v2 manifests * address * address * address * address * Minor tweaks to emails Co-authored-by: Nick <nicholas.muesch@datadoghq.com>
Motivation
Move everything to new pipelines