Skip to content

Commit 10a7543

Browse files
authored
Handle removed integrations in ddev release agent changelog command (DataDog#21167)
* Fix ddev release agent changelog command * Lint * Add changelog
1 parent 0b6f992 commit 10a7543

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

ddev/changelog.d/21167.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Handle changelog generation for removed integrations

ddev/src/ddev/cli/release/agent/changelog.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
'Mesos': 'Mesos Slave'
2424
}
2525

26+
REMOVED_INTEGRATIONS = {
27+
# name --> display name
28+
'kaspersky': 'Kaspersky'
29+
}
30+
2631

2732
@click.command(
2833
short_help="Provide a list of updated checks on a given Datadog Agent version, in changelog form",
@@ -69,8 +74,12 @@ def changelog(app: Application, since: str, to: str, write: bool, force: bool):
6974
for entry in CHANGELOG_MANUAL_ENTRIES.get(agent, []):
7075
changelog_contents.write(f'{entry}\n')
7176
for name, ver in version_changes.items():
72-
display_name = app.repo.integrations.get(name).display_name
73-
display_name = DISPLAY_NAME_MAPPING.get(display_name, display_name)
77+
try:
78+
display_name = app.repo.integrations.get(name).display_name
79+
display_name = DISPLAY_NAME_MAPPING.get(display_name, display_name)
80+
# OSError is raised if the integration path does not exist - likely a deleted or migrated integration
81+
except OSError:
82+
display_name = REMOVED_INTEGRATIONS.get(name, name)
7483

7584
breaking_notice = " **BREAKING CHANGE**" if ver[1] else ""
7685
changelog_url = check_changelog_url.format(name)

0 commit comments

Comments
 (0)