Repository navigation
feat(tools): add follow-upstream to merge upstream configuration changes into templates - #464
Merged
Merged
Conversation
…ged release each template is based on Each 7.x template and the unversioned jvm.options and environment file templates name the package release they were derived from, as a Jinja comment that is not rendered into the deployed file. tools/follow-upstream uses it as the base of the three-way merge. Determined by diffing each template against the files extracted from the graylog-server and graylog-datanode RPMs; where several releases ship an identical file, the newest is recorded. The 6.x templates are left without the line.
…raylog 7.1.11 Compared against the server.conf shipped in graylog-server 7.1.11: adds the commented events_index_refresh_interval setting.
…ges into templates tools/follow-upstream extracts /etc from the RPM and DEB of an upstream release in a podman container and three-way merges the packaged file changes since each template's base release into the template, creating the template for a new release series from the previous one. On every run it reports packaged files that are neither templated nor ignored, templated files that disappeared, and files that differ between RPM and DEB. tools/follow-upstream.yml lists the applications, starting with Graylog. The lfops-follow-upstream skill drives the tool from a release notice and covers what it cannot decide: conflicts, new or removed options, packaging changes, tests and the CHANGELOG. .claude is excluded from the collection build.
NavidSassan
force-pushed
the
feat/app-update
branch
from
October 21, 2026 09:31
7b8a68b to
489bc14
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A workflow for keeping versioned templates in line with upstream releases, piloted with Graylog.
tools/follow-upstream <app> <version>extracts/etcfrom the RPM and the DEB of a release (streamed in a Rocky 9 container, nothing is installed) and three-way merges the packaged file changes since each template's base release into the template:git merge-file <template> <packaged file, base release> <packaged file, new release>. LFOps changes are kept, overlapping upstream changes become conflict markers. For a new release series it creates the template from the previous one, adds the series to the supported versions and lists lines that still mention the old series./etcthat are neither templated nor ignored, templated files a release no longer ships, and files that differ between RPM and DEB.server.conf(absolutebin_dir,data_dir,node_id_file,message_journal_dir, addedintegrations_scripts_dir).{# Based on graylog-server 7.2.1 #}. As a Jinja comment it is not rendered, so adding it changes no deployed file and restarts nothing. CONTRIBUTING.md documents the convention.tools/follow-upstream.ymllists the applications (Graylog for now). Thelfops-follow-upstreamClaude Code skill drives the tool from a release notice (pasted mail,<app> <version>, or a local notmuch tag) and covers what the tool cannot decide: conflicts, new or removed options, packaging changes, tests, CHANGELOG..claudeis excluded from the collection build.server.conftemplate is synced with Graylog 7.1.11 (adds the commentedevents_index_refresh_intervalsetting). 7.0.15 and 7.2.1 need no change.No CHANGELOG entry: the tooling is contributor-only, and the template sync only adds upstream comments, as with the earlier 7.1.10 sync.
Test
No Molecule scenario exists for the Graylog roles.
Based onrelease of every 7.x template was determined by diffing it against the files from thegraylog-server/graylog-datanodeRPMs of all patch releases of its series.tools/follow-upstream graylog 7.2.1rebuilt them from 7.1 identical to the existing ones, except the timestamp and ago2docs.graylog.org/7-1/link, which the tool reports.tools/follow-upstream graylogfor 7.0.15, 7.1.11 and 7.2.1: exit 0, RPM and DEB byte-identical for all mapped files.server.conf, a movedjvm.optionsand a non-existent release are all reported (exit 1 / exit 2).Based onJinja comment renders to nothing (ansible.builtin.templatelookup).