Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into bryce.thuilot/vuln-…
Browse files Browse the repository at this point in the history
…9355
  • Loading branch information
bthuilot committed Dec 11, 2024
2 parents 07655b1 + 868c0f5 commit 098198a
Show file tree
Hide file tree
Showing 12 changed files with 2,157 additions and 971 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-12-10 17:29:07.286101",
"spec_repo_commit": "f35e3502"
"regenerated": "2024-12-11 14:25:01.665030",
"spec_repo_commit": "7a9d0200"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-12-10 17:29:07.306202",
"spec_repo_commit": "f35e3502"
"regenerated": "2024-12-11 14:25:01.686317",
"spec_repo_commit": "7a9d0200"
}
}
}
6 changes: 6 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23427,6 +23427,12 @@ components:
type: apiKey
x-auth-id-alias: appKeyAuth
x-env-name: DD_APP_KEY
bearerAuth:
in: header
name: Authorization
scheme: bearer
type: http
x-env-name: DD_BEARER_TOKEN
info:
contact:
email: [email protected]
Expand Down
293 changes: 200 additions & 93 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ components:
type: string
ResourceID:
description: 'Identifier, formatted as `type:id`. Supported types: `connection`,
`dashboard`, `notebook`, `security-rule`, `slo`.'
`dashboard`, `notebook`, `reference-table`, `security-rule`, `slo`.'
example: dashboard:abc-def-ghi
in: path
name: resource_id
Expand Down Expand Up @@ -3259,6 +3259,183 @@ components:
tags:
$ref: '#/components/schemas/TagsEventAttribute'
type: object
CIAppPipelineEventFinishedPipeline:
description: Details of a finished pipeline.
properties:
end:
description: Time when the pipeline run finished. It cannot be older than
18 hours in the past from the current time. The time format must be RFC3339.
example: '2023-05-31T15:30:00Z'
format: date-time
type: string
error:
$ref: '#/components/schemas/CIAppCIError'
git:
$ref: '#/components/schemas/CIAppGitInfo'
is_manual:
description: Whether or not the pipeline was triggered manually by the user.
example: false
nullable: true
type: boolean
is_resumed:
description: Whether or not the pipeline was resumed after being blocked.
example: false
nullable: true
type: boolean
level:
$ref: '#/components/schemas/CIAppPipelineEventPipelineLevel'
metrics:
$ref: '#/components/schemas/CIAppPipelineEventMetrics'
name:
description: Name of the pipeline. All pipeline runs for the builds should
have the same name.
example: Deploy to AWS
type: string
node:
$ref: '#/components/schemas/CIAppHostInfo'
parameters:
$ref: '#/components/schemas/CIAppPipelineEventParameters'
parent_pipeline:
$ref: '#/components/schemas/CIAppPipelineEventParentPipeline'
partial_retry:
description: 'Whether or not the pipeline was a partial retry of a previous
attempt. A partial retry is one

which only runs a subset of the original jobs.'
example: false
type: boolean
pipeline_id:
description: 'Any ID used in the provider to identify the pipeline run even
if it is not unique across retries.

If the `pipeline_id` is unique, then both `unique_id` and `pipeline_id`
can be set to the same value.'
example: '#023'
type: string
previous_attempt:
$ref: '#/components/schemas/CIAppPipelineEventPreviousPipeline'
queue_time:
description: The queue time in milliseconds, if applicable.
example: 1004
format: int64
minimum: 0
nullable: true
type: integer
start:
description: Time when the pipeline run started (it should not include any
queue time). The time format must be RFC3339.
example: '2023-05-31T15:30:00Z'
format: date-time
type: string
status:
$ref: '#/components/schemas/CIAppPipelineEventPipelineStatus'
tags:
$ref: '#/components/schemas/CIAppPipelineEventTags'
unique_id:
description: 'UUID of the pipeline run. The ID has to be unique across retries
and pipelines,

including partial retries.'
example: 3eacb6f3-ff04-4e10-8a9c-46e6d054024a
type: string
url:
description: The URL to look at the pipeline in the CI provider UI.
example: https://my-ci-provider.example/pipelines/my-pipeline/run/1
type: string
required:
- level
- unique_id
- name
- url
- start
- end
- status
- partial_retry
type: object
CIAppPipelineEventInProgressPipeline:
description: Details of a running pipeline.
properties:
error:
$ref: '#/components/schemas/CIAppCIError'
git:
$ref: '#/components/schemas/CIAppGitInfo'
is_manual:
description: Whether or not the pipeline was triggered manually by the user.
example: false
nullable: true
type: boolean
is_resumed:
description: Whether or not the pipeline was resumed after being blocked.
example: false
nullable: true
type: boolean
level:
$ref: '#/components/schemas/CIAppPipelineEventPipelineLevel'
metrics:
$ref: '#/components/schemas/CIAppPipelineEventMetrics'
name:
description: Name of the pipeline. All pipeline runs for the builds should
have the same name.
example: Deploy to AWS
type: string
node:
$ref: '#/components/schemas/CIAppHostInfo'
parameters:
$ref: '#/components/schemas/CIAppPipelineEventParameters'
parent_pipeline:
$ref: '#/components/schemas/CIAppPipelineEventParentPipeline'
partial_retry:
description: 'Whether or not the pipeline was a partial retry of a previous
attempt. A partial retry is one

which only runs a subset of the original jobs.'
example: false
type: boolean
pipeline_id:
description: 'Any ID used in the provider to identify the pipeline run even
if it is not unique across retries.

If the `pipeline_id` is unique, then both `unique_id` and `pipeline_id`
can be set to the same value.'
example: '#023'
type: string
previous_attempt:
$ref: '#/components/schemas/CIAppPipelineEventPreviousPipeline'
queue_time:
description: The queue time in milliseconds, if applicable.
example: 1004
format: int64
minimum: 0
nullable: true
type: integer
start:
description: Time when the pipeline run started (it should not include any
queue time). The time format must be RFC3339.
example: '2023-05-31T15:30:00Z'
format: date-time
type: string
status:
$ref: '#/components/schemas/CIAppPipelineEventPipelineInProgressStatus'
tags:
$ref: '#/components/schemas/CIAppPipelineEventTags'
unique_id:
description: UUID of the pipeline run. The ID has to be the same as the
finished pipeline.
example: 3eacb6f3-ff04-4e10-8a9c-46e6d054024a
type: string
url:
description: The URL to look at the pipeline in the CI provider UI.
example: https://my-ci-provider.example/pipelines/my-pipeline/run/1
type: string
required:
- level
- unique_id
- name
- url
- start
- status
- partial_retry
type: object
CIAppPipelineEventJob:
description: Details of a CI job.
properties:
Expand Down Expand Up @@ -3407,97 +3584,17 @@ components:
type: object
CIAppPipelineEventPipeline:
description: Details of the top level pipeline, build, or workflow of your CI.
properties:
end:
description: Time when the pipeline run finished. It cannot be older than
18 hours in the past from the current time. The time format must be RFC3339.
example: '2023-05-31T15:30:00Z'
format: date-time
type: string
error:
$ref: '#/components/schemas/CIAppCIError'
git:
$ref: '#/components/schemas/CIAppGitInfo'
is_manual:
description: Whether or not the pipeline was triggered manually by the user.
example: false
nullable: true
type: boolean
is_resumed:
description: Whether or not the pipeline was resumed after being blocked.
example: false
nullable: true
type: boolean
level:
$ref: '#/components/schemas/CIAppPipelineEventPipelineLevel'
metrics:
$ref: '#/components/schemas/CIAppPipelineEventMetrics'
name:
description: Name of the pipeline. All pipeline runs for the builds should
have the same name.
example: Deploy to AWS
type: string
node:
$ref: '#/components/schemas/CIAppHostInfo'
parameters:
$ref: '#/components/schemas/CIAppPipelineEventParameters'
parent_pipeline:
$ref: '#/components/schemas/CIAppPipelineEventParentPipeline'
partial_retry:
description: 'Whether or not the pipeline was a partial retry of a previous
attempt. A partial retry is one

which only runs a subset of the original jobs.'
example: false
type: boolean
pipeline_id:
description: 'Any ID used in the provider to identify the pipeline run even
if it is not unique across retries.

If the `pipeline_id` is unique, then both `unique_id` and `pipeline_id`
can be set to the same value.'
example: '#023'
type: string
previous_attempt:
$ref: '#/components/schemas/CIAppPipelineEventPreviousPipeline'
queue_time:
description: The queue time in milliseconds, if applicable.
example: 1004
format: int64
minimum: 0
nullable: true
type: integer
start:
description: Time when the pipeline run started (it should not include any
queue time). The time format must be RFC3339.
example: '2023-05-31T15:30:00Z'
format: date-time
type: string
status:
$ref: '#/components/schemas/CIAppPipelineEventPipelineStatus'
tags:
$ref: '#/components/schemas/CIAppPipelineEventTags'
unique_id:
description: 'UUID of the pipeline run. The ID has to be unique across retries
and pipelines,

including partial retries.'
example: 3eacb6f3-ff04-4e10-8a9c-46e6d054024a
type: string
url:
description: The URL to look at the pipeline in the CI provider UI.
example: https://my-ci-provider.example/pipelines/my-pipeline/run/1
type: string
required:
- level
- unique_id
- name
- url
- start
- end
- status
- partial_retry
type: object
oneOf:
- $ref: '#/components/schemas/CIAppPipelineEventFinishedPipeline'
- $ref: '#/components/schemas/CIAppPipelineEventInProgressPipeline'
CIAppPipelineEventPipelineInProgressStatus:
description: The in progress status of the pipeline.
enum:
- running
example: running
type: string
x-enum-varnames:
- RUNNING
CIAppPipelineEventPipelineLevel:
default: pipeline
description: Used to distinguish between pipelines, stages, jobs, and steps.
Expand Down Expand Up @@ -27654,6 +27751,12 @@ components:
name: DD-APPLICATION-KEY
type: apiKey
x-env-name: DD_APP_KEY
bearerAuth:
in: header
name: Authorization
scheme: bearer
type: http
x-env-name: DD_BEARER_TOKEN
info:
contact:
email: [email protected]
Expand Down Expand Up @@ -37747,6 +37850,8 @@ paths:

- Powerpacks: `powerpack`

- Reference Tables: `reference-table`

- Security Rules: `security-rule`

- Service Level Objectives: `slo`
Expand Down Expand Up @@ -37782,7 +37887,9 @@ paths:

Synthetic Private Locations | `viewer`, `editor`

Monitors | `viewer`, `editor`'
Monitors | `viewer`, `editor`

Reference Tables | `viewer`, `editor`'
operationId: UpdateRestrictionPolicy
parameters:
- $ref: '#/components/parameters/ResourceID'
Expand Down
2 changes: 2 additions & 0 deletions api/datadogV2/api_restriction_policies.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ func (a *RestrictionPoliciesApi) GetRestrictionPolicy(ctx _context.Context, reso
// - Dashboards: `dashboard`
// - Notebooks: `notebook`
// - Powerpacks: `powerpack`
// - Reference Tables: `reference-table`
// - Security Rules: `security-rule`
// - Service Level Objectives: `slo`
// - Synthetic Global Variables: `synthetics-global-variable`
Expand All @@ -175,6 +176,7 @@ func (a *RestrictionPoliciesApi) GetRestrictionPolicy(ctx _context.Context, reso
// Synthetic Tests | `viewer`, `editor`
// Synthetic Private Locations | `viewer`, `editor`
// Monitors | `viewer`, `editor`
// Reference Tables | `viewer`, `editor`
func (a *RestrictionPoliciesApi) UpdateRestrictionPolicy(ctx _context.Context, resourceId string, body RestrictionPolicyUpdateRequest) (RestrictionPolicyResponse, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (obj *CIAppCreatePipelineEventRequestAttributesResource) UnmarshalJSON(data
if err == nil {
if obj.CIAppPipelineEventPipeline != nil && obj.CIAppPipelineEventPipeline.UnparsedObject == nil {
jsonCIAppPipelineEventPipeline, _ := datadog.Marshal(obj.CIAppPipelineEventPipeline)
if string(jsonCIAppPipelineEventPipeline) == "{}" { // empty struct
if string(jsonCIAppPipelineEventPipeline) == "{}" && string(data) != "{}" { // empty struct
obj.CIAppPipelineEventPipeline = nil
} else {
match++
Expand Down
Loading

0 comments on commit 098198a

Please sign in to comment.