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

[WIP] Building with @grafana/toolkit #8

Closed
amotl opened this issue Jul 8, 2019 · 11 comments
Closed

[WIP] Building with @grafana/toolkit #8

amotl opened this issue Jul 8, 2019 · 11 comments

Comments

@amotl
Copy link

amotl commented Jul 8, 2019

Dear @ryantxu,

as you made us curious about the work you are currently doing related to grafana/grafana#17819, we are humbly asking how to actually make this happen:

trying with @grafana/toolkit

Note you need to yarn link @grafana/toolkit manually until we release it!

When installing it manually like yarn add @grafana/toolkit (essentially getting 6.3.0-alpha.0), yarn build will croak like

yarn run v1.15.2
$ grafana-toolkit plugin:build
/home/develop/grafana-worldmap-panel/node_modules/@grafana/toolkit/src/cli/index.ts:2
import program from 'commander';
       ^^^^^^^

SyntaxError: Unexpected identifier

With kind regards,
Andreas.

@amotl
Copy link
Author

amotl commented Jul 8, 2019

When running grafana-toolkit with ts-node, it produces this message:

$ ./node_modules/.bin/ts-node ./node_modules/.bin/grafana-toolkit
/home/develop/grafana-worldmap-panel/node_modules/ts-node/src/index.ts:245
    return new TSError(diagnosticText, diagnosticCodes)
           ^
TSError:  Unable to compile TypeScript:
error TS5058: The specified path does not exist: '/home/develop/grafana-worldmap-panel/node_modules/@grafana/toolkit/src/config/tsconfig.plugin.json'.

@ryantxu
Copy link
Collaborator

ryantxu commented Jul 8, 2019

See: #9

it is not yet working in CI, but if you run:

yarn install then yarn build it should work.

@dprokop
Copy link

dprokop commented Jul 8, 2019

@amotl also please not that we are realeasing WIP grafana-toolkit under next tag on npm, so you should install it using yarn add "@grafana/toolkit"@next. If you want to try it out locally- please refer to https://github.com/grafana/grafana/blob/master/packages/grafana-toolkit/README.md#internal-development

@amotl
Copy link
Author

amotl commented Jul 8, 2019

Dear @ryantxu and @dprokop,

thanks for your suggestions and pointers. We will try to get through based on these details.

With kind regards,
Andreas.

@dprokop
Copy link

dprokop commented Aug 12, 2019

@amotl how is it going with grafana-toolkit? We have released loads of updates since we last talked, would love to get some feedback from you! To get the latest version install "@grafana/toolkit"@next from npm.

@amotl
Copy link
Author

amotl commented Aug 12, 2019

Dear @dprokop,

thanks for asking.

I haven't been able to catch up on this but will likely dedicate some time to Worldmap because some issues have been popping up lately regarding timing woes re. correct map loading on the most recent Grafana 6.2 release as reported by some users.

If I'm lucky, I will be able to take a look at the new grafana-toolkit stack while being at it and maybe merge what @ryantxu prepared over at #9 already.

Do I understand correctly that you are signalling that I should probably become brave enough to merge the [WIP] things in order to go forward on this?

Thanks again for taking the time!

With kind regards,
Andreas.

@amotl
Copy link
Author

amotl commented Sep 29, 2019

Dear @ryantxu and @dprokop,

after switching to @ryantxu's branch with-toolkit (thanks for all your work by the way!), running yarn build now yields this error

error An unexpected error occurred: "https://registry.yarnpkg.com/@grafana/toolkit/-/toolkit-6.4.0-alpha.44-e9c1b8b3f.tgz: Request failed \"404 Not Found\"".

Indeed [1] will respond with "404 Not found". However, we see that already has some other dist-tags, so we will just update yarn.lock accordingly if we will be able to make it work through that.

If you see I am going into the wrong direction here, I will be happy to hear about any advises.

Thanks already and with kind regards,
Andreas.

[1] https://registry.yarnpkg.com/@grafana/toolkit/-/toolkit-6.4.0-alpha.44-e9c1b8b3f.tgz
[2] https://registry.yarnpkg.com/@grafana/toolkit/

@amotl
Copy link
Author

amotl commented Sep 29, 2019

After updating yarn.lock through yarn upgrade --dev "@grafana/toolkit"@next, we are able to build the plugin locally by invoking

yarn grafana-toolkit plugin:dev --watch

and it looks like everything works like a charm.

Thank you so much and with kind regards,
Andreas.

@ryantxu
Copy link
Collaborator

ryantxu commented Sep 30, 2019

looks like this is merged

@amotl
Copy link
Author

amotl commented Oct 29, 2019

Dear @dprokop,

how is it going with grafana-toolkit?

We have been able to successfully build the plugin using the new infrastructure coming from grafana-toolkit, thanks again to @ryantxu and you for your exceptional work on this.

As we are now aiming to create an appropriate release package through npx grafana-toolkit plugin:ci-package, it looks like we are hitting a road block there. We shared our observations through grafana/grafana#20071 and #15.

Thanks already for looking into this and keep up the good work!

With kind regards,
Andreas.

@amotl
Copy link
Author

amotl commented Nov 2, 2019

After some fixes to grafana-toolkit, building and packaging now works like a charm. As of now, people will have to use "@grafana/toolkit"@canary in order to make this work.

Kudos to @dprokop and @ryantxu for their support.

@amotl amotl closed this as completed Nov 2, 2019
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

No branches or pull requests

3 participants