Skip to content

add feature flag for search relevance workbench#34

Merged
martin-gaievski merged 3 commits intoopensearch-project:mainfrom
fen-qin:feature-flag
Jun 1, 2025
Merged

add feature flag for search relevance workbench#34
martin-gaievski merged 3 commits intoopensearch-project:mainfrom
fen-qin:feature-flag

Conversation

@fen-qin
Copy link
Copy Markdown
Collaborator

@fen-qin fen-qin commented May 29, 2025

Description

Add a feature flag to by defaulted enable search relevance workbench. When dashboards read the cluster settings, it can do the access control to opt-in/opt-out user experience between old version and new version.

  • feature flag = true by defaulted
  • if customers choose to opt-out SRW, feature flag = false
    • feature flag will block all rest APIs calls
GET localhost:9200/_cluster/settings?include_defaults=true
...
{
    "plugins": {
        ...
        "search_relevance": {
		"workbench_enabled": "true"     // defaulted value
	}
}
  • any API calls will get the 403 response
Search Relevance Workbench is disabled

Issues Resolved

#33
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link
Copy Markdown
Collaborator

@epugh epugh left a comment

Choose a reason for hiding this comment

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

LGTM.

fen-qin added 2 commits May 30, 2025 14:08
Signed-off-by: Fen Qin <mfenqin@amazon.com>
Signed-off-by: Fen Qin <mfenqin@amazon.com>
@martin-gaievski
Copy link
Copy Markdown
Member

I think flag should be "enabled" by default and user needs to opt-out in case they don't want SRW
@heemin32

@fen-qin
Copy link
Copy Markdown
Collaborator Author

fen-qin commented May 30, 2025

@martin-gaievski @heemin32
here is the feature flag change for frontend - o19s/dashboards-search-relevance#53

  • feature flag by defaulted is false -> old user experience
Screenshot 2025-05-30 at 2 36 32 PM
  • and currently, I enabled DYNAMIC, so after update cluster settings to enable feature flag -> new user experience
Screenshot 2025-05-30 at 2 36 59 PM

Can you check if my understanding here is correct ? My action items on this task:

  • reverse, it should be by-defaulted as true, then customer choose to opt-out ?
  • when to remove the DYNAMIC. I keep the DYNAMIC here to make it easier for all of us to validate the changes. Otherwise, it will be old experience

@heemin32
Copy link
Copy Markdown
Collaborator

reverse, it should be by-defaulted as true, then customer choose to opt-out ?

Yes

when to remove the DYNAMIC. I keep the DYNAMIC here to make it easier for all of us to validate the changes. Otherwise, it will be old experience

We should keep it as dynamic.

Signed-off-by: Fen Qin <mfenqin@amazon.com>
@fen-qin
Copy link
Copy Markdown
Collaborator Author

fen-qin commented Jun 1, 2025

reverse the feature flag. By defaulted, customers are opt-in the SWR. Then they can choose to opt-out SWR to use old experience.

@martin-gaievski martin-gaievski merged commit af7f4ae into opensearch-project:main Jun 1, 2025
13 checks passed
@codecov
Copy link
Copy Markdown

codecov bot commented Jun 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (e7c98c9) to head (bf3096d).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##               main   #34       +/-   ##
==========================================
- Coverage     14.48%     0   -14.49%     
==========================================
  Files           107     0      -107     
  Lines          3313     0     -3313     
  Branches        236     0      -236     
==========================================
- Hits            480     0      -480     
+ Misses         2808     0     -2808     
+ Partials         25     0       -25     

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

sstults pushed a commit to sstults/search-relevance that referenced this pull request Jul 1, 2025
* add feature flag for search relevance workbench

Signed-off-by: Fen Qin <mfenqin@amazon.com>

* add CHANGELOG.md for feature flag

Signed-off-by: Fen Qin <mfenqin@amazon.com>

* change defaulted value to true

Signed-off-by: Fen Qin <mfenqin@amazon.com>

---------

Signed-off-by: Fen Qin <mfenqin@amazon.com>
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.

4 participants