Skip to content

Conversation

@tkong-redhat
Copy link

@tkong-redhat tkong-redhat commented Sep 12, 2025

Servicelog post should support read query from file as clusters input. But current osdctl version will report error when only given -f parameter. This commit fixed this issue and query from file is allowed.

The change has been tested locally

cat query.txt 
cloud_provider.id is 'aws' and managed='true' and product.id is 'rosa' and state is 'ready' and hypershift.enabled is 'false' and name like '%test%'

./dist/osdctl_darwin_arm64_v8.0/osdctl servicelog post -f query.txt -i -p "MESSAGE=Bulk servicelog test message" --dry-run
WARN: The current version (v0.0.0-next) is different than the latest released version (v0.47.1). It is recommended that you update to the latest released version to ensure that no known bugs or issues are hit.
Continue? (y/N): y
INFO[0007] The following clusters match the given parameters: 
Name                    ID                                 State               Version             Cloud Provider      Region
avalija-test-20250910   2l7jjs4micp3gq5dcgvfj28km5k4bdlt   ready               4.19.10             aws                 us-east-1
dkhan-test1             2l84j2o6qee4dg7t3820qb887gifjpn5   ready               4.19.10             aws                 us-east-1
tkong-test              2l8gjp8gila4p43nkteu156k7rp0br6k   ready               4.18.18             aws                 us-east-1

INFO[0007] The following template will be sent:         
{
  "severity":"Info",
  "service_name":"SREManualAction",
  "summary":"INTERNAL ONLY, DO NOT SHARE WITH CUSTOMER",
  "description":"Bulk servicelog test message",
  "internal_only":true,
  "event_stream_id":"",
  "doc_references":null
}

…. But current osdctl version will report error when only given -f parameter. This commit fixed this issue and query from file is allowed.
Copy link
Member

@MateSaary MateSaary left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 17, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 17, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MateSaary, tkong-redhat

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:

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 17, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 17, 2025

@tkong-redhat: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 99fa8a8 into openshift:master Sep 17, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants