Skip to content
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

CasC: default values are not respected #308

Open
Brialius opened this issue Sep 15, 2022 · 2 comments
Open

CasC: default values are not respected #308

Brialius opened this issue Sep 15, 2022 · 2 comments
Labels
kind/bug Bug related issue

Comments

@Brialius
Copy link

Describe the bug
If CasC is used to configure Datadog plugin, settings which are not explicitly set in CasC will not be changed, so settings from existing config (from global configuration page) will persist after applying CasC.

To Reproduce
Steps to reproduce the behavior:

  1. Setup CasC config w/o some optional settings for Datadog plugin (w/o enableCiVisibility for example)
  datadogGlobalConfiguration:
    emitSecurityEvents: true
    emitSystemEvents: true
    hostname: "host"
    reportWith: "DSD"
    targetHost: "localhost"
    targetPort: "8125"
    targetTraceCollectionPort: "8126"
  1. Apply CasC config
  2. Go to global configuration
  3. Ensure that Datadog plugin has default values in all unset settings (CI Visibility is disabled)
  4. Change on of unset settings via UI on global configuration page (enable CI Visibility for example)

image

  1. Apply and save changes.
  2. Apply CasC config again
  3. Go to global configuration
  4. See that settings are not changed (CI Visibility is still enabled)

Expected behavior
After applying CasC I'd expect overriding unset settings with default values. In other words I want to make sure that if CasC config is used, it is the single source of truth for Datadog plugin settings.

Environment and Versions (please complete the following information):
CasC plugin: 1512.vb_79d418d5fc8
datadog plugin: 5.0.0
Jenkins LTS: 2.361.1

@Brialius Brialius added the kind/bug Bug related issue label Sep 15, 2022
@sarah-witt
Copy link
Collaborator

Hi @Brialius thank you for raising this! We haven't officially supported CasC for our plugin yet but it's something we are going to work on in the near future.

@psimms-r7
Copy link

Hi - Just checking if any update of official config as code support?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Bug related issue
Projects
None yet
Development

No branches or pull requests

3 participants