Skip to content

Commit

Permalink
Various fixes for check_only integrations (#18718)
Browse files Browse the repository at this point in the history
* fix author name not being normalized

* add missing spec file

* change number to integer
  • Loading branch information
james-eichelbaum authored Nov 7, 2024
1 parent 757aed2 commit 48879c4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions datadog_checks_dev/changelog.d/18718.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix author name not being normalized
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
get_valid_templates,
prefill_template_fields_for_check_only,
)
from ..utils import kebab_case_name, normalize_package_name
from ..utils import kebab_case_name, normalize_display_name, normalize_package_name
from .console import CONTEXT_SETTINGS, abort, echo_info, echo_success, echo_warning

HYPHEN = b'\xe2\x94\x80\xe2\x94\x80'.decode('utf-8')
Expand Down Expand Up @@ -190,6 +190,7 @@ def create(ctx, name, integration_type, location, non_interactive, quiet, dry_ru
author = manifest.get("author", {}).get("name")
if author is None:
abort("Unable to determine author from manifest")
author = normalize_display_name(author)
integration_dir_name = integration_dir_name.removeprefix(f"{author}_")
else:
if os.path.exists(integration_dir):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: {integration_name}
files:
- name: {check_name}.yaml
options:
- template: init_config
options:
- template: init_config/default
- template: instances
options:
- template: instances/default
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ instances:
#
# service: <SERVICE>

## @param min_collection_interval - number - optional - default: 15
## @param min_collection_interval - integer - optional - default: 15
## This changes the collection interval of the check. For more information, see:
## https://docs.datadoghq.com/developers/write_agent_check/#collection-interval
#
Expand Down

0 comments on commit 48879c4

Please sign in to comment.