Releases: OpsLevel/opslevel-go
v2023.5.5
May 05, 2023
Bugfix
- Fix bug with nullability for repo file checks create and update mutations
Feature
- Add ability to work with service dependencies
- Allow AWS integrations to be configured
Refactor
- Remove usages of deprecated types
graphql.Boolean
andgraphql.String
- Integration structures were refactored to support some of the upcoming API changes around integration management via the API
Dependency
- Bump golang.org/x/oauth2 from 0.6.0 to 0.7.0
- Bump github.com/rs/zerolog from 1.29.0 to 1.29.1
v2023.4.11
April 11, 2023
Feature Announcement
Dependency
- Bump github.com/hasura/go-graphql-client from 0.9.1 to 0.9.2
v2023.3.14
March 14, 2023
BREAKING CHANGES
This release has breaking changes to the way List
methods are called and the data they return. We refactored all our pagination code to work recursively so that we can actually test it properly and ensure it works as expected.
The main change you'll need to do is pass in a new argument which can be nil
and the return object is now nested in a *Connection
structure which hold the pagination information and total count.
this
services, err := client.ListServices()
becomes
servicesResp, err := client.ListServices(nil)
services := servicesResp.Nodes
Along with this we have deprecated a number of methods that will be removed in the near future and have changed our All
enum functions to just be variables.
Overall these refactors have taken our test coverage up from ~60% -> 81% 🎉
Feature
- Add create and delete for AlertSourceService
Refactor
- Fix bug where custom event check message was not able to be unset
- Refactor list teams and list groups functions to handle pagination correctly.
- Add "operation-name" to all query and mutations
- Refactoring nested pagination on groups
- Refactor service pagination calls
- Refactor repository pagination calls
- Refactored all pagination code to be tested and ensure it works properly. This is a slightly breaking change because the signature of the methods has been modified with a new input variable.
- Refactor all enum functions to just be static global variables
Dependency
- Bump github.com/hasura/go-graphql-client from 0.8.1 to 0.9.0
- Bump github.com/rs/zerolog from 1.28.0 to 1.29.0
- Bump golang.org/x/sys from 0.0.0-20211216021012-1d35b9e2eb4e to 0.1.0
- Bump github.com/hasura/go-graphql-client from 0.9.0 to 0.9.1
- Bump golang.org/x/oauth2 from 0.0.0-20220608161450-d0670ef3b1eb to 0.6.0
v2023.1.21
January 21, 2023
The first release of 2023 so you will need to upgrade the library from v2022
-> v2023
BREAKING CHANGES
This release contains a number of breaking changes so please read the changelog carefully. The major change is in the signature of alot of our structures with regards to the ID
fields. We have upgraded the underlying graphql framework we rely upon and they changed the ID
from an interface{}
to a string
. This cause some problems with our API and being able to "unset" a field during an Update mutation because the JSON marshaller is no longer able to generate the following JSON {"filterId": null}
To this end we've implemented our own ID
type which has custom JSON marshaling and we've written tests around it to 100% ensure it marshal the way our API expects. We've then refactored the entire library to use this new ID
type and have ensured that everything should work the same as before and in somecases has fixed bugs where you would be unable to "unset" a value - for example a check's filter can be "unset" so there is no filter applied. With our new ID
type this behaviour is now consistent.
This change may require you to refactor your code to support this new type in some cases but so far we've found that in most of the common cases it should not. It will mostly affect Update mutation inputs.
If you were doing this before
input := opslevel.ToolUpdateInput{
Id: graphql.ID("XXXXXXXXXXXXX"),
}
OR
client.GetCheck(graphql.ID("XXXXXXXXXXXXX"))
You can now do
input := opslevel.ToolUpdateInput{
Id: "XXXXXXXXXXXXX",
}
OR
client.GetCheck("XXXXXXXXXXXXX")
Bugfix
- Fixing issue where check notes were being deleted on updates
Feature
- Add CRUD for custom actions webhook actions
- Add CRUD for custom actions trigger definitions
- Add a new input type "JSON" which supports turning a map[string]string into escaped json when used in mutation input
Refactor
- removed "NewEmptyString" function by refactoring "NewString" to work in the expected way. This maybe cause a BREAKING CHANGE!
- Add a "HandleErrors" method that wraps "FormatErrors" to reduce code paths and increase test coverage
- refactor "NewId" method to allow for "null" as a value for Update mutations where the input can have a null ID field that acts as an "unset" this field
- BREAKING CHANGE: Make new ID type that works like our API expects. The entire codebase has been refactor and method signatures have been changed to use the builtin ID type instead of graphql.ID type. This will fix a number of bugs with Update mutations being unable to "unset" or null out an IDs where permitted.
- Refactored error handling in methods to increase code coverage and reduce branching code paths
- Deprecated
DeleteGroupWithAlias
in favor ofDeleteGroup
handling both ID or Alias
Dependency
- Bump github.com/relvacode/iso8601 from 1.1.0 to 1.3.0
- Bump github.com/hashicorp/go-retryablehttp from 0.7.1 to 0.7.2
v2022.12.16
December 16, 2022
Feature
- Adds support for new team tag type and new tag fields on the service ownership check
- Add query to get recommended runner scale
- Add RepoGrep check type
v2022.10.22
October 22, 2022
Feature
- add
ToolUrlPredicate
toToolUsage
check type
Refactor
- BREAKING: change signature of LevelUpdateInput so that mutation works and description can be set to empty string
- do not obscure api error messages when doing client validation
Bugfix
- Fix issue with UpdateContact where it would pass an "" to the API for contact type when it should be omitted
Security
- Bump github.com/rs/zerolog from 1.27.0 to 1.28.0
Dependency
- Bump github.com/gosimple/slug from 1.12.0 to 1.13.1
v2022.8.25
Feature
- Add support for HasDocumentation Check type
- Implemented get alert source APIs
- Add function to get maturity report for a given service
v2022.8.1
August 01, 2022
Feature
- Add ApiDoc fields to service struct
- Add ability to get documents from a service resource
- Add support for ServiceDependency check type
Refactor
- Add ServiceOwnershipCheckContactType to enum.go
- Add Message field to RestResponse
Bugfix
- Allow notes on a check to be set to null
v2022.7.20
Cut Release 'v2022.7.20'
v2022.7.15
Feature
- Implemented user APIs
- Add ability to query service maturity information
- Add REST client
- Add retryable http client to GQL client with a default of 10 retries
- Upgrade to go 1.18
- Add requireContactMethod and contactMethod optional args to the serviceOwnershipCheck type
Refactor
- Refactor GQL client to use same settings as REST client
- Change how API Token is set to GQL client
Bugfix
- Fix package versioning so it actually works