Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

The build feature cannot be added multiple times #16

Open
sferencik opened this issue Jan 23, 2017 · 1 comment
Open

The build feature cannot be added multiple times #16

sferencik opened this issue Jan 23, 2017 · 1 comment

Comments

@sferencik
Copy link
Collaborator

The TeamCity-Graphite build feature now allows being added multiple times to a single build config; see here. However, practically this does not work. There are multiple places in the code that assume that the feature is enabled at most once, e.g.:

  • GraphiteBuildParametersProvider - loops through all the features but if there are multiple Graphite ones, it will probably take the params from the latest
  • BuildStatusListener.IsFeatureEnabled()
    • the very question is wrong: the client shouldn't be asking "is the Graphite feature enabled" but "get me the list of Graphite features that are enabled"
    • the response is wrong too: if there are two Graphite features added to a build config, and the first one is disabled, IsFeatureEnabled() will report false (see the break statement) - despite the fact that one of the two features is indeed enabled

To be clear, I don't have a use case for multiple Graphite features per single build config. I just noticed this because I ran into the case described in the last bullet point above: the Graphite feature being ignored because another Graphite feature was disabled.

@sferencik
Copy link
Collaborator Author

As a quick fix, I propose to just own up and say that only one such feature is enabled.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant