Open
Conversation
Add --scheme flag to auth login so users can connect over HTTP for local dev. Centralize host+scheme defaulting in Profile.BaseURL() and use it everywhere (API client, auth status, login confirmation). Fix response body leak in UpdateMetricMonitoring by decoding the POST response. Remove redundant UpdateMetricMonitoringRequest struct in favor of MetricMonitoringSettings. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Instead of a separate --scheme parameter, users can now specify http:// or https:// as part of the --host value. Defaults updated to https://cloud.soda.io to make the convention visible. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Soda Cloud's PublicApiUpdateDatasetRequest validator now rejects requests with metricMonitoring.enabled=true unless datasetMetricMonitorsConfiguration is also provided: body.metricMonitoring.datasetMetricMonitorsConfiguration: Scan schedule and dataset metric monitors configuration must be provided if metric monitoring is enabled `dataset onboard --monitoring` already sends the list (via EnableDatasetDefaults), but `monitor config --enable --schedule ...` was only sending Enabled + ScanSchedule. Populate the same default monitor types (rowCount, freshness, schema, rowsInserted, totalRowCountChange, timeliness) so both code paths stay in sync. - Export defaultDatasetMonitorTypes as DefaultDatasetMonitorTypes for reuse across cmd/ and internal/api/. - Populate req.DatasetMetricMonitorsConfiguration when --enable is set. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
fix:
monitor config --enablemust populate default monitor typesProblem
sodacli monitor config <dataset-id> --enable --schedule "0 6 * * *"currently fails against Soda Cloud with:Root cause
The Cloud API now requires three fields together on
metricMonitoring:enabledscanScheduledatasetMetricMonitorsConfiguration(the list:rowCount,freshness,schema,rowsInserted,totalRowCountChange,timeliness)dataset onboard --monitoringalready sends all three via theEnableDatasetDefaultshelper ininternal/api/monitors.go. Butmonitor config --enablehas its own parallel implementation incmd/monitor.gothat was only sendingenabled+scanSchedule, so the Cloud API rejects it with a 400.This silently breaks per-dataset monitor enablement in scripts that call
monitor config --enabledirectly (including the Fizz demo bootstrap, where every subsequentmonitor addthen errors withMetric monitoring is not enabled on dataset).Fix
Populate the same default monitor types from both code paths.
internal/api/monitors.go: exportdefaultDatasetMonitorTypesasDefaultDatasetMonitorTypesso it can be reused fromcmd/.cmd/monitor.go: when--enableis set, build aDatasetMetricMonitorCfgslice fromDefaultDatasetMonitorTypesand attach it to the request, matching whatEnableDatasetDefaultsdoes.Verification
Against a local Soda Cloud:
Both succeed. Before this fix, the first command 400s and the second then errors with "Metric monitoring is not enabled on dataset".