[jitsi-dev] [jitsi/jitsi-videobridge] JVB maven strategy doesn't work when trying to rely on jvb as a dependency. (#195)


#1

Forwarding an issue one of our devs is having as we're trying to productionize our use of the videobridge, he's written up the report below:

We would like to treat jitsi-videobridge as a library instead of a running application, due to our service layer shared by all services within our datacenter. Notably, we would like to wrap the main so that we can provide unified logging (elastic search) and wire in our metrics libraries, for example.

However, the current "maven time based snapshotting" is incompatible with our java build system (we use SBT + Coursier [https://github.com/alexarchambault/coursier]). Generally speaking, SBT uses Ivy for dependency management, and while there is quite good support for maven time-based snapshotting (which is what it appears you're currently using), it is limited - and the current repository layout does not work :frowning:

In addition, we would like to be able to reliably pull an exact snapshot version when we're ready to upgrade, for example, and the current "1.0-SNAPSHOT" of jitsi-videobridge doesn't facilitate this.

Is there any chance you could move to a more standardized/ivy/coursier compatible snapshot versioning? Maybe something that uses the output of "git describe --tags --always" (this happens to be how we version everything, and it has a lot of advantages - you can very quickly know exactly what revision a jar is from).

Finally, there are a few dependencies that are missing version numbers, which is generally required by ivy/coursier and generally a good practice in my opinion.

We have filed and/or are tracking some issues within Coursier that should address most of this, but they are likely not going to be addressed any time soon:

https://github.com/alexarchambault/coursier/issues/209 - support for latest.version
https://github.com/alexarchambault/coursier/issues/157 - unable to resolve dependencies when no version is specified.
https://github.com/alexarchambault/coursier/issues/169 - support for maven time based snapshotting.

I've included the error log of fetching with coursier below.

[coursier_fetch_jvb.txt](https://github.com/jitsi/jitsi-videobridge/files/196552/coursier_fetch_jvb.txt)

···

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/issues/195


#2

Finally, there are a few dependencies that are missing version numbers, which is generally required by ivy/coursier and generally a good practice in my opinion.

Some versions are inherited from the parent (jitsi-universe). If you see any that are defined in neither, please let us know which ones.

I don't have any input on the other issues, sorry.

···

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/issues/195#issuecomment-203684442


#3

The coursier fetch for the snapshots looks at the wrong path to download the artifacts. E.g. `org.jitsi:libjitsi:1.0-20160212.154637-91` would be found at `https://github.com/jitsi/jitsi-maven-repository/blob/master/snapshots/org/jitsi/libjitsi/1.0-SNAPSHOT/libjitsi-1.0-20160212.154637-91.pom` - which is correct (compare with e.g. a snapshot of dnssecjava at Sonatype: `https://oss.sonatype.org/service/local/repositories/snapshots/content/org/jitsi/dnssecjava/1.1-SNAPSHOT/`).

I'll work from time to time on unforking some libraries and using them directly from Maven Central. And maybe we can somehow arrange to publish the Videobridge (including all dependencies) as a release in our Maven repository, e.g. at the time when a new version is installed on meet.jit.si.

···

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/issues/195#issuecomment-203774972


#4

Thanks for the assistance here. We're aware of the issues and we've been tracking them in Coursier; however, without a stable version (e.g. no 1.0-SNAPSHOT), we can't create a reproducible build using videobridge in its current form (since everytime we build, it will pick the latest snapshot).

My understanding from historical usage of maven is that publishing using git revisioning is relatively straightforward.

···

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/issues/195#issuecomment-205506606


#5

I am probably missing something, but can't you depend on a specific snapshot (e.g. "1.0-20160404.030209-126")? We publish these to our [maven repo](https://github.com/jitsi/jitsi-maven-repository/blob/master/snapshots/org/jitsi/jitsi-videobridge/1.0-SNAPSHOT/) on each build.

Getting the associated git commit is not convenient, but it is possible -- look for the commit in the jitsi-maven-repository git repo which adds the file, the commit message contains the git commit tag (e.g. "1.0-20160404.030209-126" comes from [this commit](https://github.com/jitsi/jitsi-maven-repository/commit/9a0ee472911437e58db8544d6ab01e4bf6f76530), so the jitsi-videobridge commit is 2a7385a62bd628d458862b6d63c36ea36dc12a65)

···

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/issues/195#issuecomment-205512944


#6

@bgrozev I know this is still a long way to go, but would it be possible to tag and release the versions running on https://meet.jit.si as non-snapshot versions in the future?

···

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/issues/195#issuecomment-205515237


#7

I can't answer this question, @emcho and @damencho will have to chime in. I think it makes sense (it also makes sense to push them to the "stable" deb repo, so that the packages don't get pruned).

···

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/issues/195#issuecomment-205517484


#8

I missed depending on a specific snapshot, I don't believe that was there when I was originally looking; however, what I'm suggesting you consider is throwing away the "timebased snapshotting" and _simply versioning with git itself_.

So, instead of 1.0-20160404.030209-126, you'd have "0.9.1-g-73-ab17f8" or something of that nature.

···

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/issues/195#issuecomment-205960425


#9

Regarding versioning with git I have a PR pending (https://github.com/jitsi/jitsi-videobridge/pull/171) that uses git sha in the final package filename and in the jar manifest, but leaving the version as before (1.0-SNAPSHOT) because this is the strategy used in all the jitsi related libraries so far.

···

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/issues/195#issuecomment-206181826