Skip to content

Add S3 action support with labels and improve action display#195

Open
fjerlov-cs wants to merge 2 commits intohumio:masterfrom
fjerlov-cs:feature/s3-action
Open

Add S3 action support with labels and improve action display#195
fjerlov-cs wants to merge 2 commits intohumio:masterfrom
fjerlov-cs:feature/s3-action

Conversation

@fjerlov-cs
Copy link
Contributor

@fjerlov-cs fjerlov-cs commented Jan 7, 2026

Add S3 action support, labels for all actions, and clean up dead code

  • Add S3Action type with GraphQL mutations, API client support, and
    version-gated backward compatibility (requires LogScale >= 1.221.0)
  • Add ListActionsWithoutS3 GraphQL query as a fallback for older servers
  • Add labels field to all action types and display in list/show commands
  • Define ActionType constants to replace duplicated string literals
  • Remove unused getActionLabels function, Labeled interface, and legacy
    parser APIs
  • Remove legacy parser version-gating and associated GraphQL operations
    (LegacyDeleteParserByID, LegacyCreateParser, LegacyGetParser) along
    with the LogScaleVersionWithParserAPIv2 constant
  • Remove deprecated isStarred field from alerts
  • Set Type field on all Add() return values for consistency

@fjerlov-cs
Copy link
Contributor Author

fjerlov-cs commented Feb 19, 2026

Running on 1.219.1

➜  cli git:(feature/s3-action) ✗ go run github.com/humio/cli/cmd/humioctl actions install fjerlov-test --file ./MyS3Action.yaml
Error installing action: S3 actions require LogScale version 1.221.0 or later
exit status 1
➜  cli git:(feature/s3-action) ✗ go run github.com/humio/cli/cmd/humioctl actions list fjerlov-test                     
       NAME      |     TYPE      |    LABELS      
+----------------+---------------+---------------+
  webhook-action | WebhookAction | test-1,test-2  
➜  cli git:(feature/s3-action) ✗ go run github.com/humio/cli/cmd/humioctl actions show fjerlov-test MyS3Action
Error fetching action: action "MyS3Action" not found
exit status 1

@fjerlov-cs
Copy link
Contributor Author

Running on 1.227.0

➜  cli git:(feature/s3-action) ✗ go run github.com/humio/cli/cmd/humioctl actions list fjerlov-test                            
       NAME      |     TYPE      |    LABELS      
+----------------+---------------+---------------+
  webhook-action | WebhookAction | test-1,test-2  
  s3-action      | S3Action      | test           
➜  cli git:(feature/s3-action) ✗ go run github.com/humio/cli/cmd/humioctl actions show fjerlov-test s3-action
    Name | s3-action                         
    Type | S3Action                          
      ID | 2rO3izVScG2avzf7Ru2nXkVQkC5emS5X  
  Labels | test          
  ➜  cli git:(feature/s3-action) ✗ go run github.com/humio/cli/cmd/humioctl actions install fjerlov-test --file ./MyS3Action.yaml 
Successfully installed action with name: "MyS3Action"
➜  cli git:(feature/s3-action) ✗ go run github.com/humio/cli/cmd/humioctl actions show fjerlov-test MyS3Action     
    Name | MyS3Action                        
    Type | S3Action                          
      ID | 0YPj8m1Dynywvq10KuuuuCbHUq7qw57O  
  Labels | label1,label2     

- Add S3Action type with GraphQL mutations, API client support, and
  version-gated backward compatibility (requires LogScale >= 1.221.0)
- Add ListActionsWithoutS3 GraphQL query as a fallback for older servers
- Add labels field to all action types and display in list/show commands
- Define ActionType constants to replace duplicated string literals
- Remove unused getActionLabels function, Labeled interface, and legacy
  parser APIs
- Remove legacy parser version-gating and associated GraphQL operations
  (LegacyDeleteParserByID, LegacyCreateParser, LegacyGetParser) along
  with the LogScaleVersionWithParserAPIv2 constant
- Remove deprecated isStarred field from alerts
- Set Type field on all Add() return values for consistency
@fjerlov-cs fjerlov-cs marked this pull request as ready for review February 19, 2026 14:19
go 1.22.0

toolchain go1.22.6
go 1.24.0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had problems generating the schema (golang.org/x/tools) with Go 1.26, so I upgraded. I can keep it at 1.22.0 if needed.

Copy link
Contributor

@jespermbyskov jespermbyskov left a comment

Choose a reason for hiding this comment

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

Looking good, nothing looks odd. Someone more familiar with Go should approve.

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.

2 participants

Comments