<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Maintaining on Grafana Labs</title><link>https://grafana.com/docs/loki/v2.9.x/community/maintaining/</link><description>Recent content in Maintaining on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/loki/v2.9.x/community/maintaining/index.xml" rel="self" type="application/rss+xml"/><item><title>Releasing Grafana Loki</title><link>https://grafana.com/docs/loki/v2.9.x/community/maintaining/release/</link><pubDate>Wed, 06 Sep 2023 12:47:18 +0000</pubDate><guid>https://grafana.com/docs/loki/v2.9.x/community/maintaining/release/</guid><content><![CDATA[&lt;h1 id=&#34;releasing-grafana-loki&#34;&gt;Releasing Grafana Loki&lt;/h1&gt;
&lt;p&gt;This document is a series of instructions for core Grafana Loki maintainers to be able
to publish a new Loki release.&lt;/p&gt;
&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;Each maintainer performing a release should perform the following steps once
before releasing Loki.&lt;/p&gt;
&lt;h3 id=&#34;signing-tags-and-commits&#34;&gt;Signing Tags and Commits&lt;/h3&gt;
&lt;h4 id=&#34;add-existing-gpg-key-to-github&#34;&gt;Add Existing GPG Key to GitHub&lt;/h4&gt;
&lt;p&gt;First, Navigate to your user&amp;rsquo;s &lt;a href=&#34;https://github.com/settings/keys&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;SSH and GPG keys settings
page&lt;/a&gt;. If the GPG key for the email address
used to commit with Loki is not present, follow these instructions to add it:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Run &lt;code&gt;gpg --armor --export &amp;lt;your email address&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Copy the output.&lt;/li&gt;
&lt;li&gt;In the settings page linked above, click &amp;ldquo;New GPG Key&amp;rdquo;.&lt;/li&gt;
&lt;li&gt;Copy and paste the PGP public key block.&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&#34;signing-commits-and-tags-by-default&#34;&gt;Signing Commits and Tags by Default&lt;/h4&gt;
&lt;p&gt;To avoid accidentally publishing a tag or commit without signing it, you can run
the following to ensure all commits and tags are signed:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;git config --global commit.gpgSign true
git config --global tag.gpgSign true&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h5 id=&#34;macos-signing-errors&#34;&gt;macOS Signing Errors&lt;/h5&gt;
&lt;p&gt;If you are on macOS and using an encrypted GPG key, the &lt;code&gt;gpg-agent&lt;/code&gt; may be
unable to prompt you for your private key passphrase. This will be denoted by an
error when creating a commit or tag. To circumvent the error, add the following
into your &lt;code&gt;~/.bash_profile&lt;/code&gt; or &lt;code&gt;~/.zshrc&lt;/code&gt;, depending on which shell you are
using:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;export GPG_TTY=$(tty)&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;performing-the-release&#34;&gt;Performing the Release&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Create a new branch to update &lt;code&gt;CHANGELOG.md&lt;/code&gt; and references to version
numbers across the entire repository (e.g. README.md in the project root).&lt;/li&gt;
&lt;li&gt;Modify &lt;code&gt;CHANGELOG.md&lt;/code&gt; with the new version number and its release date.&lt;/li&gt;
&lt;li&gt;List all the merged PRs since the previous release. This command is helpful
for generating the list (modifying the date to the date of the previous release): &lt;code&gt;curl https://api.github.com/search/issues?q=repo:grafana/loki&#43;is:pr&#43;&amp;quot;merged:&amp;gt;=2019-08-02&amp;quot; | jq -r &#39; .items[] | &amp;quot;* [&amp;quot; &#43; (.number|tostring) &#43; &amp;quot;](&amp;quot; &#43; .html_url &#43; &amp;quot;) **&amp;quot; &#43; .user.login &#43; &amp;quot;**: &amp;quot; &#43; .title&#39;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Go through &lt;code&gt;docs/&lt;/code&gt; and find references to the previous release version and
update them to reference the new version.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Without creating a tag&lt;/em&gt;, create a commit based on your changes and open a PR
for updating the release notes.
&lt;ol&gt;
&lt;li&gt;Until &lt;a href=&#34;https://github.com/grafana/loki/issues/852&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;852&lt;/a&gt; is fixed, updating
Helm and Ksonnet configs needs to be done in a separate commit following
the release tag so that Helm tests pass.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Merge the changelog PR.&lt;/li&gt;
&lt;li&gt;Create a new tag for the release.
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Once this step is done, the CI will be triggered to create release
artifacts and publish them to a draft release. The tag will be made
publicly available immediately.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the following to create the tag:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;RELEASE=v1.2.3 # UPDATE ME to reference new release
git checkout release-1.2.x # checkout release branch
git pull
git tag -s $RELEASE -m &amp;#34;tagging release $RELEASE&amp;#34;
git push origin $RELEASE&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Watch Drone and wait for all the jobs to finish running.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;updating-helm-and-ksonnet-configs&#34;&gt;Updating Helm and Ksonnet configs&lt;/h2&gt;
&lt;p&gt;These steps should be executed after the previous section, once CircleCI has
finished running all the release jobs.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Run &lt;code&gt;bash ./tools/release_prepare.sh&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;When prompted for the release version, enter the latest tag.&lt;/li&gt;
&lt;li&gt;When prompted for new Helm version numbers, the defaults should suffice (a
minor version bump).&lt;/li&gt;
&lt;li&gt;Commit the changes to a new branch, push, make a PR, and get it merged.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;publishing-the-release-draft&#34;&gt;Publishing the Release Draft&lt;/h2&gt;
&lt;p&gt;Once the previous two steps are completed, you can publish your draft!&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to the &lt;a href=&#34;https://github.com/grafana/loki/releases&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;GitHub releases page&lt;/a&gt;
and find the drafted release.&lt;/li&gt;
&lt;li&gt;Edit the drafted release, copying and pasting &lt;em&gt;notable changes&lt;/em&gt; from the
CHANGELOG. Add a link to the CHANGELOG, noting that the full list of changes
can be found there. Refer to other releases for help with formatting this.&lt;/li&gt;
&lt;li&gt;Optionally, have other team members review the release draft so you feel
comfortable with it.&lt;/li&gt;
&lt;li&gt;Publish the release!&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;versioning-loki-docs-on-grafana-website&#34;&gt;Versioning Loki docs on Grafana Website&lt;/h2&gt;
&lt;p&gt;Loki docs are versioned. Follow the below steps to version Loki docs for this release.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;NOTE: Here $LOCAL_LOKI_PATH is your local path where Loki is checked out with correct $VERSION&lt;/p&gt;&lt;/blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Clone Grafana website &lt;a href=&#34;https://github.com/grafana/website&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;repo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Create new branch &lt;code&gt;git checkout -b $VERSION&lt;/code&gt; (replace &lt;code&gt;$VERSION&lt;/code&gt; with current release version. e.g: &lt;code&gt;v2.5.0&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;mv content/docs/loki/next content/docs/loki/next.main&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;mkdir content/docs/loki/next&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;cp -R $LOCAL_LOKI_PATH/docs/sources/* content/docs/loki/next&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;scripts/docs-release.sh loki latest next&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;scripts/docs-release.sh loki $VERSION latest&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;mv content/docs/loki/next.main content/docs/loki/next&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Update &lt;code&gt;version_latest&lt;/code&gt; to &lt;code&gt;$VERSION&lt;/code&gt; in &lt;code&gt;content/docs/loki/_index.md&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Docs will be generated for this release.&lt;/li&gt;
&lt;li&gt;Create PR and Merge it after approval.&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="releasing-grafana-loki">Releasing Grafana Loki&lt;/h1>
&lt;p>This document is a series of instructions for core Grafana Loki maintainers to be able
to publish a new Loki release.&lt;/p>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;p>Each maintainer performing a release should perform the following steps once
before releasing Loki.&lt;/p></description></item><item><title>Releasing Loki Build Image</title><link>https://grafana.com/docs/loki/v2.9.x/community/maintaining/release-loki-build-image/</link><pubDate>Wed, 06 Sep 2023 12:47:18 +0000</pubDate><guid>https://grafana.com/docs/loki/v2.9.x/community/maintaining/release-loki-build-image/</guid><content><![CDATA[&lt;h1 id=&#34;releasing-loki-build-image&#34;&gt;Releasing Loki Build Image&lt;/h1&gt;
&lt;p&gt;The &lt;a href=&#34;https://github.com/grafana/loki/blob/main/loki-build-image&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;code&gt;loki-build-image&lt;/code&gt;&lt;/a&gt;
is the Docker image used to run tests and build Grafana Loki binaries in CI.&lt;/p&gt;
&lt;p&gt;The build and publish process of the image is triggered upon a merge to &lt;code&gt;main&lt;/code&gt;
if any changes were made in the folder &lt;code&gt;./loki-build-image/&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To build and use the &lt;code&gt;loki-build-image&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&#34;step-1&#34;&gt;Step 1&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;create a branch with the desired changes to the Dockerfile&lt;/li&gt;
&lt;li&gt;update the version tag of the &lt;code&gt;loki-build-image&lt;/code&gt; pipeline defined in &lt;code&gt;.drone/drone.jsonnet&lt;/code&gt; (search for &lt;code&gt;pipeline(&#39;loki-build-image&#39;)&lt;/code&gt;) to a new version number (try to follow semver)&lt;/li&gt;
&lt;li&gt;run &lt;code&gt;DRONE_SERVER=https://drone.grafana.net/ DRONE_TOKEN=&amp;lt;token&amp;gt; make drone&lt;/code&gt; and commit the changes to the same branch
&lt;ol&gt;
&lt;li&gt;the &lt;code&gt;&amp;lt;token&amp;gt;&lt;/code&gt; is your personal drone token, which can be found by navigating to &lt;a href=&#34;https://drone.grafana.net/account&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://drone.grafana.net/account&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;create a PR&lt;/li&gt;
&lt;li&gt;once approved and merged to &lt;code&gt;main&lt;/code&gt;, the image with the new version is built and published
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Note:&lt;/strong&gt; keep an eye on &lt;a href=&#34;https://drone.grafana.net/grafana/loki&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;https://drone.grafana.net/grafana/loki&lt;/a&gt; for the build after merging (&lt;a href=&#34;https://drone.grafana.net/grafana/loki/17760/1/2&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;example&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;step-2&#34;&gt;Step 2&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;create a branch&lt;/li&gt;
&lt;li&gt;update the &lt;code&gt;BUILD_IMAGE_VERSION&lt;/code&gt; variable in the &lt;code&gt;Makefile&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;run &lt;code&gt;loki-build-image/version-updater.sh &amp;lt;new-version&amp;gt;&lt;/code&gt; to update all the references&lt;/li&gt;
&lt;li&gt;run &lt;code&gt;DRONE_SERVER=https://drone.grafana.net/ DRONE_TOKEN=&amp;lt;token&amp;gt; make drone&lt;/code&gt; to update the Drone config to use the new build image&lt;/li&gt;
&lt;li&gt;create a new PR&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="releasing-loki-build-image">Releasing Loki Build Image&lt;/h1>
&lt;p>The &lt;a href="https://github.com/grafana/loki/blob/main/loki-build-image" target="_blank" rel="noopener noreferrer">&lt;code>loki-build-image&lt;/code>&lt;/a>
is the Docker image used to run tests and build Grafana Loki binaries in CI.&lt;/p>
&lt;p>The build and publish process of the image is triggered upon a merge to &lt;code>main&lt;/code>
if any changes were made in the folder &lt;code>./loki-build-image/&lt;/code>.&lt;/p></description></item></channel></rss>