Skip to content

Conversation

shaun-nx
Copy link
Contributor

@shaun-nx shaun-nx commented Oct 7, 2025

Proposed changes

This change adds the BuildOS field to our product telemetry.

Closes #4037

Blocked by #4008
Should not be merged until feat/inference-extension is merged

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.

Collected BuildOS for product telemetry

@shaun-nx shaun-nx requested a review from a team as a code owner October 7, 2025 13:47
@github-actions github-actions bot added enhancement New feature or request tests Pull requests that update tests labels Oct 7, 2025
@shaun-nx shaun-nx added the blocked Blocked by other issue label Oct 7, 2025
Copy link

codecov bot commented Oct 7, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.71%. Comparing base (1bfa2e9) to head (8022051).

Files with missing lines Patch % Lines
internal/controller/manager.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4038      +/-   ##
==========================================
- Coverage   86.73%   86.71%   -0.02%     
==========================================
  Files         128      128              
  Lines       16758    16761       +3     
  Branches       62       62              
==========================================
  Hits        14535    14535              
- Misses       2040     2042       +2     
- Partials      183      184       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@bjee19 bjee19 left a comment

Choose a reason for hiding this comment

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

nicely done, just a couple of small comments

Comment on lines 182 to 184
if buildOS == "" {
buildOS = "alpine"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need this since we have the check in commands.go. So like how we don't add an additional check for ImageSource I think we can follow suite.

imageSource = "unknown"
}

buildOs := os.Getenv("BUILD_OS")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Couldn't you just call this directly in the collector, rather than calling here and passing the var all the way through the code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a great point! Since I saw the same for imageSource := os.Getenv("BUILD_AGENT") above I figured this was the appropriate way to approach it.

renovate bot and others added 6 commits October 9, 2025 15:43
* Update module google.golang.org/grpc to v1.76.0

| datasource | package                | from    | to      |
| ---------- | ---------------------- | ------- | ------- |
| go         | google.golang.org/grpc | v1.75.1 | v1.76.0 |


Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update files for renovate

---------

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
| datasource | package                      | from    | to      |
| ---------- | ---------------------------- | ------- | ------- |
| go         | github.com/prometheus/common | v0.66.1 | v0.67.1 |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
| datasource  | package              | from    | to      |
| ----------- | -------------------- | ------- | ------- |
| github-tags | github/codeql-action | v3.30.6 | v4.30.7 |

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Update nginx Docker tag to v1.29.2

| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| docker     | nginx   | 1.29.1 | 1.29.2 |


Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update README

* Remove package updates

---------

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ciara Stacke <[email protected]>
…38dc (#4039)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@github-actions github-actions bot added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file and removed tests Pull requests that update tests labels Oct 9, 2025
@bjee19
Copy link
Contributor

bjee19 commented Oct 9, 2025

@shaun-nx also looks like there is some rebase issue occurring since theres a few additional files

@github-actions github-actions bot added tests Pull requests that update tests and removed documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file labels Oct 9, 2025
@shaun-nx shaun-nx requested review from sjberman and bjee19 October 9, 2025 18:24
//
//go:generate go run -tags generator github.com/nginx/telemetry-exporter/cmd/generator -type=Data -scheme -scheme-protocol=NGFProductTelemetry -scheme-df-datatype=ngf-product-telemetry
type Data struct {
type Data struct { //nolint
Copy link
Contributor

Choose a reason for hiding this comment

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

could you add a little comment here explaining why we nolint. bringing up the fieldaligntment issue but we need to have these fields in a specific order.

Name: cfg.GatewayPodConfig.Name,
},
ImageSource: cfg.ImageSource,
BuildOS: os.Getenv("BUILD_OS"),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we'll still need the check you had before and like in ImageSource where BUILD_OS could be something else besides ubi or it could be empty.

Copy link
Contributor

Choose a reason for hiding this comment

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

			imageSource := os.Getenv("BUILD_AGENT")
			if imageSource != "gha" && imageSource != "local" {
				imageSource = "unknown"
			}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sjberman pointed out in here that we should just be able to access it directly.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, os.Getenv("BUILD_OS") should be directly accessible in this file (probably even just in the collector file), but we'll still need to check the value of it. Since it could be empty and we don't want to pass that empty value in and would rather pass in something like "unknown" or "alpine"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah fair point. I'll update that too.

ControlPlanePodCount int64
// NginxOneConnectionEnabled is a boolean that indicates whether the connection to the Nginx One Console is enabled.
NginxOneConnectionEnabled bool
// BuildOS is the OS the NGF and NGINX binary was built on.
Copy link
Contributor

Choose a reason for hiding this comment

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

Technically this just checks the OS of NGF right? Do we know the expected functionality if somebody builds NGF with ubi but then tries to use NGINX in the other os?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I'm not really sure how that would work, or if it even can. I guess nothing really stops anyone from mixing them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked by other issue enhancement New feature or request release-notes tests Pull requests that update tests
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

OpenShift Support: Product Telemetry
3 participants