EN-2255: Warn on push when the latest version has insight-settings overrides#250
Open
roytl wants to merge 5 commits into
Open
EN-2255: Warn on push when the latest version has insight-settings overrides#250roytl wants to merge 5 commits into
roytl wants to merge 5 commits into
Conversation
5716951 to
236f026
Compare
236f026 to
0f73b3c
Compare
The getInsightsSettings endpoint now lands in the generated client (api_default.go + model_*.go), so the hand-added stopgap file collided with the generated declarations and broke the build. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The generated InsightsSettingsOverrides uses map[string]interface{} for
its override maps; update the test literals to match.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
On
leap push, if the latest version of the project has any insight-settings overrides (metric direction/active, ignored/added domains, ignored latent spaces), warn the user that those overrides are per-version and won't carry to the new version, and require acknowledgement before proceeding:--yesbypasses the prompt;survey.Confirm(defaults to No);--yes→ abort (never silently override someone's overrides).How
pkg/model/insights.go:GetLatestProjectVersion,GetInsightsSettingsOverrides,HasAnyInsightsOverride(+ unit tests).cmd/root_cmd/push.go:--yesflag +confirmInsightsSettingsOverrides()called early inrunPush.pkg/tensorleapapi/insights_settings.go: hand-addedGetInsightsSettingsclient method + types, mirroring the generated style.getInsightsSettingsendpoint (node-server PR #1750) to be released. By design there's no graceful degradation — if the endpoint is missing the call errors and the push aborts — so this should land only after that endpoint is live in deployed servers.make update-server-apito replace it with the generated client.Test plan
go build ./...,go vet,go test ./pkg/model/ -run TestHasAnyInsightsOverridepass.leap push→ warning;--yesskips; piped stdin without--yesaborts.