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

Imported monitors replace % in their message with %!x(MISSING) #133

Open
blampe opened this issue May 19, 2021 · 0 comments
Open

Imported monitors replace % in their message with %!x(MISSING) #133

blampe opened this issue May 19, 2021 · 0 comments
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@blampe
Copy link
Contributor

blampe commented May 19, 2021

Expected behavior

Generated code for an imported monitor should include exactly the same message as the existing resource.

Current behavior

A monitor with % anywhere in its message will produce generated code containing %!x(MISSING) in place of %.

Steps to reproduce

Tested on pulumi-datadog 3.1.0.

  1. Manually create a monitor. In the message, include % anywhere. For example: "5% of requests failed".
  2. Import the monitor using pulumi import datadog:index/monitor:Monitor test 12345
  3. Observe the message in the generated code does not match the existing message verbatim. In this example, it produces "5%!o(MISSING)f requests failed"

Context (Environment)

This breaks messages with percent-encoded URLs to runbooks, for example. It also makes commonplace percentiles (99%) unreadable. It's relatively straightforward to fix, but it's a big annoyance when trying to import a large number of existing monitors. Being able to copy-paste the generated code would be ideal!

Affected feature

Unsure.

@blampe blampe added the kind/bug Some behavior is incorrect or out of spec label May 19, 2021
@t0yv0 t0yv0 added kind/bug Some behavior is incorrect or out of spec and removed kind/bug Some behavior is incorrect or out of spec labels May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants