Skip to content

Only declare the Agent package if not already declared#672

Merged
albertvaka merged 1 commit intomasterfrom
albertvaka/do-not-redeclare-package
Nov 19, 2020
Merged

Only declare the Agent package if not already declared#672
albertvaka merged 1 commit intomasterfrom
albertvaka/do-not-redeclare-package

Conversation

@albertvaka
Copy link
Copy Markdown
Contributor

What does this PR do?

We need the Agent package to be declared even when we don't install it,
since there's code that depends on it. Our current approach is to always
declare it, which works if the package is installed by something other than
Puppet (eg: chocolatey), since our declaration would not try to install it
again and the code that depends on that declaration would still be happy.
However, in case the package is being installed by a different Puppet
module, it would fail with a Duplicate declaration error.

Motivation

Bug report.

We need the package to be declared even when we don't install it, since
there's code that depends on it. Our current approach is to always declare
it, which works if the package is installed by something else than Puppet
(eg: chocolatey), since our declaration would not try to install it again
and the code that depends on that declaration would still be happy.
However, in case the package is being installed by a different Puppet
module, it would fail with a `Duplicate declaration` error.
@albertvaka albertvaka requested a review from a team as a code owner November 19, 2020 12:49
@albertvaka albertvaka merged commit 1c096b0 into master Nov 19, 2020
@albertvaka albertvaka deleted the albertvaka/do-not-redeclare-package branch November 19, 2020 17:20
cegeka-jenkins pushed a commit to cegeka/puppet-datadog_agent that referenced this pull request Feb 5, 2026
We need the Agent package to be declared even when we don't install it,
since there's code that depends on it. Our current approach is to always
declare it, which works if the package is installed by something other than
Puppet (eg: chocolatey), since our declaration would not try to install it
again and the code that depends on that declaration would still be happy.
However, in case the package is being installed by a different Puppet
module, it would fail with a Duplicate declaration error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants