Graylog2 / Graylog2/graylog2-server

Avoid compilation of graylog2-server for web plugins

Open
#11,866 2 comments 0 reactions 1 assignee Claimed by @dennisoelkers View on GitHub
improvement infrastructure triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

The package.json of all web plugins contains a devDependency to "graylog-web-plugin" as a relative path. Because of this, in order to compile a web plugin, one must first clone graylog2-server and compile it.
This makes the process of compiling a plugin a little bit complex, and uses time and resources during continuous integration.
Would it be possible to rather define this devDependency as any other npm dependency (or, as an alternative as an URL pointing to a tarball from a graylog2-server github release)?
Thank you.

## Expected Behavior
Ideally, the process of building a graylog web plugin would simply amount to cloning the repository with the plugin and run "mvn package".

## Current Behavior
Currently, to build a web plugin, one must:
* clone graylog2-server
* "mvn compile" graylog2-server
* clone the plugin
* "mvn package" the plugin
To give you some concrete example, see, for instance, the github actions of the graylog-plugin-logging-alert: https://github.com/airbus-cyber/graylog-plugin-logging-alert/blob/master/.github/workflows/ci.yml

## Possible Solution
From a plugin developer's point of view, the easiest solution would be to declare the devDependency to graylog-web-plugin as any other regular npm package. As an alternative, the dependence could be expressed as an URL pointing to a tarball. This tarball could be published, for instance, in the gitub releases of graylog2-server (one for each release).

## Context
I am currently doing some maintenance work for several graylog plugins (https://github.com/airbus-cyber/graylog-plugin-alert-wizard, https://github.com/airbus-cyber/graylog-plugin-correlation-count, https://github.com/airbus-cyber/graylog-plugin-aggregation-count, https://github.com/airbus-cyber/graylog-plugin-logging-alert).
This issue has affected me in two ways:
* the current building process makes it harder for plugin users which want to build the plugin themselves
* the continuous integration is unnecessarily resource and time intensive
* building the plugin for the first time on a development machine (or when upgrading the version of graylog) can be time-consuming

## Your Environment
* Graylog Version: 4.2.3

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.