Dear Prometheus developers,

As you may know, since a couple months ago, we changed the way the UI is
organized to be able to include the project codemirror-promql directly in
Prometheus. The idea was when changing the PromQL syntax, we also modify
codemirror-promql so we don't have any desync between the UI and the
backend.

We are using the npm workspace feature which is the way with npm to manage
a mono-repo, and since this moment we have some troubles to upgrade the UI
dependencies like:

   - Not every files are correctly updated by dependabot
   - There are some conflicts between the dependencies used in
   codemirror-promql and in the react-app. Basically a dependency A in
   codemirror-promql could be upgraded, but cannot in the react-app because
   the react-app has some constraints that prevent this upgrade. Which leads
   to not necessarily knowing which version of the dependency A is used.

With just these two points above, updating the UI dependencies require too
much knowledge about how the npm workspaces are working and it is hard to
automatize.

Since the last version where @Bjoern Rabenstein <bjo...@rabenste.in> faced
some difficulties to upgrade the UI dependencies, I have been thinking
about how to improve the situation. I have compared the Prometheus repo
with what we are doing in Perses where it is working without any issues
(aka using a npm monorepo).
And my conclusion is actually: we didn't embrace the way the monorepo is
supposed to work in the UI way.

What we did is to put a side project (codemirror-promql) alongside of the
react-app without changing a thing. But instead we should actually align
and put in common a certain amount of dependencies used across the
different UI modules.
It wasn't possible to align the dependencies because we (actually I) said,
it will be cool to synchronize codemirror-promql to the repo
prometheus/codemirror-promql where we will make the release.
And for that, we need to build the repo which requires some
dev-dependencies ...etc so that cannot be put in common with the react-app.

And like that we still have a tag associated with the release of
codemirror-promql.

So after this tentative to explain the situation, here what I would like to
do, and where I would like your opinion on:

I would like to stop the synchronization of the codemirror-promql. So we
need to find a new way to release codemirror-promql directly in the
Prometheus repository.

So we could say, it is released at the same time as Prometheus itself. And
then:

   - With the same version. So we will bump the version of codemirror from
   0.19.0 to 2.35.
   - Its own version (with a sort of script to know if codemirror-promql
   has to be released since the Prometheus release or not).

In both cases, the release of codemirror-promql will be behind the unique
tag of Prometheus. (i.e. v2.X.Y)

Once we find the way, I will make the changes and after a couple of PRs we
should be back to a situation where with a quick command we will be able to
update or upgrade the UI dependencies. (The command is already known and I
experimented in Perses).

Sorry for the long email, I tried to explain why it's a bit hard to upgrade
the dependencies and it's actually quite hard to explain without entering
in too much detail.

All the best,
Augustin.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-developers/CAOJizGeMSpF09QngxM9bEJj4DPa9yxwz8t%2BDeFjbsXy-nDz6YA%40mail.gmail.com.

Reply via email to