Skip to content

Commit

Permalink
Merge pull request #84 from StackVista/fix-on-main
Browse files Browse the repository at this point in the history
3 issues fixed
  • Loading branch information
hierynomus authored Jun 5, 2024
2 parents 4852b0e + cdd0863 commit 20c391e
Show file tree
Hide file tree
Showing 62 changed files with 7,085 additions and 723 deletions.
8 changes: 4 additions & 4 deletions cmd/topic/topic_describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const (

type DescribeArgs struct {
Name string
Offset int32
Offset int64
Limit int32
Partition int32
File string
Expand All @@ -48,15 +48,15 @@ func DescribeCommand(deps *di.Deps) *cobra.Command {
cmd.Flags().StringVar(&args.Name, Name, "", NameUsage)
cmd.MarkFlagRequired(Name) //nolint:errcheck

cmd.Flags().Int32Var(&args.Offset, Offset, -1, OffsetUsage)
cmd.Flags().Int64Var(&args.Offset, Offset, -1, OffsetUsage)
cmd.Flags().Int32Var(&args.Limit, Limit, DefaultLimit, LimitUsage)
cmd.Flags().Int32Var(&args.Partition, Partition, -1, PartitionUsage)
common.AddFileFlagVar(cmd, &args.File, FileUsage)

return cmd
}

func argValueError(name string, value int32) common.CLIError {
func argValueError(name string, value int64) common.CLIError {
return common.NewCLIArgParseError(fmt.Errorf("invalid value for argument '%s' specified: %d", name, value))
}

Expand Down Expand Up @@ -85,7 +85,7 @@ func RunDescribeCommand(args *DescribeArgs) di.CmdWithApiFn {
return argValueError(Offset, args.Offset)
}
if args.Limit < 1 {
return argValueError(Limit, args.Limit)
return argValueError(Limit, int64(args.Limit))
}

request := api.TopicApi.Describe(cli.Context, args.Name)
Expand Down
2 changes: 1 addition & 1 deletion cmd/topic/topic_describe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func TestTopicDescribeDefaults(t *testing.T) {

type InvalidArgs struct {
Name string
Value int32
Value int64
}

func TestTopicDescribePaginationLimits(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion generated/stackstate_admin_api/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.1.0
6.0.1
38 changes: 38 additions & 0 deletions generated/stackstate_api/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
README.md
api/openapi.yaml
api_api_token.go
api_authorize_ingestion_api_key.go
api_component.go
api_dummy.go
api_event.go
api_export.go
api_health_synchronization.go
api_import.go
api_ingestion_api_key.go
api_kubernetes_logs.go
api_layout.go
api_metric.go
api_monitor.go
api_monitor_check_status.go
Expand Down Expand Up @@ -53,13 +56,21 @@ docs/ArgumentStructTypeVal.md
docs/ArgumentTimeWindowVal.md
docs/ArgumentTopologyPromQLMetricVal.md
docs/ArgumentTopologyQueryVal.md
docs/AuthorizeIngestionApiKeyApi.md
docs/AuthorizeIngestionApiKeyRequest.md
docs/BaseLayoutHint.md
docs/BaseMonitorError.md
docs/BaseNotificationChannel.md
docs/CausingEventsAreNotAvailableForTheTime.md
docs/CausingEventsResult.md
docs/ChannelReferenceId.md
docs/ComparatorWithoutEquality.md
docs/ComponentApi.md
docs/ComponentHealthChange.md
docs/ComponentHealthHistory.md
docs/ComponentHighlightMetricSection.md
docs/ComponentHighlightMetricSectionAllOf.md
docs/ComponentNotFoundError.md
docs/ComponentQuery.md
docs/CreateSubject.md
docs/DataUnavailable.md
Expand Down Expand Up @@ -153,6 +164,10 @@ docs/KubernetesLogHistogramBucket.md
docs/KubernetesLogRecord.md
docs/KubernetesLogSeverityHistogramBucket.md
docs/KubernetesLogsApi.md
docs/LayoutApi.md
docs/LayoutApiError.md
docs/LayoutHint.md
docs/LayoutList.md
docs/LicensedSubscription.md
docs/LimitOutOfRange.md
docs/LockedResponse.md
Expand All @@ -164,10 +179,15 @@ docs/MessageLevel.md
docs/Messages.md
docs/MetricApi.md
docs/MetricBucketValue.md
docs/MetricPerspectiveSection.md
docs/MetricPerspectiveSectionAllOf.md
docs/MetricPerspectiveTab.md
docs/MetricPerspectiveTabAllOf.md
docs/Monitor.md
docs/MonitorApi.md
docs/MonitorApiError.md
docs/MonitorApiErrorAllOf.md
docs/MonitorCheckStates.md
docs/MonitorCheckStatus.md
docs/MonitorCheckStatusApi.md
docs/MonitorCheckStatusApiError.md
Expand Down Expand Up @@ -300,6 +320,7 @@ docs/SpanSortDirection.md
docs/SpanSortField.md
docs/SpanSortOption.md
docs/SpanSuggestionField.md
docs/SpanSummary.md
docs/Spans.md
docs/StackElementNotFound.md
docs/StackPack.md
Expand Down Expand Up @@ -356,6 +377,7 @@ docs/UserProfile.md
docs/UserProfileApi.md
docs/UserProfileSaveError.md
docs/UserSessionApi.md
docs/ViewCheckState.md
docs/WebhookChannelRefId.md
docs/WebhookChannelWriteSchema.md
docs/WebhookNotificationChannel.md
Expand Down Expand Up @@ -384,12 +406,18 @@ model_argument_time_window_val.go
model_argument_topology_prom_ql_metric_val.go
model_argument_topology_query_val.go
model_authorize_ingestion_api_key_request.go
model_base_layout_hint.go
model_base_monitor_error.go
model_base_notification_channel.go
model_causing_events_are_not_available_for_the_time.go
model_causing_events_result.go
model_channel_reference_id.go
model_comparator_without_equality.go
model_component_health_change.go
model_component_health_history.go
model_component_highlight_metric_section.go
model_component_highlight_metric_section_all_of.go
model_component_not_found_error.go
model_component_query.go
model_create_subject.go
model_data_unavailable.go
Expand Down Expand Up @@ -476,6 +504,9 @@ model_kubernetes_log_highlight.go
model_kubernetes_log_histogram_bucket.go
model_kubernetes_log_record.go
model_kubernetes_log_severity_histogram_bucket.go
model_layout_api_error.go
model_layout_hint.go
model_layout_list.go
model_licensed_subscription.go
model_limit_out_of_range.go
model_locked_response.go
Expand All @@ -486,9 +517,14 @@ model_message.go
model_message_level.go
model_messages.go
model_metric_bucket_value.go
model_metric_perspective_section.go
model_metric_perspective_section_all_of.go
model_metric_perspective_tab.go
model_metric_perspective_tab_all_of.go
model_monitor.go
model_monitor_api_error.go
model_monitor_api_error_all_of.go
model_monitor_check_states.go
model_monitor_check_status.go
model_monitor_check_status_api_error.go
model_monitor_check_status_component.go
Expand Down Expand Up @@ -612,6 +648,7 @@ model_span_sort_direction.go
model_span_sort_field.go
model_span_sort_option.go
model_span_suggestion_field.go
model_span_summary.go
model_spans.go
model_stack_element_not_found.go
model_stack_pack.go
Expand Down Expand Up @@ -660,6 +697,7 @@ model_user_not_found_error.go
model_user_not_logged_in_error.go
model_user_profile.go
model_user_profile_save_error.go
model_view_check_state.go
model_webhook_channel_ref_id.go
model_webhook_channel_write_schema.go
model_webhook_notification_channel.go
Expand Down
2 changes: 1 addition & 1 deletion generated/stackstate_api/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.1.0
6.0.1
25 changes: 23 additions & 2 deletions generated/stackstate_api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ All URIs are relative to *http://localhost*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ApiTokenApi* | [**GetCurrentUserApiTokens**](docs/ApiTokenApi.md#getcurrentuserapitokens) | **Get** /user/profile/tokens | Get current user&#39;s API tokens
*AuthorizeIngestionApiKeyApi* | [**AuthorizeIngestionApiKey**](docs/AuthorizeIngestionApiKeyApi.md#authorizeingestionapikey) | **Post** /security/ingestion/authorize | Check authorization for an Ingestion Api Key
*ComponentApi* | [**GetComponentHealthHistory**](docs/ComponentApi.md#getcomponenthealthhistory) | **Get** /components/{componentIdOrUrn}/healthHistory | Get a component health history
*DummyApi* | [**Dummy**](docs/DummyApi.md#dummy) | **Get** /dummy/dummy | Dummy path to fix omission in openapi generation when a type is not included.
*EventApi* | [**GetEvent**](docs/EventApi.md#getevent) | **Get** /events/{eventId} | Get single event
*EventApi* | [**GetEventSources**](docs/EventApi.md#geteventsources) | **Get** /eventSources | Get event sources
Expand All @@ -105,13 +107,13 @@ Class | Method | HTTP request | Description
*HealthSynchronizationApi* | [**GetHealthSynchronizationSubStreamTopologyMatches**](docs/HealthSynchronizationApi.md#gethealthsynchronizationsubstreamtopologymatches) | **Get** /synchronization/health/streams/{healthStreamUrn}/substreams/{healthSyncSubStreamId}/topologyMatches | List health sync sub-stream check-states
*HealthSynchronizationApi* | [**PostHealthSynchronizationStreamClearErrors**](docs/HealthSynchronizationApi.md#posthealthsynchronizationstreamclearerrors) | **Post** /synchronization/health/streams/{healthStreamUrn}/clearErrors | Clear health sync stream errors
*ImportApi* | [**ImportSettings**](docs/ImportApi.md#importsettings) | **Post** /import | Import settings
*IngestionApiKeyApi* | [**AuthorizeIngestionApiKey**](docs/IngestionApiKeyApi.md#authorizeingestionapikey) | **Post** /security/ingestion/authorize | Check authorization for an Ingestion Api Key
*IngestionApiKeyApi* | [**DeleteIngestionApiKey**](docs/IngestionApiKeyApi.md#deleteingestionapikey) | **Delete** /security/ingestion/api_keys/{ingestionApiKeyId} | Delete Ingestion Api Key
*IngestionApiKeyApi* | [**GenerateIngestionApiKey**](docs/IngestionApiKeyApi.md#generateingestionapikey) | **Post** /security/ingestion/api_keys | Generate a new Ingestion Api Key
*IngestionApiKeyApi* | [**GetIngestionApiKeys**](docs/IngestionApiKeyApi.md#getingestionapikeys) | **Get** /security/ingestion/api_keys | List Ingestion Api Keys
*KubernetesLogsApi* | [**GetKubernetesLogs**](docs/KubernetesLogsApi.md#getkuberneteslogs) | **Get** /k8s/logs | Get Kubernetes logs
*KubernetesLogsApi* | [**GetKubernetesLogsAutocomplete**](docs/KubernetesLogsApi.md#getkuberneteslogsautocomplete) | **Get** /k8s/logs/autocomplete | Get Kubernetes logs autocomplete values
*KubernetesLogsApi* | [**GetKubernetesLogsHistogram**](docs/KubernetesLogsApi.md#getkuberneteslogshistogram) | **Get** /k8s/logs/histogram | Get Kubernetes logs histogram
*LayoutApi* | [**GetAllLayouts**](docs/LayoutApi.md#getalllayouts) | **Get** /layouts | List layout hints
*MetricApi* | [**GetExemplarsQuery**](docs/MetricApi.md#getexemplarsquery) | **Get** /metrics/query_exemplars | Experimental: Exemplars for a specific time range
*MetricApi* | [**GetInstantQuery**](docs/MetricApi.md#getinstantquery) | **Get** /metrics/query | Instant query at a single point in time
*MetricApi* | [**GetLabelValues**](docs/MetricApi.md#getlabelvalues) | **Get** /metrics/label/{label}/values | List of label values for a provided label name
Expand All @@ -129,16 +131,19 @@ Class | Method | HTTP request | Description
*MonitorApi* | [**DeleteMonitor**](docs/MonitorApi.md#deletemonitor) | **Delete** /monitors/{monitorIdOrUrn} | Delete a monitor
*MonitorApi* | [**GetAllMonitors**](docs/MonitorApi.md#getallmonitors) | **Get** /monitors | List monitors
*MonitorApi* | [**GetMonitor**](docs/MonitorApi.md#getmonitor) | **Get** /monitors/{monitorIdOrUrn} | Get a monitor
*MonitorApi* | [**GetMonitorCheckStates**](docs/MonitorApi.md#getmonitorcheckstates) | **Get** /monitors/{monitorIdOrUrn}/checkStates | Get the check states for a monitor
*MonitorApi* | [**GetMonitorWithStatus**](docs/MonitorApi.md#getmonitorwithstatus) | **Get** /monitors/{monitorIdOrUrn}/status | Get a monitor with stream information
*MonitorApi* | [**GetMonitorsOverview**](docs/MonitorApi.md#getmonitorsoverview) | **Get** /monitors/overview | List monitors overview
*MonitorApi* | [**LookupIdentifier**](docs/MonitorApi.md#lookupidentifier) | **Post** /monitors/identifierLookup | Multiple component identifier lookup
*MonitorApi* | [**PatchMonitor**](docs/MonitorApi.md#patchmonitor) | **Patch** /monitors/{monitorIdOrUrn} | Update some monitor properties
*MonitorApi* | [**PreviewMonitor**](docs/MonitorApi.md#previewmonitor) | **Post** /monitors/{monitorIdOrUrn}/preview | Preview a monitor
*MonitorApi* | [**PreviewMonitorCheckStates**](docs/MonitorApi.md#previewmonitorcheckstates) | **Post** /monitors/{monitorIdOrUrn}/preview/checkStates | Preview a monitor
*MonitorApi* | [**PublishHealthStates**](docs/MonitorApi.md#publishhealthstates) | **Post** /monitors/{monitorIdOrUrn}/publish | Post monitor health states
*MonitorApi* | [**RunMonitor**](docs/MonitorApi.md#runmonitor) | **Post** /monitors/{monitorIdOrUrn}/run | Run a monitor
*MonitorApi* | [**TestMonitorFunction**](docs/MonitorApi.md#testmonitorfunction) | **Post** /monitors/{monitorFunctionIdOrUrn}/test | Test a monitor
*MonitorApi* | [**TestMonitorFunctionCheckStates**](docs/MonitorApi.md#testmonitorfunctioncheckstates) | **Post** /monitors/{monitorFunctionIdOrUrn}/test/checkStates | Test a monitor
*MonitorCheckStatusApi* | [**GetMonitorCheckStatus**](docs/MonitorCheckStatusApi.md#getmonitorcheckstatus) | **Get** /monitor/checkStatus/{id} | Get a monitor check status
*MonitorCheckStatusApi* | [**GetMonitorCheckStatusHealthHistory**](docs/MonitorCheckStatusApi.md#getmonitorcheckstatushealthhistory) | **Get** /monitor/checkStatus/{id}/healthHistory | Get a monitor check health hisotry
*MonitorCheckStatusApi* | [**GetMonitorCheckStatusHealthHistory**](docs/MonitorCheckStatusApi.md#getmonitorcheckstatushealthhistory) | **Get** /monitor/checkStatus/{id}/healthHistory | Get a monitor check health history
*MonitorCheckStatusApi* | [**GetMonitorCheckStatusRelatedFailures**](docs/MonitorCheckStatusApi.md#getmonitorcheckstatusrelatedfailures) | **Get** /monitor/checkStatus/{id}/relatedFailures | Get a monitor check related failures
*NodeApi* | [**Clone**](docs/NodeApi.md#clone) | **Post** /node/{nodeType}/{nodeIdOrUrn}/clone | Clone a node with a new name
*NodeApi* | [**Delete**](docs/NodeApi.md#delete) | **Delete** /node/{nodeType}/{nodeId} | Node deletion API
Expand Down Expand Up @@ -236,12 +241,18 @@ Class | Method | HTTP request | Description
- [ArgumentTopologyPromQLMetricVal](docs/ArgumentTopologyPromQLMetricVal.md)
- [ArgumentTopologyQueryVal](docs/ArgumentTopologyQueryVal.md)
- [AuthorizeIngestionApiKeyRequest](docs/AuthorizeIngestionApiKeyRequest.md)
- [BaseLayoutHint](docs/BaseLayoutHint.md)
- [BaseMonitorError](docs/BaseMonitorError.md)
- [BaseNotificationChannel](docs/BaseNotificationChannel.md)
- [CausingEventsAreNotAvailableForTheTime](docs/CausingEventsAreNotAvailableForTheTime.md)
- [CausingEventsResult](docs/CausingEventsResult.md)
- [ChannelReferenceId](docs/ChannelReferenceId.md)
- [ComparatorWithoutEquality](docs/ComparatorWithoutEquality.md)
- [ComponentHealthChange](docs/ComponentHealthChange.md)
- [ComponentHealthHistory](docs/ComponentHealthHistory.md)
- [ComponentHighlightMetricSection](docs/ComponentHighlightMetricSection.md)
- [ComponentHighlightMetricSectionAllOf](docs/ComponentHighlightMetricSectionAllOf.md)
- [ComponentNotFoundError](docs/ComponentNotFoundError.md)
- [ComponentQuery](docs/ComponentQuery.md)
- [CreateSubject](docs/CreateSubject.md)
- [DataUnavailable](docs/DataUnavailable.md)
Expand Down Expand Up @@ -328,6 +339,9 @@ Class | Method | HTTP request | Description
- [KubernetesLogHistogramBucket](docs/KubernetesLogHistogramBucket.md)
- [KubernetesLogRecord](docs/KubernetesLogRecord.md)
- [KubernetesLogSeverityHistogramBucket](docs/KubernetesLogSeverityHistogramBucket.md)
- [LayoutApiError](docs/LayoutApiError.md)
- [LayoutHint](docs/LayoutHint.md)
- [LayoutList](docs/LayoutList.md)
- [LicensedSubscription](docs/LicensedSubscription.md)
- [LimitOutOfRange](docs/LimitOutOfRange.md)
- [LockedResponse](docs/LockedResponse.md)
Expand All @@ -338,9 +352,14 @@ Class | Method | HTTP request | Description
- [MessageLevel](docs/MessageLevel.md)
- [Messages](docs/Messages.md)
- [MetricBucketValue](docs/MetricBucketValue.md)
- [MetricPerspectiveSection](docs/MetricPerspectiveSection.md)
- [MetricPerspectiveSectionAllOf](docs/MetricPerspectiveSectionAllOf.md)
- [MetricPerspectiveTab](docs/MetricPerspectiveTab.md)
- [MetricPerspectiveTabAllOf](docs/MetricPerspectiveTabAllOf.md)
- [Monitor](docs/Monitor.md)
- [MonitorApiError](docs/MonitorApiError.md)
- [MonitorApiErrorAllOf](docs/MonitorApiErrorAllOf.md)
- [MonitorCheckStates](docs/MonitorCheckStates.md)
- [MonitorCheckStatus](docs/MonitorCheckStatus.md)
- [MonitorCheckStatusApiError](docs/MonitorCheckStatusApiError.md)
- [MonitorCheckStatusComponent](docs/MonitorCheckStatusComponent.md)
Expand Down Expand Up @@ -464,6 +483,7 @@ Class | Method | HTTP request | Description
- [SpanSortField](docs/SpanSortField.md)
- [SpanSortOption](docs/SpanSortOption.md)
- [SpanSuggestionField](docs/SpanSuggestionField.md)
- [SpanSummary](docs/SpanSummary.md)
- [Spans](docs/Spans.md)
- [StackElementNotFound](docs/StackElementNotFound.md)
- [StackPack](docs/StackPack.md)
Expand Down Expand Up @@ -512,6 +532,7 @@ Class | Method | HTTP request | Description
- [UserNotLoggedInError](docs/UserNotLoggedInError.md)
- [UserProfile](docs/UserProfile.md)
- [UserProfileSaveError](docs/UserProfileSaveError.md)
- [ViewCheckState](docs/ViewCheckState.md)
- [WebhookChannelRefId](docs/WebhookChannelRefId.md)
- [WebhookChannelWriteSchema](docs/WebhookChannelWriteSchema.md)
- [WebhookNotificationChannel](docs/WebhookNotificationChannel.md)
Expand Down
Loading

0 comments on commit 20c391e

Please sign in to comment.