Skip to content

Fix non http promtail config add spec tests - #26

Open
jorbaum wants to merge 2 commits into
cloudfoundry-community:mainfrom
jorbaum:fix-non-http-promtail-config-add-spec-tests
Open

Fix non http promtail config add spec tests#26
jorbaum wants to merge 2 commits into
cloudfoundry-community:mainfrom
jorbaum:fix-non-http-promtail-config-add-spec-tests

Conversation

@jorbaum

@jorbaum jorbaum commented Aug 11, 2025

Copy link
Copy Markdown
Contributor

This mainly fixes a minor typo.

While I was at it I also added some tests and GitHub workflow for it based on
https://github.com/cloudfoundry/otel-collector-release

Only the two properties of the promtail config file are being tested for now.

Comment thread .github/workflows/scripts.yml
@jorbaum

jorbaum commented Mar 11, 2026

Copy link
Copy Markdown
Contributor Author

@ZPascal can you take a look at it?

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the promtail Loki client URL scheme selection (http vs https) in the BOSH template and adds an RSpec-based spec test + CI workflow to validate the rendered config.

Changes:

  • Correct the promtail Loki client URL to use http:// when TLS/mTLS is disabled.
  • Add an RSpec test verifying the rendered Loki client URL scheme.
  • Add Ruby/Bundler setup (Gemfile/lock), a spec-test script, and a GitHub Actions workflow to run the specs.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
jobs/promtail/templates/config/config.yml.erb Fixes URL scheme logic for the Loki client endpoint.
spec/jobs/promtail_spec.rb Adds spec coverage for http vs https Loki client URL rendering.
scripts/subtests/spec-test Adds a script entrypoint for running the spec suite via bundler.
Gemfile Introduces Ruby dependencies needed for spec testing.
Gemfile.lock Locks Ruby dependency versions for reproducible CI runs.
.github/workflows/scripts.yml Runs the spec-test script on PRs/pushes to main.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread spec/jobs/promtail_spec.rb Outdated
Comment thread spec/jobs/promtail_spec.rb
Comment thread scripts/subtests/spec-test Outdated
Comment thread Gemfile.lock Outdated
Comment thread .github/workflows/scripts.yml
@ZPascal

ZPascal commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

@jorbaum Any update here?

BTW: This PR replaces Promtail with Alloy.

@jorbaum
jorbaum force-pushed the fix-non-http-promtail-config-add-spec-tests branch from cc0e133 to ed3d25d Compare July 15, 2026 11:23
@jorbaum

jorbaum commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

@jorbaum Any update here?

Updated :) . I addressed all comments from you and copilot. One of copilot's suggestions was slightly off, besides that all valid comments and should all be worked in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants