Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Misleading errors of dynatrace.conf.yaml not found when creating a new keptn project #657

Closed
grabnerandi opened this issue Dec 29, 2021 · 2 comments · Fixed by #661
Closed
Assignees
Labels
bug Something isn't working

Comments

@grabnerandi
Copy link
Contributor

Describe the bug
With the changed behavior of mandating a dynatrace.conf.yaml we are receiving error messages that users havent received before even though there is no option to mitigate them. Thats why those error messages are misleading and I think not necessary
When creating a new keptn project the dynatrace-service handles the project.create.finished event. I am not sure what the dynatrace-service is doing when handling project.finished but right now it always throws an error that it cant find dynatrace.conf.yaml.

Here is a screenshot after I created 3 projects in my keptn
image

I think the dynatrace-service should only handle those events that actually cause an action. Plus - since the changed behavior of mandating the dynatrace.conf.yaml we should revisit when the dynatrace.conf.yaml is really needed and when not.

Versions

Versions of the applicable components

  • Dynatrace Service version : 0.19.0
  • Dynatrace cluster version : xx
  • Keptn version: 0.11.4
@arthurpitman
Copy link
Collaborator

arthurpitman commented Jan 3, 2022

The dynatrace-service currently handles the sh.keptn.event.project.create.finished event by automatically configuring monitoring for the project:

func (eh ProjectCreateFinishedEventHandler) HandleEvent() error {
shipyard, err := eh.event.GetShipyard()
if err != nil {
log.WithError(err).Error("Could not load Keptn shipyard file")
}
cfg := NewConfiguration(eh.dtClient, eh.kClient, eh.sloReader, eh.serviceClient)
_, err = cfg.ConfigureMonitoring(eh.event.GetProject(), shipyard)
if err != nil {
return err
}
log.Info("Dynatrace Monitoring setup done")
return nil
}

This is incorrect in my opinion, as until a dynatrace/dynatrace.conf.yaml file has been created the dynatrace-service can't communicate with the Dynatrace tenant. Furthermore, the dynatrace-service should not configure monitoring for a Keptn project unless the user has explicitly asked for it.

As an interim solution, I would suggest removing this functionality.

@grabnerandi
Copy link
Contributor Author

Agree with @arthurpitman on "removing this functionality" as there is no way for the user to define a dynatrace.conf.yaml at the time of project creation!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants