Skip to content

Conversation

@mfrancisc
Copy link
Contributor

@mfrancisc mfrancisc commented Nov 11, 2025

Add workatoWebHookURL field in the /uiconfig api response.

It will be used by the UI to push events to workato.

Related PRs:

E2E tests:

Jira: https://issues.redhat.com/browse/SANDBOX-1484

Summary by CodeRabbit

  • New Features

    • Workato webhook URL is now included in the UI configuration API response and accessible to clients.
  • Chores

    • Updated codeready-toolchain/api dependency to the latest version.
  • Tests

    • Added test coverage for the new Workato webhook URL configuration field.

@coderabbitai
Copy link

coderabbitai bot commented Nov 11, 2025

Walkthrough

The changes introduce support for exposing a Workato webhook URL configuration property. A dependency version is updated, a new accessor method is added to the configuration wrapper, and the webhook URL is exposed in the UI config response with corresponding tests.

Changes

Cohort / File(s) Summary
Dependency Update
go.mod
Updated codeready-toolchain/api dependency from v0.0.0-20251008084914-06282b83d4cd to v0.0.0-20251111133521-6e510c9bd2ee
Configuration Layer
pkg/configuration/configuration.go
Added WorkatoWebHookURL() accessor method to RegistrationServiceConfig returning the webhook URL or empty string default
UI Config Exposure
pkg/controller/uiconfig.go, pkg/controller/uiconfig_test.go
Added WorkatoWebHookURL field to UIConfigResponse struct, populated in GetHandler, and added test assertion verifying the field value

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Straightforward, repetitive pattern of exposing configuration through existing layers
  • All changes are additive with no logic modifications
  • New test adequately covers the added functionality

Poem

🐰 Through layers we hop, a webhook so true,
Configuration and tests, all shiny and new,
From config to UI, the URL takes flight,
A Workato webhook, configured just right! 🪝✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: exposing the Workato webhook URL in the /uiconfig endpoint response.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
pkg/controller/uiconfig_test.go (1)

68-70: Consider testing with a non-default value.

The test currently validates the default empty string behavior. For more comprehensive coverage, consider setting an explicit WorkatoWebHookURL value in the test configuration and asserting that value is correctly propagated to the response.

Apply this diff to enhance the test:

 	s.OverrideApplicationDefault(testconfig.RegistrationService().
 		RegistrationServiceURL("https://signup.domain.com"),
+		WorkatoWebHookURL("https://hooks.workato.com/webhooks/test"),
 	)

Then verify the test asserts the expected value instead of just the default.

pkg/controller/uiconfig.go (1)

15-15: Add a documentation comment for the new field.

The UICanaryDeploymentWeight field has a helpful comment explaining its purpose. Consider adding a similar comment for WorkatoWebHookURL to document the field's purpose in the API response.

Apply this diff to add documentation:

 	UICanaryDeploymentWeight int `json:"uiCanaryDeploymentWeight"`
 
+	// WorkatoWebHookURL holds the URL for the Workato webhook endpoint used by the UI to push events.
 	WorkatoWebHookURL string `json:"workatoWebHookURL"`
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c2086c7 and ade63c2.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (4)
  • go.mod (1 hunks)
  • pkg/configuration/configuration.go (1 hunks)
  • pkg/controller/uiconfig.go (2 hunks)
  • pkg/controller/uiconfig_test.go (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: GolangCI Lint
  • GitHub Check: Build & push operator bundles for e2e tests
  • GitHub Check: Test with Coverage
🔇 Additional comments (4)
go.mod (1)

9-9: LGTM! Dependency update aligns with the related API PR.

The version update for codeready-toolchain/api is necessary to pull in the new WorkatoWebHookURL field definition from the related PR #492.

pkg/controller/uiconfig_test.go (1)

37-38: LGTM! Minor formatting improvement.

The trailing comma after RegistrationServiceURL is a good practice for cleaner diffs when adding additional configuration parameters in the future.

pkg/configuration/configuration.go (1)

150-152: LGTM! Accessor method follows established patterns.

The WorkatoWebHookURL() method implementation is consistent with other configuration accessors in the codebase, using commonconfig.GetString with an appropriate default empty string.

pkg/controller/uiconfig.go (1)

33-33: LGTM! Field correctly populated from configuration.

The WorkatoWebHookURL field is properly populated using the configuration accessor method, consistent with the existing pattern for UICanaryDeploymentWeight.

@openshift-ci
Copy link

openshift-ci bot commented Nov 11, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexeykazakov, mfrancisc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [alexeykazakov,mfrancisc]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mfrancisc
Copy link
Contributor Author

/retest

fixed e2e test

@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.54%. Comparing base (c2086c7) to head (ade63c2).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
pkg/configuration/configuration.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #558      +/-   ##
==========================================
- Coverage   81.60%   81.54%   -0.06%     
==========================================
  Files          46       46              
  Lines        2799     2802       +3     
==========================================
+ Hits         2284     2285       +1     
- Misses        429      431       +2     
  Partials       86       86              
Flag Coverage Δ
unittests 81.54% <33.33%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@mfrancisc mfrancisc merged commit 87e7bba into codeready-toolchain:master Nov 12, 2025
13 of 15 checks passed
@mfrancisc mfrancisc deleted the returnworkatoconfig branch November 12, 2025 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants