grafana / plugin-tools

Create Grafana plugins with ease.
https://grafana.com/developers/plugin-tools/
Apache License 2.0
55 stars 27 forks source link

Create Plugin: Fix backend dev env for arm64 hosts #990

Closed jackw closed 1 day ago

jackw commented 3 days ago

What this PR does / why we need it: Draft as requires testing across OS...

This PR changes the docker file and docker compose to not force amd64 which causes a mismatch between the go arch, docker arch and the host arch causing dlv to fail to work. The linked issue has further investigative info.

With the changes in this PR I can successfully connect with dlv using an M2 Macbook.

image

Which issue(s) this PR fixes:

Fixes #913

Special notes for your reviewer:

To test run the following in terminal...

npx @grafana/create-plugin@4.14.1-canary.990.e4ea168.0 --pluginName=test \
--pluginDescription="test plugin" \
--orgName=test \
--pluginType=datasource \
--hasBackend \
--hasGithubWorkflows \
--hasGithubLevitateWorkflow && \
cd test-test-datasource && \
npm i && \
npm run build && \
mage build:backend && \
DEVELOPMENT=true docker compose up
📦 Published PR as canary version: Canary Versions
:sparkles: Test out this PR locally via: ```bash npm install @grafana/create-plugin@4.14.1-canary.990.e4ea168.0 # or yarn add @grafana/create-plugin@4.14.1-canary.990.e4ea168.0 ```
github-actions[bot] commented 3 days ago

Hello! 👋 This repository uses Auto for releasing packages using PR labels.

✨ This PR can be merged and will trigger a new patch release. NOTE: When merging a PR with the release label please avoid merging another PR. For further information see here.

oshirohugo commented 3 days ago

Nice work Jack, thank you for addressing this one :D. I've tested in Linux and everything is working. I had to do some small changes that maybe you'll address in the final version, but it's good to mention, just in case.

jackw commented 2 days ago

Nice work Jack, thank you for addressing this one :D. I've tested in Linux and everything is working. I had to do some small changes that maybe you'll address in the final version, but it's good to mention, just in case.

Thanks for taking the time to give me early feedback and provide solutions to the issues I'd created! 🥇 I've now updated the branch based on your suggestions and opened for review.

oshirohugo commented 2 days ago

I've testing and everything is working out of the box! :+1:

grafana-plugins-platform-bot[bot] commented 1 day ago

:rocket: PR was released in @grafana/create-plugin@4.14.1 :rocket: