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

[Grouper/Epic] Download Functionality problems and improvements #179

Closed
tatomir146 opened this issue Feb 15, 2021 · 9 comments
Closed

[Grouper/Epic] Download Functionality problems and improvements #179

tatomir146 opened this issue Feb 15, 2021 · 9 comments
Labels
area:download bug Something isn't working
Milestone

Comments

@tatomir146
Copy link
Contributor

tatomir146 commented Feb 15, 2021

Used internal env to test download functionality.

Describe the bug
Various things which should be improved by download functionality:

  • remove "metadata" from JSON, no need to have this
  • syntheticLocations are empty config: []
  • yaml formatting - no new lines used, making yaml files hard readable
  • yaml: quoting values makes file better readable in IDEs
  • main.go: downloadSpecificAPI should be either renamed to download-specific-api to keep consistency or even better to specific-api as it's a part of download command
  • main.go: p alias used for downloadSpecificApi > not really intuitiv
  • main.go: help for download functionality tells Yaml file containing environment to deploy to - deploy should be renamed to download
  • download.go: multiple enviroments typos
  • IDs should be stripped eg: alerting-profile "mzId": "-6221876622438591000"
  • verbose prints out e.g. nil as string DEBUG getting detail {... Cl_ES %!s(*string=<nil>)}
  • built in extensions are also downloaded: ruxit.python.redis:slave_state:unsynchronized Redis Slave unsynchronized
  • if there are multiple dashboards with same name then something like this is generated:
config:
- Home: Home.json
- Home: Home.json
- Home: Home.json
- Home: Home.json
Home:
- name: Home
- name: Home
- name: Home
- name: Home
@tatomir146 tatomir146 added the bug Something isn't working label Feb 15, 2021
@kristofre
Copy link
Contributor

Not sure if I agree with

remove "metadata" from JSON, no need to have this

Usecase is as follows: what if I download from environment/cluster X (let's say non-prod) that is on version a and I want to apply that config to environment/cluster Y (production) that is on version b and there is a difference in API behaviour. The meta data of the version would allow us to process that properly

@ghost
Copy link

ghost commented Feb 16, 2021

about the yaml formatting, we will have to look for an different parser from golang struct to yaml, the default one is quite strict in the convention for formatting go-yaml/yaml#556. We will have to create custom formatters to get quoting and line breaks for certain blocks.

@tatomir146
Copy link
Contributor Author

Not sure if I agree with

remove "metadata" from JSON, no need to have this

Usecase is as follows: what if I download from environment/cluster X (let's say non-prod) that is on version a and I want to apply that config to environment/cluster Y (production) that is on version b and there is a difference in API behaviour. The meta data of the version would allow us to process that properly

But is there any value in saving this into repository? If the idea is to use download functionality to pull and store config repo ready configuration, then this configuration should also work with different cluster versions. If the main concern is validation in case of failing updates (to another environment), then there are other plans in verifying configuration compatibility, not through metada.

@cvidler
Copy link

cvidler commented Mar 10, 2021

Adding to this issue at it seems relevant, happy to raise a new issue if more appropriate.

  • app-detection-rule output of the download command, only includes one rule per application, if there's more than one rule, the others are ignored - not in the .json files.

Testing on a customers environment (hoping to use monaco to migrate all config from an environment into another), 25 Web Applications, the UI reports 36 app-detection-rules, only 25 are present in the JSON files.

(using version 1.4.0).

@kristofre
Copy link
Contributor

Adding to this issue at it seems relevant, happy to raise a new issue if more appropriate.

  • app-detection-rule output of the download command, only includes one rule per application, if there's more than one rule, the others are ignored - not in the .json files.

Testing on a customers environment (hoping to use monaco to migrate all config from an environment into another), 25 Web Applications, the UI reports 36 app-detection-rules, only 25 are present in the JSON files.

(using version 1.4.0).

Some more meat around this:
We had a (DT Product) issue when trying to create multiple app detection rules for the same app using the API.
That was resolved, but only for newly created ones starting with 210.
But for the ones created before that we are merging them together and thus not applying them all:

config:
- Webadmintools: Webadmintools.json
- Webadmintools: Webadmintools.json
- Webadmintools: Webadmintools.json
- Webadmintools: Webadmintools.json
- Webadmintools: Webadmintools.json

Webadmintools:
- name: Web admin tools
- name: Web admin tools
- name: Web admin tools
- name: Web admin tools
- name: Web admin tools

@ghost
Copy link

ghost commented Apr 27, 2021

another issue for the custom service download needs to remove rule id and method rule Id to allow the deploy process to be transparent for the user.

@evanderbent
Copy link

Another issue is in application-web, "identifier" is not stripped blocking a re-upload.

@UnseenWizzard
Copy link
Contributor

UnseenWizzard commented Jun 21, 2022

As this issue is quite old and groups several issues, the current state needs to be checked - some of these should be fixed/about to the be fixed.
Anything not resolved will be split into it's own ticket

Current state (tick if solved already)

@UnseenWizzard UnseenWizzard changed the title Diverse issues with download functionality [Grouper/Epic] Download Functionality problems and improvements Jun 21, 2022
UnseenWizzard added a commit to UnseenWizzard/dynatrace-monitoring-as-code that referenced this issue Jun 22, 2022
Rather than trying to log the Value object as a string, when logging that a config is downloaded,
log the name and id.

ref: Dynatrace#179
@UnseenWizzard
Copy link
Contributor

open sub tasks to be handled with v2

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

No branches or pull requests

5 participants