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

Create Plugin: Update docs to build backend before running docker #167

Merged
merged 4 commits into from
Jan 11, 2023

Conversation

sarahzinger
Copy link
Member

@sarahzinger sarahzinger commented Dec 5, 2022

What this PR does / why we need it:
Ensures instructions guide users towards building their plugin's backend before running docker.

Right now if you build a plugin with a backend with the create-plugin tool and follow the instructions as written you'll get a 503 error message with the message "plugin unavailable". This is because if you follow the instructions as currently written you are building the backend of your plugin (mage -v) after you've run yarn server or docker-compose up -build which kicks of a dockerized version of grafana but which does not restart if the new files in your plugin are built. It may not be clear to the user that they need to restart yarn server/docker and/or run these commands in a different order.

I think in the future it would be awesome to add some tooling to rebuild/restart the server on backend changes as well, but this feels like a nice small incremental improvement in helping people get started faster.

📦 Published PR as canary version: Canary Versions

✨ Test out this PR locally via:

npm install @grafana/create-plugin@0.8.2-canary.167.f98dad9.0
# or 
yarn add @grafana/create-plugin@0.8.2-canary.167.f98dad9.0

@CLAassistant
Copy link

CLAassistant commented Dec 5, 2022

CLA assistant check
All committers have signed the CLA.

@sarahzinger sarahzinger requested review from leventebalogh and jackw and removed request for leventebalogh December 5, 2022 21:04
@jackw jackw added create-plugin related to the create-plugin tool patch Increment the patch version when merged labels Dec 7, 2022
Copy link
Collaborator

@jackw jackw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🚀

Copy link
Collaborator

@leventebalogh leventebalogh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👏

@jackw jackw added the release Create a release when this pr is merged label Jan 11, 2023
@jackw jackw force-pushed the reverse-backend-and-frontend-instructions branch from a836a6d to f98dad9 Compare January 11, 2023 11:36
@jackw
Copy link
Collaborator

jackw commented Jan 11, 2023

@sarahzinger have rebased this with main. Will wait for it to build then merge. Thanks so much for helping out with this project! ⭐

@jackw jackw added the type/docs Changes only affect the documentation label Jan 11, 2023
@jackw jackw changed the title Update docs to recommend building backend before running docker. Create Plugin: Update docs to build backend before running docker Jan 11, 2023
@jackw jackw merged commit de43191 into main Jan 11, 2023
@jackw jackw deleted the reverse-backend-and-frontend-instructions branch January 11, 2023 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-plugin related to the create-plugin tool patch Increment the patch version when merged release Create a release when this pr is merged type/docs Changes only affect the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants