Skip to content

Latest commit

 

History

History
623 lines (556 loc) · 29.1 KB

CHANGELOG.md

File metadata and controls

623 lines (556 loc) · 29.1 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and is generated by Changie.

Refactor

  • BREAKING CHANGE revert ServiceCreateInput and ServiceUpdateInput YAML struct tags back to before 2024 convention

Bugfix

  • BREAKING CHANGE: CheckPackageVersionUpdateInput changed to allow MissingPackageResult to be nullable

Feature

  • add CodeIssue check type
  • Add new 'Aliasable' interface for working with resources that are allowed to have aliases

Dependency

  • Bump github.com/relvacode/iso8601 from 1.4.0 to 1.5.0

Dependency

  • Bump opslevel/report-deploy-github-action from 0.10.0 to 1.0.0

Feature

  • add regionOverride field to AWS integration, for overriding multiple regions
  • new IntegrationReactivate mutation to reactivate an invalidated or deactivated integration
  • added HasBadHttpStatus for better error handling

Refactor

  • BREAKING CHANGE: new argument sendInvite added to UserInvite() method to force send a user invite e-mail

Dependency

  • Bump github.com/go-playground/validator/v10 from 10.22.0 to 10.22.1
  • Bump github.com/hasura/go-graphql-client from 0.13.0 to 0.13.1
  • Bump github.com/go-resty/resty/v2 from 2.14.0 to 2.15.3

Feature

  • support setting Notes on a Service via UpdateServiceNote()

Bugfix

  • Fix bug with ReconcileTags not properly reconciling the tags due to incorrect behavior of TagAssign mutation.

Feature

  • add Systems to Cacher struct, and related caching operations

Dependency

  • Bump opslevel/report-deploy-github-action from 0.7.0 to 0.10.0
  • Bump github.com/Masterminds/sprig/v3 from 3.2.3 to 3.3.0

Bugfix

  • Fix bug where AlertSource and InfraResource queries failed because field name should be ownerLocked instead of locked field

Feature

  • Add support for Google Cloud Integrations
  • add filter query param to ListUsers() to filter out deactivated users
  • add ManagedAliases field and UniqueIdentifiers member function to System struct

Refactor

  • Updated graphql operation names for infrastructure resources, and their schemas.
  • BREAKING CHANGE - must explicitly access Aliases, OwnershipTagKeys, TagsOverrideOwnership on Integration nested Fragment structs to avoid ambiguous selector errors

Feature

  • Add support for Azure Resource Integrations
  • Add ability to create, update, list and get 'PackageVersion' checks
  • add Locked field to AlertSource, InfrastructureResource, Repository, Service, and System structs
  • Add Service Property Definition check

Dependency

  • bump opslevel-go module version to go 1.22

Feature

  • add team_member and standards_admin UserRole enums

Removed

  • remove deprecated UserRoleBasicUser enum, not used in API anymore

Feature

  • add UniqueIdentifiers utility function to Domain, Service, and Team

Feature

  • add ReconcileTags member function to client
  • add DeleteAliases function to client
  • add ReconcileAliases member function to Domain, InfrastructureResource, Scorecard, Service, System, and Team

Feature

  • add abililty to list Categories on Scorecards
  • add filter predicate config validation

Dependency

  • Bump github.com/go-playground/validator/v10 from 10.21.0 to 10.22.0
  • Bump github.com/hasura/go-graphql-client from 0.12.1 to 0.12.2

Bugfix

  • enable unsetting predicates of type PredicateUpdateInput with custom JSON marshal

Dependency

  • Bump github.com/hashicorp/go-retryablehttp from 0.7.6 to 0.7.7
  • Bump github.com/go-playground/validator/v10 from 10.20.0 to 10.21.0

Feature

  • add Validate func to Predicate struct

Dependency

  • Bump github.com/rs/zerolog from 1.32.0 to 1.33.0

Bugfix

  • make FileContentsPredicate a pointer in RepositorySearchCheckFragment to allow unsetting

Refactor

  • BREAKING CHANGE - pointers of Predicate fields updated for AlertSourceUsageCheckFragment, RepositoryGrepCheckFragment, and RepositorySearchCheckFragment

Bugfix

  • fix listing repositories. added default "visible" bool to query variables

Feature

  • Add ability to get the "default repo" of a service
  • Introduce Nullable generic type allows string only (to support for unsetting fields in update input structs)
  • Add ServiceUpdateInputV2 - can be used to unset fields on a service like description, framework, lifecycleAlias, tierAlias

Refactor

  • BREAKING - update "Usage" field in Repository struct. Was float32, is now float64

Deprecated

  • Deprecate ServiceUpdateInput, is being replaced by ServiceUpdateInputV2

Dependency

  • Bump github.com/go-playground/validator/v10 from 10.19.0 to 10.20.0
  • Bump goreleaser/goreleaser-action from 5.0.0 to 5.1.0
  • Bump github.com/hashicorp/go-retryablehttp from 0.7.5 to 0.7.6

Bugfix

  • include Schema field during infrastructure update

Feature

  • Add externalId and isDefault fields to contact struct
  • add listing services by filter
  • add "visible" payload variable to listing repositories

Dependency

  • Bump golang.org/x/net from 0.22.0 to 0.23.0

Bugfix

  • CreateTags will now return joined errors
  • fix list services maturity query, crashed if over 100 services

Feature

  • Add support for Property.Locked and PropertyDefinition.AllowedInConfigFiles
  • Add support for parent (system) on service object

Refactor

  • Convert deprecated graphql.Int's to normal int's

Removed

  • Removed examples since they use deprecated functions
  • Removed deprecated NewClient, NewString, Bool, NewInt

Dependency

  • Bump github.com/gosimple/slug from 1.13.1 to 1.14.0
  • Bump github.com/go-playground/validator/v10 from 10.18.0 to 10.19.0
  • Bump github.com/hasura/go-graphql-client from 0.11.0 to 0.12.1

Bugfix

  • BREAKING - NewJSONInput() will not json.Marshal() on string input containing a json array/obj to prevent adding unnecessary backlashes.

Feature

  • Add support for managedAliases on Teams

Refactor

  • NewTagArgs(string) will return error if string is not in exact format 'key:value'

Docs

  • Added godoc for json constructor and to string functions.

Dependency

  • Bump github.com/relvacode/iso8601 from 1.3.0 to 1.4.0
  • Bump github.com/rs/zerolog from 1.31.0 to 1.32.0
  • Bump github.com/hasura/go-graphql-client from 0.10.2 to 0.11.0
  • Bump codecov/codecov-action from 3 to 4
  • Bump arduino/setup-task from 1 to 2
  • Bump github.com/go-playground/validator/v10 from 10.16.0 to 10.18.0

This release contains a multitude of breaking changes. This release marks that beginning of applying code generation to opslevel-go to standardize the codebase to both speed up development and ensure consistency and correctness. A number of methods have had their signatures changed as well as several methods have been deprecated and previously deprecated methods have been removed.

Bugfix

  • Fix bug where Team inputs did not omit optional ParentTeam field
  • Fix bug where optional IdentifierInput fields could never be unset - this can now be done by passing NewIdentifier() with no args
  • Add missing yaml tags for *IdentifierInput and *ID

Feature

  • add yaml and default struct tags to Input structs
  • Add support for assigning Properties to Services
  • add task ci, standardizing task usage in our CI
  • Create null IdentifierInput by passing no arguments to NewIdentifier()
  • Bump github.com/go-resty/resty/v2 from 2.10.0 to 2.11.0
  • add RefOf() to take place of NewString(), NewInt(), Bool()
  • add NewManualCheckFrequencyUpdateInput() factory function
  • update InfraProviderInput.Data to type JSON, was map[string]any
  • add JSONSchema() type, similar to JSON type, needed to match GraphQL API
  • Bump github.com/hasura/go-graphql-client from 0.10.1 to 0.10.2
  • add NewCheckCreateInputTypeOf and NewCheckCreateUpdateTypeOf factory funcs
  • Add RefTo - alias for RefOf

Refactor

  • Update code to support change in schema and new Property Definition fields
  • [BREAKING CHANGE] Use string as argument for all client request functions instead of requiring an IdentifierInput
  • BREAKING CHANGE renamed JSONString type to JsonString to match GraphQL API
  • BREAKING CHANGE PropertyDefinition.Schema type is now JSONSchema, was JSON
  • Combine DeleteService(ID) and DeleteServiceWithAlias(string) into a unified function
  • DeleteScorecard() now returns a pointer like other Delete functions
  • List() functions consistently return a (*Connection, error)
  • Merge DeleteTeam(ID) and DeleteTeamWithAlias(string) into DeleteTeam(identifier string)
  • NewIdentifierInput() now returns a pointer to be consistent with NewIdentifier()
  • JSON functions now return (ptr, error) instead of panic()-ing

Deprecated

  • deprecated NewString(), NewInt(), Bool() - use RefOf() instead

Removed

  • all Groups structs, related functions, and Group type fields from other structs
  • DomainId and SystemId member func - Tags
  • Service member func - Documents
  • Team member func - GetMembers
  • Client member funcs - AssignTagsForAlias, AssignTagForAlias, AssignTagsForId, AssignTagForId, CreateTagsForId
  • Client member funcs - GetToolsForServiceWithAlias, GetToolsForServiceWithId, GetToolsForService, GetToolCount
  • Client member funcs - AddMember, AddMembers, RemoveMembers, RemoveMembers, DeleteTeamWithId, GetTeamWithId
  • Client member funcs - GetServiceWithId, GetTagsForServiceWithAlias, GetTagsForServiceWithId, GetTagsForService, GetTagCount

Bugfix

  • fix error logged when JSONString passed to fmt.Sprintf()

Feature

  • Add NewJSONInput which creates a properly marshalled input type for graphql
  • Add support for Property Definitions
  • add func to generate yaml files from our structs
  • Add ability to set the parent system of a service during create or update
  • add default struct tags which provide default values for a struct to help with sample yaml generation

Dependency

  • Bump github.com/hasura/go-graphql-client from 0.10.0 to 0.10.1

Bugfix

  • make UserIdentifierInput fields pointers, fixing the omitempty struct tag behavior
  • BREAKING: change IdentifierInput struct fields to pointers
  • revert removal of EntityOwner struct, not yet removed in API

Feature

  • Access ManagedAliases on Service
  • Enable deletion of Infrastructure Resource aliases
  • add error check to JSON unmarshalling
  • add enum ServicePropertyTypeEnum

Refactor

  • BREAKING CHANGE ownerAlias deprecated on service inputs

Deprecated

  • Groups are deprecated in favor of Team hierarchies

Removed

  • GroupInput and EntityOwnerGroup structs, CreateGroup and UpdateGroup client methods, Group field from TeamCreateInput and TeamUpdateInput structs

Dependency

  • Bump github.com/Masterminds/sprig/v3 from 3.2.2 to 3.2.3
  • Bump github.com/rocktavious/autopilot/v2023 from 2023.8.18 to 2023.11.2

Feature

  • add ParentTeam field to Team, TeamCreateInput, and TeamUpdateInput
  • Update predicate filter enum to support aliases and filter_id as options for new filter types
  • add AffectsOverallServiceLevels field to Scorecard and ScorecardInput

Deprecated

  • BREAKING CHANGE: TeamMembershipUserInput Email field replaced with User field

Dependency

  • Bump golang.org/x/net from 0.15.0 to 0.17.0
  • Bump opslevel/report-deploy-github-action from 0.6.0 to 0.7.0
  • Bump github.com/go-resty/resty/v2 from 2.9.1 to 2.10.0

Bugfix

  • hotfix to update extendedTeamAccess input param
  • fix using alias only to create a tag
  • filter duplicate tags in query response

Feature

  • add interface for taggable resources
  • domain, repository, service, system, and team - implement taggable interface
  • Add tag key name validation to CreateTag AssignTag and UpdateTag methods
  • add tags support for user and infrastructure resources
  • Add case sensitive field to filter predicate

Deprecated

  • removed RepositoryTagConnection since TagConnection already exists

Dependency

  • Bump golang.org/x/oauth2 from 0.11.0 to 0.12.0

Feature

  • add extendedTeamAccess for CustomActionsTriggerDefinitions

Dependency

  • Bump goreleaser/goreleaser-action from 4.4.0 to 4.6.0
  • Bump actions/checkout from 3 to 4
  • Bump crazy-max/ghaction-import-gpg from 5 to 6

Feature

  • add support for scorecards
  • add secrets API operations
  • update go version to 1.21

Bugfix

  • Fixes a json marshaling bug for InfraInput

Dependency

  • Bump github.com/rs/zerolog from 1.29.1 to 1.30.0
  • Bump golang.org/x/oauth2 from 0.10.0 to 0.11.0
  • Bump github.com/hasura/go-graphql-client from 0.9.3 to 0.10.0
  • Bump goreleaser/goreleaser-action from 4.3.0 to 4.4.0

Feature

  • As a user, I can configure filters with Repository predicates using Go Tools
  • As a user, I can configure filter predicates with does not match regex and does not match
  • add Taskfile for common tasks
  • As a user, I can configure nested filters
  • Install newer graphql dependency

Bugfix

  • Notes now returns rawNotes instead of notes
  • Change type of DisplayName field in ContactInput struct
  • Fix EntityOwner to work properly with our API because the union type was not implemented correctly

Feature

  • Add mutations and queries for working with 'InfrastructureResource'
  • Add support for new Alert Source Type - New Relic
  • Update AliasOwnerTypeEnum to support system, domains and group

Dependency

  • Upgrade to go 1.20
  • Bump github.com/hashicorp/go-retryablehttp from 0.7.2 to 0.7.4
  • Bump goreleaser/goreleaser-action from 4.2.0 to 4.3.0
  • Bump opslevel/report-deploy-github-action from 0.5.0 to 0.6.0
  • Bump golang.org/x/oauth2 from 0.8.0 to 0.10.0

Feature

  • upgrade to go 1.19
  • Add CustomActions TriggerDefinition EntityType support
  • Add ability to skip the welcome e-mail
  • Add ability to update the owner on a repository entity

Dependency

  • Bump golang.org/x/oauth2 from 0.7.0 to 0.8.0
  • Bump github.com/hasura/go-graphql-client from 0.9.2 to 0.9.3
  • Bump emmyoop/changie_bot from 1.0.1 to 1.1.0
  • Bump goreleaser/goreleaser-action from 2.7.0 to 4.2.0
  • Bump actions/cache from 2 to 3
  • Bump actions/setup-go from 2 to 4

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 and graphql.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

Dependency

  • Bump github.com/hasura/go-graphql-client from 0.9.1 to 0.9.2

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

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 of DeleteGroup 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

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

October 22, 2022

Feature

  • add ToolUrlPredicate to ToolUsage 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

August 25, 2022

Feature

  • Add support for HasDocumentation Check type
  • Implemented get alert source APIs
  • Add function to get maturity report for a given service

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

July 20, 2022

Feature

  • Add support for PodTimeout as a runner job outcome

Bugfix

  • Fix problem with REST client base url including graphql

July 15, 2022

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

May 20, 2022

Feature

  • upgrade to go 1.17
  • Add new pass pending flag for Custom Event Checks
  • Add support for RepositoryFileCheck "useAbsoluteRoot" field
  • Add ability to list child teams for a given group
  • Add group field to team struct

Refactor

  • Add Aliases to ServiceId
  • AddContact now accepts a ID or Alias for the target team

v2022.04.21 - 2022-04-21

Feature

  • Add get and list functions for Groups
  • Add create, update, and delete functions for Groups
  • Add ability to query for DescendentTeams, DescendantSubgroups, DescendantRepositories, DescendantServices and Members of a Group
  • Add support for new Check Types - AlertSourceUsage, GitBranchProtection and HasRecentDeploy
  • Update enum for new Tool Categories

v2022.02.25 - 2022-02-25

Refactor

  • Removes tag key name validation logic because the API downcases it and its causes bugs in other tools

Bugfix

  • Update team functions to return responsibilities without html encoding characters

v0.4.4 - 2022-02-02

Docs

  • Moving examples from Readme to subdirectory

Security

  • Dependabot slug and zerolog updates

v0.4.3 - 2022-01-26

Feature

  • Export client Option type to more easily wrap client - added example to readme
  • Add ability to specify a client timeout - defaults to 10s

v0.4.2 - 2021-12-13

Feature

  • add support for slack handle as a contact type
  • add a cache system for caching resources by alias
  • add generation of aliases for objects that don't have aliases in the API

Refactor

  • cache teams by all their aliases

v0.4.1 - 2021-11-14

Feature

  • add ability to delete aliases on services or teams

Refactor

  • bump github.com/rs/zerolog from 1.25.0 to 1.26.0

v0.4.0 - 2021-09-26

Feature

  • use codegen to generate all enums from graphql API schema
  • set custom http user-agent header as well as allow it to be appendable by both the client code and end user

Refactor

  • Team now has parity with what is available in the public API

v0.3.3 - 2021-09-14

Bugfix

  • add newly added PredicateType PredicateTypeSatisfiesJqExpression to the GetPredicateTypes return list

v0.3.2 - 2021-09-14

Feature

  • add PredicateType “SatisfiesJqExpression”

v0.3.1 - 2021-09-11

Dependency

  • bump github.com/rs/zerolog from 1.21.0 to 1.23.0 (#13)

Feature

  • expose defaultAlias on Repository struct as this is used for lookup by alias and is needed in downstream tools

v0.3.0 - 2021-08-25

Bugfix

  • GetTeamWithAlias did not use correct graphql argument type
  • fix issue when using TagUpdateInput where either key or value is blank
  • fields in Contact and User do not need to be graphql.String - converted to just regular string
  • make Tier.Id be a graphql ID rather then a string
  • fix typo of field Description in ServiceUpdateInput

Feature

  • implement graphql fragments on Check struct so endusers can get at the custom fields per check type
  • add ability to specify the index of the rubric level at creation time
  • add validation of tag key names before sending to API
  • add ability to list repositories by tier
  • add ability to list teams with a manager email
  • add more specialized listing methods for services to list by lifecycle, product and tier
  • add ability to update or delete service tools
  • add ability to update and delete service repository
  • add “Team” as check owner to mutation repsonse
  • add default 10 second time out to http client used by graphql client
  • add list for checks
  • add get for rubric category and level
  • add get and list of integrations
  • add create and update for manual check
  • add create and update for custom and custom event check
  • add create and update for payload check
  • add create and update for tag defined and tool usage check
  • add update repository check for file, integrated and search
  • add create repository check for file, integrated and search
  • add create service check for ownership, property and configuration
  • add get and delete check by ID
  • implement get filter by id
  • implement CRUD for filters (#9)
  • add dependabot (#11)

Refactor

  • remove field description from rubic category mutations
  • CreateAliases should return an error that is aggregated from any errors
  • check tests to use a map of testcases
  • port service queries that were in terraform provider to core library for reuse

v0.2.2 - 2021-07-21

Feature

  • implement CRUD for rubric categories and levels (#8)

v0.2.1 - 2021-06-13

Feature

  • add ability to update a ServiceRepository
  • add ability to connect service and repositories together
  • add ability to query for repositories

v0.2.0 - 2021-05-22

Chore

  • set MIT license

Docs

  • add badges to readme

Feature

  • support hydration of nested resources that are paginated
  • improve error output during 401 unauthorized
  • add method to check if a service has a tool

Fix

  • fix bug with assign tag to a service with alias or id

v0.1.3 - 2021-05-16

v0.1.2 - 2021-05-16

Bugfix

  • fix problem with listing teams due to invalid graphql types and recursion

v0.1.1 - 2021-05-16

Bugfix

  • dedupe the aliases in the response of CreateAliases method

Docs

  • Add logo

Feature

  • Add tags for service paginated retrieval

Refactor

  • tests can now validate graphql query and variables
  • remove usages of graphql types in favor of plain go types in public structures
  • mark all methods that were named WithId as deprecated to adhere to better naming convetion
  • change naming convetion for getting service data to not use the suffix WithId
  • use graphql.ID instead of string in client methods to adhere to standards

v0.1.0 - 2021-05-12

Refactor

  • client configuration to allow for settings api visibility header