Skip to content

Commit 78f1d6e

Browse files
Revert "Image Render: Support Tracing (#586)" (#609)
This reverts commit b1bdf72.
1 parent aa2817b commit 78f1d6e

28 files changed

+302
-1624
lines changed

.gitignore

+1-3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,4 @@ scripts/tmp
4040

4141
tests/testdata/diff_*
4242

43-
cache
44-
45-
/devenv/docker/tracing/tempo-data/
43+
cache

README.md

+42-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ A Grafana backend plugin that handles rendering panels and dashboards to PNGs us
88
- Windows (x64)
99
- Mac OS X (x64)
1010

11-
For Mac ARM64, you need to [build the plugin from source](https://github.com/grafana/grafana-image-renderer/blob/master/docs/building_from_source.md) or use the [remote rendering installation](https://github.com/grafana/grafana-image-renderer?tab=readme-ov-file#remote-rendering-service-installation).
12-
1311
### Dependencies
1412

1513
This plugin is packaged in a single executable with [Node.js](https://nodejs.org/) runtime and [Chromium browser](https://www.chromium.org/Home).
@@ -134,4 +132,45 @@ For available configuration settings, please refer to [Grafana Image Rendering d
134132
## Troubleshooting
135133

136134
For troubleshooting help, refer to
137-
[Grafana Image Rendering troubleshooting documentation](https://grafana.com/docs/grafana/latest/image-rendering/troubleshooting/).
135+
[Grafana Image Rendering troubleshooting documentation](https://grafana.com/docs/grafana/latest/image-rendering/troubleshooting/).
136+
137+
## Testing
138+
139+
In order to run the image-renderer automated test suites, you need to run the following command from the root folder:
140+
141+
```
142+
yarn test
143+
```
144+
145+
This will launch a Grafana instance in Docker and, then, run the test suites.
146+
147+
_Notes:_
148+
149+
If there are some expected changes in the reference image files (located in `/tests/testdata`), run `yarn test-update` and push the updated references.
150+
151+
If the tests are failing and you want to see the difference between the image you get and the reference image, run `yarn test-diff`. This will generate images (called `diff_<test case>.png`) containing the differences in the `/tests/testdata` folder.
152+
153+
### Fixing Drone issues
154+
155+
If tests are successful in your local environement but fail in Drone. You can follow these steps to run the tests in an environment similar to the Drone pipeline. This will mount your local files of the `grafana-image-renderer` repo in the Docker image so any change that happens in the Docker image will be available in your local environment. This allows you to run `yarn test-diff` and `yarn test-update` in Docker and see the results locally.
156+
157+
1. Run the Drone environment in Docker:
158+
159+
```
160+
cd ./devenv/docker/drone
161+
docker-compose up
162+
```
163+
164+
2. Open a terminal within the `drone-docker-puppeteer` container and run the following commands:
165+
166+
```
167+
cd /drone/src
168+
PUPPETEER_CACHE_DIR=/drone/src/cache yarn install --frozen-lockfile --no-progress
169+
PUPPETEER_CACHE_DIR=/drone/src/cache CI=true yarn test-ci
170+
```
171+
172+
_Notes:_
173+
The tests might take longer in the Docker container. If you run into timeout issues, you can run the test command with the `--testTimeout option`:
174+
```
175+
PUPPETEER_CACHE_DIR=/drone/src/cache CI=true yarn test-ci --testTimeout=10000
176+
```

default.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@
5151

5252
"verboseLogging": false,
5353
"dumpio": false,
54-
"timingMetrics": false,
55-
56-
"tracing": {
57-
"url": "",
58-
"serviceName": ""
59-
}
54+
"timingMetrics": false
6055
}
6156
}

dev.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@
5050

5151
"verboseLogging": true,
5252
"dumpio": false,
53-
"timingMetrics": true,
54-
55-
"tracing": {
56-
"url": "http://localhost:4318/v1/traces",
57-
"serviceName": ""
58-
}
53+
"timingMetrics": true
5954
}
6055
}

devenv/docker/custom-config/config.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@
4141
},
4242

4343
"verboseLogging": false,
44-
"dumpio": false,
45-
46-
"tracing": {
47-
"url": "",
48-
"serviceName": ""
49-
}
44+
"dumpio": false
5045
}
5146
}

devenv/docker/tracing/config.json

-51
This file was deleted.

devenv/docker/tracing/docker-compose.yaml

-71
This file was deleted.

devenv/docker/tracing/grafana-datasources.yaml

-33
This file was deleted.

devenv/docker/tracing/prometheus.yaml

-11
This file was deleted.

devenv/docker/tracing/tempo.yaml

-91
This file was deleted.

docs/building_from_source.md

-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ cd grafana-image-renderer
2424
# build and package for Darwin x64
2525
make build_package ARCH=darwin-x64-unknown
2626

27-
# build and package for Mac ARM64
28-
make build_package ARCH=darwin-arm64-unknown
29-
3027
# build and package without including Chromium
3128
make build_package ARCH=<ARCH> SKIP_CHROMIUM=true OUT=plugin-<ARCH>-no-chromium
3229
```

docs/index.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Use the following links for instructions on how to:
33

44
- [Build the image renderer from source](building_from_source.md)
55
- [Package plugin as a single executable](package_plugin_as_single_executable.md)
6-
- [Release and publish a new version](release_new_version.md)
7-
- [Testing instructions](testing.md)
6+
- [Release and publish a new version](release_new_version.md)

0 commit comments

Comments
 (0)