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

fix: json suffix for json template from CLI #370

Merged
merged 1 commit into from
Mar 14, 2022
Merged

Conversation

lesam
Copy link
Contributor

@lesam lesam commented Mar 11, 2022

Closes #351

The server can reject jsonnet files due to security concerns, so don't pretend that our files are jsonnet templates.

@lesam lesam requested a review from serenibyss March 11, 2022 20:16
@lesam
Copy link
Contributor Author

lesam commented Mar 11, 2022

Passes:

> ./influx template -f buckets.jsonnet
LABELS
+--------------+------------------+---------------+--------------------------------+---------+
| PACKAGE NAME |        ID        | RESOURCE NAME |          DESCRIPTION           |  COLOR  |
+--------------+------------------+---------------+--------------------------------+---------+
|   label-1    | 0000000000000000 |    label-1    | desc_1                         | #eee888 |
+--------------+------------------+---------------+--------------------------------+---------+
|                                                               TOTAL              |    1    |
+--------------+------------------+---------------+--------------------------------+---------+

BUCKETS
+--------------+------------------+---------------+-----------+--------------------------------+-------------+
| PACKAGE NAME |        ID        | RESOURCE NAME | RETENTION |          DESCRIPTION           | SCHEMA TYPE |
+--------------+------------------+---------------+-----------+--------------------------------+-------------+
|   rucket-1   | 0000000000000000 |   rucket-1    | 2h46m40s  | desc_1                         |  implicit   |
+--------------+------------------+---------------+-----------+--------------------------------+-------------+
|   rucket-2   | 0000000000000000 |   rucket-2    | 5h33m20s  | desc-2                         |  implicit   |
+--------------+------------------+---------------+-----------+--------------------------------+-------------+
|   rucket-3   | 0000000000000000 |   rucket-3    |  8h20m0s  | desc_3                         |  implicit   |
+--------------+------------------+---------------+-----------+--------------------------------+-------------+
|                                                                           TOTAL              |      3      |
+--------------+------------------+---------------+-----------+--------------------------------+-------------+

LABEL ASSOCIATIONS
+---------------+---------------+------------------+------------+------------------+
| RESOURCE TYPE | RESOURCE NAME |   RESOURCE ID    | LABEL NAME |     LABEL ID     |
+---------------+---------------+------------------+------------+------------------+
|    buckets    |   rucket-1    | 0000000000000000 |  label-1   | 0000000000000000 |
+---------------+---------------+------------------+------------+------------------+
|    buckets    |   rucket-2    | 0000000000000000 |  label-1   | 0000000000000000 |
+---------------+---------------+------------------+------------+------------------+
|    buckets    |   rucket-3    | 0000000000000000 |  label-1   | 0000000000000000 |
+---------------+---------------+------------------+------------+------------------+
|                                                      TOTAL    |        3         |
+---------------+---------------+------------------+------------+------------------+

Before this change:

> ./influx template -f buckets.jsonnet
Error: failed to summarize template: 422 Unprocessable Entity: template[0] from source(s) "buckets.jsonnet" had an issue: invalid encoding provided: jsonnet

@lesam lesam merged commit c8c7c1c into main Mar 14, 2022
@serenibyss serenibyss deleted the fix-template-jsonnet branch June 27, 2022 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

apply with -e jsonnet fails
2 participants