From 7ce01c32a6adfbd50c4fca78a6321f7e134dd482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Thu, 11 May 2023 11:58:17 +0200 Subject: [PATCH 001/294] Re-Format custom-metrics-api and start scaling-history-api (WIP); --- api/custom-metrics-api.yaml | 11 +++- api/scaling-history-api.yaml | 121 +++++++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 api/scaling-history-api.yaml diff --git a/api/custom-metrics-api.yaml b/api/custom-metrics-api.yaml index 76a017af35..3b4e427d95 100644 --- a/api/custom-metrics-api.yaml +++ b/api/custom-metrics-api.yaml @@ -16,7 +16,11 @@ paths: parameters: - in: path name: appGuid - description: The GUID identifying the application the custom metrics are submitted for. Can be found in the `application_id` property of the JSON object stored in the `VCAP_APPLICATION` environment variable. + description: | + The GUID identifying the application the custom metrics are submitted for. + + It can be found in the `application_id` property of the JSON object stored in the + `VCAP_APPLICATION` environment variable. example: 58d162ad-87d5-4f52-8abf-e56a63a67292 required: true schema: @@ -24,7 +28,10 @@ paths: post: summary: Submits application-specific custom metrics to app-autoscaler. description: | - Use to submit custom metrics to app-autoscaler which are defined and used in a dynamic scaling policy to enable automatic scaling based on application-specific metrics. We recommend submitting the custom metrics every 40 seconds from every application instance. + Use to submit custom metrics to app-autoscaler which are defined and used in a dynamic + scaling policy to enable automatic scaling based on application-specific metrics. + + We recommend submitting the custom metrics every 40 seconds from every application instance. tags: - Custom Metrics API V1 requestBody: diff --git a/api/scaling-history-api.yaml b/api/scaling-history-api.yaml new file mode 100644 index 0000000000..2a3d74879b --- /dev/null +++ b/api/scaling-history-api.yaml @@ -0,0 +1,121 @@ +openapi: 3.1.0 +info: + title: Scaling History API + description: List scaling history of an application + version: 1.0.0 +security: +- mtls: [] +- basicAuthentication: [] +tags: +- name: Scaling History API V1 + description: List the scaling history of an Application + +paths: + /v1/apps/{guid}/scaling_histories: + parameters: + - name: guid + in: path + required: true + description: | + The GUID identifying the application for which the scaling history is fetched. + + It can be found in the `application_id` property of the JSON object stored in the + `VCAP_APPLICATION` environment variable. + schema: + $ref: '#/components/schemas/GUID' + - name: start-time + in: query + description: | + The start time in the number of nanoseconds elapsed since January 1, 1970 UTC. + + The default value is 0. + schema: + type: int + example: start-time=1494989539138350432 + get: + summary: Retrieves the scaling history of an application. + description: | + Use to retrieve scaling history for an app. + tags: + - Scaling History API V1 + responses: + "200": + description: "OK" + content: + application/json: + schema: + $ref: '#/components/schemas/History' + default: + $ref: '#/components/responses/Error' + +components: + schemas: + ErrorResponse: + type: object + properties: + code: + type: string + description: The textual error code. + message: + type: string + description: The message describing the cause of the error. + GUID: + description: | + Identificator used by Cloud Foundry for entities. + + Anything is an entity. Apps, services, service-bindings, … + type: string + pattern: /(\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12}/ + History: + description: Object containing scaling history. + type: object + properties: + total_results: + type: integer + format: int64 + description: + example: 2 + total_pages: + type: integer + format: int64 + description: + example: 1 + page: + type: integer + format: int64 + description: + example: 1 + prev_url: + schema: + type: string + format: uri # TODO: Check, if valid in openapi? + next_url: + schema: + type: string + format: uri # TODO: Check, if valid in openapi? + resources: + type: array + items: + $ref: '#/components/schemas/HistoryEntry' + HistoryEntry: + description: todo + type: object + properties: + app_guid: + $ref: '#/components/schemas/GUID' + timestamp: + scaling_type: + status: + old_instances: + new_instances: + reason: + message: + error: + responses: + Error: + description: | + Error, the response body may contain further information. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' \ No newline at end of file From 97e0a8aa4114cd6be9e767364a879eb7b37f46b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Thu, 11 May 2023 16:17:17 +0200 Subject: [PATCH 002/294] Complete definition for the History API. --- api/scaling-history-api.yaml | 153 +++++++++++++++++++++++++++-------- docs/Public_API.rst | 2 +- 2 files changed, 119 insertions(+), 36 deletions(-) diff --git a/api/scaling-history-api.yaml b/api/scaling-history-api.yaml index 2a3d74879b..adf3b81739 100644 --- a/api/scaling-history-api.yaml +++ b/api/scaling-history-api.yaml @@ -27,11 +27,49 @@ paths: in: query description: | The start time in the number of nanoseconds elapsed since January 1, 1970 UTC. - - The default value is 0. schema: - type: int + type: integer + default: 0 example: start-time=1494989539138350432 + - name: end-time + in: query + description: | + The end time in the number of nanoseconds elapsed since January 1, 1970 UTC. + schema: + type: integer + default: 0 + example: end-time=1494989549117047288 + - name: order-direction + in: query + description: | + The sorting order. The scaling history will be order by timestamp ascending or descending. + schema: + type: string + enum: ["asc", "desc"] + default: desc + example: order-direction=desc + - name: page + in: query + description: The page number to query + schema: + type: integer + minimum: 1 # Or Should it be "1"? + default: 1 + example: page=1 + - name: results-per-page + in: query + description: Number of entries shown per page. + schema: + type: integer + minimum: 0 # Or Should it be "1"? + default: 50 + example: results-per-page=10 + - name: Authorization + in: header + schema: + type: string + example: | + bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o get: summary: Retrieves the scaling history of an application. description: | @@ -51,21 +89,22 @@ paths: components: schemas: ErrorResponse: - type: object - properties: - code: - type: string - description: The textual error code. - message: - type: string - description: The message describing the cause of the error. + type: object + properties: + code: + type: string + description: The textual error code. + message: + type: string + description: The message describing the cause of the error. GUID: description: | Identificator used by Cloud Foundry for entities. Anything is an entity. Apps, services, service-bindings, … type: string - pattern: /(\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12}/ + pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} + example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 History: description: Object containing scaling history. type: object @@ -73,44 +112,88 @@ components: total_results: type: integer format: int64 - description: + description: Number of history entries found for the given query. example: 2 total_pages: type: integer format: int64 - description: + description: Number of Pages from the query example: 1 page: type: integer format: int64 - description: + description: Number of the current page. example: 1 prev_url: - schema: - type: string - format: uri # TODO: Check, if valid in openapi? + type: string + format: uri next_url: - schema: - type: string - format: uri # TODO: Check, if valid in openapi? + type: string + format: uri resources: type: array items: $ref: '#/components/schemas/HistoryEntry' - HistoryEntry: - description: todo - type: object - properties: - app_guid: - $ref: '#/components/schemas/GUID' - timestamp: - scaling_type: - status: - old_instances: - new_instances: - reason: - message: - error: + HistoryEntry: + description: Description of a history event. + type: object + properties: + app_guid: + $ref: '#/components/schemas/GUID' + timestamp: + type: integer + description: | + The scaling time in the number of nanoseconds elapsed since January 1, 1970 UTC. + example: 1494989539138350432 + scaling_type: + type: integer + format: int64 + enum: [0, 1] + description: | + There are two different scaling types: + + 0: This represents `ScalingTypeDynamic`. The scaling has been done due to a dynamic + scaling rule, reacting on metrics provided by the app. + + 1: This represents `ScalingTypeSchedule`. The scaling has been done due to a + scheduled period changing the default instance limits. + example: 0 + status: + type: integer + format: int64 + enum: [0, 1, 2] + description: | + Following stati are possible: + + 0: The scaling was done successfully. + + 1: The scaling failed explicitly. + + 2: The scaling was ignored. + + This field is as well a selector of which of the other ones are used and which not. + example: 0 + old_instances: + type: integer + format: int64 + minimum: 0 + description: The number of instances before the scaling. + example: 1 + new_instances: + type: integer + format: int64 + minimum: 0 + description: The number of instances after the scaling. + example: 2 + reason: + type: string + description: Textual information about what triggered the scaling event. + example: -1 instance(s) because cpu < 20% for 60 seconds + message: # Why not `scaling_ignoration_reason`? + type: string + description: | + In case the scaling was ignored, the reason is provided in this field. + example: app in cooldown period + error: + type: string + description: | + In case the scaling failed, the reason is provided in this field. + example: failed to compute new app instances responses: Error: description: | diff --git a/docs/Public_API.rst b/docs/Public_API.rst index 12a6a9467a..e95c4cedb0 100644 --- a/docs/Public_API.rst +++ b/docs/Public_API.rst @@ -47,7 +47,7 @@ cURL '''' | curl "https://[the-api-server-url]:[port]/v1/apps/8d0cee08-23ad-4813-a779-ad8118ea0b91/scaling\_histories?start-time=1494989539138350432&end-time=1494989539138399999&order-direction=desc&page=1&results-per-page=10" \\ | -X GET \\ - | -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o" + | -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o" Response ^^^^^^^^ From a0fc4aa9a87e2486687905528cc2c2a2d2d6ea7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Thu, 11 May 2023 16:31:25 +0200 Subject: [PATCH 003/294] Refactoring and adding an example; --- api/custom-metrics-api.yaml | 21 ++------------------- api/scaling-history-api.yaml | 29 ++++++----------------------- api/shared_schemas.yaml | 24 ++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 42 deletions(-) create mode 100644 api/shared_schemas.yaml diff --git a/api/custom-metrics-api.yaml b/api/custom-metrics-api.yaml index 3b4e427d95..c7f7e72926 100644 --- a/api/custom-metrics-api.yaml +++ b/api/custom-metrics-api.yaml @@ -24,7 +24,7 @@ paths: example: 58d162ad-87d5-4f52-8abf-e56a63a67292 required: true schema: - type: string + $ref: "./shared_schemas.yaml#/GUID" post: summary: Submits application-specific custom metrics to app-autoscaler. description: | @@ -45,19 +45,11 @@ paths: '200': description: Metrics were successfully submitted. default: - $ref: '#/components/responses/Error' + $ref: "./shared_schemas.yaml#/Error" security: - mtls: [] x-codegen-request-body-name: body components: - responses: - Error: - description: | - Error, the response body may contain further information. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' schemas: Metrics: required: @@ -93,15 +85,6 @@ components: type: string description: An optional unit for the metric, for display purposes only. example: jobs - ErrorResponse: - type: object - properties: - code: - type: string - description: The textual error code. - message: - type: string - description: The message describing the cause of the error. securitySchemes: mtls: type: mutualTLS diff --git a/api/scaling-history-api.yaml b/api/scaling-history-api.yaml index adf3b81739..2fde61cfbf 100644 --- a/api/scaling-history-api.yaml +++ b/api/scaling-history-api.yaml @@ -1,9 +1,9 @@ -openapi: 3.1.0 +openapi: 3.0.0 info: title: Scaling History API description: List scaling history of an application version: 1.0.0 -security: +security: # Do we need that? - mtls: [] - basicAuthentication: [] tags: @@ -22,7 +22,7 @@ paths: It can be found in the `application_id` property of the JSON object stored in the `VCAP_APPLICATION` environment variable. schema: - $ref: '#/components/schemas/GUID' + $ref: "./shared_schemas.yaml#/GUID" - name: start-time in: query description: | @@ -82,21 +82,12 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/History' + $ref: "#/components/schemas/History" default: - $ref: '#/components/responses/Error' + $ref: "./shared_schemas.yaml#/Error" components: schemas: - ErrorResponse: - type: object - properties: - code: - type: string - description: The textual error code. - message: - type: string - description: The message describing the cause of the error. GUID: description: | Identificator used by Cloud Foundry for entities. @@ -193,12 +184,4 @@ components: type: string description: | In case the scaling failed, the reason is provided in this field. - example: failed to compute new app instances - responses: - Error: - description: | - Error, the response body may contain further information. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' \ No newline at end of file + example: failed to compute new app instances \ No newline at end of file diff --git a/api/shared_schemas.yaml b/api/shared_schemas.yaml new file mode 100644 index 0000000000..b774637890 --- /dev/null +++ b/api/shared_schemas.yaml @@ -0,0 +1,24 @@ +Error: + description: | + Error, the response body may contain further information. + content: + application/json: + schema: + $ref: "#/ErrorResponse" +ErrorResponse: + type: object + properties: + code: + type: string + description: The textual error code. + message: + type: string + description: The message describing the cause of the error. +GUID: + description: | + Identificator used by Cloud Foundry for entities. + + Anything is an entity. Apps, services, service-bindings, … + type: string + pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} + example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 \ No newline at end of file From 52c34ca7c578e9c6256d0ca610d4d4f0f50d4b9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Thu, 11 May 2023 16:46:57 +0200 Subject: [PATCH 004/294] Move shared definitions to a single file; --- api/custom-metrics-api.yaml | 4 ++-- api/scaling-history-api.yaml | 14 +++----------- api/shared_definitions.yaml | 27 +++++++++++++++++++++++++++ api/shared_schemas.yaml | 24 ------------------------ 4 files changed, 32 insertions(+), 37 deletions(-) create mode 100644 api/shared_definitions.yaml delete mode 100644 api/shared_schemas.yaml diff --git a/api/custom-metrics-api.yaml b/api/custom-metrics-api.yaml index c7f7e72926..095fbb7c27 100644 --- a/api/custom-metrics-api.yaml +++ b/api/custom-metrics-api.yaml @@ -24,7 +24,7 @@ paths: example: 58d162ad-87d5-4f52-8abf-e56a63a67292 required: true schema: - $ref: "./shared_schemas.yaml#/GUID" + $ref: "./shared_definitions.yaml#/schemas/GUID" post: summary: Submits application-specific custom metrics to app-autoscaler. description: | @@ -45,7 +45,7 @@ paths: '200': description: Metrics were successfully submitted. default: - $ref: "./shared_schemas.yaml#/Error" + $ref: "./shared_definitions.yaml#/responses/Error" security: - mtls: [] x-codegen-request-body-name: body diff --git a/api/scaling-history-api.yaml b/api/scaling-history-api.yaml index 2fde61cfbf..470b996bd3 100644 --- a/api/scaling-history-api.yaml +++ b/api/scaling-history-api.yaml @@ -22,7 +22,7 @@ paths: It can be found in the `application_id` property of the JSON object stored in the `VCAP_APPLICATION` environment variable. schema: - $ref: "./shared_schemas.yaml#/GUID" + $ref: "./shared_definitions.yaml#/schemas/GUID" - name: start-time in: query description: | @@ -84,18 +84,10 @@ paths: schema: $ref: "#/components/schemas/History" default: - $ref: "./shared_schemas.yaml#/Error" + $ref: "./shared_definitions.yaml#/responses/Error" components: schemas: - GUID: - description: | - Identificator used by Cloud Foundry for entities. - - Anything is an entity. Apps, services, service-bindings, … - type: string - pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} - example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 History: description: Object containing scaling history. type: object @@ -130,7 +122,7 @@ components: type: object properties: app_guid: - $ref: '#/components/schemas/GUID' + $ref: "./shared_definitions.yaml#/schemas/GUID" timestamp: type: integer description: | diff --git a/api/shared_definitions.yaml b/api/shared_definitions.yaml new file mode 100644 index 0000000000..5b7554319c --- /dev/null +++ b/api/shared_definitions.yaml @@ -0,0 +1,27 @@ +parameters: {} +responses: + Error: + description: | + Error, the response body may contain further information. + content: + application/json: + schema: + $ref: "#/schemas/ErrorResponse" +schemas: + ErrorResponse: + type: object + properties: + code: + type: string + description: The textual error code. + message: + type: string + description: The message describing the cause of the error. + GUID: + description: | + Identificator used by Cloud Foundry for entities. + + Anything is an entity. Apps, services, service-bindings, … + type: string + pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} + example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 \ No newline at end of file diff --git a/api/shared_schemas.yaml b/api/shared_schemas.yaml deleted file mode 100644 index b774637890..0000000000 --- a/api/shared_schemas.yaml +++ /dev/null @@ -1,24 +0,0 @@ -Error: - description: | - Error, the response body may contain further information. - content: - application/json: - schema: - $ref: "#/ErrorResponse" -ErrorResponse: - type: object - properties: - code: - type: string - description: The textual error code. - message: - type: string - description: The message describing the cause of the error. -GUID: - description: | - Identificator used by Cloud Foundry for entities. - - Anything is an entity. Apps, services, service-bindings, … - type: string - pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} - example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 \ No newline at end of file From baad352f81f2ab19ffaecab4b0d66b71cdf5d1fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 12 May 2023 14:53:16 +0200 Subject: [PATCH 005/294] Converts a history-event into a (tagged) sum-type; --- api/scaling-history-api.yaml | 117 +++++++++++++++++++++++++++++++++-- 1 file changed, 111 insertions(+), 6 deletions(-) diff --git a/api/scaling-history-api.yaml b/api/scaling-history-api.yaml index 470b996bd3..c6295820f3 100644 --- a/api/scaling-history-api.yaml +++ b/api/scaling-history-api.yaml @@ -118,7 +118,67 @@ components: items: $ref: '#/components/schemas/HistoryEntry' HistoryEntry: - description: Description of a history event. + oneOf: + - $ref: "#/components/schemas/HistoryErrorEntry" + - $ref: "#/components/schemas/HistoryIgnoreEntry" + - $ref: "#/components/schemas/HistorySuccessEntry" + HistoryErrorEntry: + description: Description of a failed scaling even in history. + type: object + properties: + status: + type: integer + format: int64 + enum: [1] + description: | + Following stati are possible: + + 0: The scaling was done successfully. + + 1: The scaling failed explicitly. + + 2: The scaling was ignored. + + This field is as well a selector of which of the other ones are used and which not. + example: 1 + app_guid: + $ref: "./shared_definitions.yaml#/schemas/GUID" + timestamp: + type: integer + description: | + The scaling time in the number of nanoseconds elapsed since January 1, 1970 UTC. + example: 1494989539138350432 + scaling_type: + type: integer + format: int64 + enum: [0, 1] + description: | + There are two different scaling types: + + 0: This represents `ScalingTypeDynamic`. The scaling has been done due to a dynamic + scaling rule, reacting on metrics provided by the app. + + 1: This represents `ScalingTypeSchedule`. The scaling has been done due to a + scheduled period changing the default instance limits. + example: 0 + old_instances: + type: integer + format: int64 + minimum: 0 + description: The number of instances before the scaling. + example: 1 + new_instances: + type: integer + format: int64 + minimum: 0 + description: The number of instances after the scaling. + example: 2 + reason: + type: string + description: Textual information about what triggered the scaling event. + example: -1 instance(s) because cpu < 20% for 60 seconds + error: + type: string + description: | + In case the scaling failed, the reason is provided in this field. + example: failed to compute new app instances + HistoryIgnoreEntry: + description: Description of an ignored scaling event in history. type: object properties: app_guid: @@ -142,7 +202,7 @@ components: status: type: integer format: int64 - enum: [0, 1, 2] + enum: [2] description: | Following stati are possible: + 0: The scaling was done successfully. @@ -172,8 +232,53 @@ components: description: | In case the scaling was ignored, the reason is provided in this field. example: app in cooldown period - error: - type: string + HistorySuccessEntry: + description: Description of a successful scaling event event in history. + type: object + properties: + app_guid: + $ref: "./shared_definitions.yaml#/schemas/GUID" + timestamp: + type: integer description: | - In case the scaling failed, the reason is provided in this field. - example: failed to compute new app instances \ No newline at end of file + The scaling time in the number of nanoseconds elapsed since January 1, 1970 UTC. + example: 1494989539138350432 + scaling_type: + type: integer + format: int64 + enum: [0, 1] + description: | + There are two different scaling types: + + 0: This represents `ScalingTypeDynamic`. The scaling has been done due to a dynamic + scaling rule, reacting on metrics provided by the app. + + 1: This represents `ScalingTypeSchedule`. The scaling has been done due to a + scheduled period changing the default instance limits. + example: 0 + status: + type: integer + format: int64 + enum: [0] + description: | + Following stati are possible: + + 0: The scaling was done successfully. + + 1: The scaling failed explicitly. + + 2: The scaling was ignored. + + This field is as well a selector of which of the other ones are used and which not. + example: 0 + old_instances: + type: integer + format: int64 + minimum: 0 + description: The number of instances before the scaling. + example: 1 + new_instances: + type: integer + format: int64 + minimum: 0 + description: The number of instances after the scaling. + example: 2 + reason: + type: string + description: Textual information about what triggered the scaling event. + example: -1 instance(s) because cpu < 20% for 60 seconds \ No newline at end of file From 35fee46a7c24002aa9bf6d959295f2bde42c1dbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 12 May 2023 15:01:36 +0200 Subject: [PATCH 006/294] Add comment; --- api/scaling-history-api.yaml | 51 +++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/api/scaling-history-api.yaml b/api/scaling-history-api.yaml index c6295820f3..44ce9291e2 100644 --- a/api/scaling-history-api.yaml +++ b/api/scaling-history-api.yaml @@ -118,6 +118,9 @@ components: items: $ref: '#/components/schemas/HistoryEntry' HistoryEntry: + # Here we create manually a tagged union comparable to: + # + # For discrimination, we use the property "status". oneOf: - $ref: "#/components/schemas/HistoryErrorEntry" - $ref: "#/components/schemas/HistoryIgnoreEntry" @@ -181,6 +184,18 @@ components: description: Description of an ignored scaling event in history. type: object properties: + status: + type: integer + format: int64 + enum: [2] + description: | + Following stati are possible: + + 0: The scaling was done successfully. + + 1: The scaling failed explicitly. + + 2: The scaling was ignored. + + This field is as well a selector of which of the other ones are used and which not. + example: 2 app_guid: $ref: "./shared_definitions.yaml#/schemas/GUID" timestamp: @@ -199,18 +214,6 @@ components: + 1: This represents `ScalingTypeSchedule`. The scaling has been done due to a scheduled period changing the default instance limits. example: 0 - status: - type: integer - format: int64 - enum: [2] - description: | - Following stati are possible: - + 0: The scaling was done successfully. - + 1: The scaling failed explicitly. - + 2: The scaling was ignored. - - This field is as well a selector of which of the other ones are used and which not. - example: 0 old_instances: type: integer format: int64 @@ -236,6 +239,18 @@ components: description: Description of a successful scaling event event in history. type: object properties: + status: + type: integer + format: int64 + enum: [0] + description: | + Following stati are possible: + + 0: The scaling was done successfully. + + 1: The scaling failed explicitly. + + 2: The scaling was ignored. + + This field is as well a selector of which of the other ones are used and which not. + example: 0 app_guid: $ref: "./shared_definitions.yaml#/schemas/GUID" timestamp: @@ -254,18 +269,6 @@ components: + 1: This represents `ScalingTypeSchedule`. The scaling has been done due to a scheduled period changing the default instance limits. example: 0 - status: - type: integer - format: int64 - enum: [0] - description: | - Following stati are possible: - + 0: The scaling was done successfully. - + 1: The scaling failed explicitly. - + 2: The scaling was ignored. - - This field is as well a selector of which of the other ones are used and which not. - example: 0 old_instances: type: integer format: int64 From 5622d3ecb0a4a30a5a628413fcd37cada7389e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 12 May 2023 15:42:49 +0200 Subject: [PATCH 007/294] Reuse more code in the openapi-specification; --- api/scaling-history-api.yaml | 118 +++++++++-------------------------- 1 file changed, 29 insertions(+), 89 deletions(-) diff --git a/api/scaling-history-api.yaml b/api/scaling-history-api.yaml index 44ce9291e2..8114bc64e3 100644 --- a/api/scaling-history-api.yaml +++ b/api/scaling-history-api.yaml @@ -121,26 +121,18 @@ components: # Here we create manually a tagged union comparable to: # # For discrimination, we use the property "status". - oneOf: - - $ref: "#/components/schemas/HistoryErrorEntry" - - $ref: "#/components/schemas/HistoryIgnoreEntry" - - $ref: "#/components/schemas/HistorySuccessEntry" - HistoryErrorEntry: - description: Description of a failed scaling even in history. + # + # TODO: Re-write this, making use of + allOf: + - $ref: "#/components/schemas/HistoryEntryCommon" + - oneOf: + - $ref: "#/components/schemas/HistoryErrorEntry" + - $ref: "#/components/schemas/HistoryIgnoreEntry" + - $ref: "#/components/schemas/HistorySuccessEntry" + HistoryEntryCommon: + description: "Properties common for each entry in the scaling history." type: object properties: - status: - type: integer - format: int64 - enum: [1] - description: | - Following stati are possible: - + 0: The scaling was done successfully. - + 1: The scaling failed explicitly. - + 2: The scaling was ignored. - - This field is as well a selector of which of the other ones are used and which not. - example: 1 app_guid: $ref: "./shared_definitions.yaml#/schemas/GUID" timestamp: @@ -154,9 +146,9 @@ components: enum: [0, 1] description: | There are two different scaling types: - + 0: This represents `ScalingTypeDynamic`. The scaling has been done due to a dynamic + + 0: This represents `ScalingTypeDynamic`. The scaling has been done due to a dynamic scaling rule, reacting on metrics provided by the app. - + 1: This represents `ScalingTypeSchedule`. The scaling has been done due to a + + 1: This represents `ScalingTypeSchedule`. The scaling has been done due to a scheduled period changing the default instance limits. example: 0 old_instances: @@ -175,6 +167,22 @@ components: type: string description: Textual information about what triggered the scaling event. example: -1 instance(s) because cpu < 20% for 60 seconds + HistoryErrorEntry: + description: Description of a failed scaling even in history. + type: object + properties: + status: + type: integer + format: int64 + enum: [1] + description: | + Following stati are possible: + + 0: The scaling was done successfully. + + 1: The scaling failed explicitly. + + 2: The scaling was ignored. + + This field is as well a selector of which of the other ones are used and which not. + example: 1 error: type: string description: | @@ -196,40 +204,6 @@ components: This field is as well a selector of which of the other ones are used and which not. example: 2 - app_guid: - $ref: "./shared_definitions.yaml#/schemas/GUID" - timestamp: - type: integer - description: | - The scaling time in the number of nanoseconds elapsed since January 1, 1970 UTC. - example: 1494989539138350432 - scaling_type: - type: integer - format: int64 - enum: [0, 1] - description: | - There are two different scaling types: - + 0: This represents `ScalingTypeDynamic`. The scaling has been done due to a dynamic - scaling rule, reacting on metrics provided by the app. - + 1: This represents `ScalingTypeSchedule`. The scaling has been done due to a - scheduled period changing the default instance limits. - example: 0 - old_instances: - type: integer - format: int64 - minimum: 0 - description: The number of instances before the scaling. - example: 1 - new_instances: - type: integer - format: int64 - minimum: 0 - description: The number of instances after the scaling. - example: 2 - reason: - type: string - description: Textual information about what triggered the scaling event. - example: -1 instance(s) because cpu < 20% for 60 seconds message: # Why not `scaling_ignoration_reason`? type: string description: | @@ -250,38 +224,4 @@ components: + 2: The scaling was ignored. This field is as well a selector of which of the other ones are used and which not. - example: 0 - app_guid: - $ref: "./shared_definitions.yaml#/schemas/GUID" - timestamp: - type: integer - description: | - The scaling time in the number of nanoseconds elapsed since January 1, 1970 UTC. - example: 1494989539138350432 - scaling_type: - type: integer - format: int64 - enum: [0, 1] - description: | - There are two different scaling types: - + 0: This represents `ScalingTypeDynamic`. The scaling has been done due to a dynamic - scaling rule, reacting on metrics provided by the app. - + 1: This represents `ScalingTypeSchedule`. The scaling has been done due to a - scheduled period changing the default instance limits. - example: 0 - old_instances: - type: integer - format: int64 - minimum: 0 - description: The number of instances before the scaling. - example: 1 - new_instances: - type: integer - format: int64 - minimum: 0 - description: The number of instances after the scaling. - example: 2 - reason: - type: string - description: Textual information about what triggered the scaling event. - example: -1 instance(s) because cpu < 20% for 60 seconds \ No newline at end of file + example: 0 \ No newline at end of file From 50d386c9ba11a1f7261bc401db469427a356dc1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 12 May 2023 16:02:29 +0200 Subject: [PATCH 008/294] Using tagged union and share property "status". --- api/scaling-history-api.yaml | 65 +++++++++++++----------------------- 1 file changed, 24 insertions(+), 41 deletions(-) diff --git a/api/scaling-history-api.yaml b/api/scaling-history-api.yaml index 8114bc64e3..28256f79b4 100644 --- a/api/scaling-history-api.yaml +++ b/api/scaling-history-api.yaml @@ -118,21 +118,40 @@ components: items: $ref: '#/components/schemas/HistoryEntry' HistoryEntry: - # Here we create manually a tagged union comparable to: - # - # For discrimination, we use the property "status". + # Here we create manually a tagged union. For discrimination, we use the property "status". # - # TODO: Re-write this, making use of + # See as well: + # + + # + + # + allOf: - $ref: "#/components/schemas/HistoryEntryCommon" - oneOf: - $ref: "#/components/schemas/HistoryErrorEntry" - $ref: "#/components/schemas/HistoryIgnoreEntry" - $ref: "#/components/schemas/HistorySuccessEntry" + discriminator: + propertyName: status + mapping: + 0: "#/components/schemas/HistorySuccessEntry" + 1: "#/components/schemas/HistoryErrorEntry" + 2: "#/components/schemas/HistoryIgnoreEntry" HistoryEntryCommon: description: "Properties common for each entry in the scaling history." type: object properties: + status: + type: integer + format: int64 + enum: [0, 1, 2] + description: | + Following stati are possible: + + 0: The scaling was done successfully. + + 1: The scaling failed explicitly. + + 2: The scaling was ignored. + + This field is as well a selector of which of the other ones are used and which not. + example: 0 app_guid: $ref: "./shared_definitions.yaml#/schemas/GUID" timestamp: @@ -171,18 +190,6 @@ components: description: Description of a failed scaling even in history. type: object properties: - status: - type: integer - format: int64 - enum: [1] - description: | - Following stati are possible: - + 0: The scaling was done successfully. - + 1: The scaling failed explicitly. - + 2: The scaling was ignored. - - This field is as well a selector of which of the other ones are used and which not. - example: 1 error: type: string description: | @@ -192,18 +199,6 @@ components: description: Description of an ignored scaling event in history. type: object properties: - status: - type: integer - format: int64 - enum: [2] - description: | - Following stati are possible: - + 0: The scaling was done successfully. - + 1: The scaling failed explicitly. - + 2: The scaling was ignored. - - This field is as well a selector of which of the other ones are used and which not. - example: 2 message: # Why not `scaling_ignoration_reason`? type: string description: | @@ -212,16 +207,4 @@ components: HistorySuccessEntry: description: Description of a successful scaling event event in history. type: object - properties: - status: - type: integer - format: int64 - enum: [0] - description: | - Following stati are possible: - + 0: The scaling was done successfully. - + 1: The scaling failed explicitly. - + 2: The scaling was ignored. - - This field is as well a selector of which of the other ones are used and which not. - example: 0 \ No newline at end of file + properties: {} # No extra fields needed in this variant. \ No newline at end of file From 8eb016cfaa9b15dd66cf111b4765c29992c33005 Mon Sep 17 00:00:00 2001 From: Anubhav Date: Wed, 24 May 2023 15:11:29 +0100 Subject: [PATCH 009/294] WIP- Adding Application-Metric-api, policy-api & improving Shared_definitions file --- api/application-metric-api.yaml | 125 +++++++++++++++++++++++++++ api/policy-api.yaml | 149 ++++++++++++++++++++++++++++++++ api/shared_definitions.yaml | 147 ++++++++++++++++++++++++++++++- 3 files changed, 420 insertions(+), 1 deletion(-) create mode 100644 api/application-metric-api.yaml create mode 100644 api/policy-api.yaml diff --git a/api/application-metric-api.yaml b/api/application-metric-api.yaml new file mode 100644 index 0000000000..f87d4914bb --- /dev/null +++ b/api/application-metric-api.yaml @@ -0,0 +1,125 @@ +openapi: 3.0.0 +info: + title: Application Metric API + description: | + AutoScaler collects the instances' metrics of an application, and aggregate the raw data into an accumulated value for evaluation. + + This API is used to return the aggregated metric result of an application. + version: 1.0.0 +security: # Do we need that? +- mtls: [] +- basicAuthentication: [] +tags: +- name: Application Metric API V1 + description: This API is used to return the aggregated metric result of an application. + +paths: + /v1/apps/{guid}/aggregated_metric_histories/metric_type: + parameters: + - name: guid + in: path + required: true + description: | + The GUID identifying the application for which the scaling history is fetched. + + It can be found in the `application_id` property of the JSON object stored in the + `VCAP_APPLICATION` environment variable. + schema: + $ref: "./shared_definitions.yaml#/schemas/GUID" + - name: metric_type + in: query + required: true + description: The metric type + schema: + type: string + enum: ["memoryused", "memoryutil", "responsetime", "throughput or custom metric's name"] + example: metric_type=memoryused + - name: start-time + in: query + description: | + The start time in the number of nanoseconds elapsed since January 1, 1970 UTC. + schema: + type: integer + default: 0 + example: start-time=1494989539138350432 + - name: end-time + in: query + description: | + The end time in the number of nanoseconds elapsed since January 1, 1970 UTC. + schema: + type: integer + default: 0 + example: end-time=1494989549117047288 + - name: order-direction + in: query + description: | + The sorting order. The scaling history will be order by timestamp ascending or descending. + schema: + type: string + enum: ["asc", "desc"] + default: desc + example: order-direction=desc + - name: page + in: query + description: The page number to query + schema: + type: integer + minimum: 1 # Or Should it be "1"? + default: 1 + example: page=1 + - name: results-per-page + in: query + description: Number of entries shown per page. + schema: + type: integer + minimum: 0 # Or Should it be "1"? + default: 50 + example: results-per-page=10 + - name: Authorization + in: header + schema: + type: string + example: | + bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o + get: + summary: Retrieves the aggregated metric result of an application + description: | + Use to retrieve aggregated metric result of an app. + tags: + - Application Metric API V1 + responses: + "200": + description: "OK" + content: + application/json: + schema: + $ref: "#/components/schemas/Application_Metrics" + default: + $ref: "./shared_definitions.yaml#/responses/Error" +components: + schemas: + Application_Metrics: + description: Object containing Application Metrics. + type: object + properties: + total_results: + type: integer + format: int64 + description: Number of history entries found for the given query. + example: 2 + total_pages: + type: integer + format: int64 + description: Number of Pages from the query + example: 1 + page: + type: integer + format: int64 + description: Number of the current page. + example: 1 + prev_url: + type: string + format: uri + next_url: + type: string + format: uri \ No newline at end of file diff --git a/api/policy-api.yaml b/api/policy-api.yaml new file mode 100644 index 0000000000..e594436ef6 --- /dev/null +++ b/api/policy-api.yaml @@ -0,0 +1,149 @@ +openapi: 3.0.0 +info: + title: Policy API + description: This API is used to create, delete, retrieve the policy + version: 1.0.0 + security: +- mtls: [] +- basicAuthentication: [] +tags: +- name: Policy API V1 + description: This API is used to create, delete, retrieve the policy + +paths: + /v1/apps/{guid}/policy: + parameters: + - name: guid + in: path + required: true + description: | + + The GUID identifying the application for which the scaling history is fetched. + + It can be found in the `application_id` property of the JSON object stored in the + `VCAP_APPLICATION` environment variable. + schema: + $ref: "./shared_definitions.yaml#/schemas/GUID" + + - name: Authorization + in: header + schema: + type: string + example: | + bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5_Iu_o + put: + summary: Retrieves the Policy + description: This API is used to create the policy + tags: + - Create Policy API V1 + response: + "200": + description: "OK" + content: + application/json: + schema: + $ref: "#/components/schemas/Policy/CreatePolicy" + default: + $ref: "./shared_definitons.yaml#/responses/Error" +components: + schemas: + CreatePolicy: + description: Object creating Policy + type: object + properties: + instance_min_count: + type: integer + format: int64 + description: minimal number of instance count + example: 1 + instance_max_count: + type: integer + format: int64 + description: maximal number of instance count + example: 4 + scaling_rules: + type: array + items: + $ref: '#/components/schemas/ScalingRules' + ScalingRules: + AnyOf: + - $ref: "./shared_definitions.yaml#/schemas/metric_type" + - $ref: "./shared_definitions.yaml#/schemas/threshold" + - $ref: "./shared_definitions.yaml#/schemas/operator" + - $ref: "./shared_definitions.yaml#/schemas/adjustment" + - $ref: "./shared_definitions.yaml#/schemas/breach_duration_secs" + - $ref: "./shared_definitions.yaml#/schemas/cool_down_secs" + schedules: + type: array + items: + $ref: '#/components/schemas/Schedules' + Schedules: + AnyOf: + - $ref: "./shared_definitions.yaml#/schemas/timezone" + - $ref: "./shared_definitions.yaml#/schemas/recurring_schedule" + - $ref: "./shared_definitions.yaml#/schemas/specific_date" + delete: + summary: Deletes the policy + description: This API is used to delete the policy + tags: + - Delete Policy API V1 + response: + "200": + description: "OK" + content: + application/json: + schema: + $ref: "#/components/schemas/Policy/DeletePolicy" + default: + $ref: "./shared_definitons.yaml#/responses/Error" + get: + summary: Retrieves the Policy + description: This API is used to retrieve the policy + tags: + - Get Policy API V1 + response: + "200": + description: "OK" + content: + application/json: + schema: + $ref: "#/components/schemas/Policy/GetPolicy" + default: + $ref: "./shared_definitons.yaml#/responses/Error" +components: + schemas: + GetPolicy: + description: Object containing Policy + type: object + properties: + instance_min_count: + type: integer + format: int64 + description: minimal number of instance count + example: 2 + instance_max_count: + type: integer + format: int64 + description: maximal number of instance count + example: 4 + scaling_rules: + type: array + items: + $ref: '#/components/schemas/ScalingRules' + ScalingRules: + AnyOf: + - $ref: "./shared_definitions.yaml#/schemas/metric_type" + - $ref: "./shared_definitions.yaml#/schemas/threshold" + - $ref: "./shared_definitions.yaml#/schemas/operator" + - $ref: "./shared_definitions.yaml#/schemas/adjustment" + - $ref: "./shared_definitions.yaml#/schemas/breach_duration_secs" + - $ref: "./shared_definitions.yaml#/schemas/cool_down_secs" + schedules: + type: array + items: + $ref: '#/components/schemas/Schedules' + Schedules: + AnyOf: + - $ref: "./shared_definitions.yaml#/schemas/timezone" + - $ref: "./shared_definitions.yaml#/schemas/recurring_schedule" + - $ref: "./shared_definitions.yaml#/schemas/specific_date" \ No newline at end of file diff --git a/api/shared_definitions.yaml b/api/shared_definitions.yaml index 5b7554319c..b1c3699038 100644 --- a/api/shared_definitions.yaml +++ b/api/shared_definitions.yaml @@ -24,4 +24,149 @@ schemas: Anything is an entity. Apps, services, service-bindings, … type: string pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} - example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 \ No newline at end of file + example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 + metric_type: + description: | + One of system-default metric types memoryused,memoryutil,responsetime, throughput, cpu or user-defined custom metric type + required: true + type: string + enum: ["memoryused", "memoryutil", "responsetime", "throughput", "cpu or custom metric's name"] + example: memoryused + threshold: + description: | + The boundary when metric value exceeds is considered as a breach + required: true + type: int + format: int64 + example: 30 + operator: + description: Used for standard operting signs - ">", "<", ">=", "<=" + required: true + type: string + enum: [">", "<", ">=", "<="] + example: < + adjustment: + description: | + The adjustment approach for instance count with each scaling. + + +5 means adding 5 instances, -50% means shrinking to the half of current size. + required: true + type: string + pattern: ^[-+][1-9]+[0-9]*[%]?$ + example: -1 + breach_duration_secs: + description: | + Time duration(in seconds) to fire scaling event if it keeps breaching + type: integer + format: int64 # this is time in seconds + example: 600 + cool_down_secs: + description: | + The time duration (in seconds) to wait before the next scaling kicks in + type: integer + format: int64 # this is time in seconds + example: 300 + timezone: + description: Using timezone definition of Java #https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html - Do we need to implement it? + required: true + type: string + example: Asia/Shanghai + recurring_schedule: + type: array + items: + $ref: '#/schemas/RecurringSchedule' + RecurringSchedule: + AnyOf: + - $ref: '#/schemas/start_date' + - $ref: '#/schemas/end_date' + - $ref: '#/schemas/start_time' + - $ref: '#/schemas/end_time' + - $ref: '#/schemas/days_of_week_or_month' + - $ref: '#/schemas/instance_min_count' + - $ref: '#/schemas/instance_max_count' + - $ref: '#/schemas/initial_min_instance_count' + + start_date: + description: the start date of the schedule. Must be a future time + type: string + format: date + example: 2016-06-27 + end_date: + description: the end date of the schedule. Must be a future time. + type: string + format: date + example: 2016-07-23 + start_time: + description: the start time of the schedule in HH:MM format + required: true + type: string + pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ + example: 11:00 + end_time: + description: the end time of the schedule in HH:MM format + required: true + type: string + pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ + example: 19:30 + end time of the schedule: + description: | + recurring days of a week or month. Use [1,2,..,7] or [1,2,...,31] to define it + type: array + example: [5, 15, 25] + instance_min_count: + description: minimal number of instance count for this schedule + required: true + type: integer + format: int64 + example: 3 + instance_max_count: + description: maximal number of instance count for this schedule + required: true + type: integer + format: int64 + example: 10 + instance_min_instance_count: + description: the initial minimal number of instance count for this schedule + type: integer + format: int64 + example: 5 + specific_date: + type: array + items: + $ref: '#/schemas/SpecificDate' + SpecificDate: + AnyOf: + - $ref: '#/schemas/start_date_time' + - $ref: '#/schemas/end_date_time' + - $ref: '#/schemas/instance_min_count' + - $ref: '#/schemas/instance_max_count' + - $ref: '#/schemas/initial_min_instance_count' + start_date_time: + description: the start time of the schedule. Must be a future time + required: true + type: string + pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/ + example: 2015-01-04T20:00 + end_date_time: # the doc has this as a start_date_time + description: the start time of the schedule. Must be a future time + required: true + type: string + pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/ + example: 2015-01-04T20:00 + instance_min_count: + description: minimal number of instance count for this schedule + required: true + type: integer + format: int64 + example: 2 + instance_max_count: + description: maximal number of instance count for this schedule + required: true + type: integer + format: int64 + example: 5 + instance_min_instance_count: + description: the initial minimal number of instance count for this schedule + type: integer + format: int64 + example: 3 \ No newline at end of file From 3926d8bf75b9436c102198570a97e4ad19990115 Mon Sep 17 00:00:00 2001 From: Anubhav Date: Wed, 31 May 2023 14:45:51 +0100 Subject: [PATCH 010/294] WIP- changes --- api/application-metric-api.yaml | 24 +++++++++++++++++++++++- api/policy-api.yaml | 2 ++ api/shared_definitions.yaml | 4 ++-- docs/Public_API.rst | 4 ++-- docs/policy.md | 4 ++-- 5 files changed, 31 insertions(+), 7 deletions(-) diff --git a/api/application-metric-api.yaml b/api/application-metric-api.yaml index f87d4914bb..97da9ef6dc 100644 --- a/api/application-metric-api.yaml +++ b/api/application-metric-api.yaml @@ -122,4 +122,26 @@ components: format: uri next_url: type: string - format: uri \ No newline at end of file + format: uri + resources: + type: array + items: + $ref: '#/components/schemas/ApplicationMetric' + ApplicationMetric: + app_guid: + $ref: "./shared_definitions.yaml#/schemas/GUID" + timestamp: + type: integer + description: | + The scaling time in the number of nanoseconds elapsed since January 1, 1970 UTC. + example: 1494989539138350432 + metric_type: + $ref: "./shared_definitions.yaml#/schemas/metric_type" + value: + type: integer + description: | + The value of metric type to be returned as the aggregated metric result of an application + example: 400 + unit: + type: string # Todo + \ No newline at end of file diff --git a/api/policy-api.yaml b/api/policy-api.yaml index e594436ef6..73a72e5f5e 100644 --- a/api/policy-api.yaml +++ b/api/policy-api.yaml @@ -80,6 +80,8 @@ components: Schedules: AnyOf: - $ref: "./shared_definitions.yaml#/schemas/timezone" + # TODO: Try to make use of + - $ref: "../../src/autoscaler/api/policyvalidator/policy_json.schema.json#/" # TODO: - $ref: "./shared_definitions.yaml#/schemas/recurring_schedule" - $ref: "./shared_definitions.yaml#/schemas/specific_date" delete: diff --git a/api/shared_definitions.yaml b/api/shared_definitions.yaml index b1c3699038..2bfde3221c 100644 --- a/api/shared_definitions.yaml +++ b/api/shared_definitions.yaml @@ -27,10 +27,10 @@ schemas: example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 metric_type: description: | - One of system-default metric types memoryused,memoryutil,responsetime, throughput, cpu or user-defined custom metric type + One user-defined custom metric type or one of the system-default metric types, which are: + "memoryused", "memoryutil", "responsetime", "throughput" and "cpu" required: true type: string - enum: ["memoryused", "memoryutil", "responsetime", "throughput", "cpu or custom metric's name"] example: memoryused threshold: description: | diff --git a/docs/Public_API.rst b/docs/Public_API.rst index e95c4cedb0..4890860b28 100644 --- a/docs/Public_API.rst +++ b/docs/Public_API.rst @@ -30,7 +30,7 @@ Parameters +--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ | end-time | The end time | int, the number of nanoseconds elapsed since January 1, 1970 UTC. | false. default 'now' | end-time=1494989549117047288 | +--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ -| order-direction | The order type. The scaling history will be order by timestamp asc or desc. | string,"asc" or "desc" | false. default desc | order-direction=desc | +| order-direction | The order type. The scaling history will be order by timestamp asc or desc. | string, "asc" or "desc" | false. default desc | order-direction=desc | +--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ | page | The page number to query | int | false. default 1 | page=1 | +--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ @@ -145,7 +145,7 @@ Parameters +--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ | guid | The GUID of the application | | true | | +--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ -| metric_type | The metric type | String, memoryused,memoryutil,responsetime, throughput or custom metric's name | true | metric_type=memoryused | +| metric_type | The metric type | String, "memoryused", "memoryutil", "responsetime", "throughput", "cpu" or custom metric's name | true | metric_type=memoryused | +--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ | start-time | The start time | int, the number of nanoseconds elapsed since January 1, 1970 UTC. | false, default 0 | start-time=1494989539138350432 | +--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ diff --git a/docs/policy.md b/docs/policy.md index 3bb598eb0c..ecbbf4d432 100644 --- a/docs/policy.md +++ b/docs/policy.md @@ -16,7 +16,7 @@ | Name | Type | Required|Description | |:---------------------|--------------|---------|---------------------------------------------------------------------------------| -| metric_type | String | true |one of system-default metric types `memoryused`,`memoryutil`,`responsetime`, `throughput`, `cpu` or user-defined custom metric type| +| metric_type | String | true |one of system-default metric types `memoryused`, `memoryutil`, `responsetime`, `throughput`, `cpu` or user-defined custom metric type| | threshold | int | true |the boundary when metric value exceeds is considered as a breach | | operator | String | true |>, <, >=, <= | | adjustment | String | true |the adjustment approach for instance count with each scaling. Support regex format `^[-+][1-9]+[0-9]*[%]?$`, i.e. +5 means adding 5 instances, -50% means shrinking to the half of current size. | @@ -50,7 +50,7 @@ | Name | Type | Required| Description | |:-------------------------------------|----------------------------|---------|----------------------------------------------------------------------------| | start_date_time | String,"yyyy-mm-ddThh:mm" | true | the start time of the schedule. Must be a future time | -| start_date_time | String,"yyyy-mm-ddThh:mm" | true | the end time of the schedule. Must be a future time | +| end_date_time | String,"yyyy-mm-ddThh:mm" | true | the end time of the schedule. Must be a future time | | instance_min_count | int | true | minimal number of instance count for this schedule | | instance_max_count | int | true | maximal number of instance count for this schedule | | initial_min_instance_count | int | false | the initial minimal number of instance count for this schedule | From ba34ae61202e5b6f8f6eba5c0d9f11317ce76719 Mon Sep 17 00:00:00 2001 From: app-autoscaler-ci-bot Date: Tue, 6 Jun 2023 19:03:50 +0000 Subject: [PATCH 011/294] Update golang version to 1.20.5 --- .final_builds/packages/golang-1-linux/index.yml | 4 ++++ .tool-versions | 2 +- packages/golang-1-linux/spec.lock | 2 +- packages/golang-1-linux/vendored-commit | 2 +- packages/golang-1-linux/version | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.final_builds/packages/golang-1-linux/index.yml b/.final_builds/packages/golang-1-linux/index.yml index 0a2bddb161..1b7e1bbfa2 100644 --- a/.final_builds/packages/golang-1-linux/index.yml +++ b/.final_builds/packages/golang-1-linux/index.yml @@ -31,6 +31,10 @@ builds: version: 6f86822e163425375f3a1b9d781b678f30fd4b6ee619b033fcf5e7e18563e74e blobstore_id: 0a69914c-05f2-4397-4cc1-390d8b2b6640 sha1: sha256:33b1f2a465c2f163e5ef31e072b2c7692ae0758ca2b7866b61d98663a6ba6329 + 8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60: + version: 8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60 + blobstore_id: d2723887-4744-43c2-64e3-289fe6483132 + sha1: sha256:efdf65bca81264d9110ec764be7edea1de341781a1ffe59c219db064d71d9fc3 a54b33c812a8cfc39ba82782a23d74bf33f5a0a92012b41a101cc9d9d48d345c: version: a54b33c812a8cfc39ba82782a23d74bf33f5a0a92012b41a101cc9d9d48d345c blobstore_id: 5a8680dd-9f44-40ac-400b-52753e7c9b25 diff --git a/.tool-versions b/.tool-versions index 738aac7530..f2b9b26012 100644 --- a/.tool-versions +++ b/.tool-versions @@ -6,7 +6,7 @@ concourse 7.9.1 direnv 2.32.3 gcloud 433.0.1 ginkgo 2.9.7 -golang 1.20.4 +golang 1.20.5 golangci-lint 1.53.2 java temurin-17.0.7+7 make 4.4 diff --git a/packages/golang-1-linux/spec.lock b/packages/golang-1-linux/spec.lock index f02637fdec..840ab8b4e4 100644 --- a/packages/golang-1-linux/spec.lock +++ b/packages/golang-1-linux/spec.lock @@ -1,2 +1,2 @@ name: golang-1-linux -fingerprint: 126fca7399cba5bc8c1b02e392441f1688daf1586d57d1b3614e314b893a6cc4 +fingerprint: 8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60 diff --git a/packages/golang-1-linux/vendored-commit b/packages/golang-1-linux/vendored-commit index 3d60c1ec9c..306aaabe1e 100644 --- a/packages/golang-1-linux/vendored-commit +++ b/packages/golang-1-linux/vendored-commit @@ -1 +1 @@ -c1872f2631f14f223005acdce58505ecc8c7a92d +f643862ee7a870c4fc0405fc0f2db6dfa2c43a77 diff --git a/packages/golang-1-linux/version b/packages/golang-1-linux/version index 1b9335f13b..ae45fe86ff 100644 --- a/packages/golang-1-linux/version +++ b/packages/golang-1-linux/version @@ -1 +1 @@ -1.20.4 \ No newline at end of file +1.20.5 \ No newline at end of file From 7e13bfc42284f213dd1a0d26dc9fba5211431260 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 01:03:05 +0000 Subject: [PATCH 012/294] chore(deps): update dependency golang to v1.20.6 (#1946) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- ci/dockerfiles/autoscaler-tools/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.tool-versions b/.tool-versions index d2f7848033..6c01cec9b8 100644 --- a/.tool-versions +++ b/.tool-versions @@ -6,7 +6,7 @@ concourse 7.9.1 direnv 2.32.3 gcloud 437.0.1 ginkgo 2.11.0 -golang 1.20.5 +golang 1.20.6 golangci-lint 1.53.3 java temurin-17.0.7+7 make 4.4 diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index d9eb53774a..26ca2ff2f4 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -45,7 +45,7 @@ RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg m # install golang # renovate: datasource=golang-version depName=golang -ARG GO_VERSION=1.20.5 +ARG GO_VERSION=1.20.6 ENV GOPATH $HOME/go ENV PATH $HOME/go/bin:/usr/local/go/bin:$PATH RUN wget -q https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz -P /tmp &&\ From a0d4b3b4977fbfadc9efa73199ae6fc59f6328bd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 01:04:10 +0000 Subject: [PATCH 013/294] fix(deps): update golang.org/x/exp digest to 06a737e (#1945) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 2 +- src/acceptance/assets/app/go_app/go.sum | 4 ++-- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index a8aa2532f0..144aaf9637 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -25,7 +25,7 @@ require ( go.opentelemetry.io/otel/metric v1.16.0 go.opentelemetry.io/otel/trace v1.16.0 go.uber.org/zap v1.24.0 - golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 + golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb ) require ( diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index 9b9bb9c2a8..8261d00d1a 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -189,8 +189,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 h1:FqrVOBQxQ8r/UwwXibI0KMolVhvFiGobSfdE33deHJM= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 2a8d485a68..1c667f9fd0 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -35,7 +35,7 @@ require ( github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26 github.com/xeipuuv/gojsonschema v1.2.0 golang.org/x/crypto v0.11.0 - golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 + golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb golang.org/x/net v0.12.0 golang.org/x/time v0.3.0 google.golang.org/grpc v1.56.2 diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index f8ae9ed0d9..3cc2193976 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1455,8 +1455,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 h1:FqrVOBQxQ8r/UwwXibI0KMolVhvFiGobSfdE33deHJM= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 h1:J74nGeMgeFnYQJN59eFwh06jX/V8g0lB7LWpjSLxtgU= From 257bbee0b3d130383ae6a5507924421bcd099fcc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 01:49:12 +0000 Subject: [PATCH 014/294] chore(deps): update dependency bosh-cli to v7.3.0 (#1947) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/dockerfiles/autoscaler-deploy/Dockerfile | 2 +- ci/dockerfiles/autoscaler-test/Dockerfile | 2 +- ci/dockerfiles/autoscaler-tools/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/dockerfiles/autoscaler-deploy/Dockerfile b/ci/dockerfiles/autoscaler-deploy/Dockerfile index b305ea3765..c0ea35cbca 100644 --- a/ci/dockerfiles/autoscaler-deploy/Dockerfile +++ b/ci/dockerfiles/autoscaler-deploy/Dockerfile @@ -46,7 +46,7 @@ ENV PATH $PATH:$GOPATH/bin:/usr/local/go/bin # Install bosh_cli # renovate: datasource=github-releases depName=bosh-cli lookupName=cloudfoundry/bosh-cli -ENV BOSH_VERSION 7.2.4 +ENV BOSH_VERSION 7.3.0 RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_VERSION}/bosh-cli-${BOSH_VERSION}-linux-amd64 && \ mv bosh-cli-* /usr/local/bin/bosh && \ chmod +x /usr/local/bin/bosh diff --git a/ci/dockerfiles/autoscaler-test/Dockerfile b/ci/dockerfiles/autoscaler-test/Dockerfile index 78f96b6faf..ddbb0089d1 100644 --- a/ci/dockerfiles/autoscaler-test/Dockerfile +++ b/ci/dockerfiles/autoscaler-test/Dockerfile @@ -57,7 +57,7 @@ RUN \ # Install bosh_cli # renovate: datasource=github-releases depName=bosh-cli lookupName=cloudfoundry/bosh-cli -ENV BOSH_VERSION 7.2.4 +ENV BOSH_VERSION 7.3.0 RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_VERSION}/bosh-cli-${BOSH_VERSION}-linux-amd64 && \ mv bosh-cli-* /usr/local/bin/bosh && \ chmod +x /usr/local/bin/bosh diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index 26ca2ff2f4..b75623d19a 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -62,7 +62,7 @@ RUN apt-get update && \ # Install bosh_cli # renovate: datasource=github-releases depName=bosh-cli lookupName=cloudfoundry/bosh-cli -ARG BOSH_VERSION=7.2.4 +ARG BOSH_VERSION=7.3.0 RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_VERSION}/bosh-cli-${BOSH_VERSION}-linux-amd64 && \ mv bosh-cli-* /usr/local/bin/bosh && \ chmod +x /usr/local/bin/bosh From a20499b2bcd2156317377ba3ef217c0d7ab7a6f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 04:04:00 +0000 Subject: [PATCH 015/294] Bump github.com/jackc/pgx/v5 in /src/changeloglockcleaner (#1949) Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.4.1 to 5.4.2. - [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md) - [Commits](https://github.com/jackc/pgx/compare/v5.4.1...v5.4.2) --- updated-dependencies: - dependency-name: github.com/jackc/pgx/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/changeloglockcleaner/go.mod | 2 +- src/changeloglockcleaner/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/changeloglockcleaner/go.mod b/src/changeloglockcleaner/go.mod index c0cc786a81..6ad13b5340 100644 --- a/src/changeloglockcleaner/go.mod +++ b/src/changeloglockcleaner/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/go-sql-driver/mysql v1.7.1 - github.com/jackc/pgx/v5 v5.4.1 + github.com/jackc/pgx/v5 v5.4.2 github.com/jmoiron/sqlx v1.3.5 github.com/onsi/ginkgo/v2 v2.11.0 github.com/onsi/gomega v1.27.8 diff --git a/src/changeloglockcleaner/go.sum b/src/changeloglockcleaner/go.sum index 497fef83b2..2bc2d008d4 100644 --- a/src/changeloglockcleaner/go.sum +++ b/src/changeloglockcleaner/go.sum @@ -22,8 +22,8 @@ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsI github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= -github.com/jackc/pgx/v5 v5.4.1 h1:oKfB/FhuVtit1bBM3zNRRsZ925ZkMN3HXL+LgLUM9lE= -github.com/jackc/pgx/v5 v5.4.1/go.mod h1:q6iHT8uDNXWiFNOlRqJzBTaSH3+2xCXkokxHZC5qWFY= +github.com/jackc/pgx/v5 v5.4.2 h1:u1gmGDwbdRUZiwisBm/Ky2M14uQyUP65bG8+20nnyrg= +github.com/jackc/pgx/v5 v5.4.2/go.mod h1:q6iHT8uDNXWiFNOlRqJzBTaSH3+2xCXkokxHZC5qWFY= github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= From cdce59b1e0a112fe3815d6a1cba5c007c64fc7b6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 05:10:44 +0000 Subject: [PATCH 016/294] chore(deps): update google/cloud-sdk docker tag to v438 (#1951) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- ci/terragrunt/.tool-versions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.tool-versions b/.tool-versions index 6c01cec9b8..6c94d28be9 100644 --- a/.tool-versions +++ b/.tool-versions @@ -4,7 +4,7 @@ bosh 7.2.4 cf 8.7.1 concourse 7.9.1 direnv 2.32.3 -gcloud 437.0.1 +gcloud 438.0.0 ginkgo 2.11.0 golang 1.20.6 golangci-lint 1.53.3 diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index ad5b124b41..db486c6e2f 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,4 +1,4 @@ -gcloud 437.0.1 +gcloud 438.0.0 helm 3.12.1 python 3.11.4 terraform 1.5.2 From 0cd1afb33a8ef9852819494f0cf59b5a025b34a6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 06:16:30 +0000 Subject: [PATCH 017/294] fix(deps): update module github.com/ogen-go/ogen to v0.71.0 (#1950) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 14 ++++++------- src/acceptance/assets/app/go_app/go.sum | 28 ++++++++++++------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index 144aaf9637..a440cfbc22 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -14,7 +14,7 @@ require ( github.com/json-iterator/go v1.1.12 github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2 github.com/mitchellh/mapstructure v1.5.0 - github.com/ogen-go/ogen v0.70.1 + github.com/ogen-go/ogen v0.71.0 github.com/onsi/ginkgo/v2 v2.11.0 github.com/onsi/gomega v1.27.8 github.com/prometheus/procfs v0.11.0 @@ -61,13 +61,13 @@ require ( go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.10.0 // indirect - golang.org/x/mod v0.11.0 // indirect - golang.org/x/net v0.11.0 // indirect + golang.org/x/crypto v0.11.0 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.12.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.9.0 // indirect - golang.org/x/text v0.10.0 // indirect - golang.org/x/tools v0.10.0 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect + golang.org/x/tools v0.11.0 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index 8261d00d1a..9f8473aae0 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -109,8 +109,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/ogen-go/ogen v0.70.1 h1:XZ6lUu3mcKbLwZf7kPwd4FJY/qDKejjULoD0RXYTxT4= -github.com/ogen-go/ogen v0.70.1/go.mod h1:5cVMmV5102SE4RTWkcx8L+pzUEnY8CpAodLhi93y/Jw= +github.com/ogen-go/ogen v0.71.0 h1:MmeONykE9/tY2oOolSkO4nDwK2kbl5oR8e6WUS/FIcA= +github.com/ogen-go/ogen v0.71.0/go.mod h1:DN3Tv8Zqla1f0JYUANyR7aEb9sRHwIwrxguv0pzVH6o= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -187,22 +187,22 @@ golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= -golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= -golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -220,20 +220,20 @@ golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.10.0 h1:tvDr/iQoUqNdohiYm0LmmKcBk+q86lb9EprIUFhHHGg= -golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= +golang.org/x/tools v0.11.0 h1:EMCa6U9S2LtZXLAMoWiR/R8dAQFRqbAitmbJ2UKhoi8= +golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 233b30137c39f9b0ea2969844cb4f286219b59c6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 06:17:00 +0000 Subject: [PATCH 018/294] fix(deps): update module github.com/jackc/pgx/v5 to v5.4.2 (#1952) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 1c667f9fd0..536c4b577e 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -18,7 +18,7 @@ require ( github.com/gorilla/mux v1.8.0 github.com/gorilla/websocket v1.5.0 github.com/hashicorp/go-retryablehttp v0.7.4 - github.com/jackc/pgx/v5 v5.4.1 + github.com/jackc/pgx/v5 v5.4.2 github.com/jmoiron/sqlx v1.3.5 github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2 github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index 3cc2193976..231da58720 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1017,8 +1017,8 @@ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsI github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= -github.com/jackc/pgx/v5 v5.4.1 h1:oKfB/FhuVtit1bBM3zNRRsZ925ZkMN3HXL+LgLUM9lE= -github.com/jackc/pgx/v5 v5.4.1/go.mod h1:q6iHT8uDNXWiFNOlRqJzBTaSH3+2xCXkokxHZC5qWFY= +github.com/jackc/pgx/v5 v5.4.2 h1:u1gmGDwbdRUZiwisBm/Ky2M14uQyUP65bG8+20nnyrg= +github.com/jackc/pgx/v5 v5.4.2/go.mod h1:q6iHT8uDNXWiFNOlRqJzBTaSH3+2xCXkokxHZC5qWFY= github.com/jackc/puddle/v2 v2.2.0 h1:RdcDk92EJBuBS55nQMMYFXTxwstHug4jkhT5pq8VxPk= github.com/jackc/puddle/v2 v2.2.0/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jgautheron/goconst v1.5.1 h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM= From b71c7722a0d2bc210f3c78874c01228e6d04eddc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 06:54:52 +0000 Subject: [PATCH 019/294] chore(deps): update dependency cloudfoundry/bosh-cli to v7.3.0 (#1948) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index 6c94d28be9..c5356a0661 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,6 +1,6 @@ act 0.2.48 actionlint 1.6.25 -bosh 7.2.4 +bosh 7.3.0 cf 8.7.1 concourse 7.9.1 direnv 2.32.3 From 92d494c19ee6cd0f81e694735f88e4203b3b8c95 Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Wed, 12 Jul 2023 16:57:30 +0200 Subject: [PATCH 020/294] Update golang and java release source repos --- ci/autoscaler/pipeline.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ci/autoscaler/pipeline.yml b/ci/autoscaler/pipeline.yml index a72222ba2e..4b6b82ff89 100644 --- a/ci/autoscaler/pipeline.yml +++ b/ci/autoscaler/pipeline.yml @@ -163,8 +163,8 @@ resources: icon: github check_every: 5m source: - uri: https://github.com/bosh-packages/golang-release.git - branch: master + uri: https://github.com/cloudfoundry/bosh-package-golang-release.git + branch: main version_depth: 20 tag_filter: v0.* @@ -173,8 +173,8 @@ resources: icon: github check_every: 5m source: - uri: https://github.com/bosh-packages/java-release.git - branch: master + uri: https://github.com/cloudfoundry/bosh-package-java-release.git + branch: main version_depth: 20 jobs: From 8e7e650ab50e03eddc407b6ccf2e29b018979a41 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 23:50:26 +0000 Subject: [PATCH 021/294] chore(deps): update dependency mikefarah/yq to v4.34.2 (#1955) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index c5356a0661..d56eaff0d9 100644 --- a/.tool-versions +++ b/.tool-versions @@ -13,4 +13,4 @@ make 4.4 maven 3.8.6 ruby 3.2.1 shellcheck 0.9.0 -yq 4.34.1 +yq 4.34.2 From 09b87e182f6e28f91bcb2fb748b6a83bb1fab2ec Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 13 Jul 2023 01:51:42 +0000 Subject: [PATCH 022/294] chore(deps): update dependency yq to v4.34.2 (#1957) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/dockerfiles/autoscaler-deploy/Dockerfile | 2 +- ci/dockerfiles/autoscaler-tools/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/dockerfiles/autoscaler-deploy/Dockerfile b/ci/dockerfiles/autoscaler-deploy/Dockerfile index c0ea35cbca..eac848d786 100644 --- a/ci/dockerfiles/autoscaler-deploy/Dockerfile +++ b/ci/dockerfiles/autoscaler-deploy/Dockerfile @@ -77,7 +77,7 @@ RUN wget -q https://github.com/stedolan/jq/releases/download/${JQ_VERSION}/jq-li # install yq # renovate: datasource=github-releases depName=yq lookupName=mikefarah/yq -ARG YQ_VERSION=v4.34.1 +ARG YQ_VERSION=v4.34.2 RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 && \ chmod a+x /usr/local/bin/yq && \ yq --version diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index b75623d19a..4a37df5511 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -98,7 +98,7 @@ RUN wget -q https://github.com/stedolan/jq/releases/download/${JQ_VERSION}/jq-li # install yq # renovate: datasource=github-releases depName=yq lookupName=mikefarah/yq -ARG YQ_VERSION=v4.34.1 +ARG YQ_VERSION=v4.34.2 RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 && \ chmod a+x /usr/local/bin/yq && \ yq --version From 6b41b0899a4bcda1f134012a566e53a4b3c5ba3d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 13 Jul 2023 07:46:12 +0000 Subject: [PATCH 023/294] chore(deps): update dependency terraform to v1.5.3 (#1956) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index db486c6e2f..9fe4af1588 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,6 +1,6 @@ gcloud 438.0.0 helm 3.12.1 python 3.11.4 -terraform 1.5.2 +terraform 1.5.3 terraform-lsp terragrunt 0.48.1 From 495930d9106ed1a374315840ffd99876bc77fae8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 14 Jul 2023 00:54:12 +0000 Subject: [PATCH 024/294] fix(deps): update golang.org/x/exp digest to 613f0c0 (#1958) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 2 +- src/acceptance/assets/app/go_app/go.sum | 4 ++-- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index a440cfbc22..942f230847 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -25,7 +25,7 @@ require ( go.opentelemetry.io/otel/metric v1.16.0 go.opentelemetry.io/otel/trace v1.16.0 go.uber.org/zap v1.24.0 - golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb + golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 ) require ( diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index 9f8473aae0..12688a1875 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -189,8 +189,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 536c4b577e..841b6497d6 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -35,7 +35,7 @@ require ( github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26 github.com/xeipuuv/gojsonschema v1.2.0 golang.org/x/crypto v0.11.0 - golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb + golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 golang.org/x/net v0.12.0 golang.org/x/time v0.3.0 google.golang.org/grpc v1.56.2 diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index 231da58720..9b7eaf58b9 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1455,8 +1455,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 h1:J74nGeMgeFnYQJN59eFwh06jX/V8g0lB7LWpjSLxtgU= From 886867cb016076c7ffb1cddcd02769aad53f00fa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 14 Jul 2023 01:31:51 +0000 Subject: [PATCH 025/294] chore(deps): update dependency bosh-cli to v7.3.1 (#1959) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/dockerfiles/autoscaler-deploy/Dockerfile | 2 +- ci/dockerfiles/autoscaler-test/Dockerfile | 2 +- ci/dockerfiles/autoscaler-tools/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/dockerfiles/autoscaler-deploy/Dockerfile b/ci/dockerfiles/autoscaler-deploy/Dockerfile index eac848d786..0e6bdcecbe 100644 --- a/ci/dockerfiles/autoscaler-deploy/Dockerfile +++ b/ci/dockerfiles/autoscaler-deploy/Dockerfile @@ -46,7 +46,7 @@ ENV PATH $PATH:$GOPATH/bin:/usr/local/go/bin # Install bosh_cli # renovate: datasource=github-releases depName=bosh-cli lookupName=cloudfoundry/bosh-cli -ENV BOSH_VERSION 7.3.0 +ENV BOSH_VERSION 7.3.1 RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_VERSION}/bosh-cli-${BOSH_VERSION}-linux-amd64 && \ mv bosh-cli-* /usr/local/bin/bosh && \ chmod +x /usr/local/bin/bosh diff --git a/ci/dockerfiles/autoscaler-test/Dockerfile b/ci/dockerfiles/autoscaler-test/Dockerfile index ddbb0089d1..582a140897 100644 --- a/ci/dockerfiles/autoscaler-test/Dockerfile +++ b/ci/dockerfiles/autoscaler-test/Dockerfile @@ -57,7 +57,7 @@ RUN \ # Install bosh_cli # renovate: datasource=github-releases depName=bosh-cli lookupName=cloudfoundry/bosh-cli -ENV BOSH_VERSION 7.3.0 +ENV BOSH_VERSION 7.3.1 RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_VERSION}/bosh-cli-${BOSH_VERSION}-linux-amd64 && \ mv bosh-cli-* /usr/local/bin/bosh && \ chmod +x /usr/local/bin/bosh diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index 4a37df5511..a6f5dcde0c 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -62,7 +62,7 @@ RUN apt-get update && \ # Install bosh_cli # renovate: datasource=github-releases depName=bosh-cli lookupName=cloudfoundry/bosh-cli -ARG BOSH_VERSION=7.3.0 +ARG BOSH_VERSION=7.3.1 RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_VERSION}/bosh-cli-${BOSH_VERSION}-linux-amd64 && \ mv bosh-cli-* /usr/local/bin/bosh && \ chmod +x /usr/local/bin/bosh From 07c24ac986e6e7e1cea56aee75a93c4a07eeaba2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 14 Jul 2023 02:19:18 +0000 Subject: [PATCH 026/294] chore(deps): update dependency helm to v3.12.2 (#1961) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 9fe4af1588..db72b23ee1 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,5 +1,5 @@ gcloud 438.0.0 -helm 3.12.1 +helm 3.12.2 python 3.11.4 terraform 1.5.3 terraform-lsp From 27444bb7cee474499e0abe0d70e63fecaa8eca16 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 14 Jul 2023 02:19:32 +0000 Subject: [PATCH 027/294] chore(deps): update dependency cloudfoundry/bosh-cli to v7.3.1 (#1960) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index d56eaff0d9..9546326402 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,6 +1,6 @@ act 0.2.48 actionlint 1.6.25 -bosh 7.3.0 +bosh 7.3.1 cf 8.7.1 concourse 7.9.1 direnv 2.32.3 From b2b83dae4bef062e1536c0ab5d8a7e91fe153b64 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Jul 2023 03:29:22 +0000 Subject: [PATCH 028/294] Bump github.com/go-chi/chi/v5 from 5.0.8 to 5.0.10 in /src/autoscaler (#1963) Bumps [github.com/go-chi/chi/v5](https://github.com/go-chi/chi) from 5.0.8 to 5.0.10. - [Release notes](https://github.com/go-chi/chi/releases) - [Changelog](https://github.com/go-chi/chi/blob/master/CHANGELOG.md) - [Commits](https://github.com/go-chi/chi/compare/v5.0.8...v5.0.10) --- updated-dependencies: - dependency-name: github.com/go-chi/chi/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 841b6497d6..222ec85864 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -11,7 +11,7 @@ require ( code.cloudfoundry.org/tlsconfig v0.0.0-20220621140725-0e6fbd869921 dario.cat/mergo v1.0.0 github.com/cenkalti/backoff/v4 v4.2.1 - github.com/go-chi/chi/v5 v5.0.8 + github.com/go-chi/chi/v5 v5.0.10 github.com/go-sql-driver/mysql v1.7.1 github.com/golang/protobuf v1.5.3 github.com/golangci/golangci-lint v1.53.3 diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index 9b7eaf58b9..4710d639fe 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -777,8 +777,8 @@ github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmV github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-chi/chi/v5 v5.0.8 h1:lD+NLqFcAi1ovnVZpsnObHGW4xb4J8lNmoYVfECH1Y0= -github.com/go-chi/chi/v5 v5.0.8/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= +github.com/go-chi/chi/v5 v5.0.10 h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk= +github.com/go-chi/chi/v5 v5.0.10/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-critic/go-critic v0.8.1 h1:16omCF1gN3gTzt4j4J6fKI/HnRojhEp+Eks6EuKw3vw= github.com/go-critic/go-critic v0.8.1/go.mod h1:kpzXl09SIJX1cr9TB/g/sAG+eFEl7ZS9f9cqvZtyNl0= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= From 3c3d3bce3545c4b2d73dbc9aac832bc08d02a5ab Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 01:10:47 +0000 Subject: [PATCH 029/294] fix(deps): update module github.com/ogen-go/ogen to v0.71.1 (#1964) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 2 +- src/acceptance/assets/app/go_app/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index 942f230847..db41656aad 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -14,7 +14,7 @@ require ( github.com/json-iterator/go v1.1.12 github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2 github.com/mitchellh/mapstructure v1.5.0 - github.com/ogen-go/ogen v0.71.0 + github.com/ogen-go/ogen v0.71.1 github.com/onsi/ginkgo/v2 v2.11.0 github.com/onsi/gomega v1.27.8 github.com/prometheus/procfs v0.11.0 diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index 12688a1875..a86f7d5ccf 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -109,8 +109,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/ogen-go/ogen v0.71.0 h1:MmeONykE9/tY2oOolSkO4nDwK2kbl5oR8e6WUS/FIcA= -github.com/ogen-go/ogen v0.71.0/go.mod h1:DN3Tv8Zqla1f0JYUANyR7aEb9sRHwIwrxguv0pzVH6o= +github.com/ogen-go/ogen v0.71.1 h1:X/TYjyi5XkXpuvLCRQYbPF/T4VJ/bjBNjdcW8ZW+NK0= +github.com/ogen-go/ogen v0.71.1/go.mod h1:DN3Tv8Zqla1f0JYUANyR7aEb9sRHwIwrxguv0pzVH6o= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= From 5d7097aa3f8cf9ccea4d74931b0f36bb2447a7c9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 01:45:09 +0000 Subject: [PATCH 030/294] chore(deps): lock file maintenance (#1965) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 13 ++-- .../github-arc-team-wg-ci/.terraform.lock.hcl | 78 +++++++++---------- jobs/Gemfile.lock | 13 ++-- spec/Gemfile.lock | 13 ++-- 4 files changed, 60 insertions(+), 57 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c219269b68..4d4430f9ab 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,7 +7,7 @@ GEM diff-lcs (1.5.0) json (2.6.3) language_server-protocol (3.17.0.3) - lint_roller (1.0.0) + lint_roller (1.1.0) parallel (1.23.0) parser (3.2.2.3) ast (~> 2.4.1) @@ -30,7 +30,7 @@ GEM rspec-its (1.3.0) rspec-core (>= 3.0.0) rspec-expectations (>= 3.0.0) - rspec-mocks (3.12.5) + rspec-mocks (3.12.6) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) @@ -51,16 +51,17 @@ GEM rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) semi_semantic (1.2.0) - standard (1.29.0) + standard (1.30.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) rubocop (~> 1.52.0) standard-custom (~> 1.0.0) standard-performance (~> 1.1.0) - standard-custom (1.0.1) - lint_roller (~> 1.0) - standard-performance (1.1.0) + standard-custom (1.0.2) lint_roller (~> 1.0) + rubocop (~> 1.50) + standard-performance (1.1.2) + lint_roller (~> 1.1) rubocop-performance (~> 1.18.0) unicode-display_width (2.4.2) diff --git a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl index 5aa72c5767..2521633674 100644 --- a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl +++ b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl @@ -19,55 +19,55 @@ provider "registry.terraform.io/gavinbunney/kubectl" { } provider "registry.terraform.io/hashicorp/google" { - version = "4.72.1" + version = "4.73.1" hashes = [ - "h1:7eGRYDBZ3aAVlbo2JcIRnp037TJ8oO/eHzU2UCx19V8=", - "h1:Bcyacs3EFH0Z/Q/w88QTmlzrsrO81GoHFd3VOwzoYoU=", - "h1:NwlmUwPRZldIyaZb12qJfmFNtc0fkfmFLqNWDVSZ4TE=", - "h1:QYGHDARL8kbo07OpmdVzWhpoHaBy+rleGfkRjzXMEEk=", - "h1:RuR8OMwVhQbEbf9QyVTmrb3eaW1JqvM12OUc7RCFcfs=", - "h1:ZGaTfhGyMwfhiEgW9HArCq9LG7Eyd+oZaqNhbk5OlDU=", - "h1:bkve+o94+chV4lFe3k3FI+hdul8Eyp+7x2a8cGPIb/0=", - "h1:nh2kB2tlgxGpf9uHyLVacvkexXPXQLYKlb5m7LwWjNk=", - "h1:qRtRlv5wzsDO0iZIjhDrOMr4Q+U06dgBkaVdB9Ptyyo=", - "h1:tKwTn5vyk/fYGR/EhM9ab9/6+8YS100PVtJBf3NX//U=", - "h1:zfCB78G6SqHeUA95KyyOQnrXwhsWi7f8rdyaF82I6Yo=", + "h1:1tQTQ8WgYmbvGmO6xBt4N/6QmsAqA12aVl22SwNysME=", + "h1:3nYxqQW1zGZi8nvd4BWxRRQQWntP7QraI3AzbOzuDDU=", + "h1:CPbsNpG33pXuwRBxglmCWJPiWNs7tD7Jz7MFPxBoG3s=", + "h1:E1WsKbfr/KLbk1Cun5/U+g2LHMT4nv6HpET2YAF7XUI=", + "h1:KpT046IMZ7pPszCdIpZOGjD5lexVp+cxuXO4vMGopy8=", + "h1:PIK2NvCT2m/c8a7kq+GwiKY5+k79gxEDr+DgkX/2+Ns=", + "h1:WjUV/k3TC5KAseJCNIoigqFme/bQFA5UsB3k6ZLr5j0=", + "h1:XcITgi++JlgoKrodjLPM032V1p5tF+XD5xd/SIfPh0w=", + "h1:aFUdo4C0ZB4Z9/UpWYA9bimCwd398uCoiyHjtWKnZ5o=", + "h1:bkCccFfNOTtzDMCe2JBw3bSr3MXJHW6lc/v3UuHlatM=", + "h1:zIFLcmpKcifHyhkntXfJKyy3DBd3WQaVAVCTpwWd0Aw=", ] } provider "registry.terraform.io/hashicorp/kubernetes" { - version = "2.21.1" + version = "2.22.0" hashes = [ - "h1:/RbNfqTldk/hTjiUjUuiAw8XVULUtYSDTbeKhs+ZW5o=", - "h1:2spGoBcGDQ/Csc23bddCfM21zyKx3PONoiqRgmuChnM=", - "h1:7cCH+Wsg2lFTpsTleJ7MewkrYfFlxU1l4HlLWP8wzFw=", - "h1:I1qWLUFmB0Z8+3CX+XzJtkgiAOYQ1nHlLN9lFcPf+zc=", - "h1:MxZmniZEYMxRRZ/gzQsZO9YC46p6gNwSGH+TSYCny/Q=", - "h1:WtLHH4m1Btjs2QhbQHWVwTujLOMK8B7lwngejbCcXkM=", - "h1:bXc0ue6S0xDbelSOYjXOQgOa0lombXDZrblwU2lvErg=", - "h1:gP8IU3gFfXYRfGZr5Qws9JryZsOGsluAVpiAoZW7eo0=", - "h1:jCRKxaAWE6ayspakxcU5wR4deC2M/Tq3KrrOmU9RO8Y=", - "h1:qzkHi2N28Xl57cteGZElxAVYKEr/trlyMnKXc7xaD74=", - "h1:x6RALWCLxmo+4IQDK3VVZLOXpR7VAiv8LNMCSEfBo6c=", + "h1:DJr88+52tPK4Ft9xltF6YL+sRz8HWLP2ZOfFiKSB5Dc=", + "h1:EBi28mEwbQJXL25oZCMaPrOUvMm6fukV5hUPleKY2w0=", + "h1:EaHpk0hY0urPcZQ4n7LgycQHklUNvoC8u+WTAH35vhg=", + "h1:N2Nta6li+07oT02gcgLzAU4goGIWNXY2zqKUV/9rLLE=", + "h1:PdThbypFQ5Wc0PQFzcef5y0z52EfgbSNW1S7ZgMQWW0=", + "h1:Tt9Ux7AfdVWeRhAkdnhknthwevYPYePnuv0mYKQ0pOY=", + "h1:b6Wj111/wsMNg8FrHFXrf4mCZFtSXKHx4JvbZh3YTCY=", + "h1:jA1dtidWHrxf0D3V7BoVc7wbzKchpIjwINBW3DiOR44=", + "h1:majnb9AYactsjXcDYDa9+wiiNFSVVIfBEMQowzTMo6E=", + "h1:o7d0icd+92XLs1l83GUYFujHl70CZ7VioYuI827hydo=", + "h1:sAHTYTbgC61YwliQTjN30Cybyb/V4Aq1GAWKg30Mx3c=", ] } provider "registry.terraform.io/integrations/github" { - version = "5.29.0" + version = "5.31.0" hashes = [ - "h1:3g4M606rOvYpPKgB6DnSQVWYkRPc9o5+/Cg9VD7BcHg=", - "h1:3lWhSOUEWVuUqyvEoy/dMbQGMX4BVSECrSpkImUQge0=", - "h1:5Q4c+ippTE5ar7d0lu5s7ta1ygzyx8A6fd5XQnRyLrA=", - "h1:8e/2zI37aga96peL1ILYIDG8H9CSY7csExj8bPgCyIw=", - "h1:AiPvbitLUTmVcxacN6SDWbAEaq7ci49fdoU0y16K8s0=", - "h1:E8QmIzJ41VwnZ823ulimCwXYuMlhTT35P1RFubXUjKc=", - "h1:HGWE6BEKe5nMlWTLbW4hnDoV2m6YMCi4VPBvy2ndRuE=", - "h1:HPmiutLYra6btE0x/1byYwlJCgXBscK57PzMXz/TcYI=", - "h1:O7VyGCpFPA5KsmBrMSNGXl4LApNhwx/qQ1xuMVzPZHs=", - "h1:WqFXfmhoYRUZTs73+S2BJ0jurUXpL+VRRJwj11IKr5I=", - "h1:YRvZXSI1numhgl7SuAE2Bx6aPg2ba7fay+Ze7B5JDyc=", - "h1:aEA5zQv9lMnw/Iv9aEKB5/hc89LOWhAtstf4kYvrhgk=", - "h1:fMy4HzlY4LCQZgLoe/hNzL12OaSwtLcGQQsFFdj0uEw=", - "h1:wJ44inqS4Jq7+dMmCdBezMs79cfqeemNIIEKJFbffHM=", + "h1:2gz1KxIUlXiou3Bil+kdkYJUNAU0Uh1L8H6JI8/LbRY=", + "h1:6pIaOFgk/2mqk507zSPzacyZiU6VV1GR0prbtdhxnaM=", + "h1:73f1cQN2fExYG78UL28xBBabI+8AjNrB6lsHPxP4JBA=", + "h1:7g1bhJ/UGzvjxSQ4wt1erkk0HMD1HMSYuGsseMqU5eA=", + "h1:FCMaj/B2Qm6TwyFltOOBtbwy4f90G7KbIyuGn/1JiUQ=", + "h1:TBJhZYNRdr5OOEmxSmxN8wM/4JAqnq0D8t91ZUIJsK4=", + "h1:V5y9CCs8rTG120/axACZWpkkl8MFp8bKFeXWM/tlaNQ=", + "h1:VPoL/2t4oqDHcAPURfmPz9k6tGxEctHUt3gaoxjYfUk=", + "h1:aBWMe1NWNo4XV0c2qPh4k3Sz+OCWLmag97vb/gN8GuM=", + "h1:exsbX95hgQ9hXFG0kHjH7V9aQ8eJHVG1poqsN8lC4T0=", + "h1:f6dVtPlj/aicpmePY8GyWQHdJQYQ0VzVRbrZLO9riK4=", + "h1:vrkktGyd2Wc5ZNi3ZXImuTtK4DlnSqOSx5O8rGMv6as=", + "h1:wLp7QdHF8rm9rgHMXvEincuQ1MQDxNPbtij+raRPz2c=", + "h1:xzw/A9odgXUdL2LWZHXy9D2V56BT4H8YeU86emBgRCs=", ] } diff --git a/jobs/Gemfile.lock b/jobs/Gemfile.lock index c219269b68..4d4430f9ab 100644 --- a/jobs/Gemfile.lock +++ b/jobs/Gemfile.lock @@ -7,7 +7,7 @@ GEM diff-lcs (1.5.0) json (2.6.3) language_server-protocol (3.17.0.3) - lint_roller (1.0.0) + lint_roller (1.1.0) parallel (1.23.0) parser (3.2.2.3) ast (~> 2.4.1) @@ -30,7 +30,7 @@ GEM rspec-its (1.3.0) rspec-core (>= 3.0.0) rspec-expectations (>= 3.0.0) - rspec-mocks (3.12.5) + rspec-mocks (3.12.6) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) @@ -51,16 +51,17 @@ GEM rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) semi_semantic (1.2.0) - standard (1.29.0) + standard (1.30.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) rubocop (~> 1.52.0) standard-custom (~> 1.0.0) standard-performance (~> 1.1.0) - standard-custom (1.0.1) - lint_roller (~> 1.0) - standard-performance (1.1.0) + standard-custom (1.0.2) lint_roller (~> 1.0) + rubocop (~> 1.50) + standard-performance (1.1.2) + lint_roller (~> 1.1) rubocop-performance (~> 1.18.0) unicode-display_width (2.4.2) diff --git a/spec/Gemfile.lock b/spec/Gemfile.lock index c5145842bf..3e0e6a900c 100644 --- a/spec/Gemfile.lock +++ b/spec/Gemfile.lock @@ -7,7 +7,7 @@ GEM diff-lcs (1.5.0) json (2.6.3) language_server-protocol (3.17.0.3) - lint_roller (1.0.0) + lint_roller (1.1.0) parallel (1.23.0) parser (3.2.2.3) ast (~> 2.4.1) @@ -30,7 +30,7 @@ GEM rspec-its (1.3.0) rspec-core (>= 3.0.0) rspec-expectations (>= 3.0.0) - rspec-mocks (3.12.5) + rspec-mocks (3.12.6) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) @@ -51,16 +51,17 @@ GEM rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) semi_semantic (1.2.0) - standard (1.29.0) + standard (1.30.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) rubocop (~> 1.52.0) standard-custom (~> 1.0.0) standard-performance (~> 1.1.0) - standard-custom (1.0.1) - lint_roller (~> 1.0) - standard-performance (1.1.0) + standard-custom (1.0.2) lint_roller (~> 1.0) + rubocop (~> 1.50) + standard-performance (1.1.2) + lint_roller (~> 1.1) rubocop-performance (~> 1.18.0) unicode-display_width (2.4.2) From 13f73c7fb5be61a765d15694b19fec95797d2b91 Mon Sep 17 00:00:00 2001 From: app-autoscaler-ci-bot <89513836+app-autoscaler-ci-bot@users.noreply.github.com> Date: Mon, 17 Jul 2023 11:02:22 +0200 Subject: [PATCH 031/294] Update golang version to 1.20.5 (#1849) Co-authored-by: Silvestre Zabala --- .final_builds/packages/golang-1-linux/index.yml | 4 ++++ .tool-versions | 2 +- packages/golang-1-linux/spec.lock | 2 +- packages/golang-1-linux/vendored-commit | 2 +- packages/golang-1-linux/version | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.final_builds/packages/golang-1-linux/index.yml b/.final_builds/packages/golang-1-linux/index.yml index 0a2bddb161..1b7e1bbfa2 100644 --- a/.final_builds/packages/golang-1-linux/index.yml +++ b/.final_builds/packages/golang-1-linux/index.yml @@ -31,6 +31,10 @@ builds: version: 6f86822e163425375f3a1b9d781b678f30fd4b6ee619b033fcf5e7e18563e74e blobstore_id: 0a69914c-05f2-4397-4cc1-390d8b2b6640 sha1: sha256:33b1f2a465c2f163e5ef31e072b2c7692ae0758ca2b7866b61d98663a6ba6329 + 8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60: + version: 8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60 + blobstore_id: d2723887-4744-43c2-64e3-289fe6483132 + sha1: sha256:efdf65bca81264d9110ec764be7edea1de341781a1ffe59c219db064d71d9fc3 a54b33c812a8cfc39ba82782a23d74bf33f5a0a92012b41a101cc9d9d48d345c: version: a54b33c812a8cfc39ba82782a23d74bf33f5a0a92012b41a101cc9d9d48d345c blobstore_id: 5a8680dd-9f44-40ac-400b-52753e7c9b25 diff --git a/.tool-versions b/.tool-versions index 9546326402..4773fee2fb 100644 --- a/.tool-versions +++ b/.tool-versions @@ -6,7 +6,7 @@ concourse 7.9.1 direnv 2.32.3 gcloud 438.0.0 ginkgo 2.11.0 -golang 1.20.6 +golang 1.20.5 golangci-lint 1.53.3 java temurin-17.0.7+7 make 4.4 diff --git a/packages/golang-1-linux/spec.lock b/packages/golang-1-linux/spec.lock index f02637fdec..840ab8b4e4 100644 --- a/packages/golang-1-linux/spec.lock +++ b/packages/golang-1-linux/spec.lock @@ -1,2 +1,2 @@ name: golang-1-linux -fingerprint: 126fca7399cba5bc8c1b02e392441f1688daf1586d57d1b3614e314b893a6cc4 +fingerprint: 8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60 diff --git a/packages/golang-1-linux/vendored-commit b/packages/golang-1-linux/vendored-commit index 3d60c1ec9c..306aaabe1e 100644 --- a/packages/golang-1-linux/vendored-commit +++ b/packages/golang-1-linux/vendored-commit @@ -1 +1 @@ -c1872f2631f14f223005acdce58505ecc8c7a92d +f643862ee7a870c4fc0405fc0f2db6dfa2c43a77 diff --git a/packages/golang-1-linux/version b/packages/golang-1-linux/version index 1b9335f13b..ae45fe86ff 100644 --- a/packages/golang-1-linux/version +++ b/packages/golang-1-linux/version @@ -1 +1 @@ -1.20.4 \ No newline at end of file +1.20.5 \ No newline at end of file From 36ee63d8d7a81ce886bb1f15b345139bc45f7853 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 18 Jul 2023 03:28:54 +0000 Subject: [PATCH 032/294] chore(deps): update dependency gruntwork-io/terragrunt to v0.48.2 (#1969) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index db72b23ee1..542366bb9d 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.2 python 3.11.4 terraform 1.5.3 terraform-lsp -terragrunt 0.48.1 +terragrunt 0.48.2 From beab28eb91ab62687955dc7cee6272b6e467cb7a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 18 Jul 2023 04:16:20 +0000 Subject: [PATCH 033/294] fix(deps): update module code.cloudfoundry.org/go-loggregator/v9 to v9.0.7 (#1971) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/autoscaler/go.mod | 4 ++-- src/autoscaler/go.sum | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 222ec85864..418eaa9dea 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -6,7 +6,7 @@ require ( code.cloudfoundry.org/cfhttp/v2 v2.0.1-0.20230113212937-05beac96f8c7 code.cloudfoundry.org/clock v1.1.0 code.cloudfoundry.org/go-log-cache v1.0.1-0.20230106184352-6dc0e9ab2e65 - code.cloudfoundry.org/go-loggregator/v9 v9.0.6 + code.cloudfoundry.org/go-loggregator/v9 v9.0.7 code.cloudfoundry.org/lager/v3 v3.0.2 code.cloudfoundry.org/tlsconfig v0.0.0-20220621140725-0e6fbd869921 dario.cat/mergo v1.0.0 @@ -231,7 +231,7 @@ require ( golang.org/x/text v0.11.0 // indirect golang.org/x/tools v0.9.3 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect honnef.co/go/tools v0.4.3 // indirect diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index 4710d639fe..cf3e95ef0a 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -604,8 +604,8 @@ code.cloudfoundry.org/go-diodes v0.0.0-20221212174934-b8cb650f2489 h1:bLiGonuL4K code.cloudfoundry.org/go-diodes v0.0.0-20221212174934-b8cb650f2489/go.mod h1:gbU0Jysh1Ep/3KfwjLLdzSJWbd9Ybh59UYCuTNBpm7U= code.cloudfoundry.org/go-log-cache v1.0.1-0.20230106184352-6dc0e9ab2e65 h1:XtOanl6QBUYNDI2+km7qtlY/KOkhQRpVBPPTapd6glc= code.cloudfoundry.org/go-log-cache v1.0.1-0.20230106184352-6dc0e9ab2e65/go.mod h1:80JBMn31Cl0fzUNSsT7m0Qy4lGeT8dtA7kOR0WWt+Os= -code.cloudfoundry.org/go-loggregator/v9 v9.0.6 h1:L2zNzSMqo6kwLw4p5/c6PF7Wur4WCnvar9+MbOevYMs= -code.cloudfoundry.org/go-loggregator/v9 v9.0.6/go.mod h1:yc3+eazjM8HC8NSTtaUIsSSalWf5rNOEbKTtvr61Z+8= +code.cloudfoundry.org/go-loggregator/v9 v9.0.7 h1:vM351mliuq6Olxarar6BYFqVPYR8D5SmomD2SZA9fUY= +code.cloudfoundry.org/go-loggregator/v9 v9.0.7/go.mod h1:THyXb1L629OSRLh73ER7SwaRV1OPmWgh0TFgmTsgJMk= code.cloudfoundry.org/lager/v3 v3.0.2 h1:H0dcQY+814G1Ea0e5K/AMaMpcr+Pe5Iv+AALJEwrP9U= code.cloudfoundry.org/lager/v3 v3.0.2/go.mod h1:zA6tOIWhr5uZUez+PGpdfBHDWQOfhOrr0cgKDagZPwk= code.cloudfoundry.org/tlsconfig v0.0.0-20220621140725-0e6fbd869921 h1:1PLAuQR56K2pw0lnlcXe+37uOaGg939W1Lqv8wxYpu4= @@ -2119,8 +2119,9 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From a4fe176a02d65bcd89d33ed74cb9cbebcaae347f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 18 Jul 2023 04:54:22 +0000 Subject: [PATCH 034/294] chore(deps): update dependency bosh-bootloader to v9.0.10 (#1966) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/dockerfiles/autoscaler-deploy/Dockerfile | 2 +- ci/dockerfiles/autoscaler-tools/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/dockerfiles/autoscaler-deploy/Dockerfile b/ci/dockerfiles/autoscaler-deploy/Dockerfile index 0e6bdcecbe..cb507b6eb3 100644 --- a/ci/dockerfiles/autoscaler-deploy/Dockerfile +++ b/ci/dockerfiles/autoscaler-deploy/Dockerfile @@ -53,7 +53,7 @@ RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_V # Install bbl # renovate: datasource=github-releases depName=bosh-bootloader lookupName=cloudfoundry/bosh-bootloader -ENV BBL_VERSION v9.0.9 +ENV BBL_VERSION v9.0.10 RUN wget -q https://github.com/cloudfoundry/bosh-bootloader/releases/download/${BBL_VERSION}/bbl-${BBL_VERSION}_linux_amd64 && \ mv bbl-* /usr/local/bin/bbl && \ chmod +x /usr/local/bin/bbl diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index a6f5dcde0c..34fafb2c4a 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -69,7 +69,7 @@ RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_V # Install bbl # renovate: datasource=github-releases depName=bosh-bootloader lookupName=cloudfoundry/bosh-bootloader -ARG BBL_VERSION=v9.0.9 +ARG BBL_VERSION=v9.0.10 RUN wget -q https://github.com/cloudfoundry/bosh-bootloader/releases/download/${BBL_VERSION}/bbl-${BBL_VERSION}_linux_amd64 && \ mv bbl-* /usr/local/bin/bbl &&\ chmod +x /usr/local/bin/bbl &&\ From 90830bcb766b64179d86c9bdbb41dd916e826359 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Jul 2023 02:30:06 +0000 Subject: [PATCH 035/294] Bump mysql-connector-j from 8.0.33 to 8.1.0 in /src (#1972) Bumps [mysql-connector-j](https://github.com/mysql/mysql-connector-j) from 8.0.33 to 8.1.0. - [Changelog](https://github.com/mysql/mysql-connector-j/blob/release/8.x/CHANGES) - [Commits](https://github.com/mysql/mysql-connector-j/compare/8.0.33...8.1.0) --- updated-dependencies: - dependency-name: com.mysql:mysql-connector-j dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/scheduler/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scheduler/pom.xml b/src/scheduler/pom.xml index 9b1d88d209..65958ca6fc 100644 --- a/src/scheduler/pom.xml +++ b/src/scheduler/pom.xml @@ -83,7 +83,7 @@ com.mysql mysql-connector-j - 8.0.33 + 8.1.0 org.apache.commons From a107ab06e07ccbd0aa5b526c6ff128123b7e4f8e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 19 Jul 2023 03:35:10 +0000 Subject: [PATCH 036/294] chore(deps): update dependency terragrunt to v0.48.3 (#1970) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 542366bb9d..3538b5e8fb 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.2 python 3.11.4 terraform 1.5.3 terraform-lsp -terragrunt 0.48.2 +terragrunt 0.48.3 From 649c85f35c457cb5f17676650ffded980d35d003 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Jul 2023 01:56:31 +0000 Subject: [PATCH 037/294] chore(deps): update dependency credhub-cli to v2.9.18 (#1976) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/dockerfiles/autoscaler-deploy/Dockerfile | 2 +- ci/dockerfiles/autoscaler-tools/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/dockerfiles/autoscaler-deploy/Dockerfile b/ci/dockerfiles/autoscaler-deploy/Dockerfile index cb507b6eb3..2465c174d1 100644 --- a/ci/dockerfiles/autoscaler-deploy/Dockerfile +++ b/ci/dockerfiles/autoscaler-deploy/Dockerfile @@ -60,7 +60,7 @@ RUN wget -q https://github.com/cloudfoundry/bosh-bootloader/releases/download/${ # Install credhub # renovate: datasource=github-releases depName=credhub-cli lookupName=cloudfoundry/credhub-cli -ENV CREDHUB_VERSION 2.9.17 +ENV CREDHUB_VERSION 2.9.18 RUN wget -q https://github.com/cloudfoundry-incubator/credhub-cli/releases/download/${CREDHUB_VERSION}/credhub-linux-${CREDHUB_VERSION}.tgz && \ tar xvfz credhub-linux-${CREDHUB_VERSION}.tgz && \ mv credhub /usr/local/bin/credhub diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index 34fafb2c4a..e5b84815cb 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -77,7 +77,7 @@ RUN wget -q https://github.com/cloudfoundry/bosh-bootloader/releases/download/${ # Install credhub # renovate: datasource=github-releases depName=credhub-cli lookupName=cloudfoundry/credhub-cli -ARG CREDHUB_VERSION=2.9.17 +ARG CREDHUB_VERSION=2.9.18 RUN wget -q https://github.com/cloudfoundry/credhub-cli/releases/download/${CREDHUB_VERSION}/credhub-linux-${CREDHUB_VERSION}.tgz && \ tar xvfz credhub-linux-${CREDHUB_VERSION}.tgz && \ mv credhub /usr/local/bin/credhub &&\ From 6233d20e3907bef14da2927a40bf254c3b0f5ef1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Jul 2023 03:02:18 +0000 Subject: [PATCH 038/294] chore(deps): update dependency terragrunt to v0.48.4 (#1977) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 3538b5e8fb..0fce15074b 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.2 python 3.11.4 terraform 1.5.3 terraform-lsp -terragrunt 0.48.3 +terragrunt 0.48.4 From 985dedb5edef5385eb5dc97733c114eac2dcf779 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Jul 2023 03:40:31 +0000 Subject: [PATCH 039/294] chore(deps): update google/cloud-sdk docker tag to v439 (#1975) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- ci/terragrunt/.tool-versions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.tool-versions b/.tool-versions index 4773fee2fb..1831b51c17 100644 --- a/.tool-versions +++ b/.tool-versions @@ -4,7 +4,7 @@ bosh 7.3.1 cf 8.7.1 concourse 7.9.1 direnv 2.32.3 -gcloud 438.0.0 +gcloud 439.0.0 ginkgo 2.11.0 golang 1.20.5 golangci-lint 1.53.3 diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 0fce15074b..949735da2c 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,4 +1,4 @@ -gcloud 438.0.0 +gcloud 439.0.0 helm 3.12.2 python 3.11.4 terraform 1.5.3 From 7ab06eb5af283f0f31b9dfae3a277b01c1025efd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 21 Jul 2023 01:32:40 +0000 Subject: [PATCH 040/294] fix(deps): update module github.com/go-faster/jx to v1.0.1 (#1980) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 2 +- src/acceptance/assets/app/go_app/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index db41656aad..12bb5c8c3a 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -8,7 +8,7 @@ require ( github.com/gin-contrib/zap v0.1.0 github.com/gin-gonic/gin v1.9.1 github.com/go-faster/errors v0.6.1 - github.com/go-faster/jx v1.0.0 + github.com/go-faster/jx v1.0.1 github.com/go-logr/logr v1.2.4 github.com/go-logr/zapr v1.2.4 github.com/json-iterator/go v1.1.12 diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index a86f7d5ccf..d8ae44cd6e 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -32,8 +32,8 @@ github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/go-faster/errors v0.6.1 h1:nNIPOBkprlKzkThvS/0YaX8Zs9KewLCOSFQS5BU06FI= github.com/go-faster/errors v0.6.1/go.mod h1:5MGV2/2T9yvlrbhe9pD9LO5Z/2zCSq2T8j+Jpi2LAyY= -github.com/go-faster/jx v1.0.0 h1:HE+ms2e6ZGkZ6u13t8u+onBinrPvIPI+0hWXGELm74g= -github.com/go-faster/jx v1.0.0/go.mod h1:zm8SlkwK+H0TYNKYtVJ/7cWFS7soJBQWhcPctKyYL/4= +github.com/go-faster/jx v1.0.1 h1:NhSJEZtqj6KmXf63On7Hg7/sjUX+gotSc/eM6bZCZ00= +github.com/go-faster/jx v1.0.1/go.mod h1:vKDNikrKoyUmpzaJ0OkIkRQClNHFX/nF3dnTJZb3skg= github.com/go-faster/yaml v0.4.6 h1:lOK/EhI04gCpPgPhgt0bChS6bvw7G3WwI8xxVe0sw9I= github.com/go-faster/yaml v0.4.6/go.mod h1:390dRIvV4zbnO7qC9FGo6YYutc+wyyUSHBgbXL52eXk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= From 4a27099b7179589f8ec0ee58611c8a10b32da6cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Jul 2023 01:56:03 +0000 Subject: [PATCH 041/294] Bump org.springframework.boot:spring-boot-starter-parent in /src (#1981) Bumps [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) from 3.1.1 to 3.1.2. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](https://github.com/spring-projects/spring-boot/compare/v3.1.1...v3.1.2) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter-parent dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/scheduler/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scheduler/pom.xml b/src/scheduler/pom.xml index 65958ca6fc..db265ef7bd 100644 --- a/src/scheduler/pom.xml +++ b/src/scheduler/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 3.1.1 + 3.1.2 From 748dfba3c98a2fc59cdcc7e796b1895db81d9454 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 21 Jul 2023 02:45:15 +0000 Subject: [PATCH 042/294] chore(deps): update dependency java to v17.0.8+7 (#1978) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index 1831b51c17..ae38d6003a 100644 --- a/.tool-versions +++ b/.tool-versions @@ -8,7 +8,7 @@ gcloud 439.0.0 ginkgo 2.11.0 golang 1.20.5 golangci-lint 1.53.3 -java temurin-17.0.7+7 +java temurin-17.0.8+7 make 4.4 maven 3.8.6 ruby 3.2.1 From 446bd51996ce5ec2b88591a3a8a3c94db1b291b7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 03:03:15 +0000 Subject: [PATCH 043/294] Bump github.com/onsi/gomega from 1.27.8 to 1.27.9 in /src/acceptance (#1985) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.27.8 to 1.27.9. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.27.8...v1.27.9) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/acceptance/go.mod | 8 ++++---- src/acceptance/go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/acceptance/go.mod b/src/acceptance/go.mod index c55684af06..f55e867339 100644 --- a/src/acceptance/go.mod +++ b/src/acceptance/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/cloudfoundry/cf-test-helpers/v2 v2.5.0 github.com/onsi/ginkgo/v2 v2.11.0 - github.com/onsi/gomega v1.27.8 + github.com/onsi/gomega v1.27.9 github.com/stretchr/testify v1.8.4 ) @@ -18,9 +18,9 @@ require ( github.com/kr/pretty v0.3.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.0 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.9.0 // indirect - golang.org/x/text v0.9.0 // indirect + golang.org/x/net v0.12.0 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect golang.org/x/tools v0.9.3 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect diff --git a/src/acceptance/go.sum b/src/acceptance/go.sum index cf8041c550..50f2893c87 100644 --- a/src/acceptance/go.sum +++ b/src/acceptance/go.sum @@ -25,8 +25,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= -github.com/onsi/gomega v1.27.8 h1:gegWiwZjBsf2DgiSbf5hpokZ98JVDMcWkUiigk6/KXc= -github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJKFnNQ= +github.com/onsi/gomega v1.27.9 h1:qIyVWbOsvQEye2QCqLsNSeH/5L1RS9vS382erEWfT3o= +github.com/onsi/gomega v1.27.9/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -38,12 +38,12 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 7b0327128ecd6988a3a08b9df37bd2ad8b2942a4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 04:39:17 +0000 Subject: [PATCH 044/294] chore(deps): lock file maintenance (#1983) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .../github-arc-team-wg-ci/.terraform.lock.hcl | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl index 2521633674..ba31ca9a59 100644 --- a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl +++ b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl @@ -19,19 +19,19 @@ provider "registry.terraform.io/gavinbunney/kubectl" { } provider "registry.terraform.io/hashicorp/google" { - version = "4.73.1" + version = "4.74.0" hashes = [ - "h1:1tQTQ8WgYmbvGmO6xBt4N/6QmsAqA12aVl22SwNysME=", - "h1:3nYxqQW1zGZi8nvd4BWxRRQQWntP7QraI3AzbOzuDDU=", - "h1:CPbsNpG33pXuwRBxglmCWJPiWNs7tD7Jz7MFPxBoG3s=", - "h1:E1WsKbfr/KLbk1Cun5/U+g2LHMT4nv6HpET2YAF7XUI=", - "h1:KpT046IMZ7pPszCdIpZOGjD5lexVp+cxuXO4vMGopy8=", - "h1:PIK2NvCT2m/c8a7kq+GwiKY5+k79gxEDr+DgkX/2+Ns=", - "h1:WjUV/k3TC5KAseJCNIoigqFme/bQFA5UsB3k6ZLr5j0=", - "h1:XcITgi++JlgoKrodjLPM032V1p5tF+XD5xd/SIfPh0w=", - "h1:aFUdo4C0ZB4Z9/UpWYA9bimCwd398uCoiyHjtWKnZ5o=", - "h1:bkCccFfNOTtzDMCe2JBw3bSr3MXJHW6lc/v3UuHlatM=", - "h1:zIFLcmpKcifHyhkntXfJKyy3DBd3WQaVAVCTpwWd0Aw=", + "h1:5EPi8zhqM9lF2xWk/xRuZ0PaV59HEQaOF36cIZQLj2w=", + "h1:6o1AeQ0WMEqiUyN85wjPIT2oT8S4oEe1ExTgieJMsRg=", + "h1:81RXtzbGWXX1Q8K302EvwiSVF54bZQDRLiLK+QoEPRk=", + "h1:CaKjcuh/pLWUwyJcGVQsvAzoul2oXIHqptLMFsk3Ukc=", + "h1:Pwzu+F8lAjyZsW/F4zqfR7l55/maouvr9HAS0ueiQjY=", + "h1:WazqiKdNsMSDEIyNBNT9rIY99jN2eWuiE6qMfKAZTpY=", + "h1:f9xumoPtChQGSSbTloTIt1ATbn2QMJtH9b0NyAuQotg=", + "h1:ghkjuvUrHsIlzjNL5KRsYZcP3R9BoFRfb0q069BXBi4=", + "h1:sod0KZScwUDWiOEEBY7JSXj8kNxiP8wPjqpAauiaTeI=", + "h1:uBwD7Uvo8SEwDWHluhDhA8zt5Dug5TwYG7Y9xbw9MiM=", + "h1:wZ7MBoMOUu7GCcM6Gqz8yZBtOigpWXAD371zTBktZho=", ] } From 309de29ae035355fd0738ec0e049f8d97e658ab1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 04:58:10 +0000 Subject: [PATCH 045/294] Bump github.com/onsi/gomega in /src/changeloglockcleaner (#1987) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.27.8 to 1.27.9. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.27.8...v1.27.9) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/changeloglockcleaner/go.mod | 10 +++++----- src/changeloglockcleaner/go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/changeloglockcleaner/go.mod b/src/changeloglockcleaner/go.mod index 6ad13b5340..7102beb90d 100644 --- a/src/changeloglockcleaner/go.mod +++ b/src/changeloglockcleaner/go.mod @@ -7,7 +7,7 @@ require ( github.com/jackc/pgx/v5 v5.4.2 github.com/jmoiron/sqlx v1.3.5 github.com/onsi/ginkgo/v2 v2.11.0 - github.com/onsi/gomega v1.27.8 + github.com/onsi/gomega v1.27.9 ) require ( @@ -19,10 +19,10 @@ require ( github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect github.com/kr/text v0.2.0 // indirect github.com/rogpeppe/go-internal v1.9.0 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.9.0 // indirect - golang.org/x/text v0.9.0 // indirect + golang.org/x/crypto v0.11.0 // indirect + golang.org/x/net v0.12.0 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect golang.org/x/tools v0.9.3 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/src/changeloglockcleaner/go.sum b/src/changeloglockcleaner/go.sum index 2bc2d008d4..a392537d84 100644 --- a/src/changeloglockcleaner/go.sum +++ b/src/changeloglockcleaner/go.sum @@ -35,8 +35,8 @@ github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRU github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= -github.com/onsi/gomega v1.27.8 h1:gegWiwZjBsf2DgiSbf5hpokZ98JVDMcWkUiigk6/KXc= -github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJKFnNQ= +github.com/onsi/gomega v1.27.9 h1:qIyVWbOsvQEye2QCqLsNSeH/5L1RS9vS382erEWfT3o= +github.com/onsi/gomega v1.27.9/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= @@ -46,16 +46,16 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= From c36250687987f4f2c919784a049e6450832d859d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 05:40:53 +0000 Subject: [PATCH 046/294] fix(deps): update module github.com/onsi/gomega to v1.27.9 (#1984) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 2 +- src/acceptance/assets/app/go_app/go.sum | 4 ++-- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index 12bb5c8c3a..e5caf71044 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -16,7 +16,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/ogen-go/ogen v0.71.1 github.com/onsi/ginkgo/v2 v2.11.0 - github.com/onsi/gomega v1.27.8 + github.com/onsi/gomega v1.27.9 github.com/prometheus/procfs v0.11.0 github.com/steinfletcher/apitest v1.5.15 go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.42.0 diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index d8ae44cd6e..d4d0d3ef75 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -117,8 +117,8 @@ github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.27.8 h1:gegWiwZjBsf2DgiSbf5hpokZ98JVDMcWkUiigk6/KXc= -github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJKFnNQ= +github.com/onsi/gomega v1.27.9 h1:qIyVWbOsvQEye2QCqLsNSeH/5L1RS9vS382erEWfT3o= +github.com/onsi/gomega v1.27.9/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 418eaa9dea..2ff961a076 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -23,7 +23,7 @@ require ( github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2 github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d github.com/onsi/ginkgo/v2 v2.11.0 - github.com/onsi/gomega v1.27.8 + github.com/onsi/gomega v1.27.9 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pivotal-cf/brokerapi/v10 v10.0.0 github.com/pkg/errors v0.9.1 diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index cf3e95ef0a..1cf0a97eda 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1182,8 +1182,8 @@ github.com/onsi/gomega v1.27.1/go.mod h1:aHX5xOykVYzWOV4WqQy0sy8BQptgukenXpCXfad github.com/onsi/gomega v1.27.3/go.mod h1:5vG284IBtfDAmDyrK+eGyZmUgUlmi+Wngqo557cZ6Gw= github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= -github.com/onsi/gomega v1.27.8 h1:gegWiwZjBsf2DgiSbf5hpokZ98JVDMcWkUiigk6/KXc= -github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJKFnNQ= +github.com/onsi/gomega v1.27.9 h1:qIyVWbOsvQEye2QCqLsNSeH/5L1RS9vS382erEWfT3o= +github.com/onsi/gomega v1.27.9/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/openzipkin/zipkin-go v0.4.1 h1:kNd/ST2yLLWhaWrkgchya40TJabe8Hioj9udfPcEO5A= github.com/openzipkin/zipkin-go v0.4.1/go.mod h1:qY0VqDSN1pOBN94dBc6w2GJlWLiovAyg7Qt6/I9HecM= github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k= From eef9dc3c6c0e431fc9ebfe8d8eadbc32a808673b Mon Sep 17 00:00:00 2001 From: app-autoscaler-ci-bot <89513836+app-autoscaler-ci-bot@users.noreply.github.com> Date: Mon, 24 Jul 2023 09:39:18 +0200 Subject: [PATCH 047/294] Update java version to 17.0.8_7 (#1982) --- .final_builds/packages/openjdk-17/index.yml | 4 ++++ packages/openjdk-17/spec.lock | 2 +- packages/openjdk-17/vendored-commit | 2 +- packages/openjdk-17/version | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.final_builds/packages/openjdk-17/index.yml b/.final_builds/packages/openjdk-17/index.yml index 6ac93fe9bd..9dd34e208f 100644 --- a/.final_builds/packages/openjdk-17/index.yml +++ b/.final_builds/packages/openjdk-17/index.yml @@ -15,4 +15,8 @@ builds: version: a1170a67f8927cb1861ceafbd406c8bd3ec2494f97fa9248c07e818ef7a016f2 blobstore_id: d7cc5f49-b426-4874-5eb6-654d9ef52f9b sha1: sha256:79c73943cffbcaf0ec06678ea4ec0d6301954a895cbe9579b15810942b79ac4f + c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0: + version: c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0 + blobstore_id: 68d1befc-806d-486a-4bc6-1d046ee71a30 + sha1: sha256:ad449f24f5a9e6971b8c9e3bb8e9500bbd5115a6872d3b95d8e0d96a60e896ed format-version: "2" diff --git a/packages/openjdk-17/spec.lock b/packages/openjdk-17/spec.lock index 6e649cf122..108af39991 100644 --- a/packages/openjdk-17/spec.lock +++ b/packages/openjdk-17/spec.lock @@ -1,2 +1,2 @@ name: openjdk-17 -fingerprint: 442aa95884826ac0ec2f1d5414c39b84e336b87e26691e60fb1fd4c1d4cbb800 +fingerprint: c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0 diff --git a/packages/openjdk-17/vendored-commit b/packages/openjdk-17/vendored-commit index 321295b351..1bf9fab151 100644 --- a/packages/openjdk-17/vendored-commit +++ b/packages/openjdk-17/vendored-commit @@ -1 +1 @@ -cfc2910f5ffb2d44d525c297d11c9197178373e5 +b02493b9ad862dca644282da212f293c636ef291 diff --git a/packages/openjdk-17/version b/packages/openjdk-17/version index ab56cb2eca..70302b9400 100644 --- a/packages/openjdk-17/version +++ b/packages/openjdk-17/version @@ -1 +1 @@ -17.0.7_7 \ No newline at end of file +17.0.8_7 \ No newline at end of file From 84b94b96c78788ab49c2030c9ffa7216c0831ca2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 25 Jul 2023 02:02:31 +0000 Subject: [PATCH 048/294] fix(deps): update module github.com/onsi/gomega to v1.27.10 (#1991) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 2 +- src/acceptance/assets/app/go_app/go.sum | 4 ++-- src/acceptance/go.mod | 2 +- src/acceptance/go.sum | 4 ++-- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- src/changeloglockcleaner/go.mod | 2 +- src/changeloglockcleaner/go.sum | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index e5caf71044..b6da30706b 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -16,7 +16,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/ogen-go/ogen v0.71.1 github.com/onsi/ginkgo/v2 v2.11.0 - github.com/onsi/gomega v1.27.9 + github.com/onsi/gomega v1.27.10 github.com/prometheus/procfs v0.11.0 github.com/steinfletcher/apitest v1.5.15 go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.42.0 diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index d4d0d3ef75..4c5665b29a 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -117,8 +117,8 @@ github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.27.9 h1:qIyVWbOsvQEye2QCqLsNSeH/5L1RS9vS382erEWfT3o= -github.com/onsi/gomega v1.27.9/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= diff --git a/src/acceptance/go.mod b/src/acceptance/go.mod index f55e867339..42b5c4f3a8 100644 --- a/src/acceptance/go.mod +++ b/src/acceptance/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/cloudfoundry/cf-test-helpers/v2 v2.5.0 github.com/onsi/ginkgo/v2 v2.11.0 - github.com/onsi/gomega v1.27.9 + github.com/onsi/gomega v1.27.10 github.com/stretchr/testify v1.8.4 ) diff --git a/src/acceptance/go.sum b/src/acceptance/go.sum index 50f2893c87..085564218e 100644 --- a/src/acceptance/go.sum +++ b/src/acceptance/go.sum @@ -25,8 +25,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= -github.com/onsi/gomega v1.27.9 h1:qIyVWbOsvQEye2QCqLsNSeH/5L1RS9vS382erEWfT3o= -github.com/onsi/gomega v1.27.9/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 2ff961a076..a67919fcf0 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -23,7 +23,7 @@ require ( github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2 github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d github.com/onsi/ginkgo/v2 v2.11.0 - github.com/onsi/gomega v1.27.9 + github.com/onsi/gomega v1.27.10 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pivotal-cf/brokerapi/v10 v10.0.0 github.com/pkg/errors v0.9.1 diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index 1cf0a97eda..825c22bed4 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1182,8 +1182,8 @@ github.com/onsi/gomega v1.27.1/go.mod h1:aHX5xOykVYzWOV4WqQy0sy8BQptgukenXpCXfad github.com/onsi/gomega v1.27.3/go.mod h1:5vG284IBtfDAmDyrK+eGyZmUgUlmi+Wngqo557cZ6Gw= github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= -github.com/onsi/gomega v1.27.9 h1:qIyVWbOsvQEye2QCqLsNSeH/5L1RS9vS382erEWfT3o= -github.com/onsi/gomega v1.27.9/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/openzipkin/zipkin-go v0.4.1 h1:kNd/ST2yLLWhaWrkgchya40TJabe8Hioj9udfPcEO5A= github.com/openzipkin/zipkin-go v0.4.1/go.mod h1:qY0VqDSN1pOBN94dBc6w2GJlWLiovAyg7Qt6/I9HecM= github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k= diff --git a/src/changeloglockcleaner/go.mod b/src/changeloglockcleaner/go.mod index 7102beb90d..6397f35f04 100644 --- a/src/changeloglockcleaner/go.mod +++ b/src/changeloglockcleaner/go.mod @@ -7,7 +7,7 @@ require ( github.com/jackc/pgx/v5 v5.4.2 github.com/jmoiron/sqlx v1.3.5 github.com/onsi/ginkgo/v2 v2.11.0 - github.com/onsi/gomega v1.27.9 + github.com/onsi/gomega v1.27.10 ) require ( diff --git a/src/changeloglockcleaner/go.sum b/src/changeloglockcleaner/go.sum index a392537d84..716ddf1e62 100644 --- a/src/changeloglockcleaner/go.sum +++ b/src/changeloglockcleaner/go.sum @@ -35,8 +35,8 @@ github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRU github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= -github.com/onsi/gomega v1.27.9 h1:qIyVWbOsvQEye2QCqLsNSeH/5L1RS9vS382erEWfT3o= -github.com/onsi/gomega v1.27.9/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= From 091951e03665e673fae2a972913c8067cd880e1d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 25 Jul 2023 02:03:11 +0000 Subject: [PATCH 049/294] fix(deps): update golang.org/x/exp digest to d98519c (#1990) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 2 +- src/acceptance/assets/app/go_app/go.sum | 4 ++-- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index b6da30706b..f228cc72e2 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -25,7 +25,7 @@ require ( go.opentelemetry.io/otel/metric v1.16.0 go.opentelemetry.io/otel/trace v1.16.0 go.uber.org/zap v1.24.0 - golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 + golang.org/x/exp v0.0.0-20230724220655-d98519c11495 ) require ( diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index 4c5665b29a..1f609f4e52 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -189,8 +189,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230724220655-d98519c11495 h1:zKGKw2WlGb8oPoRGqQ2PT8g2YoCN1w/YbbQjHXCdUWE= +golang.org/x/exp v0.0.0-20230724220655-d98519c11495/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index a67919fcf0..7308785f9f 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -35,7 +35,7 @@ require ( github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26 github.com/xeipuuv/gojsonschema v1.2.0 golang.org/x/crypto v0.11.0 - golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 + golang.org/x/exp v0.0.0-20230724220655-d98519c11495 golang.org/x/net v0.12.0 golang.org/x/time v0.3.0 google.golang.org/grpc v1.56.2 diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index 825c22bed4..4f929acfe0 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1455,8 +1455,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230724220655-d98519c11495 h1:zKGKw2WlGb8oPoRGqQ2PT8g2YoCN1w/YbbQjHXCdUWE= +golang.org/x/exp v0.0.0-20230724220655-d98519c11495/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 h1:J74nGeMgeFnYQJN59eFwh06jX/V8g0lB7LWpjSLxtgU= From f383492dff5d94d3349080daf5427572868def19 Mon Sep 17 00:00:00 2001 From: app-autoscaler-ci-bot <89513836+app-autoscaler-ci-bot@users.noreply.github.com> Date: Tue, 25 Jul 2023 09:38:29 +0200 Subject: [PATCH 050/294] Update java version to 17.0.8_7 (#1989) --- packages/openjdk-17/vendored-commit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/openjdk-17/vendored-commit b/packages/openjdk-17/vendored-commit index 1bf9fab151..6946a66275 100644 --- a/packages/openjdk-17/vendored-commit +++ b/packages/openjdk-17/vendored-commit @@ -1 +1 @@ -b02493b9ad862dca644282da212f293c636ef291 +b543b521837b3363065fcc2565f500e9cafef0b0 From 2786db7ae766918eef1816a768de25086a7056b2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 26 Jul 2023 00:58:37 +0000 Subject: [PATCH 051/294] chore(deps): update dependency rspec-file_fixtures to v0.1.8 (#1993) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile | 2 +- Gemfile.lock | 4 ++-- jobs/Gemfile | 2 +- jobs/Gemfile.lock | 4 ++-- spec/Gemfile | 2 +- spec/Gemfile.lock | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Gemfile b/Gemfile index 7496261caf..40b6edc590 100644 --- a/Gemfile +++ b/Gemfile @@ -5,5 +5,5 @@ group :development, :test do gem "rspec" gem "rspec-its" gem "standard" - gem "rspec-file_fixtures", "0.1.7" + gem "rspec-file_fixtures", "0.1.8" end diff --git a/Gemfile.lock b/Gemfile.lock index 4d4430f9ab..0daaeeea58 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -25,7 +25,7 @@ GEM rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-file_fixtures (0.1.7) + rspec-file_fixtures (0.1.8) rspec (~> 3.12) rspec-its (1.3.0) rspec-core (>= 3.0.0) @@ -71,7 +71,7 @@ PLATFORMS DEPENDENCIES bosh-template rspec - rspec-file_fixtures (= 0.1.7) + rspec-file_fixtures (= 0.1.8) rspec-its standard diff --git a/jobs/Gemfile b/jobs/Gemfile index 7496261caf..40b6edc590 100644 --- a/jobs/Gemfile +++ b/jobs/Gemfile @@ -5,5 +5,5 @@ group :development, :test do gem "rspec" gem "rspec-its" gem "standard" - gem "rspec-file_fixtures", "0.1.7" + gem "rspec-file_fixtures", "0.1.8" end diff --git a/jobs/Gemfile.lock b/jobs/Gemfile.lock index 4d4430f9ab..0daaeeea58 100644 --- a/jobs/Gemfile.lock +++ b/jobs/Gemfile.lock @@ -25,7 +25,7 @@ GEM rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-file_fixtures (0.1.7) + rspec-file_fixtures (0.1.8) rspec (~> 3.12) rspec-its (1.3.0) rspec-core (>= 3.0.0) @@ -71,7 +71,7 @@ PLATFORMS DEPENDENCIES bosh-template rspec - rspec-file_fixtures (= 0.1.7) + rspec-file_fixtures (= 0.1.8) rspec-its standard diff --git a/spec/Gemfile b/spec/Gemfile index 8eab49efd4..0d35c053cd 100644 --- a/spec/Gemfile +++ b/spec/Gemfile @@ -4,5 +4,5 @@ group :development, :test do gem "rspec" gem "rspec-its" gem "standard" - gem "rspec-file_fixtures", "0.1.7" + gem "rspec-file_fixtures", "0.1.8" end diff --git a/spec/Gemfile.lock b/spec/Gemfile.lock index 3e0e6a900c..cfaf2a3291 100644 --- a/spec/Gemfile.lock +++ b/spec/Gemfile.lock @@ -25,7 +25,7 @@ GEM rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-file_fixtures (0.1.7) + rspec-file_fixtures (0.1.8) rspec (~> 3.12) rspec-its (1.3.0) rspec-core (>= 3.0.0) @@ -72,7 +72,7 @@ PLATFORMS DEPENDENCIES bosh-template rspec - rspec-file_fixtures (= 0.1.7) + rspec-file_fixtures (= 0.1.8) rspec-its standard From fa73c5b6b8e2e44ffec2cf2380811462a238565a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 26 Jul 2023 00:58:44 +0000 Subject: [PATCH 052/294] chore(deps): update google/cloud-sdk docker tag to v440 (#1994) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- ci/terragrunt/.tool-versions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.tool-versions b/.tool-versions index ae38d6003a..ae099e1fe1 100644 --- a/.tool-versions +++ b/.tool-versions @@ -4,7 +4,7 @@ bosh 7.3.1 cf 8.7.1 concourse 7.9.1 direnv 2.32.3 -gcloud 439.0.0 +gcloud 440.0.0 ginkgo 2.11.0 golang 1.20.5 golangci-lint 1.53.3 diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 949735da2c..8fff431f7f 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,4 +1,4 @@ -gcloud 439.0.0 +gcloud 440.0.0 helm 3.12.2 python 3.11.4 terraform 1.5.3 From 94c627760ae407d8e092984b8fbb5d2cf78642a9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 27 Jul 2023 02:59:26 +0000 Subject: [PATCH 053/294] chore(deps): update dependency terraform to v1.5.4 (#1995) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 8fff431f7f..f8f0c8d2f2 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,6 +1,6 @@ gcloud 440.0.0 helm 3.12.2 python 3.11.4 -terraform 1.5.3 +terraform 1.5.4 terraform-lsp terragrunt 0.48.4 From dba807222a4433d98cec372c5851081f35d8a90f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 27 Jul 2023 03:00:37 +0000 Subject: [PATCH 054/294] fix(deps): update module github.com/prometheus/procfs to v0.11.1 (#1996) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 2 +- src/acceptance/assets/app/go_app/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index f228cc72e2..9b21962d72 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -17,7 +17,7 @@ require ( github.com/ogen-go/ogen v0.71.1 github.com/onsi/ginkgo/v2 v2.11.0 github.com/onsi/gomega v1.27.10 - github.com/prometheus/procfs v0.11.0 + github.com/prometheus/procfs v0.11.1 github.com/steinfletcher/apitest v1.5.15 go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.42.0 go.opentelemetry.io/contrib/propagators/b3 v1.17.0 diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index 1f609f4e52..358fb2701d 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -128,8 +128,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= -github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= +github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= From f01fae3048956933ea35a70a2b98d48c472f0ac0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Jul 2023 03:39:01 +0000 Subject: [PATCH 055/294] Bump google.golang.org/grpc from 1.56.2 to 1.57.0 in /src/autoscaler (#1997) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.56.2 to 1.57.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.56.2...v1.57.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/autoscaler/go.mod | 6 ++++-- src/autoscaler/go.sum | 11 ++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 7308785f9f..4a2c4e4e7c 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -38,7 +38,7 @@ require ( golang.org/x/exp v0.0.0-20230724220655-d98519c11495 golang.org/x/net v0.12.0 golang.org/x/time v0.3.0 - google.golang.org/grpc v1.56.2 + google.golang.org/grpc v1.57.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -230,7 +230,9 @@ require ( golang.org/x/term v0.10.0 // indirect golang.org/x/text v0.11.0 // indirect golang.org/x/tools v0.9.3 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect + google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index 4f929acfe0..940c61f8c9 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -2055,8 +2055,13 @@ google.golang.org/genproto v0.0.0-20230320184635-7606e756e683/go.mod h1:NWraEVix google.golang.org/genproto v0.0.0-20230323212658-478b75c54725/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= google.golang.org/genproto v0.0.0-20230330154414-c0448cd141ea/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= +google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 h1:9NWlQfY2ePejTmfwUH1OWwmznFa+0kKcHGPDvcPza9M= +google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= +google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 h1:m8v1xLLLzMe1m5P+gCTF8nJB9epwZQUBERm20Oy1poQ= +google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -2099,8 +2104,8 @@ google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5v google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= -google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= +google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/examples v0.0.0-20230512210959-5dcfb37c0b43/go.mod h1:irORyHPQXotoshbRTZVFvPDcfTfFHL23efQeop+H45M= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= From f13d4824afbff743762668232772eabbf28f2e0e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 27 Jul 2023 04:27:21 +0000 Subject: [PATCH 056/294] fix(deps): update module github.com/ogen-go/ogen to v0.72.0 (#1998) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 4 ++-- src/acceptance/assets/app/go_app/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index 9b21962d72..84c30c76a2 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -14,7 +14,7 @@ require ( github.com/json-iterator/go v1.1.12 github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2 github.com/mitchellh/mapstructure v1.5.0 - github.com/ogen-go/ogen v0.71.1 + github.com/ogen-go/ogen v0.72.0 github.com/onsi/ginkgo/v2 v2.11.0 github.com/onsi/gomega v1.27.10 github.com/prometheus/procfs v0.11.1 @@ -25,7 +25,7 @@ require ( go.opentelemetry.io/otel/metric v1.16.0 go.opentelemetry.io/otel/trace v1.16.0 go.uber.org/zap v1.24.0 - golang.org/x/exp v0.0.0-20230724220655-d98519c11495 + golang.org/x/exp v0.0.0-20230725093048-515e97ebf090 ) require ( diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index 358fb2701d..5c3dc8ac76 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -109,8 +109,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/ogen-go/ogen v0.71.1 h1:X/TYjyi5XkXpuvLCRQYbPF/T4VJ/bjBNjdcW8ZW+NK0= -github.com/ogen-go/ogen v0.71.1/go.mod h1:DN3Tv8Zqla1f0JYUANyR7aEb9sRHwIwrxguv0pzVH6o= +github.com/ogen-go/ogen v0.72.0 h1:BmwbInSq2DRStoaEgF9od1da5bq1q+viZlwPS6qXQ1c= +github.com/ogen-go/ogen v0.72.0/go.mod h1:2SgZ9FRMXsuUhdTq23nFBFgMaXQl6yennmAnIs+hofM= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -189,8 +189,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/exp v0.0.0-20230724220655-d98519c11495 h1:zKGKw2WlGb8oPoRGqQ2PT8g2YoCN1w/YbbQjHXCdUWE= -golang.org/x/exp v0.0.0-20230724220655-d98519c11495/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230725093048-515e97ebf090 h1:Di6/M8l0O2lCLc6VVRWhgCiApHV8MnQurBnFSHsQtNY= +golang.org/x/exp v0.0.0-20230725093048-515e97ebf090/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= From fbf62c09eee63779f87feeb263c01d0ef543eaa9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 02:06:24 +0000 Subject: [PATCH 057/294] Bump com.puppycrawl.tools:checkstyle from 10.12.1 to 10.12.2 in /src (#2000) Bumps [com.puppycrawl.tools:checkstyle](https://github.com/checkstyle/checkstyle) from 10.12.1 to 10.12.2. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-10.12.1...checkstyle-10.12.2) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/scheduler/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scheduler/pom.xml b/src/scheduler/pom.xml index db265ef7bd..58877c92ed 100644 --- a/src/scheduler/pom.xml +++ b/src/scheduler/pom.xml @@ -189,7 +189,7 @@ com.puppycrawl.tools checkstyle - 10.12.1 + 10.12.2 From 4f786f702cfc3b251bb0b78856761ec218b93f29 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 03:19:16 +0000 Subject: [PATCH 058/294] chore(deps): update dependency terragrunt to v0.48.5 (#2003) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index f8f0c8d2f2..6ffafb47e8 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.2 python 3.11.4 terraform 1.5.4 terraform-lsp -terragrunt 0.48.4 +terragrunt 0.48.5 From dc41172ad7018e87d48f42011587d79ed6ee3601 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 04:10:16 +0000 Subject: [PATCH 059/294] chore(deps): lock file maintenance (#1999) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- .../github-arc-team-wg-ci/.terraform.lock.hcl | 54 +++++++++---------- jobs/Gemfile.lock | 2 +- spec/Gemfile.lock | 2 +- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0daaeeea58..3a0f84bb42 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -15,7 +15,7 @@ GEM racc (1.7.1) rainbow (3.1.1) regexp_parser (2.8.1) - rexml (3.2.5) + rexml (3.2.6) rspec (3.12.0) rspec-core (~> 3.12.0) rspec-expectations (~> 3.12.0) diff --git a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl index ba31ca9a59..83327891cb 100644 --- a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl +++ b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl @@ -19,19 +19,19 @@ provider "registry.terraform.io/gavinbunney/kubectl" { } provider "registry.terraform.io/hashicorp/google" { - version = "4.74.0" + version = "4.75.1" hashes = [ - "h1:5EPi8zhqM9lF2xWk/xRuZ0PaV59HEQaOF36cIZQLj2w=", - "h1:6o1AeQ0WMEqiUyN85wjPIT2oT8S4oEe1ExTgieJMsRg=", - "h1:81RXtzbGWXX1Q8K302EvwiSVF54bZQDRLiLK+QoEPRk=", - "h1:CaKjcuh/pLWUwyJcGVQsvAzoul2oXIHqptLMFsk3Ukc=", - "h1:Pwzu+F8lAjyZsW/F4zqfR7l55/maouvr9HAS0ueiQjY=", - "h1:WazqiKdNsMSDEIyNBNT9rIY99jN2eWuiE6qMfKAZTpY=", - "h1:f9xumoPtChQGSSbTloTIt1ATbn2QMJtH9b0NyAuQotg=", - "h1:ghkjuvUrHsIlzjNL5KRsYZcP3R9BoFRfb0q069BXBi4=", - "h1:sod0KZScwUDWiOEEBY7JSXj8kNxiP8wPjqpAauiaTeI=", - "h1:uBwD7Uvo8SEwDWHluhDhA8zt5Dug5TwYG7Y9xbw9MiM=", - "h1:wZ7MBoMOUu7GCcM6Gqz8yZBtOigpWXAD371zTBktZho=", + "h1:/1rLro+SVdSVQ4jMMKcuSqY7h+uz9uVsB+IkfW9g/A4=", + "h1:2K4P/XkGpfp6dYH8ObAF0Lsf9IW2/tj65KK514CEwSA=", + "h1:GU8+BFtpC3ynnL1uQ//MtYL/Af4jFGOxDTJcobuZLNY=", + "h1:L894XTxJTQhxwmNDUl9dn/mUYJeufkLfIqyHkeChZ6M=", + "h1:f4UBw7xRpUuYFyQJzoHePMB493tNvZMemKVl6VnNIIw=", + "h1:hSJW7FEwM1jU3n+BKiH5fHIQLIpRfBKMOGJfbJ9KJkU=", + "h1:kjT9YQEI/zC4yd+psrl4Ic8R8l4Ce5pLTsph9AMsTGw=", + "h1:ouOv7AJ/Xyf8Houn5DY2UeXC/rYyaXthi2j/htEECQM=", + "h1:rVXN8aaJQk28oai7+ikLwYgsnn3sR603kRwgPS/CtGI=", + "h1:seflsWvXwkZVEsp45Q9uhyoAPynJa3jjCxosx4ZCgY4=", + "h1:vBGr7p0vm2VUXf1Z/cW8RHKmgfHoEW0hD3VH12rrCs8=", ] } @@ -53,21 +53,21 @@ provider "registry.terraform.io/hashicorp/kubernetes" { } provider "registry.terraform.io/integrations/github" { - version = "5.31.0" + version = "5.32.0" hashes = [ - "h1:2gz1KxIUlXiou3Bil+kdkYJUNAU0Uh1L8H6JI8/LbRY=", - "h1:6pIaOFgk/2mqk507zSPzacyZiU6VV1GR0prbtdhxnaM=", - "h1:73f1cQN2fExYG78UL28xBBabI+8AjNrB6lsHPxP4JBA=", - "h1:7g1bhJ/UGzvjxSQ4wt1erkk0HMD1HMSYuGsseMqU5eA=", - "h1:FCMaj/B2Qm6TwyFltOOBtbwy4f90G7KbIyuGn/1JiUQ=", - "h1:TBJhZYNRdr5OOEmxSmxN8wM/4JAqnq0D8t91ZUIJsK4=", - "h1:V5y9CCs8rTG120/axACZWpkkl8MFp8bKFeXWM/tlaNQ=", - "h1:VPoL/2t4oqDHcAPURfmPz9k6tGxEctHUt3gaoxjYfUk=", - "h1:aBWMe1NWNo4XV0c2qPh4k3Sz+OCWLmag97vb/gN8GuM=", - "h1:exsbX95hgQ9hXFG0kHjH7V9aQ8eJHVG1poqsN8lC4T0=", - "h1:f6dVtPlj/aicpmePY8GyWQHdJQYQ0VzVRbrZLO9riK4=", - "h1:vrkktGyd2Wc5ZNi3ZXImuTtK4DlnSqOSx5O8rGMv6as=", - "h1:wLp7QdHF8rm9rgHMXvEincuQ1MQDxNPbtij+raRPz2c=", - "h1:xzw/A9odgXUdL2LWZHXy9D2V56BT4H8YeU86emBgRCs=", + "h1:1vPtnvpCxaWPUgUWScL9xka/CA06q69iKaaj6pmpAcg=", + "h1:2+ykRJOPosx0nlqrGPFcBLiP5rNurpP4miwbQMBFPYI=", + "h1:ALjQKDRxUCoNsAHuJkh/tsbgjskWF1cIFbqYIhrSzIw=", + "h1:Gyd+KNK/0/jxKwzHsLZkcd4uACV+bxV4JF5hnMDXM6c=", + "h1:P+NsNNmL7/mOlD5sGegogeQxG9SVotPd0p6biEs3z3o=", + "h1:TFDh3n6L2XSueODpdVVBXcwTIicQeZh4jnPeJeAZLsA=", + "h1:XhTVkbsAH4zoPwDuj23+TWAfzOcOcamlk8Q0AJVPIQE=", + "h1:Z829L+uWh6XVjrspL5kV42g6Eml63SaZh2GdDhQr69c=", + "h1:ZT3PBYcM3m867hYS7Kb4OHDNGLQBFw0ZTSFgC416VFw=", + "h1:enUQQ96z3R8U/Zz7L6CVYs8zIjmfJhv4YgpQK4spuXM=", + "h1:gTNCUGRzAHvJihm72i0W7zebCENiqA28G8Fl+mElQ+o=", + "h1:igCF0XbR3EVR6H7pQg2bjRlNwK+KyW+z8i1DoTi7y7c=", + "h1:jb6b5h/W9RofGfnKIStSJLfuy4nz0rZMc56pNvgeHPE=", + "h1:oyUMDKIIoOl+3EoxworAm9z6dqAAzPIXWyMPCBniPNk=", ] } diff --git a/jobs/Gemfile.lock b/jobs/Gemfile.lock index 0daaeeea58..3a0f84bb42 100644 --- a/jobs/Gemfile.lock +++ b/jobs/Gemfile.lock @@ -15,7 +15,7 @@ GEM racc (1.7.1) rainbow (3.1.1) regexp_parser (2.8.1) - rexml (3.2.5) + rexml (3.2.6) rspec (3.12.0) rspec-core (~> 3.12.0) rspec-expectations (~> 3.12.0) diff --git a/spec/Gemfile.lock b/spec/Gemfile.lock index cfaf2a3291..66239495f1 100644 --- a/spec/Gemfile.lock +++ b/spec/Gemfile.lock @@ -15,7 +15,7 @@ GEM racc (1.7.1) rainbow (3.1.1) regexp_parser (2.8.1) - rexml (3.2.5) + rexml (3.2.6) rspec (3.12.0) rspec-core (~> 3.12.0) rspec-expectations (~> 3.12.0) From 7af73ec01ef863bd2f84557060db941d0de7e1ba Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 09:34:58 +0200 Subject: [PATCH 060/294] fix(deps): update golang.org/x/exp digest to b0cb94b (#1992) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 2 +- src/acceptance/assets/app/go_app/go.sum | 4 ++-- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index 84c30c76a2..f9df67f313 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -25,7 +25,7 @@ require ( go.opentelemetry.io/otel/metric v1.16.0 go.opentelemetry.io/otel/trace v1.16.0 go.uber.org/zap v1.24.0 - golang.org/x/exp v0.0.0-20230725093048-515e97ebf090 + golang.org/x/exp v0.0.0-20230728194245-b0cb94b80691 ) require ( diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index 5c3dc8ac76..cbbcf9c5a2 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -189,8 +189,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/exp v0.0.0-20230725093048-515e97ebf090 h1:Di6/M8l0O2lCLc6VVRWhgCiApHV8MnQurBnFSHsQtNY= -golang.org/x/exp v0.0.0-20230725093048-515e97ebf090/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230728194245-b0cb94b80691 h1:/yRP+0AN7mf5DkD3BAI6TOFnd51gEoDEb8o35jIFtgw= +golang.org/x/exp v0.0.0-20230728194245-b0cb94b80691/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 4a2c4e4e7c..f4249f9618 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -35,7 +35,7 @@ require ( github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26 github.com/xeipuuv/gojsonschema v1.2.0 golang.org/x/crypto v0.11.0 - golang.org/x/exp v0.0.0-20230724220655-d98519c11495 + golang.org/x/exp v0.0.0-20230728194245-b0cb94b80691 golang.org/x/net v0.12.0 golang.org/x/time v0.3.0 google.golang.org/grpc v1.57.0 diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index 940c61f8c9..71f757228e 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1455,8 +1455,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20230724220655-d98519c11495 h1:zKGKw2WlGb8oPoRGqQ2PT8g2YoCN1w/YbbQjHXCdUWE= -golang.org/x/exp v0.0.0-20230724220655-d98519c11495/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230728194245-b0cb94b80691 h1:/yRP+0AN7mf5DkD3BAI6TOFnd51gEoDEb8o35jIFtgw= +golang.org/x/exp v0.0.0-20230728194245-b0cb94b80691/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 h1:J74nGeMgeFnYQJN59eFwh06jX/V8g0lB7LWpjSLxtgU= From f175adced22519b44c6d0a925d460bce854c30a0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 2 Aug 2023 00:52:28 +0000 Subject: [PATCH 061/294] fix(deps): update golang.org/x/exp digest to d63ba01 (#2006) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 2 +- src/acceptance/assets/app/go_app/go.sum | 4 ++-- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index f9df67f313..604e262344 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -25,7 +25,7 @@ require ( go.opentelemetry.io/otel/metric v1.16.0 go.opentelemetry.io/otel/trace v1.16.0 go.uber.org/zap v1.24.0 - golang.org/x/exp v0.0.0-20230728194245-b0cb94b80691 + golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b ) require ( diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index cbbcf9c5a2..3dda8181e8 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -189,8 +189,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/exp v0.0.0-20230728194245-b0cb94b80691 h1:/yRP+0AN7mf5DkD3BAI6TOFnd51gEoDEb8o35jIFtgw= -golang.org/x/exp v0.0.0-20230728194245-b0cb94b80691/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b h1:r+vk0EmXNmekl0S0BascoeeoHk/L7wmaW2QF90K+kYI= +golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index f4249f9618..fdbf9525c0 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -35,7 +35,7 @@ require ( github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26 github.com/xeipuuv/gojsonschema v1.2.0 golang.org/x/crypto v0.11.0 - golang.org/x/exp v0.0.0-20230728194245-b0cb94b80691 + golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b golang.org/x/net v0.12.0 golang.org/x/time v0.3.0 google.golang.org/grpc v1.57.0 diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index 71f757228e..03883f189e 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1455,8 +1455,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20230728194245-b0cb94b80691 h1:/yRP+0AN7mf5DkD3BAI6TOFnd51gEoDEb8o35jIFtgw= -golang.org/x/exp v0.0.0-20230728194245-b0cb94b80691/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b h1:r+vk0EmXNmekl0S0BascoeeoHk/L7wmaW2QF90K+kYI= +golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 h1:J74nGeMgeFnYQJN59eFwh06jX/V8g0lB7LWpjSLxtgU= From 6e8ca2fe898a71f00cae9533fcd3f5641a6d1d48 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 2 Aug 2023 01:41:15 +0000 Subject: [PATCH 062/294] chore(deps): update dependency nektos/act to v0.2.49 (#2007) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index ae099e1fe1..3f63a1af8b 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,4 +1,4 @@ -act 0.2.48 +act 0.2.49 actionlint 1.6.25 bosh 7.3.1 cf 8.7.1 From 7dc3a7cfeece047a04fd3ed3f3fe99af977579ea Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 2 Aug 2023 02:50:28 +0000 Subject: [PATCH 063/294] fix(deps): update module golang.org/x/net to v0.13.0 (#2009) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index fdbf9525c0..8d3ae6e67f 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -36,7 +36,7 @@ require ( github.com/xeipuuv/gojsonschema v1.2.0 golang.org/x/crypto v0.11.0 golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b - golang.org/x/net v0.12.0 + golang.org/x/net v0.13.0 golang.org/x/time v0.3.0 google.golang.org/grpc v1.57.0 gopkg.in/yaml.v3 v3.0.1 diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index 03883f189e..19011c20e8 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1576,8 +1576,8 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= +golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= From 7a76f6f531bd965ad09d5fa389cb56c8233d35c6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 2 Aug 2023 04:02:29 +0000 Subject: [PATCH 064/294] fix(deps): update module github.com/ogen-go/ogen to v0.72.1 (#2008) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 2 +- src/acceptance/assets/app/go_app/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index 604e262344..666831df56 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -14,7 +14,7 @@ require ( github.com/json-iterator/go v1.1.12 github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2 github.com/mitchellh/mapstructure v1.5.0 - github.com/ogen-go/ogen v0.72.0 + github.com/ogen-go/ogen v0.72.1 github.com/onsi/ginkgo/v2 v2.11.0 github.com/onsi/gomega v1.27.10 github.com/prometheus/procfs v0.11.1 diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index 3dda8181e8..4c37f0a633 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -109,8 +109,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/ogen-go/ogen v0.72.0 h1:BmwbInSq2DRStoaEgF9od1da5bq1q+viZlwPS6qXQ1c= -github.com/ogen-go/ogen v0.72.0/go.mod h1:2SgZ9FRMXsuUhdTq23nFBFgMaXQl6yennmAnIs+hofM= +github.com/ogen-go/ogen v0.72.1 h1:rNgBxI7yBh2irIwuQyd7Q8SNhZPK69VjYCaiN6MP1u8= +github.com/ogen-go/ogen v0.72.1/go.mod h1:2SgZ9FRMXsuUhdTq23nFBFgMaXQl6yennmAnIs+hofM= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= From 07fef7c55b079b7f6bddfb7f44680b3612261f4e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 2 Aug 2023 04:51:22 +0000 Subject: [PATCH 065/294] chore(deps): update google/cloud-sdk docker tag to v441 (#2011) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- ci/terragrunt/.tool-versions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.tool-versions b/.tool-versions index 3f63a1af8b..07a3dba768 100644 --- a/.tool-versions +++ b/.tool-versions @@ -4,7 +4,7 @@ bosh 7.3.1 cf 8.7.1 concourse 7.9.1 direnv 2.32.3 -gcloud 440.0.0 +gcloud 441.0.0 ginkgo 2.11.0 golang 1.20.5 golangci-lint 1.53.3 diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 6ffafb47e8..cd628f81e1 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,4 +1,4 @@ -gcloud 440.0.0 +gcloud 441.0.0 helm 3.12.2 python 3.11.4 terraform 1.5.4 From df3e52e671263957c0c3162af52f206374534293 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 02:35:12 +0000 Subject: [PATCH 066/294] chore(deps): update dependency terragrunt to v0.48.6 (#2013) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index cd628f81e1..cff62604fa 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.2 python 3.11.4 terraform 1.5.4 terraform-lsp -terragrunt 0.48.5 +terragrunt 0.48.6 From 9c0549541dd353188f44ab42f0765e232b3a2da5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 02:35:23 +0000 Subject: [PATCH 067/294] chore(deps): update dependency gruntwork-io/terragrunt to v0.48.6 (#2002) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> From 2d25a42ec902af19b5f474baa1f331411f1580d5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 03:32:34 +0000 Subject: [PATCH 068/294] fix(deps): update module go.uber.org/zap to v1.25.0 (#2014) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 3 +-- src/acceptance/assets/app/go_app/go.sum | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index 666831df56..d1ef4089f3 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -24,7 +24,7 @@ require ( go.opentelemetry.io/otel v1.16.0 go.opentelemetry.io/otel/metric v1.16.0 go.opentelemetry.io/otel/trace v1.16.0 - go.uber.org/zap v1.24.0 + go.uber.org/zap v1.25.0 golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b ) @@ -58,7 +58,6 @@ require ( github.com/segmentio/asm v1.2.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.11 // indirect - go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/arch v0.3.0 // indirect golang.org/x/crypto v0.11.0 // indirect diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index 4c37f0a633..21ccf877e0 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -124,7 +124,6 @@ github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZ github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -171,16 +170,15 @@ go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/A go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= +go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= From b1a3afb0be05323c74ec172f079674c8c1f52cf8 Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Thu, 3 Aug 2023 16:58:56 +0200 Subject: [PATCH 069/294] Revert "Update golang version to 1.20.5 (#1849)" This reverts commit 13f73c7fb5be61a765d15694b19fec95797d2b91. --- .final_builds/packages/golang-1-linux/index.yml | 4 ---- .tool-versions | 2 +- packages/golang-1-linux/spec.lock | 2 +- packages/golang-1-linux/vendored-commit | 2 +- packages/golang-1-linux/version | 2 +- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.final_builds/packages/golang-1-linux/index.yml b/.final_builds/packages/golang-1-linux/index.yml index 1b7e1bbfa2..0a2bddb161 100644 --- a/.final_builds/packages/golang-1-linux/index.yml +++ b/.final_builds/packages/golang-1-linux/index.yml @@ -31,10 +31,6 @@ builds: version: 6f86822e163425375f3a1b9d781b678f30fd4b6ee619b033fcf5e7e18563e74e blobstore_id: 0a69914c-05f2-4397-4cc1-390d8b2b6640 sha1: sha256:33b1f2a465c2f163e5ef31e072b2c7692ae0758ca2b7866b61d98663a6ba6329 - 8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60: - version: 8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60 - blobstore_id: d2723887-4744-43c2-64e3-289fe6483132 - sha1: sha256:efdf65bca81264d9110ec764be7edea1de341781a1ffe59c219db064d71d9fc3 a54b33c812a8cfc39ba82782a23d74bf33f5a0a92012b41a101cc9d9d48d345c: version: a54b33c812a8cfc39ba82782a23d74bf33f5a0a92012b41a101cc9d9d48d345c blobstore_id: 5a8680dd-9f44-40ac-400b-52753e7c9b25 diff --git a/.tool-versions b/.tool-versions index 07a3dba768..002aeb0534 100644 --- a/.tool-versions +++ b/.tool-versions @@ -6,7 +6,7 @@ concourse 7.9.1 direnv 2.32.3 gcloud 441.0.0 ginkgo 2.11.0 -golang 1.20.5 +golang 1.20.6 golangci-lint 1.53.3 java temurin-17.0.8+7 make 4.4 diff --git a/packages/golang-1-linux/spec.lock b/packages/golang-1-linux/spec.lock index 840ab8b4e4..f02637fdec 100644 --- a/packages/golang-1-linux/spec.lock +++ b/packages/golang-1-linux/spec.lock @@ -1,2 +1,2 @@ name: golang-1-linux -fingerprint: 8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60 +fingerprint: 126fca7399cba5bc8c1b02e392441f1688daf1586d57d1b3614e314b893a6cc4 diff --git a/packages/golang-1-linux/vendored-commit b/packages/golang-1-linux/vendored-commit index 306aaabe1e..3d60c1ec9c 100644 --- a/packages/golang-1-linux/vendored-commit +++ b/packages/golang-1-linux/vendored-commit @@ -1 +1 @@ -f643862ee7a870c4fc0405fc0f2db6dfa2c43a77 +c1872f2631f14f223005acdce58505ecc8c7a92d diff --git a/packages/golang-1-linux/version b/packages/golang-1-linux/version index ae45fe86ff..1b9335f13b 100644 --- a/packages/golang-1-linux/version +++ b/packages/golang-1-linux/version @@ -1 +1 @@ -1.20.5 \ No newline at end of file +1.20.4 \ No newline at end of file From 11320099344186c74419514d48f41c47c59f42e9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 4 Aug 2023 02:01:03 +0000 Subject: [PATCH 070/294] chore(deps): update dependency org.apache.maven:maven-core to v3.9.4 (#2017) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/dockerfiles/autoscaler-test/Dockerfile | 2 +- ci/dockerfiles/autoscaler-tools/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/dockerfiles/autoscaler-test/Dockerfile b/ci/dockerfiles/autoscaler-test/Dockerfile index 582a140897..4d7e8b7e27 100644 --- a/ci/dockerfiles/autoscaler-test/Dockerfile +++ b/ci/dockerfiles/autoscaler-test/Dockerfile @@ -36,7 +36,7 @@ RUN \ # get maven # renovate: datasource=maven depName=org.apache.maven:maven-core -ENV MAVEN_VERSION 3.9.3 +ENV MAVEN_VERSION 3.9.4 RUN wget --no-verbose -O /tmp/apache-maven-${MAVEN_VERSION}.tar.gz http://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz && \ tar xzf /tmp/apache-maven-${MAVEN_VERSION}.tar.gz -C /opt/ && \ ln -s /opt/apache-maven-${MAVEN_VERSION} /opt/maven && \ diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index e5b84815cb..f3445ea4e8 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -105,7 +105,7 @@ RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download # get maven # renovate: datasource=maven depName=org.apache.maven:maven-core -ARG MAVEN_VERSION=3.9.3 +ARG MAVEN_VERSION=3.9.4 ENV MAVEN_HOME /opt/maven RUN wget --no-verbose -O /tmp/apache-maven-${MAVEN_VERSION}.tar.gz http://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz && \ tar xzf /tmp/apache-maven-${MAVEN_VERSION}.tar.gz -C /opt/ && \ From 9cbd32f7acc8ad48a30b7acfe294f7bb6874edd0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 6 Aug 2023 22:46:39 +0000 Subject: [PATCH 071/294] chore(deps): lock file maintenance (#2018) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .../github-arc-team-wg-ci/.terraform.lock.hcl | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl index 83327891cb..27708659a0 100644 --- a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl +++ b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl @@ -19,19 +19,19 @@ provider "registry.terraform.io/gavinbunney/kubectl" { } provider "registry.terraform.io/hashicorp/google" { - version = "4.75.1" + version = "4.76.0" hashes = [ - "h1:/1rLro+SVdSVQ4jMMKcuSqY7h+uz9uVsB+IkfW9g/A4=", - "h1:2K4P/XkGpfp6dYH8ObAF0Lsf9IW2/tj65KK514CEwSA=", - "h1:GU8+BFtpC3ynnL1uQ//MtYL/Af4jFGOxDTJcobuZLNY=", - "h1:L894XTxJTQhxwmNDUl9dn/mUYJeufkLfIqyHkeChZ6M=", - "h1:f4UBw7xRpUuYFyQJzoHePMB493tNvZMemKVl6VnNIIw=", - "h1:hSJW7FEwM1jU3n+BKiH5fHIQLIpRfBKMOGJfbJ9KJkU=", - "h1:kjT9YQEI/zC4yd+psrl4Ic8R8l4Ce5pLTsph9AMsTGw=", - "h1:ouOv7AJ/Xyf8Houn5DY2UeXC/rYyaXthi2j/htEECQM=", - "h1:rVXN8aaJQk28oai7+ikLwYgsnn3sR603kRwgPS/CtGI=", - "h1:seflsWvXwkZVEsp45Q9uhyoAPynJa3jjCxosx4ZCgY4=", - "h1:vBGr7p0vm2VUXf1Z/cW8RHKmgfHoEW0hD3VH12rrCs8=", + "h1:+w+KUxTFiJ3EQiGdDuZYOyDW+YV6/38hIR+D1fUny40=", + "h1:19cFova8/i7y9vCvzyAbkjnIJl8qhQdgjWw86fjiP7k=", + "h1:CJx05M+H8U4bMgN+1T1B8JbPOcct2eItW76mYqy7q3U=", + "h1:DFv74AdJTDS9B5DAgsxHnflsAvJeq69z9+VmSza8GlA=", + "h1:NUHyqKNv/nelGkZpwWmOAPhUnzUEEmkbz+KYVIs1DKc=", + "h1:PFn0c5lKtehKTo7k0HyT5Ga5ZKzSVGiJTPoMISgPgWE=", + "h1:XRuIr6U3qWQ+d8TZlmhgchgxwOcYpwaYh465qKIiA7I=", + "h1:aMCPRtjf1/jjb726PDRgQ5okXdip4QhGfuE09/W36wQ=", + "h1:vLKB2B15q5kQnsKArfH8od8olV+ibkEF8mOjinIeA6Q=", + "h1:vRpscn3cQ5ZfNdkX0Q0vVB3gGZbORA0+2HPUAaLSejw=", + "h1:vVwj/rwzBLLU8NLUPIRP4f+wY7MtP2+6BVqZJqkaD98=", ] } From c240fdfb2171dc8f258e3b6e0dfb0a94fc97bac8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 7 Aug 2023 00:54:40 +0000 Subject: [PATCH 072/294] fix(deps): update module github.com/jackc/pgx/v5 to v5.4.3 (#2019) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/autoscaler/go.mod | 4 ++-- src/autoscaler/go.sum | 8 ++++---- src/changeloglockcleaner/go.mod | 2 +- src/changeloglockcleaner/go.sum | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 8d3ae6e67f..153717842f 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -18,7 +18,7 @@ require ( github.com/gorilla/mux v1.8.0 github.com/gorilla/websocket v1.5.0 github.com/hashicorp/go-retryablehttp v0.7.4 - github.com/jackc/pgx/v5 v5.4.2 + github.com/jackc/pgx/v5 v5.4.3 github.com/jmoiron/sqlx v1.3.5 github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2 github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d @@ -128,7 +128,7 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect - github.com/jackc/puddle/v2 v2.2.0 // indirect + github.com/jackc/puddle/v2 v2.2.1 // indirect github.com/jgautheron/goconst v1.5.1 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index 19011c20e8..d5bce75936 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1017,10 +1017,10 @@ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsI github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= -github.com/jackc/pgx/v5 v5.4.2 h1:u1gmGDwbdRUZiwisBm/Ky2M14uQyUP65bG8+20nnyrg= -github.com/jackc/pgx/v5 v5.4.2/go.mod h1:q6iHT8uDNXWiFNOlRqJzBTaSH3+2xCXkokxHZC5qWFY= -github.com/jackc/puddle/v2 v2.2.0 h1:RdcDk92EJBuBS55nQMMYFXTxwstHug4jkhT5pq8VxPk= -github.com/jackc/puddle/v2 v2.2.0/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/jackc/pgx/v5 v5.4.3 h1:cxFyXhxlvAifxnkKKdlxv8XqUf59tDlYjnV5YYfsJJY= +github.com/jackc/pgx/v5 v5.4.3/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA= +github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= +github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jgautheron/goconst v1.5.1 h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM= github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= diff --git a/src/changeloglockcleaner/go.mod b/src/changeloglockcleaner/go.mod index 6397f35f04..8e0905643d 100644 --- a/src/changeloglockcleaner/go.mod +++ b/src/changeloglockcleaner/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/go-sql-driver/mysql v1.7.1 - github.com/jackc/pgx/v5 v5.4.2 + github.com/jackc/pgx/v5 v5.4.3 github.com/jmoiron/sqlx v1.3.5 github.com/onsi/ginkgo/v2 v2.11.0 github.com/onsi/gomega v1.27.10 diff --git a/src/changeloglockcleaner/go.sum b/src/changeloglockcleaner/go.sum index 716ddf1e62..eeb56d5672 100644 --- a/src/changeloglockcleaner/go.sum +++ b/src/changeloglockcleaner/go.sum @@ -22,8 +22,8 @@ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsI github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= -github.com/jackc/pgx/v5 v5.4.2 h1:u1gmGDwbdRUZiwisBm/Ky2M14uQyUP65bG8+20nnyrg= -github.com/jackc/pgx/v5 v5.4.2/go.mod h1:q6iHT8uDNXWiFNOlRqJzBTaSH3+2xCXkokxHZC5qWFY= +github.com/jackc/pgx/v5 v5.4.3 h1:cxFyXhxlvAifxnkKKdlxv8XqUf59tDlYjnV5YYfsJJY= +github.com/jackc/pgx/v5 v5.4.3/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA= github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= From ae668ca4cb444d4b02d2c2419e4e18cce858db98 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 7 Aug 2023 03:25:13 +0000 Subject: [PATCH 073/294] fix(deps): update dependency org.yaml:snakeyaml to v2.1 (#2020) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/db/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/pom.xml b/src/db/pom.xml index 4be759e7e3..211bb94923 100644 --- a/src/db/pom.xml +++ b/src/db/pom.xml @@ -25,7 +25,7 @@ org.yaml snakeyaml - 2.0 + 2.1 org.postgresql From 1c67a80221ec9f0e18d255ea89823a1c936dfe87 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Aug 2023 03:25:21 +0000 Subject: [PATCH 074/294] Bump org.yaml:snakeyaml from 2.0 to 2.1 in /src (#2021) Bumps [org.yaml:snakeyaml](https://bitbucket.org/snakeyaml/snakeyaml) from 2.0 to 2.1. - [Commits](https://bitbucket.org/snakeyaml/snakeyaml/branches/compare/snakeyaml-2.1..snakeyaml-2.0) --- updated-dependencies: - dependency-name: org.yaml:snakeyaml dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> From 31cd2c3ecfdab20d3a591cd127af8ff6858c6f1d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Aug 2023 04:41:16 +0000 Subject: [PATCH 075/294] Bump golang.org/x/crypto from 0.11.0 to 0.12.0 in /src/autoscaler (#2024) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.11.0 to 0.12.0. - [Commits](https://github.com/golang/crypto/compare/v0.11.0...v0.12.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/autoscaler/go.mod | 8 ++++---- src/autoscaler/go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 153717842f..425ed92e80 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -34,7 +34,7 @@ require ( github.com/stretchr/testify v1.8.4 github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26 github.com/xeipuuv/gojsonschema v1.2.0 - golang.org/x/crypto v0.11.0 + golang.org/x/crypto v0.12.0 golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b golang.org/x/net v0.13.0 golang.org/x/time v0.3.0 @@ -226,9 +226,9 @@ require ( golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 // indirect golang.org/x/mod v0.11.0 // indirect golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/term v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect golang.org/x/tools v0.9.3 // indirect google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index d5bce75936..590b6f1eee 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1438,8 +1438,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1724,8 +1724,8 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1736,8 +1736,8 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1754,8 +1754,8 @@ golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= From b87872e616dbe16c21a3946c07dfdb3cf825155f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 7 Aug 2023 05:08:24 +0000 Subject: [PATCH 076/294] fix(deps): update module golang.org/x/net to v0.14.0 (#2023) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 425ed92e80..f2d72f0b0b 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -36,7 +36,7 @@ require ( github.com/xeipuuv/gojsonschema v1.2.0 golang.org/x/crypto v0.12.0 golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b - golang.org/x/net v0.13.0 + golang.org/x/net v0.14.0 golang.org/x/time v0.3.0 google.golang.org/grpc v1.57.0 gopkg.in/yaml.v3 v3.0.1 diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index 590b6f1eee..20b8563f82 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1576,8 +1576,8 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= -golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= From 6c06f0103d4fb7e60ca0a35b0a10d7ddec3ad497 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 7 Aug 2023 06:16:29 +0000 Subject: [PATCH 077/294] fix(deps): update module golang.org/x/oauth2 to v0.11.0 (#2026) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/changelog/go.mod | 4 ++-- src/changelog/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/changelog/go.mod b/src/changelog/go.mod index 5bc11a918d..a28ecc24e1 100644 --- a/src/changelog/go.mod +++ b/src/changelog/go.mod @@ -6,7 +6,7 @@ require ( github.com/Masterminds/semver/v3 v3.2.1 github.com/shurcooL/githubv4 v0.0.0-20230704064427-599ae7bbf278 github.com/stretchr/testify v1.8.4 - golang.org/x/oauth2 v0.10.0 + golang.org/x/oauth2 v0.11.0 ) require ( @@ -14,7 +14,7 @@ require ( github.com/golang/protobuf v1.5.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/shurcooL/graphql v0.0.0-20200928012149-18c5c3165e3a // indirect - golang.org/x/net v0.12.0 // indirect + golang.org/x/net v0.14.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/src/changelog/go.sum b/src/changelog/go.sum index 4b1546f09e..ecfd48f83f 100644 --- a/src/changelog/go.sum +++ b/src/changelog/go.sum @@ -18,10 +18,10 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= +golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= From afbc054e4790e5a5a829b30852b27682b9356d6e Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Mon, 7 Aug 2023 09:29:26 +0200 Subject: [PATCH 078/294] Set `key_length` and `duration` on all certs (#2012) Default values are according to https://docs.cloudfoundry.org/api/credhub/version/2.9/ ``` key_length: 2048 duration: 365 ``` but we want ``` key_length: 4096 duration: 180 ``` --- templates/app-autoscaler.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/app-autoscaler.yml b/templates/app-autoscaler.yml index 957cd5a88f..80f55caaad 100644 --- a/templates/app-autoscaler.yml +++ b/templates/app-autoscaler.yml @@ -920,6 +920,8 @@ variables: options: common_name: metricScraperCA is_ca: true + key_length: 4096 + duration: 180 - name: loggregator_agent_metrics_tls type: certificate update_mode: converge @@ -930,3 +932,6 @@ variables: - loggregator_agent_server extended_key_usage: - server_auth + key_length: 4096 + duration: 180 + From f6db430d37e280d320159c91702f17bb5c84c99b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 8 Aug 2023 01:51:28 +0000 Subject: [PATCH 079/294] fix(deps): update module github.com/go-faster/jx to v1.1.0 (#2029) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 2 +- src/acceptance/assets/app/go_app/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index d1ef4089f3..1a3fd8ebdc 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -8,7 +8,7 @@ require ( github.com/gin-contrib/zap v0.1.0 github.com/gin-gonic/gin v1.9.1 github.com/go-faster/errors v0.6.1 - github.com/go-faster/jx v1.0.1 + github.com/go-faster/jx v1.1.0 github.com/go-logr/logr v1.2.4 github.com/go-logr/zapr v1.2.4 github.com/json-iterator/go v1.1.12 diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index 21ccf877e0..e6e57e2ceb 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -32,8 +32,8 @@ github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/go-faster/errors v0.6.1 h1:nNIPOBkprlKzkThvS/0YaX8Zs9KewLCOSFQS5BU06FI= github.com/go-faster/errors v0.6.1/go.mod h1:5MGV2/2T9yvlrbhe9pD9LO5Z/2zCSq2T8j+Jpi2LAyY= -github.com/go-faster/jx v1.0.1 h1:NhSJEZtqj6KmXf63On7Hg7/sjUX+gotSc/eM6bZCZ00= -github.com/go-faster/jx v1.0.1/go.mod h1:vKDNikrKoyUmpzaJ0OkIkRQClNHFX/nF3dnTJZb3skg= +github.com/go-faster/jx v1.1.0 h1:ZsW3wD+snOdmTDy9eIVgQdjUpXRRV4rqW8NS3t+20bg= +github.com/go-faster/jx v1.1.0/go.mod h1:vKDNikrKoyUmpzaJ0OkIkRQClNHFX/nF3dnTJZb3skg= github.com/go-faster/yaml v0.4.6 h1:lOK/EhI04gCpPgPhgt0bChS6bvw7G3WwI8xxVe0sw9I= github.com/go-faster/yaml v0.4.6/go.mod h1:390dRIvV4zbnO7qC9FGo6YYutc+wyyUSHBgbXL52eXk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= From b95475f9a9b06da024852421634274241c84f36d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 8 Aug 2023 02:41:29 +0000 Subject: [PATCH 080/294] fix(deps): update golang.org/x/exp digest to 050eac2 (#2028) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 2 +- src/acceptance/assets/app/go_app/go.sum | 4 ++-- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index 1a3fd8ebdc..4621c88345 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -25,7 +25,7 @@ require ( go.opentelemetry.io/otel/metric v1.16.0 go.opentelemetry.io/otel/trace v1.16.0 go.uber.org/zap v1.25.0 - golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b + golang.org/x/exp v0.0.0-20230807204917-050eac23e9de ) require ( diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index e6e57e2ceb..80a5e8a85e 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -187,8 +187,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b h1:r+vk0EmXNmekl0S0BascoeeoHk/L7wmaW2QF90K+kYI= -golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230807204917-050eac23e9de h1:l5Za6utMv/HsBWWqzt4S8X17j+kt1uVETUX5UFhn2rE= +golang.org/x/exp v0.0.0-20230807204917-050eac23e9de/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index f2d72f0b0b..15b7881a49 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -35,7 +35,7 @@ require ( github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26 github.com/xeipuuv/gojsonschema v1.2.0 golang.org/x/crypto v0.12.0 - golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b + golang.org/x/exp v0.0.0-20230807204917-050eac23e9de golang.org/x/net v0.14.0 golang.org/x/time v0.3.0 google.golang.org/grpc v1.57.0 diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index 20b8563f82..a64d06a156 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1455,8 +1455,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b h1:r+vk0EmXNmekl0S0BascoeeoHk/L7wmaW2QF90K+kYI= -golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230807204917-050eac23e9de h1:l5Za6utMv/HsBWWqzt4S8X17j+kt1uVETUX5UFhn2rE= +golang.org/x/exp v0.0.0-20230807204917-050eac23e9de/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 h1:J74nGeMgeFnYQJN59eFwh06jX/V8g0lB7LWpjSLxtgU= From 28243418a701244c8571a07a937b7d6aaec07ec5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 9 Aug 2023 01:39:36 +0000 Subject: [PATCH 081/294] chore(deps): update google/cloud-sdk docker tag to v442 (#2031) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- ci/terragrunt/.tool-versions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.tool-versions b/.tool-versions index 002aeb0534..fb0cd4e6b0 100644 --- a/.tool-versions +++ b/.tool-versions @@ -4,7 +4,7 @@ bosh 7.3.1 cf 8.7.1 concourse 7.9.1 direnv 2.32.3 -gcloud 441.0.0 +gcloud 442.0.0 ginkgo 2.11.0 golang 1.20.6 golangci-lint 1.53.3 diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index cff62604fa..dfbeaf3d7f 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,4 +1,4 @@ -gcloud 441.0.0 +gcloud 442.0.0 helm 3.12.2 python 3.11.4 terraform 1.5.4 From a081530b1dbfce8e9ff0022dd82bb4b4420b2580 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Aug 2023 03:26:33 +0000 Subject: [PATCH 082/294] Bump github.com/cloudfoundry/cf-test-helpers/v2 in /src/acceptance (#2032) Bumps [github.com/cloudfoundry/cf-test-helpers/v2](https://github.com/cloudfoundry/cf-test-helpers) from 2.5.0 to 2.6.0. - [Release notes](https://github.com/cloudfoundry/cf-test-helpers/releases) - [Commits](https://github.com/cloudfoundry/cf-test-helpers/compare/v2.5.0...v2.6.0) --- updated-dependencies: - dependency-name: github.com/cloudfoundry/cf-test-helpers/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/acceptance/go.mod | 2 +- src/acceptance/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/acceptance/go.mod b/src/acceptance/go.mod index 42b5c4f3a8..ff06dae55d 100644 --- a/src/acceptance/go.mod +++ b/src/acceptance/go.mod @@ -3,7 +3,7 @@ module acceptance go 1.20 require ( - github.com/cloudfoundry/cf-test-helpers/v2 v2.5.0 + github.com/cloudfoundry/cf-test-helpers/v2 v2.6.0 github.com/onsi/ginkgo/v2 v2.11.0 github.com/onsi/gomega v1.27.10 github.com/stretchr/testify v1.8.4 diff --git a/src/acceptance/go.sum b/src/acceptance/go.sum index 085564218e..a6f5854efd 100644 --- a/src/acceptance/go.sum +++ b/src/acceptance/go.sum @@ -1,5 +1,5 @@ -github.com/cloudfoundry/cf-test-helpers/v2 v2.5.0 h1:1K7Mrjwq7/APbp2f+Rs/6LhBM58SWidJejmL9SEcUlI= -github.com/cloudfoundry/cf-test-helpers/v2 v2.5.0/go.mod h1:+obqhEjTB5aVVSKJSmXlSekcukso6YIeSlqTiSDeDq8= +github.com/cloudfoundry/cf-test-helpers/v2 v2.6.0 h1:7Qg0kpKz8uDpYO9ekoV6r0/tA2Yxp15TOFottL4puyU= +github.com/cloudfoundry/cf-test-helpers/v2 v2.6.0/go.mod h1:F9lO5YQLrrF7xf5liS/pRTE9uuyZ8TQ8N2ft/mR5hv8= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= From 14a5201ba6b0233aa9843161e945407bac6aa852 Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Tue, 6 Jun 2023 17:04:43 +0100 Subject: [PATCH 083/294] WIP-Changes to Policy-API --- .direnv/flake-profile | 1 + .direnv/flake-profile-1-link | 1 + .vscode/settings.json | 8 +++++ api/policy-api.yaml | 70 ++++++++++++++++++++++++++++-------- api/shared_definitions.yaml | 39 -------------------- 5 files changed, 66 insertions(+), 53 deletions(-) create mode 120000 .direnv/flake-profile create mode 120000 .direnv/flake-profile-1-link create mode 100644 .vscode/settings.json diff --git a/.direnv/flake-profile b/.direnv/flake-profile new file mode 120000 index 0000000000..0c05709dfa --- /dev/null +++ b/.direnv/flake-profile @@ -0,0 +1 @@ +flake-profile-1-link \ No newline at end of file diff --git a/.direnv/flake-profile-1-link b/.direnv/flake-profile-1-link new file mode 120000 index 0000000000..6bc809872a --- /dev/null +++ b/.direnv/flake-profile-1-link @@ -0,0 +1 @@ +/nix/store/s4ssci8b21yy2dp6f4184lflh9agjbzd-nix-shell-env \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..fe2028537b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "yaml.schemas": { + "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json": [ + "file:///Users/I545003/SAPDevelop/app-autoscaler-release/api/shared_definitions.yaml", + "file:///Users/I545003/SAPDevelop/app-autoscaler-release/api/policy-api.yaml" + ] + } +} \ No newline at end of file diff --git a/api/policy-api.yaml b/api/policy-api.yaml index 73a72e5f5e..754b195d2e 100644 --- a/api/policy-api.yaml +++ b/api/policy-api.yaml @@ -64,25 +64,60 @@ components: scaling_rules: type: array items: - $ref: '#/components/schemas/ScalingRules' - ScalingRules: - AnyOf: - - $ref: "./shared_definitions.yaml#/schemas/metric_type" - - $ref: "./shared_definitions.yaml#/schemas/threshold" - - $ref: "./shared_definitions.yaml#/schemas/operator" - - $ref: "./shared_definitions.yaml#/schemas/adjustment" - - $ref: "./shared_definitions.yaml#/schemas/breach_duration_secs" - - $ref: "./shared_definitions.yaml#/schemas/cool_down_secs" + $ref: '#/components/schemas/ScalingRule' + ScalingRule: + properties: + metric_type: + - $ref: "./shared_definitions.yaml#/schemas/metric_type" + threshold: + description: | + The boundary when metric value exceeds is considered as a breach + required: true + type: int + format: int64 + example: 30 + operator: + description: Used for standard operting signs - ">", "<", ">=", "<=" + required: true + type: string + enum: [">", "<", ">=", "<="] + example: < + adjustment: + description: | + The adjustment approach for instance count with each scaling. + + +5 means adding 5 instances, -50% means shrinking to the half of current size. + required: true + type: string + pattern: ^[-+][1-9]+[0-9]*[%]?$ + example: -1 + breach_duration_secs: + description: | + Time duration(in seconds) to fire scaling event if it keeps breaching + type: integer + format: int64 # this is time in seconds + example: 600 + cool_down_secs: + description: | + The time duration (in seconds) to wait before the next scaling kicks in + type: integer + format: int64 # this is time in seconds + example: 300 schedules: type: array items: $ref: '#/components/schemas/Schedules' Schedules: - AnyOf: - - $ref: "./shared_definitions.yaml#/schemas/timezone" + timezone: + description: Using timezone definition of Java #https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html - Do we need to implement it? + required: true + type: string + example: Asia/Shanghai # TODO: Try to make use of - - $ref: "../../src/autoscaler/api/policyvalidator/policy_json.schema.json#/" # TODO: + #- $ref: "../../src/autoscaler/api/policyvalidator/policy_json.schema.json#/" # TODO: + recurring_schedule: - $ref: "./shared_definitions.yaml#/schemas/recurring_schedule" + specific_date: - $ref: "./shared_definitions.yaml#/schemas/specific_date" delete: summary: Deletes the policy @@ -133,19 +168,26 @@ components: items: $ref: '#/components/schemas/ScalingRules' ScalingRules: - AnyOf: + metric_type: - $ref: "./shared_definitions.yaml#/schemas/metric_type" + threshold: - $ref: "./shared_definitions.yaml#/schemas/threshold" + operator: - $ref: "./shared_definitions.yaml#/schemas/operator" + adjustment: - $ref: "./shared_definitions.yaml#/schemas/adjustment" + breach_duration_secs: - $ref: "./shared_definitions.yaml#/schemas/breach_duration_secs" + cool_down_secs: - $ref: "./shared_definitions.yaml#/schemas/cool_down_secs" schedules: type: array items: $ref: '#/components/schemas/Schedules' Schedules: - AnyOf: + timezone: - $ref: "./shared_definitions.yaml#/schemas/timezone" + recurring_schedule: - $ref: "./shared_definitions.yaml#/schemas/recurring_schedule" + specific_date: - $ref: "./shared_definitions.yaml#/schemas/specific_date" \ No newline at end of file diff --git a/api/shared_definitions.yaml b/api/shared_definitions.yaml index 2bfde3221c..77fc53ac95 100644 --- a/api/shared_definitions.yaml +++ b/api/shared_definitions.yaml @@ -32,45 +32,6 @@ schemas: required: true type: string example: memoryused - threshold: - description: | - The boundary when metric value exceeds is considered as a breach - required: true - type: int - format: int64 - example: 30 - operator: - description: Used for standard operting signs - ">", "<", ">=", "<=" - required: true - type: string - enum: [">", "<", ">=", "<="] - example: < - adjustment: - description: | - The adjustment approach for instance count with each scaling. - - +5 means adding 5 instances, -50% means shrinking to the half of current size. - required: true - type: string - pattern: ^[-+][1-9]+[0-9]*[%]?$ - example: -1 - breach_duration_secs: - description: | - Time duration(in seconds) to fire scaling event if it keeps breaching - type: integer - format: int64 # this is time in seconds - example: 600 - cool_down_secs: - description: | - The time duration (in seconds) to wait before the next scaling kicks in - type: integer - format: int64 # this is time in seconds - example: 300 - timezone: - description: Using timezone definition of Java #https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html - Do we need to implement it? - required: true - type: string - example: Asia/Shanghai recurring_schedule: type: array items: From 612be10cc05994816abc6cf29a7c5ca9033fd920 Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Wed, 7 Jun 2023 16:14:55 +0100 Subject: [PATCH 084/294] WIP- Modifications for yaml files --- api/aggregated-metric-api.yaml | 148 ++++++++++++++++++++++ api/application-metric-api.yaml | 38 +++--- api/policy-api.yaml | 211 +++++++++++++++++++------------- api/shared_definitions.yaml | 100 +-------------- 4 files changed, 300 insertions(+), 197 deletions(-) create mode 100644 api/aggregated-metric-api.yaml diff --git a/api/aggregated-metric-api.yaml b/api/aggregated-metric-api.yaml new file mode 100644 index 0000000000..98ef81cb6f --- /dev/null +++ b/api/aggregated-metric-api.yaml @@ -0,0 +1,148 @@ +openapi: 3.0.0 +info: + title: Aggregated Metric API + description: | + AutoScaler collects the instances' metrics of an application, and aggregate the raw data into an accumulated value for evaluation. + + This API is used to return the aggregated metric result of an application. + version: 1.0.0 +security: # Do we need that? +- mtls: [] +- basicAuthentication: [] #TODO +tags: +- name: Aggregated Metric API V1 + description: This API is used to return the aggregated metric result of an application. + +paths: + /v1/apps/{guid}/aggregated_metric_histories/{metric_type}: + parameters: + - name: guid + in: path + required: true + description: | + The GUID identifying the application for which the scaling history is fetched. + + It can be found in the `application_id` property of the JSON object stored in the + `VCAP_APPLICATION` environment variable. + schema: + $ref: "./shared_definitions.yaml#/schemas/GUID" + - name: metric_type + in: query + required: true + description: The metric type + schema: + $ref: "./shared_definitions.yaml#/schemas/metric_type" + - name: start-time + in: query + description: | + The start time in the number of nanoseconds elapsed since January 1, 1970 UTC. + schema: + type: integer + default: 0 + example: start-time=1494989539138350432 + - name: end-time + in: query + description: | + The end time in the number of nanoseconds elapsed since January 1, 1970 UTC. + schema: + type: integer + default: 0 + example: end-time=1494989549117047288 + - name: order-direction + in: query + description: | + The sorting order. The scaling history will be order by timestamp ascending or descending. + schema: + type: string + enum: ["asc", "desc"] + default: desc + example: order-direction=desc + - name: page + in: query + description: The page number to query + schema: + type: integer + minimum: 1 # Or Should it be "1"? + default: 1 + example: page=1 + - name: results-per-page + in: query + description: Number of entries shown per page. + schema: + type: integer + minimum: 0 # Or Should it be "1"? + default: 50 + example: results-per-page=10 + - name: Authorization + in: header + schema: + type: string + example: | + bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o + get: + summary: Retrieves the aggregated metric result of an application + description: | + Use to retrieve aggregated metric result of an app. + tags: + - Aggregated Metric API V1 + responses: + "200": + description: "OK" + content: + application/json: + schema: + $ref: "#/components/schemas/Aggregated_Metrics" + default: + $ref: "./shared_definitions.yaml#/responses/Error" +components: + schemas: + Aggregated_Metrics: + description: Object containing Application Metrics. + type: object + properties: + total_results: + type: integer + format: int64 + description: Number of history entries found for the given query. + example: 2 + total_pages: + type: integer + format: int64 + description: Number of Pages from the query + example: 1 + page: + type: integer + format: int64 + description: Number of the current page. + example: 1 + prev_url: + type: string + format: uri + next_url: + type: string + format: uri + resources: + type: array + items: + $ref: '#/components/schemas/AggregatedMetric' + AggregatedMetric: + description: Object containing metric history + type: object + properties: + app_guid: + $ref: "./shared_definitions.yaml#/schemas/GUID" + timestamp: + type: integer + description: | + The scaling time in the number of nanoseconds elapsed since January 1, 1970 UTC. + example: 1494989539138350432 + metric_type: + $ref: "./shared_definitions.yaml#/schemas/metric_type" + value: + type: integer + description: | + The value of metric type to be returned as the aggregated metric result of an application + example: 400 + unit: + type: string + example: megabytes \ No newline at end of file diff --git a/api/application-metric-api.yaml b/api/application-metric-api.yaml index 97da9ef6dc..2061956486 100644 --- a/api/application-metric-api.yaml +++ b/api/application-metric-api.yaml @@ -2,19 +2,17 @@ openapi: 3.0.0 info: title: Application Metric API description: | - AutoScaler collects the instances' metrics of an application, and aggregate the raw data into an accumulated value for evaluation. - - This API is used to return the aggregated metric result of an application. + List instance metrics of an application version: 1.0.0 security: # Do we need that? - mtls: [] -- basicAuthentication: [] +- basicAuthentication: [] #TODO tags: - name: Application Metric API V1 - description: This API is used to return the aggregated metric result of an application. + description: List instance metrics of an application. paths: - /v1/apps/{guid}/aggregated_metric_histories/metric_type: + /v1/apps/{guid}/metric_histories/{metric_type}: parameters: - name: guid in: path @@ -31,9 +29,7 @@ paths: required: true description: The metric type schema: - type: string - enum: ["memoryused", "memoryutil", "responsetime", "throughput or custom metric's name"] - example: metric_type=memoryused + $ref: "./shared_definitions.yaml#/schemas/metric_type" - name: start-time in: query description: | @@ -82,9 +78,9 @@ paths: example: | bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o get: - summary: Retrieves the aggregated metric result of an application + summary: Retrieves the instance metrics of an application description: | - Use to retrieve aggregated metric result of an app. + Use to retrieve instance metrics of an application tags: - Application Metric API V1 responses: @@ -96,6 +92,8 @@ paths: $ref: "#/components/schemas/Application_Metrics" default: $ref: "./shared_definitions.yaml#/responses/Error" + #/v1/apps/{guid}/aggregated_metric_histories/{metric_type}: + # $ref: "#/paths/~1v1/apps/{guid}/metric_histories/{metric_type}" TODO components: schemas: Application_Metrics: @@ -127,14 +125,26 @@ components: type: array items: $ref: '#/components/schemas/ApplicationMetric' - ApplicationMetric: + ApplicationMetric: + description: Object containing metric history + type: object + properties: app_guid: $ref: "./shared_definitions.yaml#/schemas/GUID" + instanceIndex: + type: integer + description: Application Metric #TODO + example: 0 timestamp: type: integer description: | The scaling time in the number of nanoseconds elapsed since January 1, 1970 UTC. example: 1494989539138350432 + collected_at: + type: integer + description: | + The time at which the metrics were collected in the number of nanoseconds + example: 1494989539138350000 metric_type: $ref: "./shared_definitions.yaml#/schemas/metric_type" value: @@ -143,5 +153,5 @@ components: The value of metric type to be returned as the aggregated metric result of an application example: 400 unit: - type: string # Todo - \ No newline at end of file + type: string + example: megabytes \ No newline at end of file diff --git a/api/policy-api.yaml b/api/policy-api.yaml index 754b195d2e..bfd6dd573d 100644 --- a/api/policy-api.yaml +++ b/api/policy-api.yaml @@ -1,11 +1,11 @@ -openapi: 3.0.0 +openapi: 3.1.0 info: title: Policy API description: This API is used to create, delete, retrieve the policy version: 1.0.0 - security: -- mtls: [] -- basicAuthentication: [] +#security: +#- mtls: [] +#- basicAuthentication: [] #TODO tags: - name: Policy API V1 description: This API is used to create, delete, retrieve the policy @@ -17,7 +17,6 @@ paths: in: path required: true description: | - The GUID identifying the application for which the scaling history is fetched. It can be found in the `application_id` property of the JSON object stored in the @@ -35,8 +34,14 @@ paths: summary: Retrieves the Policy description: This API is used to create the policy tags: - - Create Policy API V1 - response: + - Create Policy API V1 + requestBody: + type: array + content: + application/json: + schema: + $ref: "#/components/schemas/Policy/Policy" #TODO + responses: "200": description: "OK" content: @@ -44,10 +49,38 @@ paths: schema: $ref: "#/components/schemas/Policy/CreatePolicy" default: - $ref: "./shared_definitons.yaml#/responses/Error" + $ref: "./shared_definitons.yaml#/responses/Error" + delete: + summary: Deletes the policy + description: This API is used to delete the policy + tags: + - Delete Policy API V1 + response: + "200": + description: "OK" + content: + application/json: + schema: + $ref: "#/components/schemas/Policy/DeletePolicy" + default: + $ref: "./shared_definitons.yaml#/responses/Error" + get: + summary: Retrieves the Policy + description: This API is used to retrieve the policy + tags: + - Get Policy API V1 + response: + "200": + description: "OK" + content: + application/json: + schema: + $ref: "#/components/schemas/Policy/Policy" + default: + $ref: "./shared_definitons.yaml#/responses/Error" components: schemas: - CreatePolicy: + Policy: description: Object creating Policy type: object properties: @@ -108,86 +141,96 @@ components: items: $ref: '#/components/schemas/Schedules' Schedules: - timezone: - description: Using timezone definition of Java #https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html - Do we need to implement it? - required: true - type: string - example: Asia/Shanghai - # TODO: Try to make use of - #- $ref: "../../src/autoscaler/api/policyvalidator/policy_json.schema.json#/" # TODO: - recurring_schedule: - - $ref: "./shared_definitions.yaml#/schemas/recurring_schedule" - specific_date: - - $ref: "./shared_definitions.yaml#/schemas/specific_date" - delete: - summary: Deletes the policy - description: This API is used to delete the policy - tags: - - Delete Policy API V1 - response: - "200": - description: "OK" - content: - application/json: - schema: - $ref: "#/components/schemas/Policy/DeletePolicy" - default: - $ref: "./shared_definitons.yaml#/responses/Error" - get: - summary: Retrieves the Policy - description: This API is used to retrieve the policy - tags: - - Get Policy API V1 - response: - "200": - description: "OK" - content: - application/json: - schema: - $ref: "#/components/schemas/Policy/GetPolicy" - default: - $ref: "./shared_definitons.yaml#/responses/Error" -components: - schemas: - GetPolicy: - description: Object containing Policy - type: object properties: + timezone: + description: Using timezone definition of Java #https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html - Do we need to implement it? + required: true + type: string + example: Asia/Shanghai + # TODO: Try to make use of + #- $ref: "../../src/autoscaler/api/policyvalidator/policy_json.schema.json#/" # TODO: + recurring_schedule: + type: array + items: + $ref: '#/schemas/RecurringSchedule' + RecurringSchedule: + properties: + start_date: + description: the start date of the schedule. Must be a future time + type: string + format: date + example: 2016-06-27 + end_date: + description: the end date of the schedule. Must be a future time. + type: string + format: date + example: 2016-07-23 + start_time: + description: the start time of the schedule in HH:MM format + required: true + type: string + pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ + example: 11:00 + end_time: + description: the end time of the schedule in HH:MM format + required: true + type: string + pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ + example: 19:30 + end time of the schedule: + description: | + recurring days of a week or month. Use [1,2,..,7] or [1,2,...,31] to define it + type: array + example: [5, 15, 25] instance_min_count: + description: minimal number of instance count for this schedule + required: true type: integer format: int64 - description: minimal number of instance count - example: 2 - instance_max_count: + example: 3 + instance_max_count: + description: maximal number of instance count for this schedule + required: true type: integer format: int64 - description: maximal number of instance count - example: 4 - scaling_rules: - type: array - items: - $ref: '#/components/schemas/ScalingRules' - ScalingRules: - metric_type: - - $ref: "./shared_definitions.yaml#/schemas/metric_type" - threshold: - - $ref: "./shared_definitions.yaml#/schemas/threshold" - operator: - - $ref: "./shared_definitions.yaml#/schemas/operator" - adjustment: - - $ref: "./shared_definitions.yaml#/schemas/adjustment" - breach_duration_secs: - - $ref: "./shared_definitions.yaml#/schemas/breach_duration_secs" - cool_down_secs: - - $ref: "./shared_definitions.yaml#/schemas/cool_down_secs" - schedules: + example: 10 + instance_min_instance_count: + description: the initial minimal number of instance count for this schedule + type: integer + format: int64 + example: 5 + specific_date: type: array items: - $ref: '#/components/schemas/Schedules' - Schedules: - timezone: - - $ref: "./shared_definitions.yaml#/schemas/timezone" - recurring_schedule: - - $ref: "./shared_definitions.yaml#/schemas/recurring_schedule" - specific_date: - - $ref: "./shared_definitions.yaml#/schemas/specific_date" \ No newline at end of file + $ref: '#/schemas/SpecificDate' + SpecificDate: + properties: + start_date_time: + description: the start time of the schedule. Must be a future time + required: true + type: string + pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/ + example: 2015-01-04T20:00 + end_date_time: # the doc has this as a start_date_time + description: the start time of the schedule. Must be a future time + required: true + type: string + pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/ + example: 2015-01-04T20:00 + instance_min_count: + description: minimal number of instance count for this schedule + required: true + type: integer + format: int64 + example: 2 + instance_max_count: + description: maximal number of instance count for this schedule + required: true + type: integer + format: int64 + example: 5 + instance_min_instance_count: + description: the initial minimal number of instance count for this schedule + type: integer + format: int64 + example: 3 \ No newline at end of file diff --git a/api/shared_definitions.yaml b/api/shared_definitions.yaml index 77fc53ac95..0d84c08f4f 100644 --- a/api/shared_definitions.yaml +++ b/api/shared_definitions.yaml @@ -29,105 +29,7 @@ schemas: description: | One user-defined custom metric type or one of the system-default metric types, which are: "memoryused", "memoryutil", "responsetime", "throughput" and "cpu" - required: true type: string example: memoryused - recurring_schedule: - type: array - items: - $ref: '#/schemas/RecurringSchedule' - RecurringSchedule: - AnyOf: - - $ref: '#/schemas/start_date' - - $ref: '#/schemas/end_date' - - $ref: '#/schemas/start_time' - - $ref: '#/schemas/end_time' - - $ref: '#/schemas/days_of_week_or_month' - - $ref: '#/schemas/instance_min_count' - - $ref: '#/schemas/instance_max_count' - - $ref: '#/schemas/initial_min_instance_count' - start_date: - description: the start date of the schedule. Must be a future time - type: string - format: date - example: 2016-06-27 - end_date: - description: the end date of the schedule. Must be a future time. - type: string - format: date - example: 2016-07-23 - start_time: - description: the start time of the schedule in HH:MM format - required: true - type: string - pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ - example: 11:00 - end_time: - description: the end time of the schedule in HH:MM format - required: true - type: string - pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ - example: 19:30 - end time of the schedule: - description: | - recurring days of a week or month. Use [1,2,..,7] or [1,2,...,31] to define it - type: array - example: [5, 15, 25] - instance_min_count: - description: minimal number of instance count for this schedule - required: true - type: integer - format: int64 - example: 3 - instance_max_count: - description: maximal number of instance count for this schedule - required: true - type: integer - format: int64 - example: 10 - instance_min_instance_count: - description: the initial minimal number of instance count for this schedule - type: integer - format: int64 - example: 5 - specific_date: - type: array - items: - $ref: '#/schemas/SpecificDate' - SpecificDate: - AnyOf: - - $ref: '#/schemas/start_date_time' - - $ref: '#/schemas/end_date_time' - - $ref: '#/schemas/instance_min_count' - - $ref: '#/schemas/instance_max_count' - - $ref: '#/schemas/initial_min_instance_count' - start_date_time: - description: the start time of the schedule. Must be a future time - required: true - type: string - pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/ - example: 2015-01-04T20:00 - end_date_time: # the doc has this as a start_date_time - description: the start time of the schedule. Must be a future time - required: true - type: string - pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/ - example: 2015-01-04T20:00 - instance_min_count: - description: minimal number of instance count for this schedule - required: true - type: integer - format: int64 - example: 2 - instance_max_count: - description: maximal number of instance count for this schedule - required: true - type: integer - format: int64 - example: 5 - instance_min_instance_count: - description: the initial minimal number of instance count for this schedule - type: integer - format: int64 - example: 3 \ No newline at end of file + \ No newline at end of file From ec389a49274735e573a8c7fc550a8f48c592dac2 Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Mon, 12 Jun 2023 16:40:02 +0100 Subject: [PATCH 085/294] WIP- Changes & validation of OAS --- api/aggregated-metric-api.yaml | 148 ---- api/application-metric-api.yaml | 55 +- api/custom-metrics-api.yaml | 32 +- api/policy-api.yaml | 47 +- api/scaling-history-api.yaml | 41 +- api/shared_definitions.yaml | 7 + src/acceptance/assets/app/go_app/Makefile | 2 +- .../internal/custommetrics/oas_cfg_gen.go | 10 +- .../assets/app/go_app/internal/generate.go | 3 + .../internal/scalinghistory/oas_cfg_gen.go | 141 ++++ .../internal/scalinghistory/oas_client_gen.go | 238 +++++++ .../internal/scalinghistory/oas_json_gen.go | 649 ++++++++++++++++++ .../scalinghistory/oas_parameters_gen.go | 21 + .../oas_request_encoders_gen.go | 3 + .../oas_response_decoders_gen.go | 98 +++ .../scalinghistory/oas_schemas_gen.go | 596 ++++++++++++++++ .../scalinghistory/oas_validators_gen.go | 200 ++++++ 17 files changed, 2104 insertions(+), 187 deletions(-) delete mode 100644 api/aggregated-metric-api.yaml create mode 100644 src/acceptance/assets/app/go_app/internal/scalinghistory/oas_cfg_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/scalinghistory/oas_client_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/scalinghistory/oas_json_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/scalinghistory/oas_parameters_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/scalinghistory/oas_request_encoders_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/scalinghistory/oas_response_decoders_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/scalinghistory/oas_schemas_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/scalinghistory/oas_validators_gen.go diff --git a/api/aggregated-metric-api.yaml b/api/aggregated-metric-api.yaml deleted file mode 100644 index 98ef81cb6f..0000000000 --- a/api/aggregated-metric-api.yaml +++ /dev/null @@ -1,148 +0,0 @@ -openapi: 3.0.0 -info: - title: Aggregated Metric API - description: | - AutoScaler collects the instances' metrics of an application, and aggregate the raw data into an accumulated value for evaluation. - - This API is used to return the aggregated metric result of an application. - version: 1.0.0 -security: # Do we need that? -- mtls: [] -- basicAuthentication: [] #TODO -tags: -- name: Aggregated Metric API V1 - description: This API is used to return the aggregated metric result of an application. - -paths: - /v1/apps/{guid}/aggregated_metric_histories/{metric_type}: - parameters: - - name: guid - in: path - required: true - description: | - The GUID identifying the application for which the scaling history is fetched. - - It can be found in the `application_id` property of the JSON object stored in the - `VCAP_APPLICATION` environment variable. - schema: - $ref: "./shared_definitions.yaml#/schemas/GUID" - - name: metric_type - in: query - required: true - description: The metric type - schema: - $ref: "./shared_definitions.yaml#/schemas/metric_type" - - name: start-time - in: query - description: | - The start time in the number of nanoseconds elapsed since January 1, 1970 UTC. - schema: - type: integer - default: 0 - example: start-time=1494989539138350432 - - name: end-time - in: query - description: | - The end time in the number of nanoseconds elapsed since January 1, 1970 UTC. - schema: - type: integer - default: 0 - example: end-time=1494989549117047288 - - name: order-direction - in: query - description: | - The sorting order. The scaling history will be order by timestamp ascending or descending. - schema: - type: string - enum: ["asc", "desc"] - default: desc - example: order-direction=desc - - name: page - in: query - description: The page number to query - schema: - type: integer - minimum: 1 # Or Should it be "1"? - default: 1 - example: page=1 - - name: results-per-page - in: query - description: Number of entries shown per page. - schema: - type: integer - minimum: 0 # Or Should it be "1"? - default: 50 - example: results-per-page=10 - - name: Authorization - in: header - schema: - type: string - example: | - bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o - get: - summary: Retrieves the aggregated metric result of an application - description: | - Use to retrieve aggregated metric result of an app. - tags: - - Aggregated Metric API V1 - responses: - "200": - description: "OK" - content: - application/json: - schema: - $ref: "#/components/schemas/Aggregated_Metrics" - default: - $ref: "./shared_definitions.yaml#/responses/Error" -components: - schemas: - Aggregated_Metrics: - description: Object containing Application Metrics. - type: object - properties: - total_results: - type: integer - format: int64 - description: Number of history entries found for the given query. - example: 2 - total_pages: - type: integer - format: int64 - description: Number of Pages from the query - example: 1 - page: - type: integer - format: int64 - description: Number of the current page. - example: 1 - prev_url: - type: string - format: uri - next_url: - type: string - format: uri - resources: - type: array - items: - $ref: '#/components/schemas/AggregatedMetric' - AggregatedMetric: - description: Object containing metric history - type: object - properties: - app_guid: - $ref: "./shared_definitions.yaml#/schemas/GUID" - timestamp: - type: integer - description: | - The scaling time in the number of nanoseconds elapsed since January 1, 1970 UTC. - example: 1494989539138350432 - metric_type: - $ref: "./shared_definitions.yaml#/schemas/metric_type" - value: - type: integer - description: | - The value of metric type to be returned as the aggregated metric result of an application - example: 400 - unit: - type: string - example: megabytes \ No newline at end of file diff --git a/api/application-metric-api.yaml b/api/application-metric-api.yaml index 2061956486..61b1234f9a 100644 --- a/api/application-metric-api.yaml +++ b/api/application-metric-api.yaml @@ -1,8 +1,10 @@ -openapi: 3.0.0 +openapi: 3.1.0 info: title: Application Metric API description: | - List instance metrics of an application + List aggregated metrics of an application. AutoScaler collects the instances' metrics of an application, + and aggregate the raw data into an accumulated value for evaluation. + This API is used to return the aggregated metric result of an application. version: 1.0.0 security: # Do we need that? - mtls: [] @@ -12,7 +14,7 @@ tags: description: List instance metrics of an application. paths: - /v1/apps/{guid}/metric_histories/{metric_type}: + /v1/apps/{guid}/aggregated_metric_histories/{metric_type}: parameters: - name: guid in: path @@ -23,13 +25,21 @@ paths: It can be found in the `application_id` property of the JSON object stored in the `VCAP_APPLICATION` environment variable. schema: - $ref: "./shared_definitions.yaml#/schemas/GUID" + type: string + pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} + example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 + #$ref: "./shared_definitions.yaml#/schemas/GUID" - name: metric_type in: query required: true description: The metric type schema: - $ref: "./shared_definitions.yaml#/schemas/metric_type" + description: | + One user-defined custom metric type or one of the system-default metric types, which are: + "memoryused", "memoryutil", "responsetime", "throughput" and "cpu" + type: string + example: memoryused + #$ref: "./shared_definitions.yaml#/schemas/metric_type" - name: start-time in: query description: | @@ -91,11 +101,24 @@ paths: schema: $ref: "#/components/schemas/Application_Metrics" default: - $ref: "./shared_definitions.yaml#/responses/Error" - #/v1/apps/{guid}/aggregated_metric_histories/{metric_type}: - # $ref: "#/paths/~1v1/apps/{guid}/metric_histories/{metric_type}" TODO + description: | + Error, the response body may contain further information. + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + #$ref: "./shared_definitions.yaml#/responses/Error" components: schemas: + ErrorResponse: + type: object + properties: + code: + type: string + description: The textual error code. + message: + type: string + description: The message describing the cause of the error. Application_Metrics: description: Object containing Application Metrics. type: object @@ -130,7 +153,14 @@ components: type: object properties: app_guid: - $ref: "./shared_definitions.yaml#/schemas/GUID" + description: | + Identificator used by Cloud Foundry for entities. + + Anything is an entity. Apps, services, service-bindings, … + type: string + pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} + example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 + #$ref: "./shared_definitions.yaml#/schemas/GUID" instanceIndex: type: integer description: Application Metric #TODO @@ -146,7 +176,12 @@ components: The time at which the metrics were collected in the number of nanoseconds example: 1494989539138350000 metric_type: - $ref: "./shared_definitions.yaml#/schemas/metric_type" + description: | + One user-defined custom metric type or one of the system-default metric types, which are: + "memoryused", "memoryutil", "responsetime", "throughput" and "cpu" + type: string + example: memoryused + #$ref: "./shared_definitions.yaml#/schemas/metric_type" value: type: integer description: | diff --git a/api/custom-metrics-api.yaml b/api/custom-metrics-api.yaml index 095fbb7c27..76a017af35 100644 --- a/api/custom-metrics-api.yaml +++ b/api/custom-metrics-api.yaml @@ -16,22 +16,15 @@ paths: parameters: - in: path name: appGuid - description: | - The GUID identifying the application the custom metrics are submitted for. - - It can be found in the `application_id` property of the JSON object stored in the - `VCAP_APPLICATION` environment variable. + description: The GUID identifying the application the custom metrics are submitted for. Can be found in the `application_id` property of the JSON object stored in the `VCAP_APPLICATION` environment variable. example: 58d162ad-87d5-4f52-8abf-e56a63a67292 required: true schema: - $ref: "./shared_definitions.yaml#/schemas/GUID" + type: string post: summary: Submits application-specific custom metrics to app-autoscaler. description: | - Use to submit custom metrics to app-autoscaler which are defined and used in a dynamic - scaling policy to enable automatic scaling based on application-specific metrics. - - We recommend submitting the custom metrics every 40 seconds from every application instance. + Use to submit custom metrics to app-autoscaler which are defined and used in a dynamic scaling policy to enable automatic scaling based on application-specific metrics. We recommend submitting the custom metrics every 40 seconds from every application instance. tags: - Custom Metrics API V1 requestBody: @@ -45,11 +38,19 @@ paths: '200': description: Metrics were successfully submitted. default: - $ref: "./shared_definitions.yaml#/responses/Error" + $ref: '#/components/responses/Error' security: - mtls: [] x-codegen-request-body-name: body components: + responses: + Error: + description: | + Error, the response body may contain further information. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' schemas: Metrics: required: @@ -85,6 +86,15 @@ components: type: string description: An optional unit for the metric, for display purposes only. example: jobs + ErrorResponse: + type: object + properties: + code: + type: string + description: The textual error code. + message: + type: string + description: The message describing the cause of the error. securitySchemes: mtls: type: mutualTLS diff --git a/api/policy-api.yaml b/api/policy-api.yaml index bfd6dd573d..27a13efd1e 100644 --- a/api/policy-api.yaml +++ b/api/policy-api.yaml @@ -22,7 +22,10 @@ paths: It can be found in the `application_id` property of the JSON object stored in the `VCAP_APPLICATION` environment variable. schema: - $ref: "./shared_definitions.yaml#/schemas/GUID" + type: string + pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} + example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 + #$ref: "./shared_definitions.yaml#/schemas/GUID" - name: Authorization in: header @@ -49,7 +52,13 @@ paths: schema: $ref: "#/components/schemas/Policy/CreatePolicy" default: - $ref: "./shared_definitons.yaml#/responses/Error" + description: | + Error, the response body may contain further information. + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + #$ref: "./shared_definitons.yaml#/responses/Error" delete: summary: Deletes the policy description: This API is used to delete the policy @@ -63,7 +72,13 @@ paths: schema: $ref: "#/components/schemas/Policy/DeletePolicy" default: - $ref: "./shared_definitons.yaml#/responses/Error" + description: | + Error, the response body may contain further information. + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + #$ref: "./shared_definitons.yaml#/responses/Error" get: summary: Retrieves the Policy description: This API is used to retrieve the policy @@ -77,9 +92,24 @@ paths: schema: $ref: "#/components/schemas/Policy/Policy" default: - $ref: "./shared_definitons.yaml#/responses/Error" + description: | + Error, the response body may contain further information. + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + #$ref: "./shared_definitons.yaml#/responses/Error" components: schemas: + ErrorResponse: + type: object + properties: + code: + type: string + description: The textual error code. + message: + type: string + description: The message describing the cause of the error. Policy: description: Object creating Policy type: object @@ -101,7 +131,12 @@ components: ScalingRule: properties: metric_type: - - $ref: "./shared_definitions.yaml#/schemas/metric_type" + description: | + One user-defined custom metric type or one of the system-default metric types, which are: + "memoryused", "memoryutil", "responsetime", "throughput" and "cpu" + type: string + example: memoryused + #$ref: "./shared_definitions.yaml#/schemas/metric_type" threshold: description: | The boundary when metric value exceeds is considered as a breach @@ -211,7 +246,7 @@ components: type: string pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/ example: 2015-01-04T20:00 - end_date_time: # the doc has this as a start_date_time + end_date_time: description: the start time of the schedule. Must be a future time required: true type: string diff --git a/api/scaling-history-api.yaml b/api/scaling-history-api.yaml index 28256f79b4..795c488be3 100644 --- a/api/scaling-history-api.yaml +++ b/api/scaling-history-api.yaml @@ -1,11 +1,11 @@ -openapi: 3.0.0 +openapi: 3.1.0 info: title: Scaling History API description: List scaling history of an application version: 1.0.0 -security: # Do we need that? -- mtls: [] -- basicAuthentication: [] +#security: # Do we need that? +#- mtls: [] +#- basicAuthentication: [] tags: - name: Scaling History API V1 description: List the scaling history of an Application @@ -22,7 +22,10 @@ paths: It can be found in the `application_id` property of the JSON object stored in the `VCAP_APPLICATION` environment variable. schema: - $ref: "./shared_definitions.yaml#/schemas/GUID" + type: string + pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} + example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 + #$ref: "shared_definitions.yaml#/schemas/GUID" - name: start-time in: query description: | @@ -84,10 +87,25 @@ paths: schema: $ref: "#/components/schemas/History" default: - $ref: "./shared_definitions.yaml#/responses/Error" + # $ref: "#/parameters/Error" #"./shared_definitions.yaml#/responses/Error" + description: | + Error, the response body may contain further information. + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" components: schemas: + ErrorResponse: + type: object + properties: + code: + type: string + description: The textual error code. + message: + type: string + description: The message describing the cause of the error. History: description: Object containing scaling history. type: object @@ -153,7 +171,16 @@ components: This field is as well a selector of which of the other ones are used and which not. example: 0 app_guid: - $ref: "./shared_definitions.yaml#/schemas/GUID" + description: | + The GUID identifying the application for which the scaling history is fetched. + + It can be found in the `application_id` property of the JSON object stored in the + `VCAP_APPLICATION` environment variable. + schema: + type: string + pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} + example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 + #$ref: "./shared_definitions.yaml#/schemas/GUID" timestamp: type: integer description: | diff --git a/api/shared_definitions.yaml b/api/shared_definitions.yaml index 0d84c08f4f..e2fd262d90 100644 --- a/api/shared_definitions.yaml +++ b/api/shared_definitions.yaml @@ -1,3 +1,10 @@ +openapi: 3.1.0 +info: + title: app-autoscaler custom metrics API + description: | + app-autoscaler lets you automatically increase or decrease the number of your application instances based on the policies you have defined. Your applications can call the app-autoscaler custom metrics API to submit custom metrics defined and used in a dynamic scaling policy to enable automatic scaling based on application-specific metrics. + version: 1.0.0 +paths: {} parameters: {} responses: Error: diff --git a/src/acceptance/assets/app/go_app/Makefile b/src/acceptance/assets/app/go_app/Makefile index 5a0cc61307..560c2e9086 100644 --- a/src/acceptance/assets/app/go_app/Makefile +++ b/src/acceptance/assets/app/go_app/Makefile @@ -51,7 +51,7 @@ start: build deploy: build ./deploy.sh -generate: go.mod ../../../../../api/custom-metrics-api.yaml +generate: go.mod ../../../../../api/custom-metrics-api.yaml ../../../../../api/scaling-history-api.yaml ../../../../../api/policy-api.yaml ../../../../../api/application-metric-api.yaml go generate ./... .PHONY: clean diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_cfg_gen.go b/src/acceptance/assets/app/go_app/internal/custommetrics/oas_cfg_gen.go index a5b6d9e2cc..5b1cedbd7e 100644 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_cfg_gen.go +++ b/src/acceptance/assets/app/go_app/internal/custommetrics/oas_cfg_gen.go @@ -7,6 +7,8 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/global" + "go.opentelemetry.io/otel/metric/instrument" "go.opentelemetry.io/otel/trace" ht "github.com/ogen-go/ogen/http" @@ -35,7 +37,7 @@ func (cfg *otelConfig) initOTEL() { cfg.TracerProvider = otel.GetTracerProvider() } if cfg.MeterProvider == nil { - cfg.MeterProvider = otel.GetMeterProvider() + cfg.MeterProvider = global.MeterProvider() } cfg.Tracer = cfg.TracerProvider.Tracer(otelogen.Name, trace.WithInstrumentationVersion(otelogen.SemVersion()), @@ -79,9 +81,9 @@ func newClientConfig(opts ...ClientOption) clientConfig { type baseClient struct { cfg clientConfig - requests metric.Int64Counter - errors metric.Int64Counter - duration metric.Int64Histogram + requests instrument.Int64Counter + errors instrument.Int64Counter + duration instrument.Int64Histogram } func (cfg clientConfig) baseClient() (c baseClient, err error) { diff --git a/src/acceptance/assets/app/go_app/internal/generate.go b/src/acceptance/assets/app/go_app/internal/generate.go index c017fa7b4b..09c0e075ac 100644 --- a/src/acceptance/assets/app/go_app/internal/generate.go +++ b/src/acceptance/assets/app/go_app/internal/generate.go @@ -1,3 +1,6 @@ package internal //go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target custommetrics --clean ../../../../../../api/custom-metrics-api.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target scalinghistory --clean ../../../../../../api/scaling-history-api.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target policy --clean ../../../../../../api/policy-api.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target applicationmetric --clean ../../../../../../api/application-metric-api.yaml \ No newline at end of file diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_cfg_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_cfg_gen.go new file mode 100644 index 0000000000..2975fe8f63 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_cfg_gen.go @@ -0,0 +1,141 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "net/http" + + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/global" + "go.opentelemetry.io/otel/metric/instrument" + "go.opentelemetry.io/otel/trace" + + ht "github.com/ogen-go/ogen/http" + "github.com/ogen-go/ogen/ogenregex" + "github.com/ogen-go/ogen/otelogen" +) + +var regexMap = map[string]ogenregex.Regexp{ + "(\\d|[a-f]){8}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){12}": ogenregex.MustCompile("(\\d|[a-f]){8}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){12}"), +} +var ( + // Allocate option closure once. + clientSpanKind = trace.WithSpanKind(trace.SpanKindClient) +) + +type ( + optionFunc[C any] func(*C) + otelOptionFunc func(*otelConfig) +) + +type otelConfig struct { + TracerProvider trace.TracerProvider + Tracer trace.Tracer + MeterProvider metric.MeterProvider + Meter metric.Meter +} + +func (cfg *otelConfig) initOTEL() { + if cfg.TracerProvider == nil { + cfg.TracerProvider = otel.GetTracerProvider() + } + if cfg.MeterProvider == nil { + cfg.MeterProvider = global.MeterProvider() + } + cfg.Tracer = cfg.TracerProvider.Tracer(otelogen.Name, + trace.WithInstrumentationVersion(otelogen.SemVersion()), + ) + cfg.Meter = cfg.MeterProvider.Meter(otelogen.Name) +} + +type clientConfig struct { + otelConfig + Client ht.Client +} + +// ClientOption is client config option. +type ClientOption interface { + applyClient(*clientConfig) +} + +var _ = []ClientOption{ + (optionFunc[clientConfig])(nil), + (otelOptionFunc)(nil), +} + +func (o optionFunc[C]) applyClient(c *C) { + o(c) +} + +func (o otelOptionFunc) applyClient(c *clientConfig) { + o(&c.otelConfig) +} + +func newClientConfig(opts ...ClientOption) clientConfig { + cfg := clientConfig{ + Client: http.DefaultClient, + } + for _, opt := range opts { + opt.applyClient(&cfg) + } + cfg.initOTEL() + return cfg +} + +type baseClient struct { + cfg clientConfig + requests instrument.Int64Counter + errors instrument.Int64Counter + duration instrument.Int64Histogram +} + +func (cfg clientConfig) baseClient() (c baseClient, err error) { + c = baseClient{cfg: cfg} + if c.requests, err = c.cfg.Meter.Int64Counter(otelogen.ClientRequestCount); err != nil { + return c, err + } + if c.errors, err = c.cfg.Meter.Int64Counter(otelogen.ClientErrorsCount); err != nil { + return c, err + } + if c.duration, err = c.cfg.Meter.Int64Histogram(otelogen.ClientDuration); err != nil { + return c, err + } + return c, nil +} + +// Option is config option. +type Option interface { + ClientOption +} + +// WithTracerProvider specifies a tracer provider to use for creating a tracer. +// +// If none is specified, the global provider is used. +func WithTracerProvider(provider trace.TracerProvider) Option { + return otelOptionFunc(func(cfg *otelConfig) { + if provider != nil { + cfg.TracerProvider = provider + } + }) +} + +// WithMeterProvider specifies a meter provider to use for creating a meter. +// +// If none is specified, the global.MeterProvider() is used. +func WithMeterProvider(provider metric.MeterProvider) Option { + return otelOptionFunc(func(cfg *otelConfig) { + if provider != nil { + cfg.MeterProvider = provider + } + }) +} + +// WithClient specifies http client to use. +func WithClient(client ht.Client) ClientOption { + return optionFunc[clientConfig](func(cfg *clientConfig) { + if client != nil { + cfg.Client = client + } + }) +} diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_client_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_client_gen.go new file mode 100644 index 0000000000..e4c8f09238 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_client_gen.go @@ -0,0 +1,238 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "context" + "net/url" + "strings" + "time" + + "github.com/go-faster/errors" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/metric" + + "github.com/ogen-go/ogen/conv" + ht "github.com/ogen-go/ogen/http" + "github.com/ogen-go/ogen/uri" +) + +// Client implements OAS client. +type Client struct { + serverURL *url.URL + baseClient +} + +func trimTrailingSlashes(u *url.URL) { + u.Path = strings.TrimRight(u.Path, "/") + u.RawPath = strings.TrimRight(u.RawPath, "/") +} + +// NewClient initializes new Client defined by OAS. +func NewClient(serverURL string, opts ...ClientOption) (*Client, error) { + u, err := url.Parse(serverURL) + if err != nil { + return nil, err + } + trimTrailingSlashes(u) + + c, err := newClientConfig(opts...).baseClient() + if err != nil { + return nil, err + } + return &Client{ + serverURL: u, + baseClient: c, + }, nil +} + +type serverURLKey struct{} + +// WithServerURL sets context key to override server URL. +func WithServerURL(ctx context.Context, u *url.URL) context.Context { + return context.WithValue(ctx, serverURLKey{}, u) +} + +func (c *Client) requestURL(ctx context.Context) *url.URL { + u, ok := ctx.Value(serverURLKey{}).(*url.URL) + if !ok { + return c.serverURL + } + return u +} + +// V1AppsGUIDScalingHistoriesGet invokes GET /v1/apps/{guid}/scaling_histories operation. +// +// Use to retrieve scaling history for an app. +// +// GET /v1/apps/{guid}/scaling_histories +func (c *Client) V1AppsGUIDScalingHistoriesGet(ctx context.Context, params V1AppsGUIDScalingHistoriesGetParams) (*History, error) { + res, err := c.sendV1AppsGUIDScalingHistoriesGet(ctx, params) + _ = res + return res, err +} + +func (c *Client) sendV1AppsGUIDScalingHistoriesGet(ctx context.Context, params V1AppsGUIDScalingHistoriesGetParams) (res *History, err error) { + var otelAttrs []attribute.KeyValue + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, elapsedDuration.Microseconds(), metric.WithAttributes(otelAttrs...)) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "V1AppsGUIDScalingHistoriesGet", + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [3]string + pathParts[0] = "/v1/apps/" + { + // Encode "guid" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "guid", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.GUID)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/scaling_histories" + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeQueryParams" + q := uri.NewQueryEncoder() + { + // Encode "start-time" parameter. + cfg := uri.QueryParameterEncodingConfig{ + Name: "start-time", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := params.StartTime.Get(); ok { + return e.EncodeValue(conv.IntToString(val)) + } + return nil + }); err != nil { + return res, errors.Wrap(err, "encode query") + } + } + { + // Encode "end-time" parameter. + cfg := uri.QueryParameterEncodingConfig{ + Name: "end-time", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := params.EndTime.Get(); ok { + return e.EncodeValue(conv.IntToString(val)) + } + return nil + }); err != nil { + return res, errors.Wrap(err, "encode query") + } + } + { + // Encode "order-direction" parameter. + cfg := uri.QueryParameterEncodingConfig{ + Name: "order-direction", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := params.OrderDirection.Get(); ok { + return e.EncodeValue(conv.StringToString(string(val))) + } + return nil + }); err != nil { + return res, errors.Wrap(err, "encode query") + } + } + { + // Encode "page" parameter. + cfg := uri.QueryParameterEncodingConfig{ + Name: "page", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := params.Page.Get(); ok { + return e.EncodeValue(conv.IntToString(val)) + } + return nil + }); err != nil { + return res, errors.Wrap(err, "encode query") + } + } + { + // Encode "results-per-page" parameter. + cfg := uri.QueryParameterEncodingConfig{ + Name: "results-per-page", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := params.ResultsPerPage.Get(); ok { + return e.EncodeValue(conv.IntToString(val)) + } + return nil + }); err != nil { + return res, errors.Wrap(err, "encode query") + } + } + u.RawQuery = q.Values().Encode() + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "GET", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeV1AppsGUIDScalingHistoriesGetResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_json_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_json_gen.go new file mode 100644 index 0000000000..18330a1e06 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_json_gen.go @@ -0,0 +1,649 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "github.com/go-faster/errors" + "github.com/go-faster/jx" + + "github.com/ogen-go/ogen/json" +) + +// Encode implements json.Marshaler. +func (s *ErrorResponse) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ErrorResponse) encodeFields(e *jx.Encoder) { +} + +var jsonFieldsNameOfErrorResponse = [0]string{} + +// Decode decodes ErrorResponse from json. +func (s *ErrorResponse) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ErrorResponse to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ErrorResponse") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ErrorResponse) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ErrorResponse) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *History) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *History) encodeFields(e *jx.Encoder) { + { + if s.TotalResults.Set { + e.FieldStart("total_results") + s.TotalResults.Encode(e) + } + } + { + if s.TotalPages.Set { + e.FieldStart("total_pages") + s.TotalPages.Encode(e) + } + } + { + if s.Page.Set { + e.FieldStart("page") + s.Page.Encode(e) + } + } + { + if s.PrevURL.Set { + e.FieldStart("prev_url") + s.PrevURL.Encode(e) + } + } + { + if s.NextURL.Set { + e.FieldStart("next_url") + s.NextURL.Encode(e) + } + } + { + if s.Resources != nil { + e.FieldStart("resources") + e.ArrStart() + for _, elem := range s.Resources { + elem.Encode(e) + } + e.ArrEnd() + } + } +} + +var jsonFieldsNameOfHistory = [6]string{ + 0: "total_results", + 1: "total_pages", + 2: "page", + 3: "prev_url", + 4: "next_url", + 5: "resources", +} + +// Decode decodes History from json. +func (s *History) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode History to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "total_results": + if err := func() error { + s.TotalResults.Reset() + if err := s.TotalResults.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"total_results\"") + } + case "total_pages": + if err := func() error { + s.TotalPages.Reset() + if err := s.TotalPages.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"total_pages\"") + } + case "page": + if err := func() error { + s.Page.Reset() + if err := s.Page.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"page\"") + } + case "prev_url": + if err := func() error { + s.PrevURL.Reset() + if err := s.PrevURL.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"prev_url\"") + } + case "next_url": + if err := func() error { + s.NextURL.Reset() + if err := s.NextURL.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"next_url\"") + } + case "resources": + if err := func() error { + s.Resources = make([]HistoryEntry, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem HistoryEntry + if err := elem.Decode(d); err != nil { + return err + } + s.Resources = append(s.Resources, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"resources\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode History") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *History) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *History) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *HistoryEntry) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *HistoryEntry) encodeFields(e *jx.Encoder) { + { + if s.Status.Set { + e.FieldStart("status") + s.Status.Encode(e) + } + } + { + if s.AppGUID.Set { + e.FieldStart("app_guid") + s.AppGUID.Encode(e) + } + } + { + if s.Timestamp.Set { + e.FieldStart("timestamp") + s.Timestamp.Encode(e) + } + } + { + if s.ScalingType.Set { + e.FieldStart("scaling_type") + s.ScalingType.Encode(e) + } + } + { + if s.OldInstances.Set { + e.FieldStart("old_instances") + s.OldInstances.Encode(e) + } + } + { + if s.NewInstances.Set { + e.FieldStart("new_instances") + s.NewInstances.Encode(e) + } + } + { + if s.Reason.Set { + e.FieldStart("reason") + s.Reason.Encode(e) + } + } +} + +var jsonFieldsNameOfHistoryEntry = [7]string{ + 0: "status", + 1: "app_guid", + 2: "timestamp", + 3: "scaling_type", + 4: "old_instances", + 5: "new_instances", + 6: "reason", +} + +// Decode decodes HistoryEntry from json. +func (s *HistoryEntry) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode HistoryEntry to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "status": + if err := func() error { + s.Status.Reset() + if err := s.Status.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"status\"") + } + case "app_guid": + if err := func() error { + s.AppGUID.Reset() + if err := s.AppGUID.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"app_guid\"") + } + case "timestamp": + if err := func() error { + s.Timestamp.Reset() + if err := s.Timestamp.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"timestamp\"") + } + case "scaling_type": + if err := func() error { + s.ScalingType.Reset() + if err := s.ScalingType.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"scaling_type\"") + } + case "old_instances": + if err := func() error { + s.OldInstances.Reset() + if err := s.OldInstances.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"old_instances\"") + } + case "new_instances": + if err := func() error { + s.NewInstances.Reset() + if err := s.NewInstances.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"new_instances\"") + } + case "reason": + if err := func() error { + s.Reason.Reset() + if err := s.Reason.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"reason\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode HistoryEntry") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *HistoryEntry) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *HistoryEntry) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes HistoryEntryScalingType as json. +func (s HistoryEntryScalingType) Encode(e *jx.Encoder) { + e.Int64(int64(s)) +} + +// Decode decodes HistoryEntryScalingType from json. +func (s *HistoryEntryScalingType) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode HistoryEntryScalingType to nil") + } + v, err := d.Int64() + if err != nil { + return err + } + *s = HistoryEntryScalingType(v) + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s HistoryEntryScalingType) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *HistoryEntryScalingType) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes HistoryEntryStatus as json. +func (s HistoryEntryStatus) Encode(e *jx.Encoder) { + e.Int64(int64(s)) +} + +// Decode decodes HistoryEntryStatus from json. +func (s *HistoryEntryStatus) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode HistoryEntryStatus to nil") + } + v, err := d.Int64() + if err != nil { + return err + } + *s = HistoryEntryStatus(v) + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s HistoryEntryStatus) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *HistoryEntryStatus) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes HistoryEntryScalingType as json. +func (o OptHistoryEntryScalingType) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Int64(int64(o.Value)) +} + +// Decode decodes HistoryEntryScalingType from json. +func (o *OptHistoryEntryScalingType) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptHistoryEntryScalingType to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptHistoryEntryScalingType) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptHistoryEntryScalingType) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes HistoryEntryStatus as json. +func (o OptHistoryEntryStatus) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Int64(int64(o.Value)) +} + +// Decode decodes HistoryEntryStatus from json. +func (o *OptHistoryEntryStatus) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptHistoryEntryStatus to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptHistoryEntryStatus) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptHistoryEntryStatus) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes int as json. +func (o OptInt) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Int(int(o.Value)) +} + +// Decode decodes int from json. +func (o *OptInt) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptInt to nil") + } + o.Set = true + v, err := d.Int() + if err != nil { + return err + } + o.Value = int(v) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptInt) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptInt) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes int64 as json. +func (o OptInt64) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Int64(int64(o.Value)) +} + +// Decode decodes int64 from json. +func (o *OptInt64) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptInt64 to nil") + } + o.Set = true + v, err := d.Int64() + if err != nil { + return err + } + o.Value = int64(v) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptInt64) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptInt64) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes string as json. +func (o OptString) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Str(string(o.Value)) +} + +// Decode decodes string from json. +func (o *OptString) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptString to nil") + } + o.Set = true + v, err := d.Str() + if err != nil { + return err + } + o.Value = string(v) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptString) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptString) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes url.URL as json. +func (o OptURI) Encode(e *jx.Encoder) { + if !o.Set { + return + } + json.EncodeURI(e, o.Value) +} + +// Decode decodes url.URL from json. +func (o *OptURI) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptURI to nil") + } + o.Set = true + v, err := json.DecodeURI(d) + if err != nil { + return err + } + o.Value = v + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptURI) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptURI) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_parameters_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_parameters_gen.go new file mode 100644 index 0000000000..4794cb5fb4 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_parameters_gen.go @@ -0,0 +1,21 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +// V1AppsGUIDScalingHistoriesGetParams is parameters of GET /v1/apps/{guid}/scaling_histories operation. +type V1AppsGUIDScalingHistoriesGetParams struct { + // The GUID identifying the application for which the scaling history is fetched. + // It can be found in the `application_id` property of the JSON object stored in the + // `VCAP_APPLICATION` environment variable. + GUID string + // The start time in the number of nanoseconds elapsed since January 1, 1970 UTC. + StartTime OptInt + // The end time in the number of nanoseconds elapsed since January 1, 1970 UTC. + EndTime OptInt + // The sorting order. The scaling history will be order by timestamp ascending or descending. + OrderDirection OptV1AppsGUIDScalingHistoriesGetOrderDirection + // The page number to query. + Page OptInt + // Number of entries shown per page. + ResultsPerPage OptInt +} diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_request_encoders_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_request_encoders_gen.go new file mode 100644 index 0000000000..ae379a2db9 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_request_encoders_gen.go @@ -0,0 +1,3 @@ +// Code generated by ogen, DO NOT EDIT. + +package api diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_response_decoders_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_response_decoders_gen.go new file mode 100644 index 0000000000..bf1933b068 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_response_decoders_gen.go @@ -0,0 +1,98 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "io" + "mime" + "net/http" + + "github.com/go-faster/errors" + "github.com/go-faster/jx" + + "github.com/ogen-go/ogen/ogenerrors" + "github.com/ogen-go/ogen/validate" +) + +func decodeV1AppsGUIDScalingHistoriesGetResponse(resp *http.Response) (res *History, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response History + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + // Convenient error response. + defRes, err := func() (res *ErrorResponseStatusCode, err error) { + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response ErrorResponse + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &ErrorResponseStatusCode{ + StatusCode: resp.StatusCode, + Response: response, + }, nil + default: + return res, validate.InvalidContentType(ct) + } + }() + if err != nil { + return res, errors.Wrapf(err, "default (code %d)", resp.StatusCode) + } + return res, errors.Wrap(defRes, "error") +} diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_schemas_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_schemas_gen.go new file mode 100644 index 0000000000..5a72510f04 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_schemas_gen.go @@ -0,0 +1,596 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "fmt" + "net/url" + + "github.com/go-faster/errors" +) + +func (s *ErrorResponseStatusCode) Error() string { + return fmt.Sprintf("code %d: %+v", s.StatusCode, s.Response) +} + +// Ref: #/components/schemas/ErrorResponse +type ErrorResponse struct{} + +// ErrorResponseStatusCode wraps ErrorResponse with StatusCode. +type ErrorResponseStatusCode struct { + StatusCode int + Response ErrorResponse +} + +// GetStatusCode returns the value of StatusCode. +func (s *ErrorResponseStatusCode) GetStatusCode() int { + return s.StatusCode +} + +// GetResponse returns the value of Response. +func (s *ErrorResponseStatusCode) GetResponse() ErrorResponse { + return s.Response +} + +// SetStatusCode sets the value of StatusCode. +func (s *ErrorResponseStatusCode) SetStatusCode(val int) { + s.StatusCode = val +} + +// SetResponse sets the value of Response. +func (s *ErrorResponseStatusCode) SetResponse(val ErrorResponse) { + s.Response = val +} + +// Object containing scaling history. +// Ref: #/components/schemas/History +type History struct { + // Number of history entries found for the given query. + TotalResults OptInt64 `json:"total_results"` + // Number of Pages from the query. + TotalPages OptInt64 `json:"total_pages"` + // Number of the current page. + Page OptInt64 `json:"page"` + PrevURL OptURI `json:"prev_url"` + NextURL OptURI `json:"next_url"` + Resources []HistoryEntry `json:"resources"` +} + +// GetTotalResults returns the value of TotalResults. +func (s *History) GetTotalResults() OptInt64 { + return s.TotalResults +} + +// GetTotalPages returns the value of TotalPages. +func (s *History) GetTotalPages() OptInt64 { + return s.TotalPages +} + +// GetPage returns the value of Page. +func (s *History) GetPage() OptInt64 { + return s.Page +} + +// GetPrevURL returns the value of PrevURL. +func (s *History) GetPrevURL() OptURI { + return s.PrevURL +} + +// GetNextURL returns the value of NextURL. +func (s *History) GetNextURL() OptURI { + return s.NextURL +} + +// GetResources returns the value of Resources. +func (s *History) GetResources() []HistoryEntry { + return s.Resources +} + +// SetTotalResults sets the value of TotalResults. +func (s *History) SetTotalResults(val OptInt64) { + s.TotalResults = val +} + +// SetTotalPages sets the value of TotalPages. +func (s *History) SetTotalPages(val OptInt64) { + s.TotalPages = val +} + +// SetPage sets the value of Page. +func (s *History) SetPage(val OptInt64) { + s.Page = val +} + +// SetPrevURL sets the value of PrevURL. +func (s *History) SetPrevURL(val OptURI) { + s.PrevURL = val +} + +// SetNextURL sets the value of NextURL. +func (s *History) SetNextURL(val OptURI) { + s.NextURL = val +} + +// SetResources sets the value of Resources. +func (s *History) SetResources(val []HistoryEntry) { + s.Resources = val +} + +// Merged schema. +// Ref: #/components/schemas/HistoryEntry +type HistoryEntry struct { + // Following stati are possible: + // + 0: The scaling was done successfully. + // + 1: The scaling failed explicitly. + // + 2: The scaling was ignored. + // This field is as well a selector of which of the other ones are used and which not. + Status OptHistoryEntryStatus `json:"status"` + // The GUID identifying the application for which the scaling history is fetched. + // It can be found in the `application_id` property of the JSON object stored in the + // `VCAP_APPLICATION` environment variable. + AppGUID OptString `json:"app_guid"` + // The scaling time in the number of nanoseconds elapsed since January 1, 1970 UTC. + Timestamp OptInt `json:"timestamp"` + // There are two different scaling types: + // + 0: This represents `ScalingTypeDynamic`. The scaling has been done due to a dynamic + // scaling rule, reacting on metrics provided by the app. + // + 1: This represents `ScalingTypeSchedule`. The scaling has been done due to a + // scheduled period changing the default instance limits. + ScalingType OptHistoryEntryScalingType `json:"scaling_type"` + // The number of instances before the scaling. + OldInstances OptInt64 `json:"old_instances"` + // The number of instances after the scaling. + NewInstances OptInt64 `json:"new_instances"` + // Textual information about what triggered the scaling event. + Reason OptString `json:"reason"` +} + +// GetStatus returns the value of Status. +func (s *HistoryEntry) GetStatus() OptHistoryEntryStatus { + return s.Status +} + +// GetAppGUID returns the value of AppGUID. +func (s *HistoryEntry) GetAppGUID() OptString { + return s.AppGUID +} + +// GetTimestamp returns the value of Timestamp. +func (s *HistoryEntry) GetTimestamp() OptInt { + return s.Timestamp +} + +// GetScalingType returns the value of ScalingType. +func (s *HistoryEntry) GetScalingType() OptHistoryEntryScalingType { + return s.ScalingType +} + +// GetOldInstances returns the value of OldInstances. +func (s *HistoryEntry) GetOldInstances() OptInt64 { + return s.OldInstances +} + +// GetNewInstances returns the value of NewInstances. +func (s *HistoryEntry) GetNewInstances() OptInt64 { + return s.NewInstances +} + +// GetReason returns the value of Reason. +func (s *HistoryEntry) GetReason() OptString { + return s.Reason +} + +// SetStatus sets the value of Status. +func (s *HistoryEntry) SetStatus(val OptHistoryEntryStatus) { + s.Status = val +} + +// SetAppGUID sets the value of AppGUID. +func (s *HistoryEntry) SetAppGUID(val OptString) { + s.AppGUID = val +} + +// SetTimestamp sets the value of Timestamp. +func (s *HistoryEntry) SetTimestamp(val OptInt) { + s.Timestamp = val +} + +// SetScalingType sets the value of ScalingType. +func (s *HistoryEntry) SetScalingType(val OptHistoryEntryScalingType) { + s.ScalingType = val +} + +// SetOldInstances sets the value of OldInstances. +func (s *HistoryEntry) SetOldInstances(val OptInt64) { + s.OldInstances = val +} + +// SetNewInstances sets the value of NewInstances. +func (s *HistoryEntry) SetNewInstances(val OptInt64) { + s.NewInstances = val +} + +// SetReason sets the value of Reason. +func (s *HistoryEntry) SetReason(val OptString) { + s.Reason = val +} + +// There are two different scaling types: +// + 0: This represents `ScalingTypeDynamic`. The scaling has been done due to a dynamic +// scaling rule, reacting on metrics provided by the app. +// + 1: This represents `ScalingTypeSchedule`. The scaling has been done due to a +// scheduled period changing the default instance limits. +type HistoryEntryScalingType int64 + +const ( + HistoryEntryScalingType0 HistoryEntryScalingType = 0 + HistoryEntryScalingType1 HistoryEntryScalingType = 1 +) + +// Following stati are possible: +// + 0: The scaling was done successfully. +// + 1: The scaling failed explicitly. +// + 2: The scaling was ignored. +// This field is as well a selector of which of the other ones are used and which not. +type HistoryEntryStatus int64 + +const ( + HistoryEntryStatus0 HistoryEntryStatus = 0 + HistoryEntryStatus1 HistoryEntryStatus = 1 + HistoryEntryStatus2 HistoryEntryStatus = 2 +) + +// NewOptHistoryEntryScalingType returns new OptHistoryEntryScalingType with value set to v. +func NewOptHistoryEntryScalingType(v HistoryEntryScalingType) OptHistoryEntryScalingType { + return OptHistoryEntryScalingType{ + Value: v, + Set: true, + } +} + +// OptHistoryEntryScalingType is optional HistoryEntryScalingType. +type OptHistoryEntryScalingType struct { + Value HistoryEntryScalingType + Set bool +} + +// IsSet returns true if OptHistoryEntryScalingType was set. +func (o OptHistoryEntryScalingType) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptHistoryEntryScalingType) Reset() { + var v HistoryEntryScalingType + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptHistoryEntryScalingType) SetTo(v HistoryEntryScalingType) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptHistoryEntryScalingType) Get() (v HistoryEntryScalingType, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptHistoryEntryScalingType) Or(d HistoryEntryScalingType) HistoryEntryScalingType { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptHistoryEntryStatus returns new OptHistoryEntryStatus with value set to v. +func NewOptHistoryEntryStatus(v HistoryEntryStatus) OptHistoryEntryStatus { + return OptHistoryEntryStatus{ + Value: v, + Set: true, + } +} + +// OptHistoryEntryStatus is optional HistoryEntryStatus. +type OptHistoryEntryStatus struct { + Value HistoryEntryStatus + Set bool +} + +// IsSet returns true if OptHistoryEntryStatus was set. +func (o OptHistoryEntryStatus) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptHistoryEntryStatus) Reset() { + var v HistoryEntryStatus + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptHistoryEntryStatus) SetTo(v HistoryEntryStatus) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptHistoryEntryStatus) Get() (v HistoryEntryStatus, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptHistoryEntryStatus) Or(d HistoryEntryStatus) HistoryEntryStatus { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptInt returns new OptInt with value set to v. +func NewOptInt(v int) OptInt { + return OptInt{ + Value: v, + Set: true, + } +} + +// OptInt is optional int. +type OptInt struct { + Value int + Set bool +} + +// IsSet returns true if OptInt was set. +func (o OptInt) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptInt) Reset() { + var v int + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptInt) SetTo(v int) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptInt) Get() (v int, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptInt) Or(d int) int { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptInt64 returns new OptInt64 with value set to v. +func NewOptInt64(v int64) OptInt64 { + return OptInt64{ + Value: v, + Set: true, + } +} + +// OptInt64 is optional int64. +type OptInt64 struct { + Value int64 + Set bool +} + +// IsSet returns true if OptInt64 was set. +func (o OptInt64) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptInt64) Reset() { + var v int64 + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptInt64) SetTo(v int64) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptInt64) Get() (v int64, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptInt64) Or(d int64) int64 { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptString returns new OptString with value set to v. +func NewOptString(v string) OptString { + return OptString{ + Value: v, + Set: true, + } +} + +// OptString is optional string. +type OptString struct { + Value string + Set bool +} + +// IsSet returns true if OptString was set. +func (o OptString) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptString) Reset() { + var v string + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptString) SetTo(v string) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptString) Get() (v string, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptString) Or(d string) string { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptURI returns new OptURI with value set to v. +func NewOptURI(v url.URL) OptURI { + return OptURI{ + Value: v, + Set: true, + } +} + +// OptURI is optional url.URL. +type OptURI struct { + Value url.URL + Set bool +} + +// IsSet returns true if OptURI was set. +func (o OptURI) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptURI) Reset() { + var v url.URL + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptURI) SetTo(v url.URL) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptURI) Get() (v url.URL, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptURI) Or(d url.URL) url.URL { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptV1AppsGUIDScalingHistoriesGetOrderDirection returns new OptV1AppsGUIDScalingHistoriesGetOrderDirection with value set to v. +func NewOptV1AppsGUIDScalingHistoriesGetOrderDirection(v V1AppsGUIDScalingHistoriesGetOrderDirection) OptV1AppsGUIDScalingHistoriesGetOrderDirection { + return OptV1AppsGUIDScalingHistoriesGetOrderDirection{ + Value: v, + Set: true, + } +} + +// OptV1AppsGUIDScalingHistoriesGetOrderDirection is optional V1AppsGUIDScalingHistoriesGetOrderDirection. +type OptV1AppsGUIDScalingHistoriesGetOrderDirection struct { + Value V1AppsGUIDScalingHistoriesGetOrderDirection + Set bool +} + +// IsSet returns true if OptV1AppsGUIDScalingHistoriesGetOrderDirection was set. +func (o OptV1AppsGUIDScalingHistoriesGetOrderDirection) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptV1AppsGUIDScalingHistoriesGetOrderDirection) Reset() { + var v V1AppsGUIDScalingHistoriesGetOrderDirection + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptV1AppsGUIDScalingHistoriesGetOrderDirection) SetTo(v V1AppsGUIDScalingHistoriesGetOrderDirection) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptV1AppsGUIDScalingHistoriesGetOrderDirection) Get() (v V1AppsGUIDScalingHistoriesGetOrderDirection, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptV1AppsGUIDScalingHistoriesGetOrderDirection) Or(d V1AppsGUIDScalingHistoriesGetOrderDirection) V1AppsGUIDScalingHistoriesGetOrderDirection { + if v, ok := o.Get(); ok { + return v + } + return d +} + +type V1AppsGUIDScalingHistoriesGetOrderDirection string + +const ( + V1AppsGUIDScalingHistoriesGetOrderDirectionAsc V1AppsGUIDScalingHistoriesGetOrderDirection = "asc" + V1AppsGUIDScalingHistoriesGetOrderDirectionDesc V1AppsGUIDScalingHistoriesGetOrderDirection = "desc" +) + +// MarshalText implements encoding.TextMarshaler. +func (s V1AppsGUIDScalingHistoriesGetOrderDirection) MarshalText() ([]byte, error) { + switch s { + case V1AppsGUIDScalingHistoriesGetOrderDirectionAsc: + return []byte(s), nil + case V1AppsGUIDScalingHistoriesGetOrderDirectionDesc: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *V1AppsGUIDScalingHistoriesGetOrderDirection) UnmarshalText(data []byte) error { + switch V1AppsGUIDScalingHistoriesGetOrderDirection(data) { + case V1AppsGUIDScalingHistoriesGetOrderDirectionAsc: + *s = V1AppsGUIDScalingHistoriesGetOrderDirectionAsc + return nil + case V1AppsGUIDScalingHistoriesGetOrderDirectionDesc: + *s = V1AppsGUIDScalingHistoriesGetOrderDirectionDesc + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_validators_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_validators_gen.go new file mode 100644 index 0000000000..1c16219f91 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_validators_gen.go @@ -0,0 +1,200 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "fmt" + + "github.com/go-faster/errors" + + "github.com/ogen-go/ogen/validate" +) + +func (s *History) Validate() error { + var failures []validate.FieldError + if err := func() error { + var failures []validate.FieldError + for i, elem := range s.Resources { + if err := func() error { + if err := elem.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "resources", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} +func (s *HistoryEntry) Validate() error { + var failures []validate.FieldError + if err := func() error { + if s.Status.Set { + if err := func() error { + if err := s.Status.Value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "status", + Error: err, + }) + } + if err := func() error { + if s.AppGUID.Set { + if err := func() error { + if err := (validate.String{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: regexMap["(\\d|[a-f]){8}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){12}"], + }).Validate(string(s.AppGUID.Value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "app_guid", + Error: err, + }) + } + if err := func() error { + if s.ScalingType.Set { + if err := func() error { + if err := s.ScalingType.Value.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "scaling_type", + Error: err, + }) + } + if err := func() error { + if s.OldInstances.Set { + if err := func() error { + if err := (validate.Int{ + MinSet: true, + Min: 0, + MaxSet: false, + Max: 0, + MinExclusive: false, + MaxExclusive: false, + MultipleOfSet: false, + MultipleOf: 0, + }).Validate(int64(s.OldInstances.Value)); err != nil { + return errors.Wrap(err, "int") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "old_instances", + Error: err, + }) + } + if err := func() error { + if s.NewInstances.Set { + if err := func() error { + if err := (validate.Int{ + MinSet: true, + Min: 0, + MaxSet: false, + Max: 0, + MinExclusive: false, + MaxExclusive: false, + MultipleOfSet: false, + MultipleOf: 0, + }).Validate(int64(s.NewInstances.Value)); err != nil { + return errors.Wrap(err, "int") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "new_instances", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} +func (s HistoryEntryScalingType) Validate() error { + switch s { + case 0: + return nil + case 1: + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} +func (s HistoryEntryStatus) Validate() error { + switch s { + case 0: + return nil + case 1: + return nil + case 2: + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} + +func (s V1AppsGUIDScalingHistoriesGetOrderDirection) Validate() error { + switch s { + case "asc": + return nil + case "desc": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} From bab9244470e0a32a4272cff8196e497c51f2e0b4 Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Tue, 13 Jun 2023 11:24:12 +0100 Subject: [PATCH 086/294] Validation of oas --- api/application-metric-api.yaml | 27 +- api/policy-api.yaml | 136 +++-- api/scaling-history-api.yaml | 25 +- .../internal/applicationmetric/oas_cfg_gen.go | 141 +++++ .../applicationmetric/oas_client_gen.go | 292 ++++++++++ .../applicationmetric/oas_json_gen.go | 519 ++++++++++++++++++ .../applicationmetric/oas_parameters_gen.go | 23 + .../oas_request_encoders_gen.go | 3 + .../oas_response_decoders_gen.go | 98 ++++ .../applicationmetric/oas_schemas_gen.go | 495 +++++++++++++++++ .../applicationmetric/oas_security_gen.go | 25 + .../applicationmetric/oas_validators_gen.go | 88 +++ .../assets/app/go_app/internal/generate.go | 2 +- .../app/go_app/internal/policy/oas_cfg_gen.go | 141 +++++ .../go_app/internal/policy/oas_client_gen.go | 426 ++++++++++++++ .../go_app/internal/policy/oas_json_gen.go | 271 +++++++++ .../internal/policy/oas_parameters_gen.go | 27 + .../policy/oas_request_encoders_gen.go | 32 ++ .../policy/oas_response_decoders_gen.go | 264 +++++++++ .../go_app/internal/policy/oas_schemas_gen.go | 201 +++++++ .../internal/policy/oas_security_gen.go | 25 + .../internal/scalinghistory/oas_client_gen.go | 38 +- .../scalinghistory/oas_schemas_gen.go | 25 + .../scalinghistory/oas_security_gen.go | 25 + 24 files changed, 3279 insertions(+), 70 deletions(-) create mode 100644 src/acceptance/assets/app/go_app/internal/applicationmetric/oas_cfg_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/applicationmetric/oas_client_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/applicationmetric/oas_json_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/applicationmetric/oas_parameters_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/applicationmetric/oas_request_encoders_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/applicationmetric/oas_response_decoders_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/applicationmetric/oas_schemas_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/applicationmetric/oas_security_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/applicationmetric/oas_validators_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/policy/oas_cfg_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/policy/oas_client_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/policy/oas_json_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/policy/oas_parameters_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/policy/oas_request_encoders_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/policy/oas_response_decoders_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/policy/oas_schemas_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/policy/oas_security_gen.go create mode 100644 src/acceptance/assets/app/go_app/internal/scalinghistory/oas_security_gen.go diff --git a/api/application-metric-api.yaml b/api/application-metric-api.yaml index 61b1234f9a..f1f3682be6 100644 --- a/api/application-metric-api.yaml +++ b/api/application-metric-api.yaml @@ -7,8 +7,8 @@ info: This API is used to return the aggregated metric result of an application. version: 1.0.0 security: # Do we need that? -- mtls: [] -- basicAuthentication: [] #TODO +#- mtls: [] +- basicAuthentication: [] tags: - name: Application Metric API V1 description: List instance metrics of an application. @@ -30,7 +30,7 @@ paths: example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 #$ref: "./shared_definitions.yaml#/schemas/GUID" - name: metric_type - in: query + in: path required: true description: The metric type schema: @@ -81,12 +81,12 @@ paths: minimum: 0 # Or Should it be "1"? default: 50 example: results-per-page=10 - - name: Authorization - in: header - schema: - type: string - example: | - bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o + #- name: Authorization + #in: header + #schema: + #type: string + #example: | + #bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o get: summary: Retrieves the instance metrics of an application description: | @@ -108,6 +108,9 @@ paths: schema: $ref: "#/components/schemas/ErrorResponse" #$ref: "./shared_definitions.yaml#/responses/Error" + security: + - basicAuthentication: [] + x-codegen-request-body-name: body components: schemas: ErrorResponse: @@ -189,4 +192,8 @@ components: example: 400 unit: type: string - example: megabytes \ No newline at end of file + example: megabytes + securitySchemes: + basicAuthentication: + type: http + scheme: basic \ No newline at end of file diff --git a/api/policy-api.yaml b/api/policy-api.yaml index 27a13efd1e..90e8d68ba2 100644 --- a/api/policy-api.yaml +++ b/api/policy-api.yaml @@ -3,9 +3,8 @@ info: title: Policy API description: This API is used to create, delete, retrieve the policy version: 1.0.0 -#security: -#- mtls: [] -#- basicAuthentication: [] #TODO +security: +- basicAuthentication: [] #TODO tags: - name: Policy API V1 description: This API is used to create, delete, retrieve the policy @@ -27,12 +26,12 @@ paths: example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 #$ref: "./shared_definitions.yaml#/schemas/GUID" - - name: Authorization - in: header - schema: - type: string - example: | - bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5_Iu_o + #- name: Authorization + #in: header + #schema: + #type: string + #example: | + #bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5_Iu_o put: summary: Retrieves the Policy description: This API is used to create the policy @@ -43,14 +42,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Policy/Policy" #TODO + $ref: "#/components/schemas/Policy" #TODO responses: "200": description: "OK" content: application/json: schema: - $ref: "#/components/schemas/Policy/CreatePolicy" + $ref: "#/components/schemas/Policy" default: description: | Error, the response body may contain further information. @@ -59,18 +58,21 @@ paths: schema: $ref: "#/components/schemas/ErrorResponse" #$ref: "./shared_definitons.yaml#/responses/Error" + security: + - basicAuthentication: [] + x-codegen-request-body-name: body delete: summary: Deletes the policy description: This API is used to delete the policy tags: - Delete Policy API V1 - response: + responses: "200": description: "OK" content: application/json: schema: - $ref: "#/components/schemas/Policy/DeletePolicy" + $ref: "#/components/schemas/Policy" default: description: | Error, the response body may contain further information. @@ -79,18 +81,21 @@ paths: schema: $ref: "#/components/schemas/ErrorResponse" #$ref: "./shared_definitons.yaml#/responses/Error" + security: + - basicAuthentication: [] + x-codegen-request-body-name: body get: summary: Retrieves the Policy description: This API is used to retrieve the policy tags: - Get Policy API V1 - response: + responses: "200": description: "OK" content: application/json: schema: - $ref: "#/components/schemas/Policy/Policy" + $ref: "#/components/schemas/Policy" default: description: | Error, the response body may contain further information. @@ -99,6 +104,9 @@ paths: schema: $ref: "#/components/schemas/ErrorResponse" #$ref: "./shared_definitons.yaml#/responses/Error" + security: + - basicAuthentication: [] + x-codegen-request-body-name: body components: schemas: ErrorResponse: @@ -129,6 +137,10 @@ components: items: $ref: '#/components/schemas/ScalingRule' ScalingRule: + required: # https://github.com/go-swagger/go-swagger/issues/1425 + - threshold + - operator + - adjustment properties: metric_type: description: | @@ -140,13 +152,14 @@ components: threshold: description: | The boundary when metric value exceeds is considered as a breach - required: true - type: int - format: int64 + #required: true + schema: + type: int + format: int64 example: 30 operator: description: Used for standard operting signs - ">", "<", ">=", "<=" - required: true + #required: true type: string enum: [">", "<", ">=", "<="] example: < @@ -155,7 +168,7 @@ components: The adjustment approach for instance count with each scaling. +5 means adding 5 instances, -50% means shrinking to the half of current size. - required: true + # required: true type: string pattern: ^[-+][1-9]+[0-9]*[%]?$ example: -1 @@ -176,19 +189,27 @@ components: items: $ref: '#/components/schemas/Schedules' Schedules: + required: + - timezone properties: timezone: description: Using timezone definition of Java #https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html - Do we need to implement it? - required: true - type: string + #required: true + schema: + type: string example: Asia/Shanghai # TODO: Try to make use of #- $ref: "../../src/autoscaler/api/policyvalidator/policy_json.schema.json#/" # TODO: recurring_schedule: type: array items: - $ref: '#/schemas/RecurringSchedule' + $ref: "#/components/schemas/RecurringSchedule" RecurringSchedule: + required: + - start_time + - end_time + - instance_min_count + - instance_max_count properties: start_date: description: the start date of the schedule. Must be a future time @@ -202,15 +223,17 @@ components: example: 2016-07-23 start_time: description: the start time of the schedule in HH:MM format - required: true - type: string - pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ + #required: true + schema: + type: string + pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ example: 11:00 end_time: description: the end time of the schedule in HH:MM format - required: true - type: string - pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ + #required: true + schema: + type: string + pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ example: 19:30 end time of the schedule: description: | @@ -219,15 +242,17 @@ components: example: [5, 15, 25] instance_min_count: description: minimal number of instance count for this schedule - required: true - type: integer - format: int64 + #required: true + schema: + type: integer + format: int64 example: 3 instance_max_count: description: maximal number of instance count for this schedule - required: true - type: integer - format: int64 + #required: true + schema: + type: integer + format: int64 example: 10 instance_min_instance_count: description: the initial minimal number of instance count for this schedule @@ -237,35 +262,48 @@ components: specific_date: type: array items: - $ref: '#/schemas/SpecificDate' + $ref: '#/components/schemas/SpecificDate' SpecificDate: + required: + - start_date_time + - end_date_time + - instance_min_count + - instance_max_count properties: start_date_time: description: the start time of the schedule. Must be a future time - required: true - type: string - pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/ + #required: true + schema: + type: string + pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/ example: 2015-01-04T20:00 end_date_time: description: the start time of the schedule. Must be a future time - required: true - type: string - pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/ + #required: true + schema: + type: string + pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/ example: 2015-01-04T20:00 instance_min_count: description: minimal number of instance count for this schedule - required: true - type: integer - format: int64 + #required: true + schema: + type: integer + format: int64 example: 2 instance_max_count: description: maximal number of instance count for this schedule - required: true - type: integer - format: int64 + #required: true + schema: + type: integer + format: int64 example: 5 instance_min_instance_count: description: the initial minimal number of instance count for this schedule type: integer format: int64 - example: 3 \ No newline at end of file + example: 3 + securitySchemes: + basicAuthentication: + type: http + scheme: basic \ No newline at end of file diff --git a/api/scaling-history-api.yaml b/api/scaling-history-api.yaml index 795c488be3..1265971910 100644 --- a/api/scaling-history-api.yaml +++ b/api/scaling-history-api.yaml @@ -3,9 +3,9 @@ info: title: Scaling History API description: List scaling history of an application version: 1.0.0 -#security: # Do we need that? +security: # Do we need that? #- mtls: [] -#- basicAuthentication: [] +- basicAuthentication: [] tags: - name: Scaling History API V1 description: List the scaling history of an Application @@ -67,12 +67,12 @@ paths: minimum: 0 # Or Should it be "1"? default: 50 example: results-per-page=10 - - name: Authorization - in: header - schema: - type: string - example: | - bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o + #- name: Authorization + #in: header + #schema: + #type: string + #example: | + #bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o get: summary: Retrieves the scaling history of an application. description: | @@ -94,6 +94,9 @@ paths: application/json: schema: $ref: "#/components/schemas/ErrorResponse" + security: + - basicAuthentication: [] + x-codegen-request-body-name: body components: schemas: @@ -234,4 +237,8 @@ components: HistorySuccessEntry: description: Description of a successful scaling event event in history. type: object - properties: {} # No extra fields needed in this variant. \ No newline at end of file + properties: {} # No extra fields needed in this variant. + securitySchemes: + basicAuthentication: + type: http + scheme: basic \ No newline at end of file diff --git a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_cfg_gen.go b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_cfg_gen.go new file mode 100644 index 0000000000..2975fe8f63 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_cfg_gen.go @@ -0,0 +1,141 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "net/http" + + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/global" + "go.opentelemetry.io/otel/metric/instrument" + "go.opentelemetry.io/otel/trace" + + ht "github.com/ogen-go/ogen/http" + "github.com/ogen-go/ogen/ogenregex" + "github.com/ogen-go/ogen/otelogen" +) + +var regexMap = map[string]ogenregex.Regexp{ + "(\\d|[a-f]){8}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){12}": ogenregex.MustCompile("(\\d|[a-f]){8}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){12}"), +} +var ( + // Allocate option closure once. + clientSpanKind = trace.WithSpanKind(trace.SpanKindClient) +) + +type ( + optionFunc[C any] func(*C) + otelOptionFunc func(*otelConfig) +) + +type otelConfig struct { + TracerProvider trace.TracerProvider + Tracer trace.Tracer + MeterProvider metric.MeterProvider + Meter metric.Meter +} + +func (cfg *otelConfig) initOTEL() { + if cfg.TracerProvider == nil { + cfg.TracerProvider = otel.GetTracerProvider() + } + if cfg.MeterProvider == nil { + cfg.MeterProvider = global.MeterProvider() + } + cfg.Tracer = cfg.TracerProvider.Tracer(otelogen.Name, + trace.WithInstrumentationVersion(otelogen.SemVersion()), + ) + cfg.Meter = cfg.MeterProvider.Meter(otelogen.Name) +} + +type clientConfig struct { + otelConfig + Client ht.Client +} + +// ClientOption is client config option. +type ClientOption interface { + applyClient(*clientConfig) +} + +var _ = []ClientOption{ + (optionFunc[clientConfig])(nil), + (otelOptionFunc)(nil), +} + +func (o optionFunc[C]) applyClient(c *C) { + o(c) +} + +func (o otelOptionFunc) applyClient(c *clientConfig) { + o(&c.otelConfig) +} + +func newClientConfig(opts ...ClientOption) clientConfig { + cfg := clientConfig{ + Client: http.DefaultClient, + } + for _, opt := range opts { + opt.applyClient(&cfg) + } + cfg.initOTEL() + return cfg +} + +type baseClient struct { + cfg clientConfig + requests instrument.Int64Counter + errors instrument.Int64Counter + duration instrument.Int64Histogram +} + +func (cfg clientConfig) baseClient() (c baseClient, err error) { + c = baseClient{cfg: cfg} + if c.requests, err = c.cfg.Meter.Int64Counter(otelogen.ClientRequestCount); err != nil { + return c, err + } + if c.errors, err = c.cfg.Meter.Int64Counter(otelogen.ClientErrorsCount); err != nil { + return c, err + } + if c.duration, err = c.cfg.Meter.Int64Histogram(otelogen.ClientDuration); err != nil { + return c, err + } + return c, nil +} + +// Option is config option. +type Option interface { + ClientOption +} + +// WithTracerProvider specifies a tracer provider to use for creating a tracer. +// +// If none is specified, the global provider is used. +func WithTracerProvider(provider trace.TracerProvider) Option { + return otelOptionFunc(func(cfg *otelConfig) { + if provider != nil { + cfg.TracerProvider = provider + } + }) +} + +// WithMeterProvider specifies a meter provider to use for creating a meter. +// +// If none is specified, the global.MeterProvider() is used. +func WithMeterProvider(provider metric.MeterProvider) Option { + return otelOptionFunc(func(cfg *otelConfig) { + if provider != nil { + cfg.MeterProvider = provider + } + }) +} + +// WithClient specifies http client to use. +func WithClient(client ht.Client) ClientOption { + return optionFunc[clientConfig](func(cfg *clientConfig) { + if client != nil { + cfg.Client = client + } + }) +} diff --git a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_client_gen.go b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_client_gen.go new file mode 100644 index 0000000000..18b3a89406 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_client_gen.go @@ -0,0 +1,292 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "context" + "net/url" + "strings" + "time" + + "github.com/go-faster/errors" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/metric" + + "github.com/ogen-go/ogen/conv" + ht "github.com/ogen-go/ogen/http" + "github.com/ogen-go/ogen/ogenerrors" + "github.com/ogen-go/ogen/uri" +) + +// Client implements OAS client. +type Client struct { + serverURL *url.URL + sec SecuritySource + baseClient +} + +func trimTrailingSlashes(u *url.URL) { + u.Path = strings.TrimRight(u.Path, "/") + u.RawPath = strings.TrimRight(u.RawPath, "/") +} + +// NewClient initializes new Client defined by OAS. +func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error) { + u, err := url.Parse(serverURL) + if err != nil { + return nil, err + } + trimTrailingSlashes(u) + + c, err := newClientConfig(opts...).baseClient() + if err != nil { + return nil, err + } + return &Client{ + serverURL: u, + sec: sec, + baseClient: c, + }, nil +} + +type serverURLKey struct{} + +// WithServerURL sets context key to override server URL. +func WithServerURL(ctx context.Context, u *url.URL) context.Context { + return context.WithValue(ctx, serverURLKey{}, u) +} + +func (c *Client) requestURL(ctx context.Context) *url.URL { + u, ok := ctx.Value(serverURLKey{}).(*url.URL) + if !ok { + return c.serverURL + } + return u +} + +// V1AppsGUIDAggregatedMetricHistoriesMetricTypeGet invokes GET /v1/apps/{guid}/aggregated_metric_histories/{metric_type} operation. +// +// Use to retrieve instance metrics of an application. +// +// GET /v1/apps/{guid}/aggregated_metric_histories/{metric_type} +func (c *Client) V1AppsGUIDAggregatedMetricHistoriesMetricTypeGet(ctx context.Context, params V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetParams) (*ApplicationMetrics, error) { + res, err := c.sendV1AppsGUIDAggregatedMetricHistoriesMetricTypeGet(ctx, params) + _ = res + return res, err +} + +func (c *Client) sendV1AppsGUIDAggregatedMetricHistoriesMetricTypeGet(ctx context.Context, params V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetParams) (res *ApplicationMetrics, err error) { + var otelAttrs []attribute.KeyValue + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, elapsedDuration.Microseconds(), metric.WithAttributes(otelAttrs...)) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "V1AppsGUIDAggregatedMetricHistoriesMetricTypeGet", + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [4]string + pathParts[0] = "/v1/apps/" + { + // Encode "guid" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "guid", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.GUID)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/aggregated_metric_histories/" + { + // Encode "metric_type" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "metric_type", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.MetricType)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[3] = encoded + } + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeQueryParams" + q := uri.NewQueryEncoder() + { + // Encode "start-time" parameter. + cfg := uri.QueryParameterEncodingConfig{ + Name: "start-time", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := params.StartTime.Get(); ok { + return e.EncodeValue(conv.IntToString(val)) + } + return nil + }); err != nil { + return res, errors.Wrap(err, "encode query") + } + } + { + // Encode "end-time" parameter. + cfg := uri.QueryParameterEncodingConfig{ + Name: "end-time", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := params.EndTime.Get(); ok { + return e.EncodeValue(conv.IntToString(val)) + } + return nil + }); err != nil { + return res, errors.Wrap(err, "encode query") + } + } + { + // Encode "order-direction" parameter. + cfg := uri.QueryParameterEncodingConfig{ + Name: "order-direction", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := params.OrderDirection.Get(); ok { + return e.EncodeValue(conv.StringToString(string(val))) + } + return nil + }); err != nil { + return res, errors.Wrap(err, "encode query") + } + } + { + // Encode "page" parameter. + cfg := uri.QueryParameterEncodingConfig{ + Name: "page", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := params.Page.Get(); ok { + return e.EncodeValue(conv.IntToString(val)) + } + return nil + }); err != nil { + return res, errors.Wrap(err, "encode query") + } + } + { + // Encode "results-per-page" parameter. + cfg := uri.QueryParameterEncodingConfig{ + Name: "results-per-page", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := params.ResultsPerPage.Get(); ok { + return e.EncodeValue(conv.IntToString(val)) + } + return nil + }); err != nil { + return res, errors.Wrap(err, "encode query") + } + } + u.RawQuery = q.Values().Encode() + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "GET", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:BasicAuthentication" + switch err := c.securityBasicAuthentication(ctx, "V1AppsGUIDAggregatedMetricHistoriesMetricTypeGet", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"BasicAuthentication\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, errors.New("no security requirement satisfied") + } + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} diff --git a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_json_gen.go b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_json_gen.go new file mode 100644 index 0000000000..fde127df30 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_json_gen.go @@ -0,0 +1,519 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "github.com/go-faster/errors" + "github.com/go-faster/jx" + + "github.com/ogen-go/ogen/json" +) + +// Encode implements json.Marshaler. +func (s *ApplicationMetric) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ApplicationMetric) encodeFields(e *jx.Encoder) { + { + if s.AppGUID.Set { + e.FieldStart("app_guid") + s.AppGUID.Encode(e) + } + } + { + if s.InstanceIndex.Set { + e.FieldStart("instanceIndex") + s.InstanceIndex.Encode(e) + } + } + { + if s.Timestamp.Set { + e.FieldStart("timestamp") + s.Timestamp.Encode(e) + } + } + { + if s.CollectedAt.Set { + e.FieldStart("collected_at") + s.CollectedAt.Encode(e) + } + } + { + if s.MetricType.Set { + e.FieldStart("metric_type") + s.MetricType.Encode(e) + } + } + { + if s.Value.Set { + e.FieldStart("value") + s.Value.Encode(e) + } + } + { + if s.Unit.Set { + e.FieldStart("unit") + s.Unit.Encode(e) + } + } +} + +var jsonFieldsNameOfApplicationMetric = [7]string{ + 0: "app_guid", + 1: "instanceIndex", + 2: "timestamp", + 3: "collected_at", + 4: "metric_type", + 5: "value", + 6: "unit", +} + +// Decode decodes ApplicationMetric from json. +func (s *ApplicationMetric) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ApplicationMetric to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "app_guid": + if err := func() error { + s.AppGUID.Reset() + if err := s.AppGUID.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"app_guid\"") + } + case "instanceIndex": + if err := func() error { + s.InstanceIndex.Reset() + if err := s.InstanceIndex.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"instanceIndex\"") + } + case "timestamp": + if err := func() error { + s.Timestamp.Reset() + if err := s.Timestamp.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"timestamp\"") + } + case "collected_at": + if err := func() error { + s.CollectedAt.Reset() + if err := s.CollectedAt.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"collected_at\"") + } + case "metric_type": + if err := func() error { + s.MetricType.Reset() + if err := s.MetricType.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"metric_type\"") + } + case "value": + if err := func() error { + s.Value.Reset() + if err := s.Value.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"value\"") + } + case "unit": + if err := func() error { + s.Unit.Reset() + if err := s.Unit.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"unit\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ApplicationMetric") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ApplicationMetric) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ApplicationMetric) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ApplicationMetrics) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ApplicationMetrics) encodeFields(e *jx.Encoder) { + { + if s.TotalResults.Set { + e.FieldStart("total_results") + s.TotalResults.Encode(e) + } + } + { + if s.TotalPages.Set { + e.FieldStart("total_pages") + s.TotalPages.Encode(e) + } + } + { + if s.Page.Set { + e.FieldStart("page") + s.Page.Encode(e) + } + } + { + if s.PrevURL.Set { + e.FieldStart("prev_url") + s.PrevURL.Encode(e) + } + } + { + if s.NextURL.Set { + e.FieldStart("next_url") + s.NextURL.Encode(e) + } + } + { + if s.Resources != nil { + e.FieldStart("resources") + e.ArrStart() + for _, elem := range s.Resources { + elem.Encode(e) + } + e.ArrEnd() + } + } +} + +var jsonFieldsNameOfApplicationMetrics = [6]string{ + 0: "total_results", + 1: "total_pages", + 2: "page", + 3: "prev_url", + 4: "next_url", + 5: "resources", +} + +// Decode decodes ApplicationMetrics from json. +func (s *ApplicationMetrics) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ApplicationMetrics to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "total_results": + if err := func() error { + s.TotalResults.Reset() + if err := s.TotalResults.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"total_results\"") + } + case "total_pages": + if err := func() error { + s.TotalPages.Reset() + if err := s.TotalPages.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"total_pages\"") + } + case "page": + if err := func() error { + s.Page.Reset() + if err := s.Page.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"page\"") + } + case "prev_url": + if err := func() error { + s.PrevURL.Reset() + if err := s.PrevURL.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"prev_url\"") + } + case "next_url": + if err := func() error { + s.NextURL.Reset() + if err := s.NextURL.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"next_url\"") + } + case "resources": + if err := func() error { + s.Resources = make([]ApplicationMetric, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem ApplicationMetric + if err := elem.Decode(d); err != nil { + return err + } + s.Resources = append(s.Resources, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"resources\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ApplicationMetrics") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ApplicationMetrics) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ApplicationMetrics) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ErrorResponse) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ErrorResponse) encodeFields(e *jx.Encoder) { +} + +var jsonFieldsNameOfErrorResponse = [0]string{} + +// Decode decodes ErrorResponse from json. +func (s *ErrorResponse) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ErrorResponse to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ErrorResponse") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ErrorResponse) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ErrorResponse) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes int as json. +func (o OptInt) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Int(int(o.Value)) +} + +// Decode decodes int from json. +func (o *OptInt) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptInt to nil") + } + o.Set = true + v, err := d.Int() + if err != nil { + return err + } + o.Value = int(v) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptInt) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptInt) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes int64 as json. +func (o OptInt64) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Int64(int64(o.Value)) +} + +// Decode decodes int64 from json. +func (o *OptInt64) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptInt64 to nil") + } + o.Set = true + v, err := d.Int64() + if err != nil { + return err + } + o.Value = int64(v) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptInt64) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptInt64) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes string as json. +func (o OptString) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Str(string(o.Value)) +} + +// Decode decodes string from json. +func (o *OptString) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptString to nil") + } + o.Set = true + v, err := d.Str() + if err != nil { + return err + } + o.Value = string(v) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptString) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptString) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes url.URL as json. +func (o OptURI) Encode(e *jx.Encoder) { + if !o.Set { + return + } + json.EncodeURI(e, o.Value) +} + +// Decode decodes url.URL from json. +func (o *OptURI) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptURI to nil") + } + o.Set = true + v, err := json.DecodeURI(d) + if err != nil { + return err + } + o.Value = v + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptURI) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptURI) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} diff --git a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_parameters_gen.go b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_parameters_gen.go new file mode 100644 index 0000000000..b02d39ada6 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_parameters_gen.go @@ -0,0 +1,23 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +// V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetParams is parameters of GET /v1/apps/{guid}/aggregated_metric_histories/{metric_type} operation. +type V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetParams struct { + // The GUID identifying the application for which the scaling history is fetched. + // It can be found in the `application_id` property of the JSON object stored in the + // `VCAP_APPLICATION` environment variable. + GUID string + // The metric type. + MetricType string + // The start time in the number of nanoseconds elapsed since January 1, 1970 UTC. + StartTime OptInt + // The end time in the number of nanoseconds elapsed since January 1, 1970 UTC. + EndTime OptInt + // The sorting order. The scaling history will be order by timestamp ascending or descending. + OrderDirection OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection + // The page number to query. + Page OptInt + // Number of entries shown per page. + ResultsPerPage OptInt +} diff --git a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_request_encoders_gen.go b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_request_encoders_gen.go new file mode 100644 index 0000000000..ae379a2db9 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_request_encoders_gen.go @@ -0,0 +1,3 @@ +// Code generated by ogen, DO NOT EDIT. + +package api diff --git a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_response_decoders_gen.go b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_response_decoders_gen.go new file mode 100644 index 0000000000..9afbb64fa2 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_response_decoders_gen.go @@ -0,0 +1,98 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "io" + "mime" + "net/http" + + "github.com/go-faster/errors" + "github.com/go-faster/jx" + + "github.com/ogen-go/ogen/ogenerrors" + "github.com/ogen-go/ogen/validate" +) + +func decodeV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetResponse(resp *http.Response) (res *ApplicationMetrics, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response ApplicationMetrics + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + // Convenient error response. + defRes, err := func() (res *ErrorResponseStatusCode, err error) { + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response ErrorResponse + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &ErrorResponseStatusCode{ + StatusCode: resp.StatusCode, + Response: response, + }, nil + default: + return res, validate.InvalidContentType(ct) + } + }() + if err != nil { + return res, errors.Wrapf(err, "default (code %d)", resp.StatusCode) + } + return res, errors.Wrap(defRes, "error") +} diff --git a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_schemas_gen.go b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_schemas_gen.go new file mode 100644 index 0000000000..6010e2b2f5 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_schemas_gen.go @@ -0,0 +1,495 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "fmt" + "net/url" + + "github.com/go-faster/errors" +) + +func (s *ErrorResponseStatusCode) Error() string { + return fmt.Sprintf("code %d: %+v", s.StatusCode, s.Response) +} + +// Object containing metric history. +// Ref: #/components/schemas/ApplicationMetric +type ApplicationMetric struct { + // Identificator used by Cloud Foundry for entities. + // Anything is an entity. Apps, services, service-bindings, …. + AppGUID OptString `json:"app_guid"` + // Application Metric. + InstanceIndex OptInt `json:"instanceIndex"` + // The scaling time in the number of nanoseconds elapsed since January 1, 1970 UTC. + Timestamp OptInt `json:"timestamp"` + // The time at which the metrics were collected in the number of nanoseconds. + CollectedAt OptInt `json:"collected_at"` + // One user-defined custom metric type or one of the system-default metric types, which are: + // "memoryused", "memoryutil", "responsetime", "throughput" and "cpu". + MetricType OptString `json:"metric_type"` + // The value of metric type to be returned as the aggregated metric result of an application. + Value OptInt `json:"value"` + Unit OptString `json:"unit"` +} + +// GetAppGUID returns the value of AppGUID. +func (s *ApplicationMetric) GetAppGUID() OptString { + return s.AppGUID +} + +// GetInstanceIndex returns the value of InstanceIndex. +func (s *ApplicationMetric) GetInstanceIndex() OptInt { + return s.InstanceIndex +} + +// GetTimestamp returns the value of Timestamp. +func (s *ApplicationMetric) GetTimestamp() OptInt { + return s.Timestamp +} + +// GetCollectedAt returns the value of CollectedAt. +func (s *ApplicationMetric) GetCollectedAt() OptInt { + return s.CollectedAt +} + +// GetMetricType returns the value of MetricType. +func (s *ApplicationMetric) GetMetricType() OptString { + return s.MetricType +} + +// GetValue returns the value of Value. +func (s *ApplicationMetric) GetValue() OptInt { + return s.Value +} + +// GetUnit returns the value of Unit. +func (s *ApplicationMetric) GetUnit() OptString { + return s.Unit +} + +// SetAppGUID sets the value of AppGUID. +func (s *ApplicationMetric) SetAppGUID(val OptString) { + s.AppGUID = val +} + +// SetInstanceIndex sets the value of InstanceIndex. +func (s *ApplicationMetric) SetInstanceIndex(val OptInt) { + s.InstanceIndex = val +} + +// SetTimestamp sets the value of Timestamp. +func (s *ApplicationMetric) SetTimestamp(val OptInt) { + s.Timestamp = val +} + +// SetCollectedAt sets the value of CollectedAt. +func (s *ApplicationMetric) SetCollectedAt(val OptInt) { + s.CollectedAt = val +} + +// SetMetricType sets the value of MetricType. +func (s *ApplicationMetric) SetMetricType(val OptString) { + s.MetricType = val +} + +// SetValue sets the value of Value. +func (s *ApplicationMetric) SetValue(val OptInt) { + s.Value = val +} + +// SetUnit sets the value of Unit. +func (s *ApplicationMetric) SetUnit(val OptString) { + s.Unit = val +} + +// Object containing Application Metrics. +// Ref: #/components/schemas/Application_Metrics +type ApplicationMetrics struct { + // Number of history entries found for the given query. + TotalResults OptInt64 `json:"total_results"` + // Number of Pages from the query. + TotalPages OptInt64 `json:"total_pages"` + // Number of the current page. + Page OptInt64 `json:"page"` + PrevURL OptURI `json:"prev_url"` + NextURL OptURI `json:"next_url"` + Resources []ApplicationMetric `json:"resources"` +} + +// GetTotalResults returns the value of TotalResults. +func (s *ApplicationMetrics) GetTotalResults() OptInt64 { + return s.TotalResults +} + +// GetTotalPages returns the value of TotalPages. +func (s *ApplicationMetrics) GetTotalPages() OptInt64 { + return s.TotalPages +} + +// GetPage returns the value of Page. +func (s *ApplicationMetrics) GetPage() OptInt64 { + return s.Page +} + +// GetPrevURL returns the value of PrevURL. +func (s *ApplicationMetrics) GetPrevURL() OptURI { + return s.PrevURL +} + +// GetNextURL returns the value of NextURL. +func (s *ApplicationMetrics) GetNextURL() OptURI { + return s.NextURL +} + +// GetResources returns the value of Resources. +func (s *ApplicationMetrics) GetResources() []ApplicationMetric { + return s.Resources +} + +// SetTotalResults sets the value of TotalResults. +func (s *ApplicationMetrics) SetTotalResults(val OptInt64) { + s.TotalResults = val +} + +// SetTotalPages sets the value of TotalPages. +func (s *ApplicationMetrics) SetTotalPages(val OptInt64) { + s.TotalPages = val +} + +// SetPage sets the value of Page. +func (s *ApplicationMetrics) SetPage(val OptInt64) { + s.Page = val +} + +// SetPrevURL sets the value of PrevURL. +func (s *ApplicationMetrics) SetPrevURL(val OptURI) { + s.PrevURL = val +} + +// SetNextURL sets the value of NextURL. +func (s *ApplicationMetrics) SetNextURL(val OptURI) { + s.NextURL = val +} + +// SetResources sets the value of Resources. +func (s *ApplicationMetrics) SetResources(val []ApplicationMetric) { + s.Resources = val +} + +type BasicAuthentication struct { + Username string + Password string +} + +// GetUsername returns the value of Username. +func (s *BasicAuthentication) GetUsername() string { + return s.Username +} + +// GetPassword returns the value of Password. +func (s *BasicAuthentication) GetPassword() string { + return s.Password +} + +// SetUsername sets the value of Username. +func (s *BasicAuthentication) SetUsername(val string) { + s.Username = val +} + +// SetPassword sets the value of Password. +func (s *BasicAuthentication) SetPassword(val string) { + s.Password = val +} + +// Ref: #/components/schemas/ErrorResponse +type ErrorResponse struct{} + +// ErrorResponseStatusCode wraps ErrorResponse with StatusCode. +type ErrorResponseStatusCode struct { + StatusCode int + Response ErrorResponse +} + +// GetStatusCode returns the value of StatusCode. +func (s *ErrorResponseStatusCode) GetStatusCode() int { + return s.StatusCode +} + +// GetResponse returns the value of Response. +func (s *ErrorResponseStatusCode) GetResponse() ErrorResponse { + return s.Response +} + +// SetStatusCode sets the value of StatusCode. +func (s *ErrorResponseStatusCode) SetStatusCode(val int) { + s.StatusCode = val +} + +// SetResponse sets the value of Response. +func (s *ErrorResponseStatusCode) SetResponse(val ErrorResponse) { + s.Response = val +} + +// NewOptInt returns new OptInt with value set to v. +func NewOptInt(v int) OptInt { + return OptInt{ + Value: v, + Set: true, + } +} + +// OptInt is optional int. +type OptInt struct { + Value int + Set bool +} + +// IsSet returns true if OptInt was set. +func (o OptInt) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptInt) Reset() { + var v int + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptInt) SetTo(v int) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptInt) Get() (v int, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptInt) Or(d int) int { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptInt64 returns new OptInt64 with value set to v. +func NewOptInt64(v int64) OptInt64 { + return OptInt64{ + Value: v, + Set: true, + } +} + +// OptInt64 is optional int64. +type OptInt64 struct { + Value int64 + Set bool +} + +// IsSet returns true if OptInt64 was set. +func (o OptInt64) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptInt64) Reset() { + var v int64 + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptInt64) SetTo(v int64) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptInt64) Get() (v int64, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptInt64) Or(d int64) int64 { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptString returns new OptString with value set to v. +func NewOptString(v string) OptString { + return OptString{ + Value: v, + Set: true, + } +} + +// OptString is optional string. +type OptString struct { + Value string + Set bool +} + +// IsSet returns true if OptString was set. +func (o OptString) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptString) Reset() { + var v string + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptString) SetTo(v string) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptString) Get() (v string, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptString) Or(d string) string { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptURI returns new OptURI with value set to v. +func NewOptURI(v url.URL) OptURI { + return OptURI{ + Value: v, + Set: true, + } +} + +// OptURI is optional url.URL. +type OptURI struct { + Value url.URL + Set bool +} + +// IsSet returns true if OptURI was set. +func (o OptURI) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptURI) Reset() { + var v url.URL + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptURI) SetTo(v url.URL) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptURI) Get() (v url.URL, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptURI) Or(d url.URL) url.URL { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection returns new OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection with value set to v. +func NewOptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection(v V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection { + return OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection{ + Value: v, + Set: true, + } +} + +// OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection is optional V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection. +type OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection struct { + Value V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection + Set bool +} + +// IsSet returns true if OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection was set. +func (o OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) Reset() { + var v V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) SetTo(v V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) Get() (v V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) Or(d V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection { + if v, ok := o.Get(); ok { + return v + } + return d +} + +type V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection string + +const ( + V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirectionAsc V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection = "asc" + V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirectionDesc V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection = "desc" +) + +// MarshalText implements encoding.TextMarshaler. +func (s V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) MarshalText() ([]byte, error) { + switch s { + case V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirectionAsc: + return []byte(s), nil + case V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirectionDesc: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) UnmarshalText(data []byte) error { + switch V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection(data) { + case V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirectionAsc: + *s = V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirectionAsc + return nil + case V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirectionDesc: + *s = V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirectionDesc + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} diff --git a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_security_gen.go b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_security_gen.go new file mode 100644 index 0000000000..60555f78c7 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_security_gen.go @@ -0,0 +1,25 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "context" + "net/http" + + "github.com/go-faster/errors" +) + +// SecuritySource is provider of security values (tokens, passwords, etc.). +type SecuritySource interface { + // BasicAuthentication provides basicAuthentication security value. + BasicAuthentication(ctx context.Context, operationName string) (BasicAuthentication, error) +} + +func (s *Client) securityBasicAuthentication(ctx context.Context, operationName string, req *http.Request) error { + t, err := s.sec.BasicAuthentication(ctx, operationName) + if err != nil { + return errors.Wrap(err, "security source \"BasicAuthentication\"") + } + req.SetBasicAuth(t.Username, t.Password) + return nil +} diff --git a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_validators_gen.go b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_validators_gen.go new file mode 100644 index 0000000000..ce2d11fd78 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_validators_gen.go @@ -0,0 +1,88 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "fmt" + + "github.com/go-faster/errors" + + "github.com/ogen-go/ogen/validate" +) + +func (s *ApplicationMetric) Validate() error { + var failures []validate.FieldError + if err := func() error { + if s.AppGUID.Set { + if err := func() error { + if err := (validate.String{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: regexMap["(\\d|[a-f]){8}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){12}"], + }).Validate(string(s.AppGUID.Value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "app_guid", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} +func (s *ApplicationMetrics) Validate() error { + var failures []validate.FieldError + if err := func() error { + var failures []validate.FieldError + for i, elem := range s.Resources { + if err := func() error { + if err := elem.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "resources", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) Validate() error { + switch s { + case "asc": + return nil + case "desc": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} diff --git a/src/acceptance/assets/app/go_app/internal/generate.go b/src/acceptance/assets/app/go_app/internal/generate.go index 09c0e075ac..0aaccabd3c 100644 --- a/src/acceptance/assets/app/go_app/internal/generate.go +++ b/src/acceptance/assets/app/go_app/internal/generate.go @@ -3,4 +3,4 @@ package internal //go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target custommetrics --clean ../../../../../../api/custom-metrics-api.yaml //go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target scalinghistory --clean ../../../../../../api/scaling-history-api.yaml //go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target policy --clean ../../../../../../api/policy-api.yaml -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target applicationmetric --clean ../../../../../../api/application-metric-api.yaml \ No newline at end of file +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target applicationmetric --clean ../../../../../../api/application-metric-api.yaml diff --git a/src/acceptance/assets/app/go_app/internal/policy/oas_cfg_gen.go b/src/acceptance/assets/app/go_app/internal/policy/oas_cfg_gen.go new file mode 100644 index 0000000000..2975fe8f63 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/policy/oas_cfg_gen.go @@ -0,0 +1,141 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "net/http" + + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/global" + "go.opentelemetry.io/otel/metric/instrument" + "go.opentelemetry.io/otel/trace" + + ht "github.com/ogen-go/ogen/http" + "github.com/ogen-go/ogen/ogenregex" + "github.com/ogen-go/ogen/otelogen" +) + +var regexMap = map[string]ogenregex.Regexp{ + "(\\d|[a-f]){8}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){12}": ogenregex.MustCompile("(\\d|[a-f]){8}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){12}"), +} +var ( + // Allocate option closure once. + clientSpanKind = trace.WithSpanKind(trace.SpanKindClient) +) + +type ( + optionFunc[C any] func(*C) + otelOptionFunc func(*otelConfig) +) + +type otelConfig struct { + TracerProvider trace.TracerProvider + Tracer trace.Tracer + MeterProvider metric.MeterProvider + Meter metric.Meter +} + +func (cfg *otelConfig) initOTEL() { + if cfg.TracerProvider == nil { + cfg.TracerProvider = otel.GetTracerProvider() + } + if cfg.MeterProvider == nil { + cfg.MeterProvider = global.MeterProvider() + } + cfg.Tracer = cfg.TracerProvider.Tracer(otelogen.Name, + trace.WithInstrumentationVersion(otelogen.SemVersion()), + ) + cfg.Meter = cfg.MeterProvider.Meter(otelogen.Name) +} + +type clientConfig struct { + otelConfig + Client ht.Client +} + +// ClientOption is client config option. +type ClientOption interface { + applyClient(*clientConfig) +} + +var _ = []ClientOption{ + (optionFunc[clientConfig])(nil), + (otelOptionFunc)(nil), +} + +func (o optionFunc[C]) applyClient(c *C) { + o(c) +} + +func (o otelOptionFunc) applyClient(c *clientConfig) { + o(&c.otelConfig) +} + +func newClientConfig(opts ...ClientOption) clientConfig { + cfg := clientConfig{ + Client: http.DefaultClient, + } + for _, opt := range opts { + opt.applyClient(&cfg) + } + cfg.initOTEL() + return cfg +} + +type baseClient struct { + cfg clientConfig + requests instrument.Int64Counter + errors instrument.Int64Counter + duration instrument.Int64Histogram +} + +func (cfg clientConfig) baseClient() (c baseClient, err error) { + c = baseClient{cfg: cfg} + if c.requests, err = c.cfg.Meter.Int64Counter(otelogen.ClientRequestCount); err != nil { + return c, err + } + if c.errors, err = c.cfg.Meter.Int64Counter(otelogen.ClientErrorsCount); err != nil { + return c, err + } + if c.duration, err = c.cfg.Meter.Int64Histogram(otelogen.ClientDuration); err != nil { + return c, err + } + return c, nil +} + +// Option is config option. +type Option interface { + ClientOption +} + +// WithTracerProvider specifies a tracer provider to use for creating a tracer. +// +// If none is specified, the global provider is used. +func WithTracerProvider(provider trace.TracerProvider) Option { + return otelOptionFunc(func(cfg *otelConfig) { + if provider != nil { + cfg.TracerProvider = provider + } + }) +} + +// WithMeterProvider specifies a meter provider to use for creating a meter. +// +// If none is specified, the global.MeterProvider() is used. +func WithMeterProvider(provider metric.MeterProvider) Option { + return otelOptionFunc(func(cfg *otelConfig) { + if provider != nil { + cfg.MeterProvider = provider + } + }) +} + +// WithClient specifies http client to use. +func WithClient(client ht.Client) ClientOption { + return optionFunc[clientConfig](func(cfg *clientConfig) { + if client != nil { + cfg.Client = client + } + }) +} diff --git a/src/acceptance/assets/app/go_app/internal/policy/oas_client_gen.go b/src/acceptance/assets/app/go_app/internal/policy/oas_client_gen.go new file mode 100644 index 0000000000..4515da36c6 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/policy/oas_client_gen.go @@ -0,0 +1,426 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "context" + "net/url" + "strings" + "time" + + "github.com/go-faster/errors" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/metric" + + "github.com/ogen-go/ogen/conv" + ht "github.com/ogen-go/ogen/http" + "github.com/ogen-go/ogen/ogenerrors" + "github.com/ogen-go/ogen/uri" +) + +// Client implements OAS client. +type Client struct { + serverURL *url.URL + sec SecuritySource + baseClient +} + +func trimTrailingSlashes(u *url.URL) { + u.Path = strings.TrimRight(u.Path, "/") + u.RawPath = strings.TrimRight(u.RawPath, "/") +} + +// NewClient initializes new Client defined by OAS. +func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error) { + u, err := url.Parse(serverURL) + if err != nil { + return nil, err + } + trimTrailingSlashes(u) + + c, err := newClientConfig(opts...).baseClient() + if err != nil { + return nil, err + } + return &Client{ + serverURL: u, + sec: sec, + baseClient: c, + }, nil +} + +type serverURLKey struct{} + +// WithServerURL sets context key to override server URL. +func WithServerURL(ctx context.Context, u *url.URL) context.Context { + return context.WithValue(ctx, serverURLKey{}, u) +} + +func (c *Client) requestURL(ctx context.Context) *url.URL { + u, ok := ctx.Value(serverURLKey{}).(*url.URL) + if !ok { + return c.serverURL + } + return u +} + +// V1AppsGUIDPolicyDelete invokes DELETE /v1/apps/{guid}/policy operation. +// +// This API is used to delete the policy. +// +// DELETE /v1/apps/{guid}/policy +func (c *Client) V1AppsGUIDPolicyDelete(ctx context.Context, params V1AppsGUIDPolicyDeleteParams) (*Policy, error) { + res, err := c.sendV1AppsGUIDPolicyDelete(ctx, params) + _ = res + return res, err +} + +func (c *Client) sendV1AppsGUIDPolicyDelete(ctx context.Context, params V1AppsGUIDPolicyDeleteParams) (res *Policy, err error) { + var otelAttrs []attribute.KeyValue + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, elapsedDuration.Microseconds(), metric.WithAttributes(otelAttrs...)) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "V1AppsGUIDPolicyDelete", + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [3]string + pathParts[0] = "/v1/apps/" + { + // Encode "guid" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "guid", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.GUID)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/policy" + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "DELETE", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:BasicAuthentication" + switch err := c.securityBasicAuthentication(ctx, "V1AppsGUIDPolicyDelete", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"BasicAuthentication\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, errors.New("no security requirement satisfied") + } + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeV1AppsGUIDPolicyDeleteResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} + +// V1AppsGUIDPolicyGet invokes GET /v1/apps/{guid}/policy operation. +// +// This API is used to retrieve the policy. +// +// GET /v1/apps/{guid}/policy +func (c *Client) V1AppsGUIDPolicyGet(ctx context.Context, params V1AppsGUIDPolicyGetParams) (*Policy, error) { + res, err := c.sendV1AppsGUIDPolicyGet(ctx, params) + _ = res + return res, err +} + +func (c *Client) sendV1AppsGUIDPolicyGet(ctx context.Context, params V1AppsGUIDPolicyGetParams) (res *Policy, err error) { + var otelAttrs []attribute.KeyValue + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, elapsedDuration.Microseconds(), metric.WithAttributes(otelAttrs...)) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "V1AppsGUIDPolicyGet", + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [3]string + pathParts[0] = "/v1/apps/" + { + // Encode "guid" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "guid", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.GUID)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/policy" + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "GET", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:BasicAuthentication" + switch err := c.securityBasicAuthentication(ctx, "V1AppsGUIDPolicyGet", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"BasicAuthentication\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, errors.New("no security requirement satisfied") + } + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeV1AppsGUIDPolicyGetResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} + +// V1AppsGUIDPolicyPut invokes PUT /v1/apps/{guid}/policy operation. +// +// This API is used to create the policy. +// +// PUT /v1/apps/{guid}/policy +func (c *Client) V1AppsGUIDPolicyPut(ctx context.Context, request OptPolicy, params V1AppsGUIDPolicyPutParams) (*Policy, error) { + res, err := c.sendV1AppsGUIDPolicyPut(ctx, request, params) + _ = res + return res, err +} + +func (c *Client) sendV1AppsGUIDPolicyPut(ctx context.Context, request OptPolicy, params V1AppsGUIDPolicyPutParams) (res *Policy, err error) { + var otelAttrs []attribute.KeyValue + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + c.duration.Record(ctx, elapsedDuration.Microseconds(), metric.WithAttributes(otelAttrs...)) + }() + + // Increment request counter. + c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + + // Start a span for this request. + ctx, span := c.cfg.Tracer.Start(ctx, "V1AppsGUIDPolicyPut", + clientSpanKind, + ) + // Track stage for error reporting. + var stage string + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + } + span.End() + }() + + stage = "BuildURL" + u := uri.Clone(c.requestURL(ctx)) + var pathParts [3]string + pathParts[0] = "/v1/apps/" + { + // Encode "guid" parameter. + e := uri.NewPathEncoder(uri.PathEncoderConfig{ + Param: "guid", + Style: uri.PathStyleSimple, + Explode: false, + }) + if err := func() error { + return e.EncodeValue(conv.StringToString(params.GUID)) + }(); err != nil { + return res, errors.Wrap(err, "encode path") + } + encoded, err := e.Result() + if err != nil { + return res, errors.Wrap(err, "encode path") + } + pathParts[1] = encoded + } + pathParts[2] = "/policy" + uri.AddPathParts(u, pathParts[:]...) + + stage = "EncodeRequest" + r, err := ht.NewRequest(ctx, "PUT", u) + if err != nil { + return res, errors.Wrap(err, "create request") + } + if err := encodeV1AppsGUIDPolicyPutRequest(request, r); err != nil { + return res, errors.Wrap(err, "encode request") + } + + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:BasicAuthentication" + switch err := c.securityBasicAuthentication(ctx, "V1AppsGUIDPolicyPut", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"BasicAuthentication\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, errors.New("no security requirement satisfied") + } + } + + stage = "SendRequest" + resp, err := c.cfg.Client.Do(r) + if err != nil { + return res, errors.Wrap(err, "do request") + } + defer resp.Body.Close() + + stage = "DecodeResponse" + result, err := decodeV1AppsGUIDPolicyPutResponse(resp) + if err != nil { + return res, errors.Wrap(err, "decode response") + } + + return result, nil +} diff --git a/src/acceptance/assets/app/go_app/internal/policy/oas_json_gen.go b/src/acceptance/assets/app/go_app/internal/policy/oas_json_gen.go new file mode 100644 index 0000000000..88c0703e2a --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/policy/oas_json_gen.go @@ -0,0 +1,271 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "github.com/go-faster/errors" + "github.com/go-faster/jx" +) + +// Encode implements json.Marshaler. +func (s *ErrorResponse) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ErrorResponse) encodeFields(e *jx.Encoder) { +} + +var jsonFieldsNameOfErrorResponse = [0]string{} + +// Decode decodes ErrorResponse from json. +func (s *ErrorResponse) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ErrorResponse to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ErrorResponse") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ErrorResponse) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ErrorResponse) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes int64 as json. +func (o OptInt64) Encode(e *jx.Encoder) { + if !o.Set { + return + } + e.Int64(int64(o.Value)) +} + +// Decode decodes int64 from json. +func (o *OptInt64) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptInt64 to nil") + } + o.Set = true + v, err := d.Int64() + if err != nil { + return err + } + o.Value = int64(v) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptInt64) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptInt64) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes Policy as json. +func (o OptPolicy) Encode(e *jx.Encoder) { + if !o.Set { + return + } + o.Value.Encode(e) +} + +// Decode decodes Policy from json. +func (o *OptPolicy) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode OptPolicy to nil") + } + o.Set = true + if err := o.Value.Decode(d); err != nil { + return err + } + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s OptPolicy) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *OptPolicy) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *Policy) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *Policy) encodeFields(e *jx.Encoder) { + { + if s.InstanceMinCount.Set { + e.FieldStart("instance_min_count") + s.InstanceMinCount.Encode(e) + } + } + { + if s.InstanceMaxCount.Set { + e.FieldStart("instance_max_count") + s.InstanceMaxCount.Encode(e) + } + } + { + if s.ScalingRules != nil { + e.FieldStart("scaling_rules") + e.ArrStart() + for _, elem := range s.ScalingRules { + elem.Encode(e) + } + e.ArrEnd() + } + } +} + +var jsonFieldsNameOfPolicy = [3]string{ + 0: "instance_min_count", + 1: "instance_max_count", + 2: "scaling_rules", +} + +// Decode decodes Policy from json. +func (s *Policy) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode Policy to nil") + } + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "instance_min_count": + if err := func() error { + s.InstanceMinCount.Reset() + if err := s.InstanceMinCount.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"instance_min_count\"") + } + case "instance_max_count": + if err := func() error { + s.InstanceMaxCount.Reset() + if err := s.InstanceMaxCount.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"instance_max_count\"") + } + case "scaling_rules": + if err := func() error { + s.ScalingRules = make([]ScalingRule, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem ScalingRule + if err := elem.Decode(d); err != nil { + return err + } + s.ScalingRules = append(s.ScalingRules, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"scaling_rules\"") + } + default: + return d.Skip() + } + return nil + }); err != nil { + return errors.Wrap(err, "decode Policy") + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *Policy) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *Policy) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ScalingRule as json. +func (s ScalingRule) Encode(e *jx.Encoder) { + unwrapped := jx.Raw(s) + + if len(unwrapped) != 0 { + e.Raw(unwrapped) + } +} + +// Decode decodes ScalingRule from json. +func (s *ScalingRule) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ScalingRule to nil") + } + var unwrapped jx.Raw + if err := func() error { + v, err := d.RawAppend(nil) + unwrapped = jx.Raw(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "alias") + } + *s = ScalingRule(unwrapped) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s ScalingRule) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ScalingRule) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} diff --git a/src/acceptance/assets/app/go_app/internal/policy/oas_parameters_gen.go b/src/acceptance/assets/app/go_app/internal/policy/oas_parameters_gen.go new file mode 100644 index 0000000000..709b44bd20 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/policy/oas_parameters_gen.go @@ -0,0 +1,27 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +// V1AppsGUIDPolicyDeleteParams is parameters of DELETE /v1/apps/{guid}/policy operation. +type V1AppsGUIDPolicyDeleteParams struct { + // The GUID identifying the application for which the scaling history is fetched. + // It can be found in the `application_id` property of the JSON object stored in the + // `VCAP_APPLICATION` environment variable. + GUID string +} + +// V1AppsGUIDPolicyGetParams is parameters of GET /v1/apps/{guid}/policy operation. +type V1AppsGUIDPolicyGetParams struct { + // The GUID identifying the application for which the scaling history is fetched. + // It can be found in the `application_id` property of the JSON object stored in the + // `VCAP_APPLICATION` environment variable. + GUID string +} + +// V1AppsGUIDPolicyPutParams is parameters of PUT /v1/apps/{guid}/policy operation. +type V1AppsGUIDPolicyPutParams struct { + // The GUID identifying the application for which the scaling history is fetched. + // It can be found in the `application_id` property of the JSON object stored in the + // `VCAP_APPLICATION` environment variable. + GUID string +} diff --git a/src/acceptance/assets/app/go_app/internal/policy/oas_request_encoders_gen.go b/src/acceptance/assets/app/go_app/internal/policy/oas_request_encoders_gen.go new file mode 100644 index 0000000000..130ae49b28 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/policy/oas_request_encoders_gen.go @@ -0,0 +1,32 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "bytes" + "net/http" + + "github.com/go-faster/jx" + + ht "github.com/ogen-go/ogen/http" +) + +func encodeV1AppsGUIDPolicyPutRequest( + req OptPolicy, + r *http.Request, +) error { + const contentType = "application/json" + if !req.Set { + // Keep request with empty body if value is not set. + return nil + } + e := jx.GetEncoder() + { + if req.Set { + req.Encode(e) + } + } + encoded := e.Bytes() + ht.SetBody(r, bytes.NewReader(encoded), contentType) + return nil +} diff --git a/src/acceptance/assets/app/go_app/internal/policy/oas_response_decoders_gen.go b/src/acceptance/assets/app/go_app/internal/policy/oas_response_decoders_gen.go new file mode 100644 index 0000000000..89bd97ab0c --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/policy/oas_response_decoders_gen.go @@ -0,0 +1,264 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "io" + "mime" + "net/http" + + "github.com/go-faster/errors" + "github.com/go-faster/jx" + + "github.com/ogen-go/ogen/ogenerrors" + "github.com/ogen-go/ogen/validate" +) + +func decodeV1AppsGUIDPolicyDeleteResponse(resp *http.Response) (res *Policy, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response Policy + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + // Convenient error response. + defRes, err := func() (res *ErrorResponseStatusCode, err error) { + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response ErrorResponse + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &ErrorResponseStatusCode{ + StatusCode: resp.StatusCode, + Response: response, + }, nil + default: + return res, validate.InvalidContentType(ct) + } + }() + if err != nil { + return res, errors.Wrapf(err, "default (code %d)", resp.StatusCode) + } + return res, errors.Wrap(defRes, "error") +} + +func decodeV1AppsGUIDPolicyGetResponse(resp *http.Response) (res *Policy, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response Policy + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + // Convenient error response. + defRes, err := func() (res *ErrorResponseStatusCode, err error) { + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response ErrorResponse + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &ErrorResponseStatusCode{ + StatusCode: resp.StatusCode, + Response: response, + }, nil + default: + return res, validate.InvalidContentType(ct) + } + }() + if err != nil { + return res, errors.Wrapf(err, "default (code %d)", resp.StatusCode) + } + return res, errors.Wrap(defRes, "error") +} + +func decodeV1AppsGUIDPolicyPutResponse(resp *http.Response) (res *Policy, _ error) { + switch resp.StatusCode { + case 200: + // Code 200. + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response Policy + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &response, nil + default: + return res, validate.InvalidContentType(ct) + } + } + // Convenient error response. + defRes, err := func() (res *ErrorResponseStatusCode, err error) { + ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) + if err != nil { + return res, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + buf, err := io.ReadAll(resp.Body) + if err != nil { + return res, err + } + d := jx.DecodeBytes(buf) + + var response ErrorResponse + if err := func() error { + if err := response.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return res, err + } + return &ErrorResponseStatusCode{ + StatusCode: resp.StatusCode, + Response: response, + }, nil + default: + return res, validate.InvalidContentType(ct) + } + }() + if err != nil { + return res, errors.Wrapf(err, "default (code %d)", resp.StatusCode) + } + return res, errors.Wrap(defRes, "error") +} diff --git a/src/acceptance/assets/app/go_app/internal/policy/oas_schemas_gen.go b/src/acceptance/assets/app/go_app/internal/policy/oas_schemas_gen.go new file mode 100644 index 0000000000..29f8306c86 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/policy/oas_schemas_gen.go @@ -0,0 +1,201 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "fmt" + + "github.com/go-faster/jx" +) + +func (s *ErrorResponseStatusCode) Error() string { + return fmt.Sprintf("code %d: %+v", s.StatusCode, s.Response) +} + +type BasicAuthentication struct { + Username string + Password string +} + +// GetUsername returns the value of Username. +func (s *BasicAuthentication) GetUsername() string { + return s.Username +} + +// GetPassword returns the value of Password. +func (s *BasicAuthentication) GetPassword() string { + return s.Password +} + +// SetUsername sets the value of Username. +func (s *BasicAuthentication) SetUsername(val string) { + s.Username = val +} + +// SetPassword sets the value of Password. +func (s *BasicAuthentication) SetPassword(val string) { + s.Password = val +} + +// Ref: #/components/schemas/ErrorResponse +type ErrorResponse struct{} + +// ErrorResponseStatusCode wraps ErrorResponse with StatusCode. +type ErrorResponseStatusCode struct { + StatusCode int + Response ErrorResponse +} + +// GetStatusCode returns the value of StatusCode. +func (s *ErrorResponseStatusCode) GetStatusCode() int { + return s.StatusCode +} + +// GetResponse returns the value of Response. +func (s *ErrorResponseStatusCode) GetResponse() ErrorResponse { + return s.Response +} + +// SetStatusCode sets the value of StatusCode. +func (s *ErrorResponseStatusCode) SetStatusCode(val int) { + s.StatusCode = val +} + +// SetResponse sets the value of Response. +func (s *ErrorResponseStatusCode) SetResponse(val ErrorResponse) { + s.Response = val +} + +// NewOptInt64 returns new OptInt64 with value set to v. +func NewOptInt64(v int64) OptInt64 { + return OptInt64{ + Value: v, + Set: true, + } +} + +// OptInt64 is optional int64. +type OptInt64 struct { + Value int64 + Set bool +} + +// IsSet returns true if OptInt64 was set. +func (o OptInt64) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptInt64) Reset() { + var v int64 + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptInt64) SetTo(v int64) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptInt64) Get() (v int64, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptInt64) Or(d int64) int64 { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptPolicy returns new OptPolicy with value set to v. +func NewOptPolicy(v Policy) OptPolicy { + return OptPolicy{ + Value: v, + Set: true, + } +} + +// OptPolicy is optional Policy. +type OptPolicy struct { + Value Policy + Set bool +} + +// IsSet returns true if OptPolicy was set. +func (o OptPolicy) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptPolicy) Reset() { + var v Policy + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptPolicy) SetTo(v Policy) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptPolicy) Get() (v Policy, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptPolicy) Or(d Policy) Policy { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// Object creating Policy. +// Ref: #/components/schemas/Policy +type Policy struct { + // Minimal number of instance count. + InstanceMinCount OptInt64 `json:"instance_min_count"` + // Maximal number of instance count. + InstanceMaxCount OptInt64 `json:"instance_max_count"` + ScalingRules []ScalingRule `json:"scaling_rules"` +} + +// GetInstanceMinCount returns the value of InstanceMinCount. +func (s *Policy) GetInstanceMinCount() OptInt64 { + return s.InstanceMinCount +} + +// GetInstanceMaxCount returns the value of InstanceMaxCount. +func (s *Policy) GetInstanceMaxCount() OptInt64 { + return s.InstanceMaxCount +} + +// GetScalingRules returns the value of ScalingRules. +func (s *Policy) GetScalingRules() []ScalingRule { + return s.ScalingRules +} + +// SetInstanceMinCount sets the value of InstanceMinCount. +func (s *Policy) SetInstanceMinCount(val OptInt64) { + s.InstanceMinCount = val +} + +// SetInstanceMaxCount sets the value of InstanceMaxCount. +func (s *Policy) SetInstanceMaxCount(val OptInt64) { + s.InstanceMaxCount = val +} + +// SetScalingRules sets the value of ScalingRules. +func (s *Policy) SetScalingRules(val []ScalingRule) { + s.ScalingRules = val +} + +type ScalingRule jx.Raw diff --git a/src/acceptance/assets/app/go_app/internal/policy/oas_security_gen.go b/src/acceptance/assets/app/go_app/internal/policy/oas_security_gen.go new file mode 100644 index 0000000000..60555f78c7 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/policy/oas_security_gen.go @@ -0,0 +1,25 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "context" + "net/http" + + "github.com/go-faster/errors" +) + +// SecuritySource is provider of security values (tokens, passwords, etc.). +type SecuritySource interface { + // BasicAuthentication provides basicAuthentication security value. + BasicAuthentication(ctx context.Context, operationName string) (BasicAuthentication, error) +} + +func (s *Client) securityBasicAuthentication(ctx context.Context, operationName string, req *http.Request) error { + t, err := s.sec.BasicAuthentication(ctx, operationName) + if err != nil { + return errors.Wrap(err, "security source \"BasicAuthentication\"") + } + req.SetBasicAuth(t.Username, t.Password) + return nil +} diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_client_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_client_gen.go index e4c8f09238..9a18d32e60 100644 --- a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_client_gen.go +++ b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_client_gen.go @@ -15,12 +15,14 @@ import ( "github.com/ogen-go/ogen/conv" ht "github.com/ogen-go/ogen/http" + "github.com/ogen-go/ogen/ogenerrors" "github.com/ogen-go/ogen/uri" ) // Client implements OAS client. type Client struct { serverURL *url.URL + sec SecuritySource baseClient } @@ -30,7 +32,7 @@ func trimTrailingSlashes(u *url.URL) { } // NewClient initializes new Client defined by OAS. -func NewClient(serverURL string, opts ...ClientOption) (*Client, error) { +func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error) { u, err := url.Parse(serverURL) if err != nil { return nil, err @@ -43,6 +45,7 @@ func NewClient(serverURL string, opts ...ClientOption) (*Client, error) { } return &Client{ serverURL: u, + sec: sec, baseClient: c, }, nil } @@ -221,6 +224,39 @@ func (c *Client) sendV1AppsGUIDScalingHistoriesGet(ctx context.Context, params V return res, errors.Wrap(err, "create request") } + { + type bitset = [1]uint8 + var satisfied bitset + { + stage = "Security:BasicAuthentication" + switch err := c.securityBasicAuthentication(ctx, "V1AppsGUIDScalingHistoriesGet", r); { + case err == nil: // if NO error + satisfied[0] |= 1 << 0 + case errors.Is(err, ogenerrors.ErrSkipClientSecurity): + // Skip this security. + default: + return res, errors.Wrap(err, "security \"BasicAuthentication\"") + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + return res, errors.New("no security requirement satisfied") + } + } + stage = "SendRequest" resp, err := c.cfg.Client.Do(r) if err != nil { diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_schemas_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_schemas_gen.go index 5a72510f04..aae57aa340 100644 --- a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_schemas_gen.go +++ b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_schemas_gen.go @@ -13,6 +13,31 @@ func (s *ErrorResponseStatusCode) Error() string { return fmt.Sprintf("code %d: %+v", s.StatusCode, s.Response) } +type BasicAuthentication struct { + Username string + Password string +} + +// GetUsername returns the value of Username. +func (s *BasicAuthentication) GetUsername() string { + return s.Username +} + +// GetPassword returns the value of Password. +func (s *BasicAuthentication) GetPassword() string { + return s.Password +} + +// SetUsername sets the value of Username. +func (s *BasicAuthentication) SetUsername(val string) { + s.Username = val +} + +// SetPassword sets the value of Password. +func (s *BasicAuthentication) SetPassword(val string) { + s.Password = val +} + // Ref: #/components/schemas/ErrorResponse type ErrorResponse struct{} diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_security_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_security_gen.go new file mode 100644 index 0000000000..60555f78c7 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_security_gen.go @@ -0,0 +1,25 @@ +// Code generated by ogen, DO NOT EDIT. + +package api + +import ( + "context" + "net/http" + + "github.com/go-faster/errors" +) + +// SecuritySource is provider of security values (tokens, passwords, etc.). +type SecuritySource interface { + // BasicAuthentication provides basicAuthentication security value. + BasicAuthentication(ctx context.Context, operationName string) (BasicAuthentication, error) +} + +func (s *Client) securityBasicAuthentication(ctx context.Context, operationName string, req *http.Request) error { + t, err := s.sec.BasicAuthentication(ctx, operationName) + if err != nil { + return errors.Wrap(err, "security source \"BasicAuthentication\"") + } + req.SetBasicAuth(t.Username, t.Password) + return nil +} From 7f9f3ce62cf19faecbf765fc83b6b95bcc539449 Mon Sep 17 00:00:00 2001 From: Gupta Date: Fri, 7 Jul 2023 15:56:26 +0100 Subject: [PATCH 087/294] Changes to External referencing for OpenAPI specs --- api/policy-api.yaml | 1 - api/scaling-history-api.yaml | 18 +++--------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/api/policy-api.yaml b/api/policy-api.yaml index 90e8d68ba2..15c5d1b8fa 100644 --- a/api/policy-api.yaml +++ b/api/policy-api.yaml @@ -38,7 +38,6 @@ paths: tags: - Create Policy API V1 requestBody: - type: array content: application/json: schema: diff --git a/api/scaling-history-api.yaml b/api/scaling-history-api.yaml index 1265971910..79081ff781 100644 --- a/api/scaling-history-api.yaml +++ b/api/scaling-history-api.yaml @@ -22,10 +22,7 @@ paths: It can be found in the `application_id` property of the JSON object stored in the `VCAP_APPLICATION` environment variable. schema: - type: string - pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} - example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 - #$ref: "shared_definitions.yaml#/schemas/GUID" + $ref: "shared_definitions.yaml#/schemas/GUID" - name: start-time in: query description: | @@ -87,13 +84,7 @@ paths: schema: $ref: "#/components/schemas/History" default: - # $ref: "#/parameters/Error" #"./shared_definitions.yaml#/responses/Error" - description: | - Error, the response body may contain further information. - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" + $ref: "./shared_definitions.yaml#/responses/Error" security: - basicAuthentication: [] x-codegen-request-body-name: body @@ -180,10 +171,7 @@ components: It can be found in the `application_id` property of the JSON object stored in the `VCAP_APPLICATION` environment variable. schema: - type: string - pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} - example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 - #$ref: "./shared_definitions.yaml#/schemas/GUID" + $ref: "./shared_definitions.yaml#/schemas/GUID" timestamp: type: integer description: | From 58733cf337be960e38d68415c53657078ddd0e8e Mon Sep 17 00:00:00 2001 From: Gupta Date: Mon, 10 Jul 2023 22:46:04 +0100 Subject: [PATCH 088/294] Refactoring OAS --- api/application-metric-api.yaml | 56 +++++++++++++++-------------- api/custom-metrics-api.yaml | 12 ++++--- api/policy-api.yaml | 63 +++++++++++++++++---------------- 3 files changed, 69 insertions(+), 62 deletions(-) diff --git a/api/application-metric-api.yaml b/api/application-metric-api.yaml index f1f3682be6..78d253b697 100644 --- a/api/application-metric-api.yaml +++ b/api/application-metric-api.yaml @@ -25,21 +25,21 @@ paths: It can be found in the `application_id` property of the JSON object stored in the `VCAP_APPLICATION` environment variable. schema: - type: string - pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} - example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 - #$ref: "./shared_definitions.yaml#/schemas/GUID" + # type: string + # pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} + # example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 + $ref: "./shared_definitions.yaml#/schemas/GUID" - name: metric_type in: path required: true description: The metric type schema: - description: | - One user-defined custom metric type or one of the system-default metric types, which are: - "memoryused", "memoryutil", "responsetime", "throughput" and "cpu" - type: string - example: memoryused - #$ref: "./shared_definitions.yaml#/schemas/metric_type" + # description: | + # One user-defined custom metric type or one of the system-default metric types, which are: + # "memoryused", "memoryutil", "responsetime", "throughput" and "cpu" + # type: string + # example: memoryused + $ref: "./shared_definitions.yaml#/schemas/metric_type" - name: start-time in: query description: | @@ -101,13 +101,13 @@ paths: schema: $ref: "#/components/schemas/Application_Metrics" default: - description: | - Error, the response body may contain further information. - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - #$ref: "./shared_definitions.yaml#/responses/Error" + # description: | + # Error, the response body may contain further information. + # content: + # application/json: + # schema: + # $ref: "#/components/schemas/ErrorResponse" + $ref: "./shared_definitions.yaml#/responses/Error" security: - basicAuthentication: [] x-codegen-request-body-name: body @@ -160,10 +160,11 @@ components: Identificator used by Cloud Foundry for entities. Anything is an entity. Apps, services, service-bindings, … - type: string - pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} - example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 - #$ref: "./shared_definitions.yaml#/schemas/GUID" + schema: + # type: string + # pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} + # example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 + $ref: "./shared_definitions.yaml#/schemas/GUID" instanceIndex: type: integer description: Application Metric #TODO @@ -179,12 +180,13 @@ components: The time at which the metrics were collected in the number of nanoseconds example: 1494989539138350000 metric_type: - description: | - One user-defined custom metric type or one of the system-default metric types, which are: - "memoryused", "memoryutil", "responsetime", "throughput" and "cpu" - type: string - example: memoryused - #$ref: "./shared_definitions.yaml#/schemas/metric_type" + # description: | + # One user-defined custom metric type or one of the system-default metric types, which are: + # "memoryused", "memoryutil", "responsetime", "throughput" and "cpu" + # type: string + # example: memoryused + schema: + $ref: "./shared_definitions.yaml#/schemas/metric_type" value: type: integer description: | diff --git a/api/custom-metrics-api.yaml b/api/custom-metrics-api.yaml index 76a017af35..a2dca68aa8 100644 --- a/api/custom-metrics-api.yaml +++ b/api/custom-metrics-api.yaml @@ -16,11 +16,15 @@ paths: parameters: - in: path name: appGuid - description: The GUID identifying the application the custom metrics are submitted for. Can be found in the `application_id` property of the JSON object stored in the `VCAP_APPLICATION` environment variable. - example: 58d162ad-87d5-4f52-8abf-e56a63a67292 + description: | + The GUID identifying the application for which the scaling history is fetched. + + It can be found in the `application_id` property of the JSON object stored in the + `VCAP_APPLICATION` environment variable. required: true schema: - type: string + # type: string + $ref: "shared_definitions.yaml#/schemas/GUID" post: summary: Submits application-specific custom metrics to app-autoscaler. description: | @@ -38,7 +42,7 @@ paths: '200': description: Metrics were successfully submitted. default: - $ref: '#/components/responses/Error' + $ref: "./shared_definitions.yaml#/responses/Error" security: - mtls: [] x-codegen-request-body-name: body diff --git a/api/policy-api.yaml b/api/policy-api.yaml index 15c5d1b8fa..293add7690 100644 --- a/api/policy-api.yaml +++ b/api/policy-api.yaml @@ -21,10 +21,10 @@ paths: It can be found in the `application_id` property of the JSON object stored in the `VCAP_APPLICATION` environment variable. schema: - type: string - pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} - example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 - #$ref: "./shared_definitions.yaml#/schemas/GUID" + # type: string + # pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} + # example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 + $ref: "./shared_definitions.yaml#/schemas/GUID" #- name: Authorization #in: header @@ -50,13 +50,13 @@ paths: schema: $ref: "#/components/schemas/Policy" default: - description: | - Error, the response body may contain further information. - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - #$ref: "./shared_definitons.yaml#/responses/Error" + # description: | + # Error, the response body may contain further information. + # content: + # application/json: + # schema: + # $ref: "#/components/schemas/ErrorResponse" + $ref: "./shared_definitons.yaml#/responses/Error" security: - basicAuthentication: [] x-codegen-request-body-name: body @@ -73,13 +73,13 @@ paths: schema: $ref: "#/components/schemas/Policy" default: - description: | - Error, the response body may contain further information. - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - #$ref: "./shared_definitons.yaml#/responses/Error" + # description: | + # Error, the response body may contain further information. + # content: + # application/json: + # schema: + # $ref: "#/components/schemas/ErrorResponse" + $ref: "./shared_definitons.yaml#/responses/Error" security: - basicAuthentication: [] x-codegen-request-body-name: body @@ -96,13 +96,13 @@ paths: schema: $ref: "#/components/schemas/Policy" default: - description: | - Error, the response body may contain further information. - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - #$ref: "./shared_definitons.yaml#/responses/Error" + # description: | + # Error, the response body may contain further information. + # content: + # application/json: + # schema: + # $ref: "#/components/schemas/ErrorResponse" + $ref: "./shared_definitons.yaml#/responses/Error" security: - basicAuthentication: [] x-codegen-request-body-name: body @@ -142,12 +142,13 @@ components: - adjustment properties: metric_type: - description: | - One user-defined custom metric type or one of the system-default metric types, which are: - "memoryused", "memoryutil", "responsetime", "throughput" and "cpu" - type: string - example: memoryused - #$ref: "./shared_definitions.yaml#/schemas/metric_type" + schema: + # description: | + # One user-defined custom metric type or one of the system-default metric types, which are: + # "memoryused", "memoryutil", "responsetime", "throughput" and "cpu" + # type: string + # example: memoryused + $ref: "./shared_definitions.yaml#/schemas/metric_type" threshold: description: | The boundary when metric value exceeds is considered as a breach From 36634a5584b0bd2e25c9d65524564b97163914b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Wed, 12 Jul 2023 14:35:18 +0200 Subject: [PATCH 089/294] Fixes in the specification checked by swagger-cli; --- api/application-metric-api.yaml | 88 ++++++----------- api/custom-metrics-api.yaml | 38 +++----- api/policy-api.yaml | 161 +++++++++++++------------------- api/scaling-history-api.yaml | 37 +++----- api/shared_definitions.yaml | 13 +-- 5 files changed, 116 insertions(+), 221 deletions(-) diff --git a/api/application-metric-api.yaml b/api/application-metric-api.yaml index 78d253b697..406f5da926 100644 --- a/api/application-metric-api.yaml +++ b/api/application-metric-api.yaml @@ -1,17 +1,18 @@ -openapi: 3.1.0 +openapi: 3.0.0 info: title: Application Metric API description: | - List aggregated metrics of an application. AutoScaler collects the instances' metrics of an application, - and aggregate the raw data into an accumulated value for evaluation. + List aggregated metrics of an application. AutoScaler collects the instances' metrics of an + application, and aggregate the raw data into an accumulated value for evaluation. + This API is used to return the aggregated metric result of an application. version: 1.0.0 security: # Do we need that? -#- mtls: [] -- basicAuthentication: [] +# - mtls: [] +- basicAuthentication: [] tags: - name: Application Metric API V1 - description: List instance metrics of an application. + description: List aggregated metrics of an application. paths: /v1/apps/{guid}/aggregated_metric_histories/{metric_type}: @@ -25,20 +26,12 @@ paths: It can be found in the `application_id` property of the JSON object stored in the `VCAP_APPLICATION` environment variable. schema: - # type: string - # pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} - # example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 - $ref: "./shared_definitions.yaml#/schemas/GUID" + $ref: "./shared_definitions.yaml#/schemas/GUID" - name: metric_type in: path required: true description: The metric type schema: - # description: | - # One user-defined custom metric type or one of the system-default metric types, which are: - # "memoryused", "memoryutil", "responsetime", "throughput" and "cpu" - # type: string - # example: memoryused $ref: "./shared_definitions.yaml#/schemas/metric_type" - name: start-time in: query @@ -67,7 +60,7 @@ paths: example: order-direction=desc - name: page in: query - description: The page number to query + description: The page number to query. schema: type: integer minimum: 1 # Or Should it be "1"? @@ -81,16 +74,16 @@ paths: minimum: 0 # Or Should it be "1"? default: 50 example: results-per-page=10 - #- name: Authorization - #in: header - #schema: - #type: string - #example: | - #bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o + # - name: Authorization + # in: header + # schema: + # type: string + # example: | + # bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o get: - summary: Retrieves the instance metrics of an application + summary: Retrieves the instance metrics of an application. description: | - Use to retrieve instance metrics of an application + Use to retrieve instance metrics of an application. tags: - Application Metric API V1 responses: @@ -101,35 +94,20 @@ paths: schema: $ref: "#/components/schemas/Application_Metrics" default: - # description: | - # Error, the response body may contain further information. - # content: - # application/json: - # schema: - # $ref: "#/components/schemas/ErrorResponse" - $ref: "./shared_definitions.yaml#/responses/Error" + $ref: "./shared_definitions.yaml#/responses/Error" security: - basicAuthentication: [] x-codegen-request-body-name: body components: schemas: - ErrorResponse: - type: object - properties: - code: - type: string - description: The textual error code. - message: - type: string - description: The message describing the cause of the error. Application_Metrics: - description: Object containing Application Metrics. + description: Object containing Application Metrics type: object properties: total_results: type: integer format: int64 - description: Number of history entries found for the given query. + description: Number of history entries found for the given query example: 2 total_pages: type: integer @@ -139,7 +117,7 @@ components: page: type: integer format: int64 - description: Number of the current page. + description: Number of the current page example: 1 prev_url: type: string @@ -152,19 +130,12 @@ components: items: $ref: '#/components/schemas/ApplicationMetric' ApplicationMetric: - description: Object containing metric history + description: Object containing metric history type: object properties: app_guid: - description: | - Identificator used by Cloud Foundry for entities. - Anything is an entity. Apps, services, service-bindings, … - schema: - # type: string - # pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} - # example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 - $ref: "./shared_definitions.yaml#/schemas/GUID" + $ref: "./shared_definitions.yaml#/schemas/GUID" instanceIndex: type: integer description: Application Metric #TODO @@ -179,21 +150,16 @@ components: description: | The time at which the metrics were collected in the number of nanoseconds example: 1494989539138350000 - metric_type: - # description: | - # One user-defined custom metric type or one of the system-default metric types, which are: - # "memoryused", "memoryutil", "responsetime", "throughput" and "cpu" - # type: string - # example: memoryused - schema: - $ref: "./shared_definitions.yaml#/schemas/metric_type" + metric_type: + + $ref: "./shared_definitions.yaml#/schemas/metric_type" value: type: integer description: | The value of metric type to be returned as the aggregated metric result of an application example: 400 unit: - type: string + type: string example: megabytes securitySchemes: basicAuthentication: diff --git a/api/custom-metrics-api.yaml b/api/custom-metrics-api.yaml index a2dca68aa8..1abc8be3d1 100644 --- a/api/custom-metrics-api.yaml +++ b/api/custom-metrics-api.yaml @@ -1,11 +1,11 @@ -openapi: 3.1.0 +openapi: 3.0.0 info: title: app-autoscaler custom metrics API description: | app-autoscaler lets you automatically increase or decrease the number of your application instances based on the policies you have defined. Your applications can call the app-autoscaler custom metrics API to submit custom metrics defined and used in a dynamic scaling policy to enable automatic scaling based on application-specific metrics. version: 1.0.0 security: -- mtls: [] +# - mtls: [] - basicAuthentication: [] tags: - name: Custom Metrics API V1 @@ -17,18 +17,21 @@ paths: - in: path name: appGuid description: | - The GUID identifying the application for which the scaling history is fetched. + The GUID identifying the application for which the metrics are fetched. It can be found in the `application_id` property of the JSON object stored in the `VCAP_APPLICATION` environment variable. + example: 58d162ad-87d5-4f52-8abf-e56a63a67292 required: true schema: - # type: string - $ref: "shared_definitions.yaml#/schemas/GUID" + $ref: "./shared_definitions.yaml#/schemas/GUID" post: summary: Submits application-specific custom metrics to app-autoscaler. description: | - Use to submit custom metrics to app-autoscaler which are defined and used in a dynamic scaling policy to enable automatic scaling based on application-specific metrics. We recommend submitting the custom metrics every 40 seconds from every application instance. + Use to submit custom metrics to app-autoscaler which are defined and used in a dynamic + scaling policy to enable automatic scaling based on application-specific metrics. + + We recommend submitting the custom metrics every 40 seconds from every application instance. tags: - Custom Metrics API V1 requestBody: @@ -47,14 +50,6 @@ paths: - mtls: [] x-codegen-request-body-name: body components: - responses: - Error: - description: | - Error, the response body may contain further information. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' schemas: Metrics: required: @@ -90,19 +85,10 @@ components: type: string description: An optional unit for the metric, for display purposes only. example: jobs - ErrorResponse: - type: object - properties: - code: - type: string - description: The textual error code. - message: - type: string - description: The message describing the cause of the error. securitySchemes: - mtls: - type: mutualTLS - description: Use the Instance Identity Credentials provided by the Cloud Foundry runtime + # mtls: + # type: mutualTLS + # description: Use the Instance Identity Credentials provided by the Cloud Foundry runtime basicAuthentication: type: http scheme: basic diff --git a/api/policy-api.yaml b/api/policy-api.yaml index 293add7690..148498edc3 100644 --- a/api/policy-api.yaml +++ b/api/policy-api.yaml @@ -1,15 +1,16 @@ -openapi: 3.1.0 -info: +openapi: 3.0.0 +info: title: Policy API description: This API is used to create, delete, retrieve the policy version: 1.0.0 -security: -- basicAuthentication: [] #TODO +security: +# - mtls: [] +- basicAuthentication: [] tags: - name: Policy API V1 description: This API is used to create, delete, retrieve the policy -paths: +paths: /v1/apps/{guid}/policy: parameters: - name: guid @@ -21,19 +22,15 @@ paths: It can be found in the `application_id` property of the JSON object stored in the `VCAP_APPLICATION` environment variable. schema: - # type: string - # pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} - # example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 $ref: "./shared_definitions.yaml#/schemas/GUID" - - #- name: Authorization - #in: header - #schema: - #type: string - #example: | - #bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5_Iu_o + # - name: Authorization + # in: header + # schema: + # type: string + # example: | + # bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5_Iu_o put: - summary: Retrieves the Policy + summary: Retrieves the Policy description: This API is used to create the policy tags: - Create Policy API V1 @@ -42,91 +39,61 @@ paths: application/json: schema: $ref: "#/components/schemas/Policy" #TODO - responses: + responses: "200": description: "OK" content: application/json: schema: $ref: "#/components/schemas/Policy" - default: - # description: | - # Error, the response body may contain further information. - # content: - # application/json: - # schema: - # $ref: "#/components/schemas/ErrorResponse" - $ref: "./shared_definitons.yaml#/responses/Error" + default: + $ref: "./shared_definitions.yaml#/responses/Error" security: - basicAuthentication: [] x-codegen-request-body-name: body delete: - summary: Deletes the policy + summary: Deletes the policy description: This API is used to delete the policy - tags: + tags: - Delete Policy API V1 - responses: + responses: "200": description: "OK" content: application/json: schema: $ref: "#/components/schemas/Policy" - default: - # description: | - # Error, the response body may contain further information. - # content: - # application/json: - # schema: - # $ref: "#/components/schemas/ErrorResponse" - $ref: "./shared_definitons.yaml#/responses/Error" + default: + $ref: "./shared_definitions.yaml#/responses/Error" security: - basicAuthentication: [] x-codegen-request-body-name: body get: - summary: Retrieves the Policy + summary: Retrieves the Policy description: This API is used to retrieve the policy tags: - - Get Policy API V1 - responses: + - Get Policy API V1 + responses: "200": description: "OK" content: application/json: schema: $ref: "#/components/schemas/Policy" - default: - # description: | - # Error, the response body may contain further information. - # content: - # application/json: - # schema: - # $ref: "#/components/schemas/ErrorResponse" - $ref: "./shared_definitons.yaml#/responses/Error" - security: - - basicAuthentication: [] - x-codegen-request-body-name: body + default: + $ref: "./shared_definitions.yaml#/responses/Error" components: schemas: - ErrorResponse: - type: object - properties: - code: - type: string - description: The textual error code. - message: - type: string - description: The message describing the cause of the error. Policy: - description: Object creating Policy + description: Object containing Policy type: object properties: instance_min_count: type: integer format: int64 description: minimal number of instance count - example: 1 - instance_max_count: + example: 2 + instance_max_count: type: integer format: int64 description: maximal number of instance count @@ -142,20 +109,20 @@ components: - adjustment properties: metric_type: - schema: + # schema: # description: | - # One user-defined custom metric type or one of the system-default metric types, which are: + # One user-defined custom metric type or one of the system-default metric types, which are: # "memoryused", "memoryutil", "responsetime", "throughput" and "cpu" # type: string # example: memoryused - $ref: "./shared_definitions.yaml#/schemas/metric_type" + $ref: "./shared_definitions.yaml#/schemas/metric_type" threshold: description: | The boundary when metric value exceeds is considered as a breach - #required: true - schema: - type: int - format: int64 + # required: true + # schema: + type: integer + format: int64 example: 30 operator: description: Used for standard operting signs - ">", "<", ">=", "<=" @@ -195,8 +162,8 @@ components: timezone: description: Using timezone definition of Java #https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html - Do we need to implement it? #required: true - schema: - type: string + # schema: + type: string example: Asia/Shanghai # TODO: Try to make use of #- $ref: "../../src/autoscaler/api/policyvalidator/policy_json.schema.json#/" # TODO: @@ -220,20 +187,20 @@ components: description: the end date of the schedule. Must be a future time. type: string format: date - example: 2016-07-23 + example: 2016-07-23 start_time: description: the start time of the schedule in HH:MM format #required: true - schema: - type: string - pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ + # schema: + type: string + pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ example: 11:00 end_time: description: the end time of the schedule in HH:MM format #required: true - schema: - type: string - pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ + # schema: + type: string + pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ example: 19:30 end time of the schedule: description: | @@ -243,16 +210,16 @@ components: instance_min_count: description: minimal number of instance count for this schedule #required: true - schema: - type: integer - format: int64 + # schema: + type: integer + format: int64 example: 3 instance_max_count: description: maximal number of instance count for this schedule #required: true - schema: - type: integer - format: int64 + # schema: + type: integer + format: int64 example: 10 instance_min_instance_count: description: the initial minimal number of instance count for this schedule @@ -273,30 +240,30 @@ components: start_date_time: description: the start time of the schedule. Must be a future time #required: true - schema: - type: string - pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/ + # schema: + type: string + pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/ example: 2015-01-04T20:00 - end_date_time: + end_date_time: description: the start time of the schedule. Must be a future time #required: true - schema: - type: string - pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/ + # schema: + type: string + pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/ example: 2015-01-04T20:00 instance_min_count: description: minimal number of instance count for this schedule #required: true - schema: - type: integer - format: int64 + # schema: + type: integer + format: int64 example: 2 instance_max_count: description: maximal number of instance count for this schedule #required: true - schema: - type: integer - format: int64 + # schema: + type: integer + format: int64 example: 5 instance_min_instance_count: description: the initial minimal number of instance count for this schedule diff --git a/api/scaling-history-api.yaml b/api/scaling-history-api.yaml index 79081ff781..43045a83fb 100644 --- a/api/scaling-history-api.yaml +++ b/api/scaling-history-api.yaml @@ -1,10 +1,10 @@ -openapi: 3.1.0 +openapi: 3.0.0 info: title: Scaling History API description: List scaling history of an application version: 1.0.0 security: # Do we need that? -#- mtls: [] +# - mtls: [] - basicAuthentication: [] tags: - name: Scaling History API V1 @@ -22,7 +22,7 @@ paths: It can be found in the `application_id` property of the JSON object stored in the `VCAP_APPLICATION` environment variable. schema: - $ref: "shared_definitions.yaml#/schemas/GUID" + $ref: "./shared_definitions.yaml#/schemas/GUID" - name: start-time in: query description: | @@ -64,12 +64,12 @@ paths: minimum: 0 # Or Should it be "1"? default: 50 example: results-per-page=10 - #- name: Authorization - #in: header - #schema: - #type: string - #example: | - #bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o + # - name: Authorization + # in: header + # schema: + # type: string + # example: | + # bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o get: summary: Retrieves the scaling history of an application. description: | @@ -84,22 +84,13 @@ paths: schema: $ref: "#/components/schemas/History" default: - $ref: "./shared_definitions.yaml#/responses/Error" + $ref: "./shared_definitions.yaml#/responses/Error" security: - basicAuthentication: [] x-codegen-request-body-name: body components: schemas: - ErrorResponse: - type: object - properties: - code: - type: string - description: The textual error code. - message: - type: string - description: The message describing the cause of the error. History: description: Object containing scaling history. type: object @@ -165,13 +156,7 @@ components: This field is as well a selector of which of the other ones are used and which not. example: 0 app_guid: - description: | - The GUID identifying the application for which the scaling history is fetched. - - It can be found in the `application_id` property of the JSON object stored in the - `VCAP_APPLICATION` environment variable. - schema: - $ref: "./shared_definitions.yaml#/schemas/GUID" + $ref: "./shared_definitions.yaml#/schemas/GUID" timestamp: type: integer description: | diff --git a/api/shared_definitions.yaml b/api/shared_definitions.yaml index e2fd262d90..15dc3e60af 100644 --- a/api/shared_definitions.yaml +++ b/api/shared_definitions.yaml @@ -1,10 +1,3 @@ -openapi: 3.1.0 -info: - title: app-autoscaler custom metrics API - description: | - app-autoscaler lets you automatically increase or decrease the number of your application instances based on the policies you have defined. Your applications can call the app-autoscaler custom metrics API to submit custom metrics defined and used in a dynamic scaling policy to enable automatic scaling based on application-specific metrics. - version: 1.0.0 -paths: {} parameters: {} responses: Error: @@ -34,9 +27,7 @@ schemas: example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 metric_type: description: | - One user-defined custom metric type or one of the system-default metric types, which are: + One user-defined custom metric type or one of the system-default metric types, which are: "memoryused", "memoryutil", "responsetime", "throughput" and "cpu" type: string - example: memoryused - - \ No newline at end of file + example: memoryused \ No newline at end of file From 3e0242fd012d8d0aed81e3d336ef8cb6781a4e2b Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Wed, 9 Aug 2023 14:44:41 +0100 Subject: [PATCH 090/294] Removing unnecessary files --- .direnv/flake-profile | 1 - .direnv/flake-profile-1-link | 1 - .gitignore | 1 - .vscode/settings.json | 8 -------- 4 files changed, 11 deletions(-) delete mode 120000 .direnv/flake-profile delete mode 120000 .direnv/flake-profile-1-link delete mode 100644 .vscode/settings.json diff --git a/.direnv/flake-profile b/.direnv/flake-profile deleted file mode 120000 index 0c05709dfa..0000000000 --- a/.direnv/flake-profile +++ /dev/null @@ -1 +0,0 @@ -flake-profile-1-link \ No newline at end of file diff --git a/.direnv/flake-profile-1-link b/.direnv/flake-profile-1-link deleted file mode 120000 index 6bc809872a..0000000000 --- a/.direnv/flake-profile-1-link +++ /dev/null @@ -1 +0,0 @@ -/nix/store/s4ssci8b21yy2dp6f4184lflh9agjbzd-nix-shell-env \ No newline at end of file diff --git a/.gitignore b/.gitignore index 416357470d..848ad413ec 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ dev_releases .blobs blobs .dev_builds -.DS_Store .final_builds/jobs/**/*.tgz .final_builds/packages/**/*.tgz *.swp diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index fe2028537b..0000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "yaml.schemas": { - "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json": [ - "file:///Users/I545003/SAPDevelop/app-autoscaler-release/api/shared_definitions.yaml", - "file:///Users/I545003/SAPDevelop/app-autoscaler-release/api/policy-api.yaml" - ] - } -} \ No newline at end of file From 92bfc4c0e4d5d627008abf8e51174783fcb72535 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 10 Aug 2023 03:06:57 +0000 Subject: [PATCH 091/294] chore(deps): update dependency gruntwork-io/terragrunt to v0.48.7 (#2036) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index dfbeaf3d7f..5f7cb14e5d 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.2 python 3.11.4 terraform 1.5.4 terraform-lsp -terragrunt 0.48.6 +terragrunt 0.48.7 From d6708570ff87c56f881d4a5ed363b325650fbe9f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Aug 2023 03:59:45 +0000 Subject: [PATCH 092/294] Bump github.com/golangci/golangci-lint in /src/autoscaler (#2035) Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.53.3 to 1.54.0. - [Release notes](https://github.com/golangci/golangci-lint/releases) - [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md) - [Commits](https://github.com/golangci/golangci-lint/compare/v1.53.3...v1.54.0) --- updated-dependencies: - dependency-name: github.com/golangci/golangci-lint dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/autoscaler/go.mod | 38 +++++++++++----------- src/autoscaler/go.sum | 76 +++++++++++++++++++++---------------------- 2 files changed, 57 insertions(+), 57 deletions(-) diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 15b7881a49..421c89800a 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -14,7 +14,7 @@ require ( github.com/go-chi/chi/v5 v5.0.10 github.com/go-sql-driver/mysql v1.7.1 github.com/golang/protobuf v1.5.3 - github.com/golangci/golangci-lint v1.53.3 + github.com/golangci/golangci-lint v1.54.0 github.com/gorilla/mux v1.8.0 github.com/gorilla/websocket v1.5.0 github.com/hashicorp/go-retryablehttp v0.7.4 @@ -47,19 +47,19 @@ require ( 4d63.com/gochecknoglobals v0.2.1 // indirect code.cloudfoundry.org/go-diodes v0.0.0-20221212174934-b8cb650f2489 // indirect filippo.io/edwards25519 v1.0.0-rc.1 // indirect - github.com/4meepo/tagalign v1.2.2 // indirect - github.com/Abirdcfly/dupword v0.0.11 // indirect + github.com/4meepo/tagalign v1.3.2 // indirect + github.com/Abirdcfly/dupword v0.0.12 // indirect github.com/Antonboom/errname v0.1.10 // indirect github.com/Antonboom/nilnil v0.1.5 // indirect github.com/BurntSushi/toml v1.3.2 // indirect github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect - github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect + github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0 // indirect github.com/Masterminds/semver v1.5.0 // indirect github.com/OpenPeeDeeP/depguard/v2 v2.1.0 // indirect github.com/alexkohler/nakedret/v2 v2.0.2 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect github.com/alingse/asasalint v0.0.11 // indirect - github.com/ashanbrown/forbidigo v1.5.3 // indirect + github.com/ashanbrown/forbidigo v1.6.0 // indirect github.com/ashanbrown/makezero v1.1.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bkielbasa/cyclop v1.2.1 // indirect @@ -76,7 +76,7 @@ require ( github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/curioswitch/go-reassign v0.2.0 // indirect - github.com/daixiang0/gci v0.10.1 // indirect + github.com/daixiang0/gci v0.11.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/denis-tingaikin/go-header v0.4.3 // indirect github.com/esimonov/ifshort v1.0.4 // indirect @@ -87,7 +87,7 @@ require ( github.com/firefart/nonamedreturns v1.0.4 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect - github.com/go-critic/go-critic v0.8.1 // indirect + github.com/go-critic/go-critic v0.8.2 // indirect github.com/go-logr/logr v1.2.4 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/go-toolsmith/astcast v1.1.0 // indirect @@ -106,7 +106,7 @@ require ( github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2 // indirect github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect - github.com/golangci/misspell v0.4.0 // indirect + github.com/golangci/misspell v0.4.1 // indirect github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect github.com/google/go-cmp v0.5.9 // indirect @@ -137,7 +137,7 @@ require ( github.com/kisielk/gotool v1.0.0 // indirect github.com/kkHAIKE/contextcheck v1.1.4 // indirect github.com/kulti/thelper v0.6.3 // indirect - github.com/kunwardeep/paralleltest v1.0.7 // indirect + github.com/kunwardeep/paralleltest v1.0.8 // indirect github.com/kyoh86/exportloopref v0.1.11 // indirect github.com/ldez/gomoddirectives v0.2.3 // indirect github.com/ldez/tagliatelle v0.5.0 // indirect @@ -160,7 +160,7 @@ require ( github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect github.com/nishanths/exhaustive v0.11.0 // indirect github.com/nishanths/predeclared v0.2.2 // indirect - github.com/nunnatsa/ginkgolinter v0.12.1 // indirect + github.com/nunnatsa/ginkgolinter v0.13.3 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/openzipkin/zipkin-go v0.4.1 // indirect github.com/pborman/uuid v1.2.1 // indirect @@ -168,7 +168,7 @@ require ( github.com/pelletier/go-toml/v2 v2.0.5 // indirect github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/polyfloyd/go-errorlint v1.4.2 // indirect + github.com/polyfloyd/go-errorlint v1.4.3 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.10.1 // indirect @@ -207,29 +207,29 @@ require ( github.com/timonwong/loggercheck v0.9.4 // indirect github.com/tomarrell/wrapcheck/v2 v2.8.1 // indirect github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect - github.com/ultraware/funlen v0.0.3 // indirect + github.com/ultraware/funlen v0.1.0 // indirect github.com/ultraware/whitespace v0.0.5 // indirect github.com/urfave/cli v1.22.9 // indirect - github.com/uudashr/gocognit v1.0.6 // indirect + github.com/uudashr/gocognit v1.0.7 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xen0n/gosmopolitan v1.2.1 // indirect github.com/yagipy/maintidx v1.0.0 // indirect github.com/yeya24/promlinter v0.2.0 // indirect - github.com/ykadowak/zerologlint v0.1.2 // indirect - gitlab.com/bosi/decorder v0.2.3 // indirect + github.com/ykadowak/zerologlint v0.1.3 // indirect + gitlab.com/bosi/decorder v0.4.0 // indirect go.step.sm/crypto v0.16.2 // indirect - go.tmz.dev/musttag v0.7.0 // indirect + go.tmz.dev/musttag v0.7.1 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 // indirect - golang.org/x/mod v0.11.0 // indirect - golang.org/x/sync v0.2.0 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/sync v0.3.0 // indirect golang.org/x/sys v0.11.0 // indirect golang.org/x/term v0.11.0 // indirect golang.org/x/text v0.12.0 // indirect - golang.org/x/tools v0.9.3 // indirect + golang.org/x/tools v0.12.0 // indirect google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index a64d06a156..cd60751260 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -617,10 +617,10 @@ filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmG filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= -github.com/4meepo/tagalign v1.2.2 h1:kQeUTkFTaBRtd/7jm8OKJl9iHk0gAO+TDFPHGSna0aw= -github.com/4meepo/tagalign v1.2.2/go.mod h1:Q9c1rYMZJc9dPRkbQPpcBNCLEmY2njbAsXhQOZFE2dE= -github.com/Abirdcfly/dupword v0.0.11 h1:z6v8rMETchZXUIuHxYNmlUAuKuB21PeaSymTed16wgU= -github.com/Abirdcfly/dupword v0.0.11/go.mod h1:wH8mVGuf3CP5fsBTkfWwwwKTjDnVVCxtU8d8rgeVYXA= +github.com/4meepo/tagalign v1.3.2 h1:1idD3yxlRGV18VjqtDbqYvQ5pXqQS0wO2dn6M3XstvI= +github.com/4meepo/tagalign v1.3.2/go.mod h1:Q9c1rYMZJc9dPRkbQPpcBNCLEmY2njbAsXhQOZFE2dE= +github.com/Abirdcfly/dupword v0.0.12 h1:56NnOyrXzChj07BDFjeRA+IUzSz01jmzEq+G4kEgFhc= +github.com/Abirdcfly/dupword v0.0.12/go.mod h1:+us/TGct/nI9Ndcbcp3rgNcQzctTj68pq7TcgNpLfdI= github.com/Antonboom/errname v0.1.10 h1:RZ7cYo/GuZqjr1nuJLNe8ZH+a+Jd9DaZzttWzak9Bls= github.com/Antonboom/errname v0.1.10/go.mod h1:xLeiCIrvVNpUtsN0wxAh05bNIZpqE22/qDMnTBTttiA= github.com/Antonboom/nilnil v0.1.5 h1:X2JAdEVcbPaOom2TUa1FxZ3uyuUlex0XMLGYMemu6l0= @@ -631,8 +631,8 @@ github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= -github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 h1:+r1rSv4gvYn0wmRjC8X7IAzX8QezqtFV9m0MUHFJgts= -github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0/go.mod h1:b3g59n2Y+T5xmcxJL+UEG2f8cQploZm1mR/v6BW0mU0= +github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0 h1:3ZBs7LAezy8gh0uECsA6CGU43FF3zsx5f4eah5FxTMA= +github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0/go.mod h1:rZLTje5A9kFBe0pzhpe2TdhRniBF++PRHQuRpR8esVc= github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= @@ -662,8 +662,8 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= -github.com/ashanbrown/forbidigo v1.5.3 h1:jfg+fkm/snMx+V9FBwsl1d340BV/99kZGv5jN9hBoXk= -github.com/ashanbrown/forbidigo v1.5.3/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= +github.com/ashanbrown/forbidigo v1.6.0 h1:D3aewfM37Yb3pxHujIPSpTf6oQk9sc9WZi8gerOIVIY= +github.com/ashanbrown/forbidigo v1.6.0/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= @@ -728,8 +728,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= -github.com/daixiang0/gci v0.10.1 h1:eheNA3ljF6SxnPD/vE4lCBusVHmV3Rs3dkKvFrJ7MR0= -github.com/daixiang0/gci v0.10.1/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= +github.com/daixiang0/gci v0.11.0 h1:XeQbFKkCRxvVyn06EOuNY6LPGBLVuB/W130c8FrnX6A= +github.com/daixiang0/gci v0.11.0/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -779,8 +779,8 @@ github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlya github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-chi/chi/v5 v5.0.10 h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk= github.com/go-chi/chi/v5 v5.0.10/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= -github.com/go-critic/go-critic v0.8.1 h1:16omCF1gN3gTzt4j4J6fKI/HnRojhEp+Eks6EuKw3vw= -github.com/go-critic/go-critic v0.8.1/go.mod h1:kpzXl09SIJX1cr9TB/g/sAG+eFEl7ZS9f9cqvZtyNl0= +github.com/go-critic/go-critic v0.8.2 h1:mekhZ9jw5NBEj3I8o/EywXw5zBfGAJuMo4VVVjtxF80= +github.com/go-critic/go-critic v0.8.2/go.mod h1:nZPlrtVfOuLOe8GpvWTfcMzfkG0QVZWAziAeXpivfQo= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= @@ -880,14 +880,14 @@ github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe h1:6RGUuS7EGotKx6 github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2 h1:amWTbTGqOZ71ruzrdA+Nx5WA3tV1N0goTspwmKCQvBY= github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2/go.mod h1:9wOXstvyDRshQ9LggQuzBCGysxs3b6Uo/1MvYCR2NMs= -github.com/golangci/golangci-lint v1.53.3 h1:CUcRafczT4t1F+mvdkUm6KuOpxUZTl0yWN/rSU6sSMo= -github.com/golangci/golangci-lint v1.53.3/go.mod h1:W4Gg3ONq6p3Jl+0s/h9Gr0j7yEgHJWWZO2bHl2tBUXM= +github.com/golangci/golangci-lint v1.54.0 h1:sWD8sCmlWRZYj7I0VZLwX7uYfjIcIUHq8rSO4IJtzdw= +github.com/golangci/golangci-lint v1.54.0/go.mod h1:iNEG4/FSaCPMDZTk1JGetYZzz5sg25ref6QECL/NA9U= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.4.0 h1:KtVB/hTK4bbL/S6bs64rYyk8adjmh1BygbBiaAiX+a0= -github.com/golangci/misspell v0.4.0/go.mod h1:W6O/bwV6lGDxUCChm2ykw9NQdd5bYd1Xkjo88UcWyJc= +github.com/golangci/misspell v0.4.1 h1:+y73iSicVy2PqyX7kmUefHusENlrP9YwuHZHPLGQj/g= +github.com/golangci/misspell v0.4.1/go.mod h1:9mAN1quEo3DlpbaIKKyEvRxK1pwqR9s/Sea1bJCtlNI= github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 h1:DIPQnGy2Gv2FSA4B/hh8Q7xx3B7AIDk3DAMeHclH1vQ= github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6/go.mod h1:0AKcRCkMoKvUvlf89F6O7H2LYdhr1zBh736mBItOdRs= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= @@ -1066,8 +1066,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs= github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= -github.com/kunwardeep/paralleltest v1.0.7 h1:2uCk94js0+nVNQoHZNLBkAR1DQJrVzw6T0RMzJn55dQ= -github.com/kunwardeep/paralleltest v1.0.7/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= +github.com/kunwardeep/paralleltest v1.0.8 h1:Ul2KsqtzFxTlSU7IP0JusWlLiNqQaloB9vguyjbE558= +github.com/kunwardeep/paralleltest v1.0.8/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= github.com/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ymEyhQ= github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= github.com/ldez/gomoddirectives v0.2.3 h1:y7MBaisZVDYmKvt9/l1mjNCiSA1BVn34U0ObUcJwlhA= @@ -1142,8 +1142,8 @@ github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= -github.com/nunnatsa/ginkgolinter v0.12.1 h1:vwOqb5Nu05OikTXqhvLdHCGcx5uthIYIl0t79UVrERQ= -github.com/nunnatsa/ginkgolinter v0.12.1/go.mod h1:AK8Ab1PypVrcGUusuKD8RDcl2KgsIwvNaaxAlyHSzso= +github.com/nunnatsa/ginkgolinter v0.13.3 h1:wEvjrzSMfDdnoWkctignX9QTf4rT9f4GkQ3uVoXBmiU= +github.com/nunnatsa/ginkgolinter v0.13.3/go.mod h1:aTKXo8WddENYxNEFT+4ZxEgWXqlD9uMD3w9Bfw/ABEc= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -1217,8 +1217,8 @@ github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polyfloyd/go-errorlint v1.4.2 h1:CU+O4181IxFDdPH6t/HT7IiDj1I7zxNi1RIUxYwn8d0= -github.com/polyfloyd/go-errorlint v1.4.2/go.mod h1:k6fU/+fQe38ednoZS51T7gSIGQW1y94d6TkSr35OzH8= +github.com/polyfloyd/go-errorlint v1.4.3 h1:P6NALOLV8BrWhm6PsqOraUK05E5h8IZnpXYJ+CIg+0U= +github.com/polyfloyd/go-errorlint v1.4.3/go.mod h1:VPlWPh6hB/wruVG803SuNpLuTGNjLHYlvcdSy4RhdPA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= @@ -1368,14 +1368,14 @@ github.com/tomarrell/wrapcheck/v2 v2.8.1 h1:HxSqDSN0sAt0yJYsrcYVoEeyM4aI9yAm3KQp github.com/tomarrell/wrapcheck/v2 v2.8.1/go.mod h1:/n2Q3NZ4XFT50ho6Hbxg+RV1uyo2Uow/Vdm9NQcl5SE= github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= -github.com/ultraware/funlen v0.0.3 h1:5ylVWm8wsNwH5aWo9438pwvsK0QiqVuUrt9bn7S/iLA= -github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= +github.com/ultraware/funlen v0.1.0 h1:BuqclbkY6pO+cvxoq7OsktIXZpgBSkYTQtmwhAK81vI= +github.com/ultraware/funlen v0.1.0/go.mod h1:XJqmOQja6DpxarLj6Jj1U7JuoS8PvL4nEqDaQhy22p4= github.com/ultraware/whitespace v0.0.5 h1:hh+/cpIcopyMYbZNVov9iSxvJU3OYQg78Sfaqzi/CzI= github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli v1.22.9 h1:cv3/KhXGBGjEXLC4bH0sLuJ9BewaAbpk5oyMOveu4pw= github.com/urfave/cli v1.22.9/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/uudashr/gocognit v1.0.6 h1:2Cgi6MweCsdB6kpcVQp7EW4U23iBFQWfTXiWlyp842Y= -github.com/uudashr/gocognit v1.0.6/go.mod h1:nAIUuVBnYU7pcninia3BHOvQkpQCeO76Uscky5BOwcY= +github.com/uudashr/gocognit v1.0.7 h1:e9aFXgKgUJrQ5+bs61zBigmj7bFJ/5cC6HmMahVzuDo= +github.com/uudashr/gocognit v1.0.7/go.mod h1:nAIUuVBnYU7pcninia3BHOvQkpQCeO76Uscky5BOwcY= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= @@ -1388,8 +1388,8 @@ github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= github.com/yeya24/promlinter v0.2.0 h1:xFKDQ82orCU5jQujdaD8stOHiv8UN68BSdn2a8u8Y3o= github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= -github.com/ykadowak/zerologlint v0.1.2 h1:Um4P5RMmelfjQqQJKtE8ZW+dLZrXrENeIzWWKw800U4= -github.com/ykadowak/zerologlint v0.1.2/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= +github.com/ykadowak/zerologlint v0.1.3 h1:TLy1dTW3Nuc+YE3bYRPToG1Q9Ej78b5UUN6bjbGdxPE= +github.com/ykadowak/zerologlint v0.1.3/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1399,8 +1399,8 @@ github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= -gitlab.com/bosi/decorder v0.2.3 h1:gX4/RgK16ijY8V+BRQHAySfQAb354T7/xQpDB2n10P0= -gitlab.com/bosi/decorder v0.2.3/go.mod h1:9K1RB5+VPNQYtXtTDAzd2OEftsZb1oV0IrJrzChSdGE= +gitlab.com/bosi/decorder v0.4.0 h1:HWuxAhSxIvsITcXeP+iIRg9d1cVfvVkmlF7M68GaoDY= +gitlab.com/bosi/decorder v0.4.0/go.mod h1:xarnteyUoJiOTEldDysquWKTVDCKo2TOIOIibSuWqOg= go-simpler.org/assert v0.5.0 h1:+5L/lajuQtzmbtEfh69sr5cRf2/xZzyJhFjoOz/PPqs= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -1415,8 +1415,8 @@ go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.step.sm/crypto v0.16.2 h1:Pr9aazTwWBBZNogUsOqhOrPSdwAa9pPs+lMB602lnDA= go.step.sm/crypto v0.16.2/go.mod h1:1WkTOTY+fOX/RY4TnZREp6trQAsBHRQ7nu6QJBiNQF8= -go.tmz.dev/musttag v0.7.0 h1:QfytzjTWGXZmChoX0L++7uQN+yRCPfyFm+whsM+lfGc= -go.tmz.dev/musttag v0.7.0/go.mod h1:oTFPvgOkJmp5kYL02S8+jrH0eLrBIl57rzWeA26zDEM= +go.tmz.dev/musttag v0.7.1 h1:9lFmeSFnFfPuMq4IksHGomItE6NgKMNW2Nt2FPOhCfU= +go.tmz.dev/musttag v0.7.1/go.mod h1:oJLkpR56EsIryktZJk/B0IroSMi37YWver47fibGh5U= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= @@ -1506,8 +1506,8 @@ golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1623,8 +1623,8 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1842,8 +1842,8 @@ golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= -golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= +golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From d9c9444e98fba562847a1c4c6cb2a7551ca0ee76 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 10 Aug 2023 05:43:12 +0000 Subject: [PATCH 093/294] chore(deps): update dependency golangci/golangci-lint to v1.54.0 (#2040) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index fb0cd4e6b0..4302149cec 100644 --- a/.tool-versions +++ b/.tool-versions @@ -7,7 +7,7 @@ direnv 2.32.3 gcloud 442.0.0 ginkgo 2.11.0 golang 1.20.6 -golangci-lint 1.53.3 +golangci-lint 1.54.0 java temurin-17.0.8+7 make 4.4 maven 3.8.6 From 284b58e0db14ed1af941d7c5d198c4852e89eaf3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 10 Aug 2023 07:07:55 +0000 Subject: [PATCH 094/294] fix(deps): update golang.org/x/exp digest to 352e893 (#2033) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 2 +- src/acceptance/assets/app/go_app/go.sum | 4 ++-- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index 4621c88345..45be761060 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -25,7 +25,7 @@ require ( go.opentelemetry.io/otel/metric v1.16.0 go.opentelemetry.io/otel/trace v1.16.0 go.uber.org/zap v1.25.0 - golang.org/x/exp v0.0.0-20230807204917-050eac23e9de + golang.org/x/exp v0.0.0-20230810033253-352e893a4cad ) require ( diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index 80a5e8a85e..71c7e10112 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -187,8 +187,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/exp v0.0.0-20230807204917-050eac23e9de h1:l5Za6utMv/HsBWWqzt4S8X17j+kt1uVETUX5UFhn2rE= -golang.org/x/exp v0.0.0-20230807204917-050eac23e9de/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230810033253-352e893a4cad h1:g0bG7Z4uG+OgH2QDODnjp6ggkk1bJDsINcuWmJN1iJU= +golang.org/x/exp v0.0.0-20230810033253-352e893a4cad/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 421c89800a..ef83bf159c 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -35,7 +35,7 @@ require ( github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26 github.com/xeipuuv/gojsonschema v1.2.0 golang.org/x/crypto v0.12.0 - golang.org/x/exp v0.0.0-20230807204917-050eac23e9de + golang.org/x/exp v0.0.0-20230810033253-352e893a4cad golang.org/x/net v0.14.0 golang.org/x/time v0.3.0 google.golang.org/grpc v1.57.0 diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index cd60751260..2422a612da 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1455,8 +1455,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20230807204917-050eac23e9de h1:l5Za6utMv/HsBWWqzt4S8X17j+kt1uVETUX5UFhn2rE= -golang.org/x/exp v0.0.0-20230807204917-050eac23e9de/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230810033253-352e893a4cad h1:g0bG7Z4uG+OgH2QDODnjp6ggkk1bJDsINcuWmJN1iJU= +golang.org/x/exp v0.0.0-20230810033253-352e893a4cad/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 h1:J74nGeMgeFnYQJN59eFwh06jX/V8g0lB7LWpjSLxtgU= From fc18cca7548da1b4595a8ac033702bb6e9d0988f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 10 Aug 2023 08:11:27 +0000 Subject: [PATCH 095/294] chore(deps): update dependency credhub-cli to v2.9.19 (#2034) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/dockerfiles/autoscaler-deploy/Dockerfile | 2 +- ci/dockerfiles/autoscaler-tools/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/dockerfiles/autoscaler-deploy/Dockerfile b/ci/dockerfiles/autoscaler-deploy/Dockerfile index 2465c174d1..28ae937972 100644 --- a/ci/dockerfiles/autoscaler-deploy/Dockerfile +++ b/ci/dockerfiles/autoscaler-deploy/Dockerfile @@ -60,7 +60,7 @@ RUN wget -q https://github.com/cloudfoundry/bosh-bootloader/releases/download/${ # Install credhub # renovate: datasource=github-releases depName=credhub-cli lookupName=cloudfoundry/credhub-cli -ENV CREDHUB_VERSION 2.9.18 +ENV CREDHUB_VERSION 2.9.19 RUN wget -q https://github.com/cloudfoundry-incubator/credhub-cli/releases/download/${CREDHUB_VERSION}/credhub-linux-${CREDHUB_VERSION}.tgz && \ tar xvfz credhub-linux-${CREDHUB_VERSION}.tgz && \ mv credhub /usr/local/bin/credhub diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index f3445ea4e8..5f2911133d 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -77,7 +77,7 @@ RUN wget -q https://github.com/cloudfoundry/bosh-bootloader/releases/download/${ # Install credhub # renovate: datasource=github-releases depName=credhub-cli lookupName=cloudfoundry/credhub-cli -ARG CREDHUB_VERSION=2.9.18 +ARG CREDHUB_VERSION=2.9.19 RUN wget -q https://github.com/cloudfoundry/credhub-cli/releases/download/${CREDHUB_VERSION}/credhub-linux-${CREDHUB_VERSION}.tgz && \ tar xvfz credhub-linux-${CREDHUB_VERSION}.tgz && \ mv credhub /usr/local/bin/credhub &&\ From b7001ded85cb61485fcc3055575c5e16aff5275f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 10 Aug 2023 09:33:12 +0000 Subject: [PATCH 096/294] chore(deps): update dependency concourse/concourse to v7.10.0 (#2038) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index 4302149cec..f35f799fc9 100644 --- a/.tool-versions +++ b/.tool-versions @@ -2,7 +2,7 @@ act 0.2.49 actionlint 1.6.25 bosh 7.3.1 cf 8.7.1 -concourse 7.9.1 +concourse 7.10.0 direnv 2.32.3 gcloud 442.0.0 ginkgo 2.11.0 From 83b944e98b8df73ab8dfb7a12a5d288714675ecc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 10 Aug 2023 10:31:14 +0000 Subject: [PATCH 097/294] chore(deps): update dependency terraform to v1.5.5 (#2037) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 5f7cb14e5d..645a98a486 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,6 +1,6 @@ gcloud 442.0.0 helm 3.12.2 python 3.11.4 -terraform 1.5.4 +terraform 1.5.5 terraform-lsp terragrunt 0.48.7 From 787d61bee4ad9c78fadc997695c0c9b3a963c287 Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Wed, 9 Aug 2023 16:18:44 +0100 Subject: [PATCH 098/294] Introducing Github action for validation --- .github/workflows/openapi-specs-check.yaml | 34 ++++++++++++++++++++++ src/acceptance/assets/app/go_app/Makefile | 5 +++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/openapi-specs-check.yaml diff --git a/.github/workflows/openapi-specs-check.yaml b/.github/workflows/openapi-specs-check.yaml new file mode 100644 index 0000000000..91a13edd4d --- /dev/null +++ b/.github/workflows/openapi-specs-check.yaml @@ -0,0 +1,34 @@ +name: "Validate OpenAPI-Specifications" +on: + pull_request: +jobs: + validate: + runs-on: ubuntu-latest + steps: + - name: Get OpenAPI files + id: getfiles + uses: actions/checkout@v3 + - name: Determine schema-files + id: schema-files + shell: bash + run: | + #! /usr/bin/env bash + + set -eu -o pipefail + + # Using step output (space separated file list) + FILES="$(find api -type f -iname '*.yaml')" + echo 'I am living!' + { + echo 'file_list<> ${GITHUB_OUTPUT} + echo 'I am done!'; cat "${GITHUB_OUTPUT}" + # echo "file_list=${FILES}" >> ${GITHUB_OUTPUT} # echo "::set-output name=file_list::$FILES" + - name: swagger-validator + uses: mbowman100/swagger-validator-action@master + # if: env.FILE_COUNT != '0' # Comment out if you want it to fail if no files found + with: + # files: ${{ env.FILE_LIST }} + files: ${{ steps.schema-files.outputs.file_list }} # For if you're using output \ No newline at end of file diff --git a/src/acceptance/assets/app/go_app/Makefile b/src/acceptance/assets/app/go_app/Makefile index 560c2e9086..5e884a220e 100644 --- a/src/acceptance/assets/app/go_app/Makefile +++ b/src/acceptance/assets/app/go_app/Makefile @@ -51,7 +51,10 @@ start: build deploy: build ./deploy.sh -generate: go.mod ../../../../../api/custom-metrics-api.yaml ../../../../../api/scaling-history-api.yaml ../../../../../api/policy-api.yaml ../../../../../api/application-metric-api.yaml +openapi-spec-path := ../../../../../api +openapi-specs := $(wildcard ${openapi-spec-path}/*.yaml) + +generate: go.mod ${openapi-specs} go generate ./... .PHONY: clean From 8a48140249ba232ee28da804bc4661351f68842c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Thu, 10 Aug 2023 15:29:40 +0200 Subject: [PATCH 099/294] Rename openapi-files to better filter on them by their file-name; Adapt filter-expression; --- .github/workflows/openapi-specs-check.yaml | 12 ++++++------ ...-api.yaml => application-metric-api.openapi.yaml} | 0 ...rics-api.yaml => custom-metrics-api.openapi.yaml} | 0 api/{policy-api.yaml => policy-api.openapi.yaml} | 0 ...ory-api.yaml => scaling-history-api.openapi.yaml} | 0 5 files changed, 6 insertions(+), 6 deletions(-) rename api/{application-metric-api.yaml => application-metric-api.openapi.yaml} (100%) rename api/{custom-metrics-api.yaml => custom-metrics-api.openapi.yaml} (100%) rename api/{policy-api.yaml => policy-api.openapi.yaml} (100%) rename api/{scaling-history-api.yaml => scaling-history-api.openapi.yaml} (100%) diff --git a/.github/workflows/openapi-specs-check.yaml b/.github/workflows/openapi-specs-check.yaml index 91a13edd4d..cb5b9dd8be 100644 --- a/.github/workflows/openapi-specs-check.yaml +++ b/.github/workflows/openapi-specs-check.yaml @@ -17,18 +17,18 @@ jobs: set -eu -o pipefail # Using step output (space separated file list) - FILES="$(find api -type f -iname '*.yaml')" - echo 'I am living!' + FILES="$(find api -type f -iname '*.openapi.yaml')" + + # Github documentation on multiline-strings does not work + # (). + # Here, we successfully use instead. { echo 'file_list<> ${GITHUB_OUTPUT} - echo 'I am done!'; cat "${GITHUB_OUTPUT}" - # echo "file_list=${FILES}" >> ${GITHUB_OUTPUT} # echo "::set-output name=file_list::$FILES" - name: swagger-validator uses: mbowman100/swagger-validator-action@master # if: env.FILE_COUNT != '0' # Comment out if you want it to fail if no files found with: - # files: ${{ env.FILE_LIST }} - files: ${{ steps.schema-files.outputs.file_list }} # For if you're using output \ No newline at end of file + files: ${{ steps.schema-files.outputs.file_list }} \ No newline at end of file diff --git a/api/application-metric-api.yaml b/api/application-metric-api.openapi.yaml similarity index 100% rename from api/application-metric-api.yaml rename to api/application-metric-api.openapi.yaml diff --git a/api/custom-metrics-api.yaml b/api/custom-metrics-api.openapi.yaml similarity index 100% rename from api/custom-metrics-api.yaml rename to api/custom-metrics-api.openapi.yaml diff --git a/api/policy-api.yaml b/api/policy-api.openapi.yaml similarity index 100% rename from api/policy-api.yaml rename to api/policy-api.openapi.yaml diff --git a/api/scaling-history-api.yaml b/api/scaling-history-api.openapi.yaml similarity index 100% rename from api/scaling-history-api.yaml rename to api/scaling-history-api.openapi.yaml From 5c4634b5882c4bda175f1f5d88981b9b70c051bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Thu, 10 Aug 2023 15:39:22 +0200 Subject: [PATCH 100/294] Make linters happy; --- .github/workflows/openapi-specs-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/openapi-specs-check.yaml b/.github/workflows/openapi-specs-check.yaml index cb5b9dd8be..97c974874c 100644 --- a/.github/workflows/openapi-specs-check.yaml +++ b/.github/workflows/openapi-specs-check.yaml @@ -26,7 +26,7 @@ jobs: echo 'file_list<> ${GITHUB_OUTPUT} + } >> "${GITHUB_OUTPUT}" - name: swagger-validator uses: mbowman100/swagger-validator-action@master # if: env.FILE_COUNT != '0' # Comment out if you want it to fail if no files found From 78a45c0842d67572509d954ae80b3af14d073f53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Thu, 10 Aug 2023 16:16:17 +0200 Subject: [PATCH 101/294] =?UTF-8?q?Use=20security-schemes=20=E2=80=93=20WI?= =?UTF-8?q?P;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/application-metric-api.openapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/application-metric-api.openapi.yaml b/api/application-metric-api.openapi.yaml index 406f5da926..235980d503 100644 --- a/api/application-metric-api.openapi.yaml +++ b/api/application-metric-api.openapi.yaml @@ -4,7 +4,7 @@ info: description: | List aggregated metrics of an application. AutoScaler collects the instances' metrics of an application, and aggregate the raw data into an accumulated value for evaluation. - + This API is used to return the aggregated metric result of an application. version: 1.0.0 security: # Do we need that? From 919d824d9210cbddf1efb8d8163c047e6fe48bbd Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Thu, 10 Aug 2023 16:29:44 +0100 Subject: [PATCH 102/294] Introducing Bearer Authentication for all OpenAPI specifications --- api/application-metric-api.openapi.yaml | 16 ++++------------ api/custom-metrics-api.openapi.yaml | 10 ++-------- api/policy-api.openapi.yaml | 18 ++++-------------- api/scaling-history-api.openapi.yaml | 16 ++++------------ 4 files changed, 14 insertions(+), 46 deletions(-) diff --git a/api/application-metric-api.openapi.yaml b/api/application-metric-api.openapi.yaml index 235980d503..d194a9c131 100644 --- a/api/application-metric-api.openapi.yaml +++ b/api/application-metric-api.openapi.yaml @@ -7,9 +7,6 @@ info: This API is used to return the aggregated metric result of an application. version: 1.0.0 -security: # Do we need that? -# - mtls: [] -- basicAuthentication: [] tags: - name: Application Metric API V1 description: List aggregated metrics of an application. @@ -74,12 +71,6 @@ paths: minimum: 0 # Or Should it be "1"? default: 50 example: results-per-page=10 - # - name: Authorization - # in: header - # schema: - # type: string - # example: | - # bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o get: summary: Retrieves the instance metrics of an application. description: | @@ -96,7 +87,7 @@ paths: default: $ref: "./shared_definitions.yaml#/responses/Error" security: - - basicAuthentication: [] + - bearerAuth: [] x-codegen-request-body-name: body components: schemas: @@ -162,6 +153,7 @@ components: type: string example: megabytes securitySchemes: - basicAuthentication: + bearerAuth: type: http - scheme: basic \ No newline at end of file + scheme: bearer + bearerFormat: JWT \ No newline at end of file diff --git a/api/custom-metrics-api.openapi.yaml b/api/custom-metrics-api.openapi.yaml index 1abc8be3d1..ea8764a835 100644 --- a/api/custom-metrics-api.openapi.yaml +++ b/api/custom-metrics-api.openapi.yaml @@ -4,9 +4,6 @@ info: description: | app-autoscaler lets you automatically increase or decrease the number of your application instances based on the policies you have defined. Your applications can call the app-autoscaler custom metrics API to submit custom metrics defined and used in a dynamic scaling policy to enable automatic scaling based on application-specific metrics. version: 1.0.0 -security: -# - mtls: [] -- basicAuthentication: [] tags: - name: Custom Metrics API V1 description: Work with application-specific custom metrics to scale your application. @@ -47,7 +44,7 @@ paths: default: $ref: "./shared_definitions.yaml#/responses/Error" security: - - mtls: [] + - basicAuthentication: [] x-codegen-request-body-name: body components: schemas: @@ -86,9 +83,6 @@ components: description: An optional unit for the metric, for display purposes only. example: jobs securitySchemes: - # mtls: - # type: mutualTLS - # description: Use the Instance Identity Credentials provided by the Cloud Foundry runtime basicAuthentication: type: http - scheme: basic + scheme: basic \ No newline at end of file diff --git a/api/policy-api.openapi.yaml b/api/policy-api.openapi.yaml index 148498edc3..9c423b3b9f 100644 --- a/api/policy-api.openapi.yaml +++ b/api/policy-api.openapi.yaml @@ -4,8 +4,7 @@ info: description: This API is used to create, delete, retrieve the policy version: 1.0.0 security: -# - mtls: [] -- basicAuthentication: [] +- bearerAuth: [] tags: - name: Policy API V1 description: This API is used to create, delete, retrieve the policy @@ -23,12 +22,6 @@ paths: `VCAP_APPLICATION` environment variable. schema: $ref: "./shared_definitions.yaml#/schemas/GUID" - # - name: Authorization - # in: header - # schema: - # type: string - # example: | - # bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5_Iu_o put: summary: Retrieves the Policy description: This API is used to create the policy @@ -48,8 +41,6 @@ paths: $ref: "#/components/schemas/Policy" default: $ref: "./shared_definitions.yaml#/responses/Error" - security: - - basicAuthentication: [] x-codegen-request-body-name: body delete: summary: Deletes the policy @@ -65,8 +56,6 @@ paths: $ref: "#/components/schemas/Policy" default: $ref: "./shared_definitions.yaml#/responses/Error" - security: - - basicAuthentication: [] x-codegen-request-body-name: body get: summary: Retrieves the Policy @@ -271,6 +260,7 @@ components: format: int64 example: 3 securitySchemes: - basicAuthentication: + bearerAuth: type: http - scheme: basic \ No newline at end of file + scheme: bearer + bearerFormat: JWT \ No newline at end of file diff --git a/api/scaling-history-api.openapi.yaml b/api/scaling-history-api.openapi.yaml index 43045a83fb..3d4f740f3b 100644 --- a/api/scaling-history-api.openapi.yaml +++ b/api/scaling-history-api.openapi.yaml @@ -3,9 +3,6 @@ info: title: Scaling History API description: List scaling history of an application version: 1.0.0 -security: # Do we need that? -# - mtls: [] -- basicAuthentication: [] tags: - name: Scaling History API V1 description: List the scaling history of an Application @@ -64,12 +61,6 @@ paths: minimum: 0 # Or Should it be "1"? default: 50 example: results-per-page=10 - # - name: Authorization - # in: header - # schema: - # type: string - # example: | - # bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o get: summary: Retrieves the scaling history of an application. description: | @@ -86,7 +77,7 @@ paths: default: $ref: "./shared_definitions.yaml#/responses/Error" security: - - basicAuthentication: [] + - bearerAuth: [] x-codegen-request-body-name: body components: @@ -212,6 +203,7 @@ components: type: object properties: {} # No extra fields needed in this variant. securitySchemes: - basicAuthentication: + bearerAuth: type: http - scheme: basic \ No newline at end of file + scheme: bearer + bearerFormat: JWT \ No newline at end of file From 6be8f3f64af94b186e3be7f67f295e85d9df9c07 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 11 Aug 2023 00:57:19 +0000 Subject: [PATCH 103/294] chore(deps): update dependency helm to v3.12.3 (#2041) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 645a98a486..3d2442d779 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,5 +1,5 @@ gcloud 442.0.0 -helm 3.12.2 +helm 3.12.3 python 3.11.4 terraform 1.5.5 terraform-lsp From fe8c15f83822ad3c493631102092a854e55884a6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 11 Aug 2023 01:43:33 +0000 Subject: [PATCH 104/294] fix(deps): update dependency org.liquibase:liquibase-core to v4.23.1 (#2042) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/db/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/pom.xml b/src/db/pom.xml index 211bb94923..5f7a3edf69 100644 --- a/src/db/pom.xml +++ b/src/db/pom.xml @@ -20,7 +20,7 @@ org.liquibase liquibase-core - 4.23.0 + 4.23.1 org.yaml From 853cb2ef4841253063d6dc2f61d1c51fd74d7051 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 11 Aug 2023 05:40:54 +0000 Subject: [PATCH 105/294] chore(deps): update dependency mikefarah/yq to v4.35.1 (#2043) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index f35f799fc9..24f6a631fd 100644 --- a/.tool-versions +++ b/.tool-versions @@ -13,4 +13,4 @@ make 4.4 maven 3.8.6 ruby 3.2.1 shellcheck 0.9.0 -yq 4.34.2 +yq 4.35.1 From 425afecf11d798dbc867b80a8cf60650b1ae4c42 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 11 Aug 2023 06:24:31 +0000 Subject: [PATCH 106/294] chore(deps): update dependency yq to v4.35.1 (#2044) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/dockerfiles/autoscaler-deploy/Dockerfile | 2 +- ci/dockerfiles/autoscaler-tools/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/dockerfiles/autoscaler-deploy/Dockerfile b/ci/dockerfiles/autoscaler-deploy/Dockerfile index 28ae937972..b89042b957 100644 --- a/ci/dockerfiles/autoscaler-deploy/Dockerfile +++ b/ci/dockerfiles/autoscaler-deploy/Dockerfile @@ -77,7 +77,7 @@ RUN wget -q https://github.com/stedolan/jq/releases/download/${JQ_VERSION}/jq-li # install yq # renovate: datasource=github-releases depName=yq lookupName=mikefarah/yq -ARG YQ_VERSION=v4.34.2 +ARG YQ_VERSION=v4.35.1 RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 && \ chmod a+x /usr/local/bin/yq && \ yq --version diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index 5f2911133d..2ec2848957 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -98,7 +98,7 @@ RUN wget -q https://github.com/stedolan/jq/releases/download/${JQ_VERSION}/jq-li # install yq # renovate: datasource=github-releases depName=yq lookupName=mikefarah/yq -ARG YQ_VERSION=v4.34.2 +ARG YQ_VERSION=v4.35.1 RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 && \ chmod a+x /usr/local/bin/yq && \ yq --version From ab30193b3762760e56ed9256499e6ff508159a08 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 11 Aug 2023 17:10:14 +0000 Subject: [PATCH 107/294] chore(deps): update dependency golangci-lint to v1.54.1 (#2039) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index 24f6a631fd..6e7986ba36 100644 --- a/.tool-versions +++ b/.tool-versions @@ -7,7 +7,7 @@ direnv 2.32.3 gcloud 442.0.0 ginkgo 2.11.0 golang 1.20.6 -golangci-lint 1.54.0 +golangci-lint 1.54.1 java temurin-17.0.8+7 make 4.4 maven 3.8.6 From d0def378c4941cf13298de78592bdb758125f237 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 01:29:50 +0000 Subject: [PATCH 108/294] fix(deps): update golang.org/x/exp digest to 89c5cff (#2045) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 2 +- src/acceptance/assets/app/go_app/go.sum | 4 ++-- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index 45be761060..fe6cf213fc 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -25,7 +25,7 @@ require ( go.opentelemetry.io/otel/metric v1.16.0 go.opentelemetry.io/otel/trace v1.16.0 go.uber.org/zap v1.25.0 - golang.org/x/exp v0.0.0-20230810033253-352e893a4cad + golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb ) require ( diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index 71c7e10112..b851271334 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -187,8 +187,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/exp v0.0.0-20230810033253-352e893a4cad h1:g0bG7Z4uG+OgH2QDODnjp6ggkk1bJDsINcuWmJN1iJU= -golang.org/x/exp v0.0.0-20230810033253-352e893a4cad/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA= +golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index ef83bf159c..fd3b89ba09 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -35,7 +35,7 @@ require ( github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26 github.com/xeipuuv/gojsonschema v1.2.0 golang.org/x/crypto v0.12.0 - golang.org/x/exp v0.0.0-20230810033253-352e893a4cad + golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb golang.org/x/net v0.14.0 golang.org/x/time v0.3.0 google.golang.org/grpc v1.57.0 diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index 2422a612da..fa807714cf 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1455,8 +1455,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20230810033253-352e893a4cad h1:g0bG7Z4uG+OgH2QDODnjp6ggkk1bJDsINcuWmJN1iJU= -golang.org/x/exp v0.0.0-20230810033253-352e893a4cad/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA= +golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 h1:J74nGeMgeFnYQJN59eFwh06jX/V8g0lB7LWpjSLxtgU= From de57a91ea18b859848aa20898d00734e28eb2281 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 02:58:00 +0000 Subject: [PATCH 109/294] fix(deps): update module github.com/golangci/golangci-lint to v1.54.1 (#2046) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/autoscaler/go.mod | 8 ++++---- src/autoscaler/go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index fd3b89ba09..7e1ae3b8a3 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -14,7 +14,7 @@ require ( github.com/go-chi/chi/v5 v5.0.10 github.com/go-sql-driver/mysql v1.7.1 github.com/golang/protobuf v1.5.3 - github.com/golangci/golangci-lint v1.54.0 + github.com/golangci/golangci-lint v1.54.1 github.com/gorilla/mux v1.8.0 github.com/gorilla/websocket v1.5.0 github.com/hashicorp/go-retryablehttp v0.7.4 @@ -87,7 +87,7 @@ require ( github.com/firefart/nonamedreturns v1.0.4 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect - github.com/go-critic/go-critic v0.8.2 // indirect + github.com/go-critic/go-critic v0.9.0 // indirect github.com/go-logr/logr v1.2.4 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/go-toolsmith/astcast v1.1.0 // indirect @@ -172,7 +172,7 @@ require ( github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.10.1 // indirect - github.com/quasilyte/go-ruleguard v0.3.19 // indirect + github.com/quasilyte/go-ruleguard v0.4.0 // indirect github.com/quasilyte/gogrep v0.5.0 // indirect github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect @@ -223,7 +223,7 @@ require ( go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 // indirect + golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 // indirect golang.org/x/mod v0.12.0 // indirect golang.org/x/sync v0.3.0 // indirect golang.org/x/sys v0.11.0 // indirect diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index fa807714cf..c778969b49 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -779,8 +779,8 @@ github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlya github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-chi/chi/v5 v5.0.10 h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk= github.com/go-chi/chi/v5 v5.0.10/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= -github.com/go-critic/go-critic v0.8.2 h1:mekhZ9jw5NBEj3I8o/EywXw5zBfGAJuMo4VVVjtxF80= -github.com/go-critic/go-critic v0.8.2/go.mod h1:nZPlrtVfOuLOe8GpvWTfcMzfkG0QVZWAziAeXpivfQo= +github.com/go-critic/go-critic v0.9.0 h1:Pmys9qvU3pSML/3GEQ2Xd9RZ/ip+aXHKILuxczKGV/U= +github.com/go-critic/go-critic v0.9.0/go.mod h1:5P8tdXL7m/6qnyG6oRAlYLORvoXH0WDypYgAEmagT40= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= @@ -880,8 +880,8 @@ github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe h1:6RGUuS7EGotKx6 github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2 h1:amWTbTGqOZ71ruzrdA+Nx5WA3tV1N0goTspwmKCQvBY= github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2/go.mod h1:9wOXstvyDRshQ9LggQuzBCGysxs3b6Uo/1MvYCR2NMs= -github.com/golangci/golangci-lint v1.54.0 h1:sWD8sCmlWRZYj7I0VZLwX7uYfjIcIUHq8rSO4IJtzdw= -github.com/golangci/golangci-lint v1.54.0/go.mod h1:iNEG4/FSaCPMDZTk1JGetYZzz5sg25ref6QECL/NA9U= +github.com/golangci/golangci-lint v1.54.1 h1:0qMrH1gkeIBqCZaaAm5Fwq4xys9rO/lJofHfZURIFFk= +github.com/golangci/golangci-lint v1.54.1/go.mod h1:JK47+qksV/t2mAz9YvndwT0ZLW4A1rvDljOs3g9jblo= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= @@ -1245,8 +1245,8 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/quasilyte/go-ruleguard v0.3.19 h1:tfMnabXle/HzOb5Xe9CUZYWXKfkS1KwRmZyPmD9nVcc= -github.com/quasilyte/go-ruleguard v0.3.19/go.mod h1:lHSn69Scl48I7Gt9cX3VrbsZYvYiBYszZOZW4A+oTEw= +github.com/quasilyte/go-ruleguard v0.4.0 h1:DyM6r+TKL+xbKB4Nm7Afd1IQh9kEUKQs2pboWGKtvQo= +github.com/quasilyte/go-ruleguard v0.4.0/go.mod h1:Eu76Z/R8IXtViWUIHkE3p8gdH3/PKk1eh3YGfaEof10= github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= @@ -1459,8 +1459,8 @@ golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8Cj golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 h1:J74nGeMgeFnYQJN59eFwh06jX/V8g0lB7LWpjSLxtgU= -golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 h1:jWGQJV4niP+CCmFW9ekjA9Zx8vYORzOUH2/Nl5WPuLQ= +golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= From 3de6494e57d476e3f9772998675580b00d09c993 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 04:04:16 +0000 Subject: [PATCH 110/294] chore(deps): update dependency terragrunt to v0.49.1 (#2048) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 3d2442d779..6e8dfdc2a7 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.4 terraform 1.5.5 terraform-lsp -terragrunt 0.48.7 +terragrunt 0.49.1 From 08f90db3dff56229009814cf7abd4beb093da03c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 05:01:29 +0000 Subject: [PATCH 111/294] chore(deps): update dependency bosh-bootloader to v9.0.11 (#2051) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/dockerfiles/autoscaler-deploy/Dockerfile | 2 +- ci/dockerfiles/autoscaler-tools/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/dockerfiles/autoscaler-deploy/Dockerfile b/ci/dockerfiles/autoscaler-deploy/Dockerfile index b89042b957..97f4ae101f 100644 --- a/ci/dockerfiles/autoscaler-deploy/Dockerfile +++ b/ci/dockerfiles/autoscaler-deploy/Dockerfile @@ -53,7 +53,7 @@ RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_V # Install bbl # renovate: datasource=github-releases depName=bosh-bootloader lookupName=cloudfoundry/bosh-bootloader -ENV BBL_VERSION v9.0.10 +ENV BBL_VERSION v9.0.11 RUN wget -q https://github.com/cloudfoundry/bosh-bootloader/releases/download/${BBL_VERSION}/bbl-${BBL_VERSION}_linux_amd64 && \ mv bbl-* /usr/local/bin/bbl && \ chmod +x /usr/local/bin/bbl diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index 2ec2848957..b930d79543 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -69,7 +69,7 @@ RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_V # Install bbl # renovate: datasource=github-releases depName=bosh-bootloader lookupName=cloudfoundry/bosh-bootloader -ARG BBL_VERSION=v9.0.10 +ARG BBL_VERSION=v9.0.11 RUN wget -q https://github.com/cloudfoundry/bosh-bootloader/releases/download/${BBL_VERSION}/bbl-${BBL_VERSION}_linux_amd64 && \ mv bbl-* /usr/local/bin/bbl &&\ chmod +x /usr/local/bin/bbl &&\ From cc21a0038be28443d2c49f9fe7b97c34fc80e925 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 05:47:27 +0000 Subject: [PATCH 112/294] fix(deps): update module github.com/ogen-go/ogen to v0.73.0 (#2050) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 12 ++++++------ src/acceptance/assets/app/go_app/go.sum | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index fe6cf213fc..8d44e28004 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -14,7 +14,7 @@ require ( github.com/json-iterator/go v1.1.12 github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2 github.com/mitchellh/mapstructure v1.5.0 - github.com/ogen-go/ogen v0.72.1 + github.com/ogen-go/ogen v0.73.0 github.com/onsi/ginkgo/v2 v2.11.0 github.com/onsi/gomega v1.27.10 github.com/prometheus/procfs v0.11.1 @@ -60,13 +60,13 @@ require ( github.com/ugorji/go/codec v1.2.11 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.11.0 // indirect + golang.org/x/crypto v0.12.0 // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.12.0 // indirect + golang.org/x/net v0.14.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect - golang.org/x/tools v0.11.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect + golang.org/x/tools v0.12.0 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index b851271334..2f5ebf1a54 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -109,8 +109,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/ogen-go/ogen v0.72.1 h1:rNgBxI7yBh2irIwuQyd7Q8SNhZPK69VjYCaiN6MP1u8= -github.com/ogen-go/ogen v0.72.1/go.mod h1:2SgZ9FRMXsuUhdTq23nFBFgMaXQl6yennmAnIs+hofM= +github.com/ogen-go/ogen v0.73.0 h1:h9HFV2V/h7UTKewlJpvOjx0gHIjjn4O9mjKe3eLNWkY= +github.com/ogen-go/ogen v0.73.0/go.mod h1:CS1RfTfLLcxw968GF2pEw8r6P6YTlU+mCOTGJvl7P2c= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -185,8 +185,8 @@ golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA= golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -199,8 +199,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -218,20 +218,20 @@ golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.11.0 h1:EMCa6U9S2LtZXLAMoWiR/R8dAQFRqbAitmbJ2UKhoi8= -golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= +golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= +golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 9dbf0b5211dd52448de71be4d32c3bcc040e5b86 Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Fri, 11 Aug 2023 14:01:26 +0200 Subject: [PATCH 113/294] Fix return codes if SpaceDeveloper check fails Original fix by Kevin Cross --- .../api/publicapiserver/middleware.go | 13 +- .../api/publicapiserver/middleware_test.go | 32 +++++ .../public_api_handler_test.go | 15 +- src/autoscaler/cf/errors.go | 40 ++++-- src/autoscaler/cf/errors_test.go | 16 +++ src/autoscaler/cf/mocks/mocks.go | 45 ++++-- src/autoscaler/cf/mocks/mocks_test.go | 12 +- src/autoscaler/cf/oauth.go | 40 ++++-- src/autoscaler/cf/oauth_test.go | 136 +++++++++++------- 9 files changed, 241 insertions(+), 108 deletions(-) diff --git a/src/autoscaler/api/publicapiserver/middleware.go b/src/autoscaler/api/publicapiserver/middleware.go index 2537d85554..cf84b72b08 100644 --- a/src/autoscaler/api/publicapiserver/middleware.go +++ b/src/autoscaler/api/publicapiserver/middleware.go @@ -71,12 +71,18 @@ func (mw *Middleware) Oauth(next http.Handler) http.Handler { } isUserSpaceDeveloper, err := mw.cfClient.IsUserSpaceDeveloper(userToken, cf.Guid(appId)) if err != nil { - if errors.Is(err, cf.ErrUnauthrorized) { + switch { + case cf.IsNotFound(err): + handlers.WriteJSONResponse(w, http.StatusNotFound, models.ErrorResponse{ + Code: "App not found", + Message: "The app guid supplied does not exist"}) + return + case errors.Is(err, cf.ErrUnauthorized): handlers.WriteJSONResponse(w, http.StatusUnauthorized, models.ErrorResponse{ Code: "Unauthorized", Message: "You are not authorized to perform the requested action"}) return - } else { + default: mw.logger.Error("failed to check space developer permissions", err, nil) handlers.WriteJSONResponse(w, http.StatusInternalServerError, models.ErrorResponse{ Code: "Internal-Server-Error", @@ -84,6 +90,7 @@ func (mw *Middleware) Oauth(next http.Handler) http.Handler { return } } + if isUserSpaceDeveloper { next.ServeHTTP(w, r) return @@ -156,7 +163,7 @@ func (mw *Middleware) HasClientToken(next http.Handler) http.Handler { } isTokenAuthorized, err := mw.cfClient.IsTokenAuthorized(clientToken, mw.clientId) if err != nil { - if errors.Is(err, cf.ErrUnauthrorized) { + if errors.Is(err, cf.ErrUnauthorized) { writeErrorResponse(w, http.StatusUnauthorized, "client is not authorized to perform the requested action") return } else { diff --git a/src/autoscaler/api/publicapiserver/middleware_test.go b/src/autoscaler/api/publicapiserver/middleware_test.go index 892cf906f1..ab4c1d5ffd 100644 --- a/src/autoscaler/api/publicapiserver/middleware_test.go +++ b/src/autoscaler/api/publicapiserver/middleware_test.go @@ -5,6 +5,8 @@ import ( "net/http" "net/http/httptest" + "code.cloudfoundry.org/app-autoscaler/src/autoscaler/cf" + "code.cloudfoundry.org/lager/v3/lagertest" "github.com/gorilla/mux" . "github.com/onsi/ginkgo/v2" @@ -62,6 +64,7 @@ var _ = Describe("Middleware", func() { }) }) + Context("Invalid user token format", func() { Context("when user token is not a bearer token", func() { BeforeEach(func() { @@ -104,6 +107,20 @@ var _ = Describe("Middleware", func() { }) }) }) + Context("App does not exist", func() { + BeforeEach(func() { + fakeCFClient.IsUserAdminReturns(false, nil) + fakeCFClient.IsUserSpaceDeveloperReturns(false, cf.CfResourceNotFound) + req = httptest.NewRequest(http.MethodGet, "/v1/apps/"+TEST_APP_ID, nil) + req.Header.Add("Authorization", TEST_USER_TOKEN) + }) + It("should fail with 404", func() { + CheckResponse(resp, http.StatusNotFound, models.ErrorResponse{ + Code: "App not found", + Message: "The app guid supplied does not exist", + }) + }) + }) Context("isadminuser check fails", func() { BeforeEach(func() { @@ -147,6 +164,21 @@ var _ = Describe("Middleware", func() { }) }) }) + Context("isspacedeveloper check fails unauthorised", func() { + BeforeEach(func() { + fakeCFClient.IsUserAdminReturns(false, nil) + fakeCFClient.IsUserSpaceDeveloperReturns(false, fmt.Errorf("wrapped error %w", cf.ErrUnauthorized)) + + req = httptest.NewRequest(http.MethodGet, "/v1/apps/"+TEST_APP_ID, nil) + req.Header.Add("Authorization", TEST_USER_TOKEN) + }) + It("should fail with 401", func() { + CheckResponse(resp, http.StatusUnauthorized, models.ErrorResponse{ + Code: "Unauthorized", + Message: "You are not authorized to perform the requested action", + }) + }) + }) Context("user is space developer", func() { BeforeEach(func() { diff --git a/src/autoscaler/api/publicapiserver/public_api_handler_test.go b/src/autoscaler/api/publicapiserver/public_api_handler_test.go index 1d45e71b13..454ccfc3af 100644 --- a/src/autoscaler/api/publicapiserver/public_api_handler_test.go +++ b/src/autoscaler/api/publicapiserver/public_api_handler_test.go @@ -281,11 +281,18 @@ var _ = Describe("PublicApiHandler", func() { }) Describe("DetachScalingPolicy", func() { + BeforeEach(func() { + req, _ = http.NewRequest(http.MethodDelete, "", nil) + pathVariables["appId"] = TEST_APP_ID + }) JustBeforeEach(func() { handler.DetachScalingPolicy(resp, req, pathVariables) }) Context("When appId is not present", func() { + BeforeEach(func() { + delete(pathVariables, "appId") + }) It("should fail with 400", func() { Expect(resp.Code).To(Equal(http.StatusBadRequest)) Expect(resp.Body.String()).To(Equal(`{"code":"Bad Request","message":"AppId is required"}`)) @@ -294,8 +301,6 @@ var _ = Describe("PublicApiHandler", func() { Context("When delete policy errors", func() { BeforeEach(func() { - pathVariables["appId"] = TEST_APP_ID - req, _ = http.NewRequest(http.MethodDelete, "", nil) policydb.DeletePolicyReturns(fmt.Errorf("Failed to save policy")) }) It("should fail with 500", func() { @@ -306,8 +311,6 @@ var _ = Describe("PublicApiHandler", func() { Context("When scheduler returns non 200 and non 204 status code", func() { BeforeEach(func() { - pathVariables["appId"] = TEST_APP_ID - req, _ = http.NewRequest(http.MethodPut, "", nil) schedulerStatus = 500 }) It("should fail with 500", func() { @@ -318,8 +321,6 @@ var _ = Describe("PublicApiHandler", func() { Context("When scheduler returns 200 status code", func() { BeforeEach(func() { - pathVariables["appId"] = TEST_APP_ID - req, _ = http.NewRequest(http.MethodPut, "", nil) schedulerStatus = 200 }) It("should succeed", func() { @@ -380,8 +381,6 @@ var _ = Describe("PublicApiHandler", func() { Context("When scheduler returns 204 status code", func() { BeforeEach(func() { - pathVariables["appId"] = TEST_APP_ID - req, _ = http.NewRequest(http.MethodPut, "", nil) schedulerStatus = 204 }) It("should succeed", func() { diff --git a/src/autoscaler/cf/errors.go b/src/autoscaler/cf/errors.go index 59fde763de..06f8b44dee 100644 --- a/src/autoscaler/cf/errors.go +++ b/src/autoscaler/cf/errors.go @@ -8,6 +8,8 @@ import ( ) const cfResourceNotFound = 10010 +const cfNotAuthenticated = 10002 +const cfNotAuthorised = 10003 type CFErrorResponse struct { Description string `json:"description"` @@ -17,6 +19,9 @@ type CFErrorResponse struct { var CfResourceNotFound = &CfError{Errors: []CfErrorItem{{Detail: "App usage event not found", Title: "CF-ResourceNotFound", Code: cfResourceNotFound}}} var CfInternalServerError = &CfError{Errors: []CfErrorItem{{Detail: "An unexpected, uncaught error occurred; the CC logs will contain more information", Title: "UnknownError", Code: 10001}}} +var CfNotAuthenticated = &CfError{Errors: []CfErrorItem{{Detail: "No auth token was given, but authentication is required for this endpoint", Title: "CF-NotAuthenticated", Code: cfNotAuthenticated}}} +var CfNotAuthorized = &CfError{Errors: []CfErrorItem{{Detail: "The authenticated user does not have permission to perform this operation", Title: "CF-NotAuthorized", Code: cfNotAuthorised}}} + var _ error = &CfError{} var ErrInvalidJson = fmt.Errorf("invalid error json") @@ -38,11 +43,21 @@ func NewCfError(url string, resourceId string, statusCode int, respBody []byte) // CfError cf V3 Error type type CfError struct { - Errors []CfErrorItem `json:"errors"` + Errors ErrorItems `json:"errors"` StatusCode int ResourceId string url string } +type ErrorItems []CfErrorItem + +func (e ErrorItems) hasError(errorCode int) bool { + for _, item := range e { + if item.Code == errorCode { + return true + } + } + return false +} type CfErrorItem struct { Code int `json:"code"` @@ -63,19 +78,26 @@ func (c *CfError) Error() string { return fmt.Sprintf("cf api Error url='%s', resourceId='%s': %s", c.url, c.ResourceId, message) } -func (c *CfError) IsNotFound() bool { +func (c *CfError) IsValid() bool { + return c != nil && len(c.Errors) > 0 +} + +func (c *CfError) ContainsError(errorCode int) bool { if c.IsValid() { - for _, item := range c.Errors { - if item.Code == cfResourceNotFound { - return true - } - } + return c.Errors.hasError(errorCode) } return false } -func (c *CfError) IsValid() bool { - return c != nil && len(c.Errors) > 0 +func (c *CfError) IsNotFound() bool { + return c.ContainsError(cfResourceNotFound) +} +func (c *CfError) IsNotAuthorised() bool { + return c.ContainsError(cfNotAuthorised) +} + +func (c *CfError) IsNotAuthenticated() bool { + return c.ContainsError(cfNotAuthenticated) } func truncateString(stringToTrunk string, length int) string { diff --git a/src/autoscaler/cf/errors_test.go b/src/autoscaler/cf/errors_test.go index fb81ed43e1..ec52804bb5 100644 --- a/src/autoscaler/cf/errors_test.go +++ b/src/autoscaler/cf/errors_test.go @@ -59,6 +59,22 @@ var _ = Describe("Errors test", func() { }) }) + Context("resource not authorized", func() { + BeforeEach(func() { + errorResponse = `{"errors": [{"detail": "The authenticated user does not have permission to perform this operation","title": "CF-NotAuthorized","code": 10003}]}` + }) + It("Should return true for IsNotAuthorised()", func() { + Expect(cfError.IsNotAuthorised()).To(BeTrue()) + }) + }) + Context("resource not authenticated", func() { + BeforeEach(func() { + errorResponse = `{"errors": [{"detail": "No auth token was given, but authentication is required for this endpoint","title": "CF-NotAuthenticated","code": 10002}]}` + }) + It("Should return true for IsNotAuthenticated()", func() { + Expect(cfError.IsNotAuthenticated()).To(BeTrue()) + }) + }) Context("There is one error", func() { BeforeEach(func() { errorResponse = `{"errors": [{"code": 1,"title": "Title","detail": "Detail"}]}` }) It("Should have the right message", func() { diff --git a/src/autoscaler/cf/mocks/mocks.go b/src/autoscaler/cf/mocks/mocks.go index e2f35c9db3..adc1bf0661 100644 --- a/src/autoscaler/cf/mocks/mocks.go +++ b/src/autoscaler/cf/mocks/mocks.go @@ -65,25 +65,40 @@ func (a AddMock) GetApp(appState string, statusCode int, spaceGuid cf.SpaceId) A Expect(err).NotTo(HaveOccurred()) updated, err := time.Parse(time.RFC3339, "2022-07-21T14:30:17Z") Expect(err).NotTo(HaveOccurred()) - a.server.RouteToHandler("GET", - regexp.MustCompile(`^/v3/apps/[^/]+$`), - ghttp.RespondWithJSONEncoded(statusCode, cf.App{ - Guid: "testing-guid-get-app", - Name: "mock-get-app", - State: appState, - CreatedAt: created, - UpdatedAt: updated, - Relationships: cf.Relationships{ - Space: &cf.Space{ - Data: cf.SpaceData{ - Guid: spaceGuid, - }, + + response := definedResponsesOR(statusCode, cf.App{ + Guid: "testing-guid-get-app", + Name: "mock-get-app", + State: appState, + CreatedAt: created, + UpdatedAt: updated, + Relationships: cf.Relationships{ + Space: &cf.Space{ + Data: cf.SpaceData{ + Guid: spaceGuid, }, }, - })) + }, + }) + a.server.RouteToHandler("GET", + regexp.MustCompile(`^/v3/apps/[^/]+$`), + ghttp.RespondWithJSONEncoded(statusCode, response)) return a } +func definedResponsesOR(statusCode int, response interface{}) interface{} { + switch statusCode { + case 401: + response = cf.CfNotAuthenticated + case 403: + response = cf.CfNotAuthorized + case 404: + response = cf.CfResourceNotFound + default: + } + return response +} + func (a AddMock) GetAppProcesses(processes int) AddMock { type processesResponse struct { Pagination cf.Pagination `json:"pagination"` @@ -112,7 +127,7 @@ func (a AddMock) ScaleAppWebProcess() AddMock { func (a AddMock) Roles(statusCode int, roles ...cf.Role) AddMock { a.server.RouteToHandler("GET", "/v3/roles", - ghttp.RespondWithJSONEncoded(statusCode, cf.Response[cf.Role]{Resources: roles})) + ghttp.RespondWithJSONEncoded(statusCode, definedResponsesOR(statusCode, cf.Response[cf.Role]{Resources: roles}))) return a } diff --git a/src/autoscaler/cf/mocks/mocks_test.go b/src/autoscaler/cf/mocks/mocks_test.go index 082449cf35..31cf2c44f2 100644 --- a/src/autoscaler/cf/mocks/mocks_test.go +++ b/src/autoscaler/cf/mocks/mocks_test.go @@ -1,8 +1,6 @@ package mocks_test import ( - "errors" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/cf/mocks" "code.cloudfoundry.org/app-autoscaler/src/autoscaler/cf" @@ -290,9 +288,9 @@ var _ = Describe("Cf cloud controller", func() { DeferCleanup(mocks.Close) }) It("will return success", func() { - userAdmin, err := cfc.IsUserSpaceDeveloper("bearer a-test-access-token", "test-app-id") + userSpaceDeveloper, err := cfc.IsUserSpaceDeveloper("bearer a-test-access-token", "test-app-id") Expect(err).NotTo(HaveOccurred()) - Expect(userAdmin).To(BeTrue()) + Expect(userSpaceDeveloper).To(BeTrue()) }) }) When("the mocks return 401", func() { @@ -308,9 +306,9 @@ var _ = Describe("Cf cloud controller", func() { DeferCleanup(mocks.Close) }) It("will return unauthorised", func() { - _, err := cfc.IsUserSpaceDeveloper("bearer a-test-access-token", "test-app-id") - Expect(err).To(HaveOccurred()) - Expect(errors.Is(err, cf.ErrUnauthrorized)).To(BeTrue()) + userSpaceDeveloper, err := cfc.IsUserSpaceDeveloper("bearer a-test-access-token", "test-app-id") + Expect(err).NotTo(HaveOccurred()) + Expect(userSpaceDeveloper).To(BeFalse()) }) }) }) diff --git a/src/autoscaler/cf/oauth.go b/src/autoscaler/cf/oauth.go index 21b16694f8..8fe6c938dc 100644 --- a/src/autoscaler/cf/oauth.go +++ b/src/autoscaler/cf/oauth.go @@ -3,6 +3,7 @@ package cf import ( "context" "encoding/json" + "errors" "fmt" "net/http" "net/url" @@ -16,7 +17,7 @@ const ( ) var ( - ErrUnauthrorized = fmt.Errorf(http.StatusText(http.StatusUnauthorized)) + ErrUnauthorized = fmt.Errorf(http.StatusText(http.StatusUnauthorized)) ErrInvalidTokenFormat = fmt.Errorf("Invalid token format") ) @@ -27,6 +28,10 @@ func (c *Client) IsUserSpaceDeveloper(userToken string, appId Guid) (bool, error func (c *CtxClient) IsUserSpaceDeveloper(ctx context.Context, userToken string, appId Guid) (bool, error) { userId, err := c.getUserId(ctx, userToken) if err != nil { + if errors.Is(ErrUnauthorized, err) { + c.logger.Error("getUserId: token Not authorized", err) + return false, nil + } return false, fmt.Errorf("failed IsUserSpaceDeveloper for appId(%s): %w", appId, err) } @@ -37,6 +42,10 @@ func (c *CtxClient) IsUserSpaceDeveloper(ctx context.Context, userToken string, roles, err := c.GetSpaceDeveloperRoles(ctx, spaceId, userId) if err != nil { + if IsNotFound(err) { + c.logger.Info("GetSpaceDeveloperRoles: Not not found", lager.Data{"userId": userId, "spaceid": spaceId}) + return false, nil + } return false, fmt.Errorf("failed IsUserSpaceDeveloper userId(%s), spaceId(%s): %w", userId, spaceId, err) } @@ -123,24 +132,25 @@ func (c *CtxClient) getUserId(ctx context.Context, userToken string) (UserId, er return "", err } defer func() { _ = resp.Body.Close() }() - if resp.StatusCode == http.StatusUnauthorized { + + switch resp.StatusCode { + case http.StatusOK: + userInfo := struct { + UserId UserId `json:"user_id"` + }{} + err = json.NewDecoder(resp.Body).Decode(&userInfo) + if err != nil { + c.logger.Error("Failed to parse user info response body", err, lager.Data{"userInfoEndpoint": userInfoEndpoint}) + return "", err + } + return userInfo.UserId, nil + case http.StatusNotFound, http.StatusUnauthorized: c.logger.Error("Failed to get user info, token invalid", nil, lager.Data{"userInfoEndpoint": userInfoEndpoint, "statusCode": resp.StatusCode}) - return "", ErrUnauthrorized - } else if resp.StatusCode != http.StatusOK { + return "", ErrUnauthorized + default: c.logger.Error("Failed to get user info", nil, lager.Data{"userInfoEndpoint": userInfoEndpoint, "statusCode": resp.StatusCode}) return "", fmt.Errorf("Failed to get user info, statuscode :%v", resp.StatusCode) } - - userInfo := struct { - UserId UserId `json:"user_id"` - }{} - err = json.NewDecoder(resp.Body).Decode(&userInfo) - if err != nil { - c.logger.Error("Failed to parse user info response body", err, lager.Data{"userInfoEndpoint": userInfoEndpoint}) - return "", err - } - - return userInfo.UserId, nil } func (c *CtxClient) getSpaceId(ctx context.Context, appId Guid) (SpaceId, error) { diff --git a/src/autoscaler/cf/oauth_test.go b/src/autoscaler/cf/oauth_test.go index f6df252063..84428ee8e1 100644 --- a/src/autoscaler/cf/oauth_test.go +++ b/src/autoscaler/cf/oauth_test.go @@ -44,7 +44,7 @@ var _ = Describe("Oauth", func() { fakeTokenServer *mocks.Server userInfoStatus int - userInfoResponse userInfo + userInfoResponse interface{} userScopeStatus int userScopeResponse userScope @@ -110,32 +110,53 @@ var _ = Describe("Oauth", func() { }) }) - Context("user info endpoint returns 401 statusCode", func() { - BeforeEach(func() { - userInfoStatus = http.StatusUnauthorized - }) - It("should error", func() { - Expect(err).To(HaveOccurred()) - Expect(err).To(MatchError(MatchRegexp("Unauthorized"))) + Context("user info endpoint", func() { + Context("returns 401 statusCode", func() { + BeforeEach(func() { + userInfoStatus = http.StatusUnauthorized + }) + It("should false", func() { + Expect(err).ToNot(HaveOccurred()) + Expect(isUserSpaceDeveloperFlag).To(BeFalse()) + }) }) - }) - Context("user info endpoint returns non-200 and non-401 statusCode", func() { - BeforeEach(func() { - userInfoStatus = http.StatusBadRequest + Context("uua returns not found", func() { + BeforeEach(func() { + userInfoStatus = http.StatusNotFound + }) + It("should return false", func() { + Expect(err).ToNot(HaveOccurred()) + Expect(isUserSpaceDeveloperFlag).To(BeFalse()) + }) }) - It("should error", func() { - Expect(err).To(HaveOccurred()) - Expect(err).To(MatchError(MatchRegexp("Failed to get user info, statuscode :400"))) + Context("response code 404 but not from cc", func() { + BeforeEach(func() { + userInfoStatus = http.StatusNotFound + }) + It("should return false", func() { + Expect(err).ToNot(HaveOccurred()) + Expect(isUserSpaceDeveloperFlag).To(BeFalse()) + }) }) - }) - Context("user info response is not in json format", func() { - BeforeEach(func() { - fakeTokenServer.RouteToHandler(http.MethodGet, "/userinfo", ghttp.RespondWith(http.StatusOK, "non-json-response")) + Context("returns non 200,401,404 statusCode", func() { + BeforeEach(func() { + userInfoStatus = http.StatusBadRequest + }) + It("should error", func() { + Expect(err).To(HaveOccurred()) + Expect(err).To(MatchError(MatchRegexp("Failed to get user info, statuscode :400"))) + }) }) - It("should error", func() { - Expect(err).To(HaveOccurred()) + + Context("is not in json format", func() { + BeforeEach(func() { + fakeTokenServer.RouteToHandler(http.MethodGet, "/userinfo", ghttp.RespondWith(http.StatusOK, "non-json-response")) + }) + It("should error", func() { + Expect(err).To(HaveOccurred()) + }) }) }) @@ -149,43 +170,56 @@ var _ = Describe("Oauth", func() { }) }) - Context("apps endpoint returns 400 status code", func() { - BeforeEach(func() { - appStatus = http.StatusBadRequest - }) - It("should error", func() { - Expect(err).To(HaveOccurred()) - Expect(err).To(MatchError(MatchRegexp("400"))) + Context("apps endpoint", func() { + Context("returns 400 status code", func() { + BeforeEach(func() { + appStatus = http.StatusBadRequest + }) + It("should error", func() { + Expect(err).To(HaveOccurred()) + Expect(err).To(MatchError(MatchRegexp("400"))) + }) }) - }) - Context("apps endpoint returns 401 status code", func() { - BeforeEach(func() { - appStatus = http.StatusUnauthorized - }) - It("should error", func() { - Expect(err).To(HaveOccurred()) - Expect(err).To(MatchError(MatchRegexp("401"))) + Context("returns 401 status code", func() { + BeforeEach(func() { + appStatus = http.StatusUnauthorized + }) + It("should error", func() { + Expect(err).To(HaveOccurred()) + Expect(err).To(MatchError(MatchRegexp(`CF-NotAuthenticated`))) + }) }) - }) - Context("roles endpoint returns 200 and 400 status code", func() { - BeforeEach(func() { - rolesStatus = http.StatusBadRequest - }) - It("should error", func() { - Expect(err).To(HaveOccurred()) - Expect(err).To(MatchError(MatchRegexp(`failed IsUserSpaceDeveloper userId\(test-user-id\), spaceId\(test-space-id\):.*page 1:.*cf.Response\[.*cf.Role\]:.*400`))) + Context("returns 404 status code", func() { + BeforeEach(func() { + appStatus = http.StatusNotFound + }) + It("should error", func() { + Expect(err).To(HaveOccurred()) + Expect(err).To(MatchError(MatchRegexp(`CF-ResourceNotFound`))) + }) }) }) - - Context("roles endpoint returns 401 status code", func() { - BeforeEach(func() { - rolesStatus = http.StatusUnauthorized + Context("roles endpoint", func() { + Context("roles endpoint 400 status code", func() { + BeforeEach(func() { + rolesStatus = http.StatusBadRequest + }) + It("should error", func() { + Expect(err).To(HaveOccurred()) + Expect(err).To(MatchError(MatchRegexp(`failed IsUserSpaceDeveloper userId\(test-user-id\), spaceId\(test-space-id\):.*page 1:.*cf.Response\[.*cf.Role\]:.*400`))) + }) }) - It("should error", func() { - Expect(err).To(HaveOccurred()) - Expect(err).To(MatchError(MatchRegexp(`.*userId\(test-user-id\), spaceId\(test-space-id\):.*cf.Response\[.*cf.Role\]:.*invalid error json`))) + + Context("roles endpoint returns 404 status code", func() { + BeforeEach(func() { + rolesStatus = http.StatusNotFound + }) + It("should return false", func() { + Expect(err).ToNot(HaveOccurred()) + Expect(isUserSpaceDeveloperFlag).To(BeFalse()) + }) }) }) From f5ad36928ad7682db89f4700415536998389cf32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Mon, 14 Aug 2023 10:59:28 +0200 Subject: [PATCH 114/294] Remove generated code; --- .../internal/applicationmetric/oas_cfg_gen.go | 141 ---- .../applicationmetric/oas_client_gen.go | 292 -------- .../applicationmetric/oas_json_gen.go | 519 -------------- .../applicationmetric/oas_parameters_gen.go | 23 - .../oas_request_encoders_gen.go | 3 - .../oas_response_decoders_gen.go | 98 --- .../applicationmetric/oas_schemas_gen.go | 495 ------------- .../applicationmetric/oas_security_gen.go | 25 - .../applicationmetric/oas_validators_gen.go | 88 --- .../internal/custommetrics/api_credentials.go | 8 - .../custommetrics/basic_auth_transport.go | 32 - .../internal/custommetrics/oas_cfg_gen.go | 137 ---- .../internal/custommetrics/oas_client_gen.go | 163 ----- .../internal/custommetrics/oas_json_gen.go | 381 ---------- .../custommetrics/oas_parameters_gen.go | 10 - .../custommetrics/oas_request_encoders_gen.go | 26 - .../oas_response_decoders_gen.go | 66 -- .../internal/custommetrics/oas_schemas_gen.go | 184 ----- .../custommetrics/oas_validators_gen.go | 65 -- .../app/go_app/internal/policy/oas_cfg_gen.go | 141 ---- .../go_app/internal/policy/oas_client_gen.go | 426 ------------ .../go_app/internal/policy/oas_json_gen.go | 271 -------- .../internal/policy/oas_parameters_gen.go | 27 - .../policy/oas_request_encoders_gen.go | 32 - .../policy/oas_response_decoders_gen.go | 264 ------- .../go_app/internal/policy/oas_schemas_gen.go | 201 ------ .../internal/policy/oas_security_gen.go | 25 - .../internal/scalinghistory/oas_cfg_gen.go | 141 ---- .../internal/scalinghistory/oas_client_gen.go | 274 -------- .../internal/scalinghistory/oas_json_gen.go | 649 ------------------ .../scalinghistory/oas_parameters_gen.go | 21 - .../oas_request_encoders_gen.go | 3 - .../oas_response_decoders_gen.go | 98 --- .../scalinghistory/oas_schemas_gen.go | 621 ----------------- .../scalinghistory/oas_security_gen.go | 25 - .../scalinghistory/oas_validators_gen.go | 200 ------ 36 files changed, 6175 deletions(-) delete mode 100644 src/acceptance/assets/app/go_app/internal/applicationmetric/oas_cfg_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/applicationmetric/oas_client_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/applicationmetric/oas_json_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/applicationmetric/oas_parameters_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/applicationmetric/oas_request_encoders_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/applicationmetric/oas_response_decoders_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/applicationmetric/oas_schemas_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/applicationmetric/oas_security_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/applicationmetric/oas_validators_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/custommetrics/api_credentials.go delete mode 100644 src/acceptance/assets/app/go_app/internal/custommetrics/basic_auth_transport.go delete mode 100644 src/acceptance/assets/app/go_app/internal/custommetrics/oas_cfg_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/custommetrics/oas_client_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/custommetrics/oas_json_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/custommetrics/oas_parameters_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/custommetrics/oas_request_encoders_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/custommetrics/oas_response_decoders_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/custommetrics/oas_schemas_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/custommetrics/oas_validators_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/policy/oas_cfg_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/policy/oas_client_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/policy/oas_json_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/policy/oas_parameters_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/policy/oas_request_encoders_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/policy/oas_response_decoders_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/policy/oas_schemas_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/policy/oas_security_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/scalinghistory/oas_cfg_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/scalinghistory/oas_client_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/scalinghistory/oas_json_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/scalinghistory/oas_parameters_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/scalinghistory/oas_request_encoders_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/scalinghistory/oas_response_decoders_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/scalinghistory/oas_schemas_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/scalinghistory/oas_security_gen.go delete mode 100644 src/acceptance/assets/app/go_app/internal/scalinghistory/oas_validators_gen.go diff --git a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_cfg_gen.go b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_cfg_gen.go deleted file mode 100644 index 2975fe8f63..0000000000 --- a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_cfg_gen.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "net/http" - - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/global" - "go.opentelemetry.io/otel/metric/instrument" - "go.opentelemetry.io/otel/trace" - - ht "github.com/ogen-go/ogen/http" - "github.com/ogen-go/ogen/ogenregex" - "github.com/ogen-go/ogen/otelogen" -) - -var regexMap = map[string]ogenregex.Regexp{ - "(\\d|[a-f]){8}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){12}": ogenregex.MustCompile("(\\d|[a-f]){8}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){12}"), -} -var ( - // Allocate option closure once. - clientSpanKind = trace.WithSpanKind(trace.SpanKindClient) -) - -type ( - optionFunc[C any] func(*C) - otelOptionFunc func(*otelConfig) -) - -type otelConfig struct { - TracerProvider trace.TracerProvider - Tracer trace.Tracer - MeterProvider metric.MeterProvider - Meter metric.Meter -} - -func (cfg *otelConfig) initOTEL() { - if cfg.TracerProvider == nil { - cfg.TracerProvider = otel.GetTracerProvider() - } - if cfg.MeterProvider == nil { - cfg.MeterProvider = global.MeterProvider() - } - cfg.Tracer = cfg.TracerProvider.Tracer(otelogen.Name, - trace.WithInstrumentationVersion(otelogen.SemVersion()), - ) - cfg.Meter = cfg.MeterProvider.Meter(otelogen.Name) -} - -type clientConfig struct { - otelConfig - Client ht.Client -} - -// ClientOption is client config option. -type ClientOption interface { - applyClient(*clientConfig) -} - -var _ = []ClientOption{ - (optionFunc[clientConfig])(nil), - (otelOptionFunc)(nil), -} - -func (o optionFunc[C]) applyClient(c *C) { - o(c) -} - -func (o otelOptionFunc) applyClient(c *clientConfig) { - o(&c.otelConfig) -} - -func newClientConfig(opts ...ClientOption) clientConfig { - cfg := clientConfig{ - Client: http.DefaultClient, - } - for _, opt := range opts { - opt.applyClient(&cfg) - } - cfg.initOTEL() - return cfg -} - -type baseClient struct { - cfg clientConfig - requests instrument.Int64Counter - errors instrument.Int64Counter - duration instrument.Int64Histogram -} - -func (cfg clientConfig) baseClient() (c baseClient, err error) { - c = baseClient{cfg: cfg} - if c.requests, err = c.cfg.Meter.Int64Counter(otelogen.ClientRequestCount); err != nil { - return c, err - } - if c.errors, err = c.cfg.Meter.Int64Counter(otelogen.ClientErrorsCount); err != nil { - return c, err - } - if c.duration, err = c.cfg.Meter.Int64Histogram(otelogen.ClientDuration); err != nil { - return c, err - } - return c, nil -} - -// Option is config option. -type Option interface { - ClientOption -} - -// WithTracerProvider specifies a tracer provider to use for creating a tracer. -// -// If none is specified, the global provider is used. -func WithTracerProvider(provider trace.TracerProvider) Option { - return otelOptionFunc(func(cfg *otelConfig) { - if provider != nil { - cfg.TracerProvider = provider - } - }) -} - -// WithMeterProvider specifies a meter provider to use for creating a meter. -// -// If none is specified, the global.MeterProvider() is used. -func WithMeterProvider(provider metric.MeterProvider) Option { - return otelOptionFunc(func(cfg *otelConfig) { - if provider != nil { - cfg.MeterProvider = provider - } - }) -} - -// WithClient specifies http client to use. -func WithClient(client ht.Client) ClientOption { - return optionFunc[clientConfig](func(cfg *clientConfig) { - if client != nil { - cfg.Client = client - } - }) -} diff --git a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_client_gen.go b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_client_gen.go deleted file mode 100644 index 18b3a89406..0000000000 --- a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_client_gen.go +++ /dev/null @@ -1,292 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "context" - "net/url" - "strings" - "time" - - "github.com/go-faster/errors" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/metric" - - "github.com/ogen-go/ogen/conv" - ht "github.com/ogen-go/ogen/http" - "github.com/ogen-go/ogen/ogenerrors" - "github.com/ogen-go/ogen/uri" -) - -// Client implements OAS client. -type Client struct { - serverURL *url.URL - sec SecuritySource - baseClient -} - -func trimTrailingSlashes(u *url.URL) { - u.Path = strings.TrimRight(u.Path, "/") - u.RawPath = strings.TrimRight(u.RawPath, "/") -} - -// NewClient initializes new Client defined by OAS. -func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error) { - u, err := url.Parse(serverURL) - if err != nil { - return nil, err - } - trimTrailingSlashes(u) - - c, err := newClientConfig(opts...).baseClient() - if err != nil { - return nil, err - } - return &Client{ - serverURL: u, - sec: sec, - baseClient: c, - }, nil -} - -type serverURLKey struct{} - -// WithServerURL sets context key to override server URL. -func WithServerURL(ctx context.Context, u *url.URL) context.Context { - return context.WithValue(ctx, serverURLKey{}, u) -} - -func (c *Client) requestURL(ctx context.Context) *url.URL { - u, ok := ctx.Value(serverURLKey{}).(*url.URL) - if !ok { - return c.serverURL - } - return u -} - -// V1AppsGUIDAggregatedMetricHistoriesMetricTypeGet invokes GET /v1/apps/{guid}/aggregated_metric_histories/{metric_type} operation. -// -// Use to retrieve instance metrics of an application. -// -// GET /v1/apps/{guid}/aggregated_metric_histories/{metric_type} -func (c *Client) V1AppsGUIDAggregatedMetricHistoriesMetricTypeGet(ctx context.Context, params V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetParams) (*ApplicationMetrics, error) { - res, err := c.sendV1AppsGUIDAggregatedMetricHistoriesMetricTypeGet(ctx, params) - _ = res - return res, err -} - -func (c *Client) sendV1AppsGUIDAggregatedMetricHistoriesMetricTypeGet(ctx context.Context, params V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetParams) (res *ApplicationMetrics, err error) { - var otelAttrs []attribute.KeyValue - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), metric.WithAttributes(otelAttrs...)) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "V1AppsGUIDAggregatedMetricHistoriesMetricTypeGet", - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [4]string - pathParts[0] = "/v1/apps/" - { - // Encode "guid" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "guid", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.GUID)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/aggregated_metric_histories/" - { - // Encode "metric_type" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "metric_type", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.MetricType)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[3] = encoded - } - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeQueryParams" - q := uri.NewQueryEncoder() - { - // Encode "start-time" parameter. - cfg := uri.QueryParameterEncodingConfig{ - Name: "start-time", - Style: uri.QueryStyleForm, - Explode: true, - } - - if err := q.EncodeParam(cfg, func(e uri.Encoder) error { - if val, ok := params.StartTime.Get(); ok { - return e.EncodeValue(conv.IntToString(val)) - } - return nil - }); err != nil { - return res, errors.Wrap(err, "encode query") - } - } - { - // Encode "end-time" parameter. - cfg := uri.QueryParameterEncodingConfig{ - Name: "end-time", - Style: uri.QueryStyleForm, - Explode: true, - } - - if err := q.EncodeParam(cfg, func(e uri.Encoder) error { - if val, ok := params.EndTime.Get(); ok { - return e.EncodeValue(conv.IntToString(val)) - } - return nil - }); err != nil { - return res, errors.Wrap(err, "encode query") - } - } - { - // Encode "order-direction" parameter. - cfg := uri.QueryParameterEncodingConfig{ - Name: "order-direction", - Style: uri.QueryStyleForm, - Explode: true, - } - - if err := q.EncodeParam(cfg, func(e uri.Encoder) error { - if val, ok := params.OrderDirection.Get(); ok { - return e.EncodeValue(conv.StringToString(string(val))) - } - return nil - }); err != nil { - return res, errors.Wrap(err, "encode query") - } - } - { - // Encode "page" parameter. - cfg := uri.QueryParameterEncodingConfig{ - Name: "page", - Style: uri.QueryStyleForm, - Explode: true, - } - - if err := q.EncodeParam(cfg, func(e uri.Encoder) error { - if val, ok := params.Page.Get(); ok { - return e.EncodeValue(conv.IntToString(val)) - } - return nil - }); err != nil { - return res, errors.Wrap(err, "encode query") - } - } - { - // Encode "results-per-page" parameter. - cfg := uri.QueryParameterEncodingConfig{ - Name: "results-per-page", - Style: uri.QueryStyleForm, - Explode: true, - } - - if err := q.EncodeParam(cfg, func(e uri.Encoder) error { - if val, ok := params.ResultsPerPage.Get(); ok { - return e.EncodeValue(conv.IntToString(val)) - } - return nil - }); err != nil { - return res, errors.Wrap(err, "encode query") - } - } - u.RawQuery = q.Values().Encode() - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "GET", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:BasicAuthentication" - switch err := c.securityBasicAuthentication(ctx, "V1AppsGUIDAggregatedMetricHistoriesMetricTypeGet", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"BasicAuthentication\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, errors.New("no security requirement satisfied") - } - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} diff --git a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_json_gen.go b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_json_gen.go deleted file mode 100644 index fde127df30..0000000000 --- a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_json_gen.go +++ /dev/null @@ -1,519 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "github.com/go-faster/errors" - "github.com/go-faster/jx" - - "github.com/ogen-go/ogen/json" -) - -// Encode implements json.Marshaler. -func (s *ApplicationMetric) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ApplicationMetric) encodeFields(e *jx.Encoder) { - { - if s.AppGUID.Set { - e.FieldStart("app_guid") - s.AppGUID.Encode(e) - } - } - { - if s.InstanceIndex.Set { - e.FieldStart("instanceIndex") - s.InstanceIndex.Encode(e) - } - } - { - if s.Timestamp.Set { - e.FieldStart("timestamp") - s.Timestamp.Encode(e) - } - } - { - if s.CollectedAt.Set { - e.FieldStart("collected_at") - s.CollectedAt.Encode(e) - } - } - { - if s.MetricType.Set { - e.FieldStart("metric_type") - s.MetricType.Encode(e) - } - } - { - if s.Value.Set { - e.FieldStart("value") - s.Value.Encode(e) - } - } - { - if s.Unit.Set { - e.FieldStart("unit") - s.Unit.Encode(e) - } - } -} - -var jsonFieldsNameOfApplicationMetric = [7]string{ - 0: "app_guid", - 1: "instanceIndex", - 2: "timestamp", - 3: "collected_at", - 4: "metric_type", - 5: "value", - 6: "unit", -} - -// Decode decodes ApplicationMetric from json. -func (s *ApplicationMetric) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ApplicationMetric to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "app_guid": - if err := func() error { - s.AppGUID.Reset() - if err := s.AppGUID.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"app_guid\"") - } - case "instanceIndex": - if err := func() error { - s.InstanceIndex.Reset() - if err := s.InstanceIndex.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"instanceIndex\"") - } - case "timestamp": - if err := func() error { - s.Timestamp.Reset() - if err := s.Timestamp.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"timestamp\"") - } - case "collected_at": - if err := func() error { - s.CollectedAt.Reset() - if err := s.CollectedAt.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"collected_at\"") - } - case "metric_type": - if err := func() error { - s.MetricType.Reset() - if err := s.MetricType.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"metric_type\"") - } - case "value": - if err := func() error { - s.Value.Reset() - if err := s.Value.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"value\"") - } - case "unit": - if err := func() error { - s.Unit.Reset() - if err := s.Unit.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"unit\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ApplicationMetric") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ApplicationMetric) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ApplicationMetric) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ApplicationMetrics) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ApplicationMetrics) encodeFields(e *jx.Encoder) { - { - if s.TotalResults.Set { - e.FieldStart("total_results") - s.TotalResults.Encode(e) - } - } - { - if s.TotalPages.Set { - e.FieldStart("total_pages") - s.TotalPages.Encode(e) - } - } - { - if s.Page.Set { - e.FieldStart("page") - s.Page.Encode(e) - } - } - { - if s.PrevURL.Set { - e.FieldStart("prev_url") - s.PrevURL.Encode(e) - } - } - { - if s.NextURL.Set { - e.FieldStart("next_url") - s.NextURL.Encode(e) - } - } - { - if s.Resources != nil { - e.FieldStart("resources") - e.ArrStart() - for _, elem := range s.Resources { - elem.Encode(e) - } - e.ArrEnd() - } - } -} - -var jsonFieldsNameOfApplicationMetrics = [6]string{ - 0: "total_results", - 1: "total_pages", - 2: "page", - 3: "prev_url", - 4: "next_url", - 5: "resources", -} - -// Decode decodes ApplicationMetrics from json. -func (s *ApplicationMetrics) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ApplicationMetrics to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "total_results": - if err := func() error { - s.TotalResults.Reset() - if err := s.TotalResults.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"total_results\"") - } - case "total_pages": - if err := func() error { - s.TotalPages.Reset() - if err := s.TotalPages.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"total_pages\"") - } - case "page": - if err := func() error { - s.Page.Reset() - if err := s.Page.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"page\"") - } - case "prev_url": - if err := func() error { - s.PrevURL.Reset() - if err := s.PrevURL.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"prev_url\"") - } - case "next_url": - if err := func() error { - s.NextURL.Reset() - if err := s.NextURL.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"next_url\"") - } - case "resources": - if err := func() error { - s.Resources = make([]ApplicationMetric, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem ApplicationMetric - if err := elem.Decode(d); err != nil { - return err - } - s.Resources = append(s.Resources, elem) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"resources\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ApplicationMetrics") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ApplicationMetrics) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ApplicationMetrics) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *ErrorResponse) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ErrorResponse) encodeFields(e *jx.Encoder) { -} - -var jsonFieldsNameOfErrorResponse = [0]string{} - -// Decode decodes ErrorResponse from json. -func (s *ErrorResponse) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ErrorResponse to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ErrorResponse") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ErrorResponse) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ErrorResponse) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes int as json. -func (o OptInt) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Int(int(o.Value)) -} - -// Decode decodes int from json. -func (o *OptInt) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptInt to nil") - } - o.Set = true - v, err := d.Int() - if err != nil { - return err - } - o.Value = int(v) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptInt) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptInt) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes int64 as json. -func (o OptInt64) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Int64(int64(o.Value)) -} - -// Decode decodes int64 from json. -func (o *OptInt64) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptInt64 to nil") - } - o.Set = true - v, err := d.Int64() - if err != nil { - return err - } - o.Value = int64(v) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptInt64) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptInt64) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes string as json. -func (o OptString) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Str(string(o.Value)) -} - -// Decode decodes string from json. -func (o *OptString) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptString to nil") - } - o.Set = true - v, err := d.Str() - if err != nil { - return err - } - o.Value = string(v) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptString) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptString) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes url.URL as json. -func (o OptURI) Encode(e *jx.Encoder) { - if !o.Set { - return - } - json.EncodeURI(e, o.Value) -} - -// Decode decodes url.URL from json. -func (o *OptURI) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptURI to nil") - } - o.Set = true - v, err := json.DecodeURI(d) - if err != nil { - return err - } - o.Value = v - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptURI) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptURI) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} diff --git a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_parameters_gen.go b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_parameters_gen.go deleted file mode 100644 index b02d39ada6..0000000000 --- a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_parameters_gen.go +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -// V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetParams is parameters of GET /v1/apps/{guid}/aggregated_metric_histories/{metric_type} operation. -type V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetParams struct { - // The GUID identifying the application for which the scaling history is fetched. - // It can be found in the `application_id` property of the JSON object stored in the - // `VCAP_APPLICATION` environment variable. - GUID string - // The metric type. - MetricType string - // The start time in the number of nanoseconds elapsed since January 1, 1970 UTC. - StartTime OptInt - // The end time in the number of nanoseconds elapsed since January 1, 1970 UTC. - EndTime OptInt - // The sorting order. The scaling history will be order by timestamp ascending or descending. - OrderDirection OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection - // The page number to query. - Page OptInt - // Number of entries shown per page. - ResultsPerPage OptInt -} diff --git a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_request_encoders_gen.go b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_request_encoders_gen.go deleted file mode 100644 index ae379a2db9..0000000000 --- a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_request_encoders_gen.go +++ /dev/null @@ -1,3 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api diff --git a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_response_decoders_gen.go b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_response_decoders_gen.go deleted file mode 100644 index 9afbb64fa2..0000000000 --- a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_response_decoders_gen.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "io" - "mime" - "net/http" - - "github.com/go-faster/errors" - "github.com/go-faster/jx" - - "github.com/ogen-go/ogen/ogenerrors" - "github.com/ogen-go/ogen/validate" -) - -func decodeV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetResponse(resp *http.Response) (res *ApplicationMetrics, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response ApplicationMetrics - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - // Convenient error response. - defRes, err := func() (res *ErrorResponseStatusCode, err error) { - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response ErrorResponse - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &ErrorResponseStatusCode{ - StatusCode: resp.StatusCode, - Response: response, - }, nil - default: - return res, validate.InvalidContentType(ct) - } - }() - if err != nil { - return res, errors.Wrapf(err, "default (code %d)", resp.StatusCode) - } - return res, errors.Wrap(defRes, "error") -} diff --git a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_schemas_gen.go b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_schemas_gen.go deleted file mode 100644 index 6010e2b2f5..0000000000 --- a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_schemas_gen.go +++ /dev/null @@ -1,495 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "fmt" - "net/url" - - "github.com/go-faster/errors" -) - -func (s *ErrorResponseStatusCode) Error() string { - return fmt.Sprintf("code %d: %+v", s.StatusCode, s.Response) -} - -// Object containing metric history. -// Ref: #/components/schemas/ApplicationMetric -type ApplicationMetric struct { - // Identificator used by Cloud Foundry for entities. - // Anything is an entity. Apps, services, service-bindings, …. - AppGUID OptString `json:"app_guid"` - // Application Metric. - InstanceIndex OptInt `json:"instanceIndex"` - // The scaling time in the number of nanoseconds elapsed since January 1, 1970 UTC. - Timestamp OptInt `json:"timestamp"` - // The time at which the metrics were collected in the number of nanoseconds. - CollectedAt OptInt `json:"collected_at"` - // One user-defined custom metric type or one of the system-default metric types, which are: - // "memoryused", "memoryutil", "responsetime", "throughput" and "cpu". - MetricType OptString `json:"metric_type"` - // The value of metric type to be returned as the aggregated metric result of an application. - Value OptInt `json:"value"` - Unit OptString `json:"unit"` -} - -// GetAppGUID returns the value of AppGUID. -func (s *ApplicationMetric) GetAppGUID() OptString { - return s.AppGUID -} - -// GetInstanceIndex returns the value of InstanceIndex. -func (s *ApplicationMetric) GetInstanceIndex() OptInt { - return s.InstanceIndex -} - -// GetTimestamp returns the value of Timestamp. -func (s *ApplicationMetric) GetTimestamp() OptInt { - return s.Timestamp -} - -// GetCollectedAt returns the value of CollectedAt. -func (s *ApplicationMetric) GetCollectedAt() OptInt { - return s.CollectedAt -} - -// GetMetricType returns the value of MetricType. -func (s *ApplicationMetric) GetMetricType() OptString { - return s.MetricType -} - -// GetValue returns the value of Value. -func (s *ApplicationMetric) GetValue() OptInt { - return s.Value -} - -// GetUnit returns the value of Unit. -func (s *ApplicationMetric) GetUnit() OptString { - return s.Unit -} - -// SetAppGUID sets the value of AppGUID. -func (s *ApplicationMetric) SetAppGUID(val OptString) { - s.AppGUID = val -} - -// SetInstanceIndex sets the value of InstanceIndex. -func (s *ApplicationMetric) SetInstanceIndex(val OptInt) { - s.InstanceIndex = val -} - -// SetTimestamp sets the value of Timestamp. -func (s *ApplicationMetric) SetTimestamp(val OptInt) { - s.Timestamp = val -} - -// SetCollectedAt sets the value of CollectedAt. -func (s *ApplicationMetric) SetCollectedAt(val OptInt) { - s.CollectedAt = val -} - -// SetMetricType sets the value of MetricType. -func (s *ApplicationMetric) SetMetricType(val OptString) { - s.MetricType = val -} - -// SetValue sets the value of Value. -func (s *ApplicationMetric) SetValue(val OptInt) { - s.Value = val -} - -// SetUnit sets the value of Unit. -func (s *ApplicationMetric) SetUnit(val OptString) { - s.Unit = val -} - -// Object containing Application Metrics. -// Ref: #/components/schemas/Application_Metrics -type ApplicationMetrics struct { - // Number of history entries found for the given query. - TotalResults OptInt64 `json:"total_results"` - // Number of Pages from the query. - TotalPages OptInt64 `json:"total_pages"` - // Number of the current page. - Page OptInt64 `json:"page"` - PrevURL OptURI `json:"prev_url"` - NextURL OptURI `json:"next_url"` - Resources []ApplicationMetric `json:"resources"` -} - -// GetTotalResults returns the value of TotalResults. -func (s *ApplicationMetrics) GetTotalResults() OptInt64 { - return s.TotalResults -} - -// GetTotalPages returns the value of TotalPages. -func (s *ApplicationMetrics) GetTotalPages() OptInt64 { - return s.TotalPages -} - -// GetPage returns the value of Page. -func (s *ApplicationMetrics) GetPage() OptInt64 { - return s.Page -} - -// GetPrevURL returns the value of PrevURL. -func (s *ApplicationMetrics) GetPrevURL() OptURI { - return s.PrevURL -} - -// GetNextURL returns the value of NextURL. -func (s *ApplicationMetrics) GetNextURL() OptURI { - return s.NextURL -} - -// GetResources returns the value of Resources. -func (s *ApplicationMetrics) GetResources() []ApplicationMetric { - return s.Resources -} - -// SetTotalResults sets the value of TotalResults. -func (s *ApplicationMetrics) SetTotalResults(val OptInt64) { - s.TotalResults = val -} - -// SetTotalPages sets the value of TotalPages. -func (s *ApplicationMetrics) SetTotalPages(val OptInt64) { - s.TotalPages = val -} - -// SetPage sets the value of Page. -func (s *ApplicationMetrics) SetPage(val OptInt64) { - s.Page = val -} - -// SetPrevURL sets the value of PrevURL. -func (s *ApplicationMetrics) SetPrevURL(val OptURI) { - s.PrevURL = val -} - -// SetNextURL sets the value of NextURL. -func (s *ApplicationMetrics) SetNextURL(val OptURI) { - s.NextURL = val -} - -// SetResources sets the value of Resources. -func (s *ApplicationMetrics) SetResources(val []ApplicationMetric) { - s.Resources = val -} - -type BasicAuthentication struct { - Username string - Password string -} - -// GetUsername returns the value of Username. -func (s *BasicAuthentication) GetUsername() string { - return s.Username -} - -// GetPassword returns the value of Password. -func (s *BasicAuthentication) GetPassword() string { - return s.Password -} - -// SetUsername sets the value of Username. -func (s *BasicAuthentication) SetUsername(val string) { - s.Username = val -} - -// SetPassword sets the value of Password. -func (s *BasicAuthentication) SetPassword(val string) { - s.Password = val -} - -// Ref: #/components/schemas/ErrorResponse -type ErrorResponse struct{} - -// ErrorResponseStatusCode wraps ErrorResponse with StatusCode. -type ErrorResponseStatusCode struct { - StatusCode int - Response ErrorResponse -} - -// GetStatusCode returns the value of StatusCode. -func (s *ErrorResponseStatusCode) GetStatusCode() int { - return s.StatusCode -} - -// GetResponse returns the value of Response. -func (s *ErrorResponseStatusCode) GetResponse() ErrorResponse { - return s.Response -} - -// SetStatusCode sets the value of StatusCode. -func (s *ErrorResponseStatusCode) SetStatusCode(val int) { - s.StatusCode = val -} - -// SetResponse sets the value of Response. -func (s *ErrorResponseStatusCode) SetResponse(val ErrorResponse) { - s.Response = val -} - -// NewOptInt returns new OptInt with value set to v. -func NewOptInt(v int) OptInt { - return OptInt{ - Value: v, - Set: true, - } -} - -// OptInt is optional int. -type OptInt struct { - Value int - Set bool -} - -// IsSet returns true if OptInt was set. -func (o OptInt) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptInt) Reset() { - var v int - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptInt) SetTo(v int) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptInt) Get() (v int, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptInt) Or(d int) int { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptInt64 returns new OptInt64 with value set to v. -func NewOptInt64(v int64) OptInt64 { - return OptInt64{ - Value: v, - Set: true, - } -} - -// OptInt64 is optional int64. -type OptInt64 struct { - Value int64 - Set bool -} - -// IsSet returns true if OptInt64 was set. -func (o OptInt64) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptInt64) Reset() { - var v int64 - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptInt64) SetTo(v int64) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptInt64) Get() (v int64, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptInt64) Or(d int64) int64 { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptString returns new OptString with value set to v. -func NewOptString(v string) OptString { - return OptString{ - Value: v, - Set: true, - } -} - -// OptString is optional string. -type OptString struct { - Value string - Set bool -} - -// IsSet returns true if OptString was set. -func (o OptString) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptString) Reset() { - var v string - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptString) SetTo(v string) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptString) Get() (v string, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptString) Or(d string) string { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptURI returns new OptURI with value set to v. -func NewOptURI(v url.URL) OptURI { - return OptURI{ - Value: v, - Set: true, - } -} - -// OptURI is optional url.URL. -type OptURI struct { - Value url.URL - Set bool -} - -// IsSet returns true if OptURI was set. -func (o OptURI) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptURI) Reset() { - var v url.URL - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptURI) SetTo(v url.URL) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptURI) Get() (v url.URL, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptURI) Or(d url.URL) url.URL { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection returns new OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection with value set to v. -func NewOptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection(v V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection { - return OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection{ - Value: v, - Set: true, - } -} - -// OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection is optional V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection. -type OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection struct { - Value V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection - Set bool -} - -// IsSet returns true if OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection was set. -func (o OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) Reset() { - var v V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) SetTo(v V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) Get() (v V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptV1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) Or(d V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection { - if v, ok := o.Get(); ok { - return v - } - return d -} - -type V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection string - -const ( - V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirectionAsc V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection = "asc" - V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirectionDesc V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection = "desc" -) - -// MarshalText implements encoding.TextMarshaler. -func (s V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) MarshalText() ([]byte, error) { - switch s { - case V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirectionAsc: - return []byte(s), nil - case V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirectionDesc: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) UnmarshalText(data []byte) error { - switch V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection(data) { - case V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirectionAsc: - *s = V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirectionAsc - return nil - case V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirectionDesc: - *s = V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirectionDesc - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} diff --git a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_security_gen.go b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_security_gen.go deleted file mode 100644 index 60555f78c7..0000000000 --- a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_security_gen.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "context" - "net/http" - - "github.com/go-faster/errors" -) - -// SecuritySource is provider of security values (tokens, passwords, etc.). -type SecuritySource interface { - // BasicAuthentication provides basicAuthentication security value. - BasicAuthentication(ctx context.Context, operationName string) (BasicAuthentication, error) -} - -func (s *Client) securityBasicAuthentication(ctx context.Context, operationName string, req *http.Request) error { - t, err := s.sec.BasicAuthentication(ctx, operationName) - if err != nil { - return errors.Wrap(err, "security source \"BasicAuthentication\"") - } - req.SetBasicAuth(t.Username, t.Password) - return nil -} diff --git a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_validators_gen.go b/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_validators_gen.go deleted file mode 100644 index ce2d11fd78..0000000000 --- a/src/acceptance/assets/app/go_app/internal/applicationmetric/oas_validators_gen.go +++ /dev/null @@ -1,88 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "fmt" - - "github.com/go-faster/errors" - - "github.com/ogen-go/ogen/validate" -) - -func (s *ApplicationMetric) Validate() error { - var failures []validate.FieldError - if err := func() error { - if s.AppGUID.Set { - if err := func() error { - if err := (validate.String{ - MinLength: 0, - MinLengthSet: false, - MaxLength: 0, - MaxLengthSet: false, - Email: false, - Hostname: false, - Regex: regexMap["(\\d|[a-f]){8}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){12}"], - }).Validate(string(s.AppGUID.Value)); err != nil { - return errors.Wrap(err, "string") - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "app_guid", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s *ApplicationMetrics) Validate() error { - var failures []validate.FieldError - if err := func() error { - var failures []validate.FieldError - for i, elem := range s.Resources { - if err := func() error { - if err := elem.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: fmt.Sprintf("[%d]", i), - Error: err, - }) - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "resources", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} - -func (s V1AppsGUIDAggregatedMetricHistoriesMetricTypeGetOrderDirection) Validate() error { - switch s { - case "asc": - return nil - case "desc": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/api_credentials.go b/src/acceptance/assets/app/go_app/internal/custommetrics/api_credentials.go deleted file mode 100644 index 40fcf9a7b7..0000000000 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/api_credentials.go +++ /dev/null @@ -1,8 +0,0 @@ -package api - -type CustomMetricsCredentials struct { - Username string `mapstructure:"username" json:"username"` - Password string `mapstructure:"password" json:"password"` - URL string `mapstructure:"url" json:"url"` - MtlsURL string `mapstructure:"mtls_url" json:"mtls_url"` -} diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/basic_auth_transport.go b/src/acceptance/assets/app/go_app/internal/custommetrics/basic_auth_transport.go deleted file mode 100644 index 7f1c0a5c47..0000000000 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/basic_auth_transport.go +++ /dev/null @@ -1,32 +0,0 @@ -package api - -import ( - "crypto/tls" - "encoding/base64" - "fmt" - "net/http" -) - -type BasicAuthTransport struct { - Username string - Password string - Transport *http.Transport -} - -func (bat BasicAuthTransport) RoundTrip(req *http.Request) (*http.Response, error) { - req.Header.Set("Authorization", fmt.Sprintf("Basic %s", - base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", - bat.Username, bat.Password))))) - return bat.Transport.RoundTrip(req) -} - -func (bat *BasicAuthTransport) Client() *http.Client { - return &http.Client{Transport: bat} -} - -func NewBasicAuthTransport(credentials CustomMetricsCredentials) *BasicAuthTransport { - tr := &http.Transport{ - TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, - } - return &BasicAuthTransport{credentials.Username, credentials.Password, tr} -} diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_cfg_gen.go b/src/acceptance/assets/app/go_app/internal/custommetrics/oas_cfg_gen.go deleted file mode 100644 index 5b1cedbd7e..0000000000 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_cfg_gen.go +++ /dev/null @@ -1,137 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "net/http" - - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/global" - "go.opentelemetry.io/otel/metric/instrument" - "go.opentelemetry.io/otel/trace" - - ht "github.com/ogen-go/ogen/http" - "github.com/ogen-go/ogen/otelogen" -) - -var ( - // Allocate option closure once. - clientSpanKind = trace.WithSpanKind(trace.SpanKindClient) -) - -type ( - optionFunc[C any] func(*C) - otelOptionFunc func(*otelConfig) -) - -type otelConfig struct { - TracerProvider trace.TracerProvider - Tracer trace.Tracer - MeterProvider metric.MeterProvider - Meter metric.Meter -} - -func (cfg *otelConfig) initOTEL() { - if cfg.TracerProvider == nil { - cfg.TracerProvider = otel.GetTracerProvider() - } - if cfg.MeterProvider == nil { - cfg.MeterProvider = global.MeterProvider() - } - cfg.Tracer = cfg.TracerProvider.Tracer(otelogen.Name, - trace.WithInstrumentationVersion(otelogen.SemVersion()), - ) - cfg.Meter = cfg.MeterProvider.Meter(otelogen.Name) -} - -type clientConfig struct { - otelConfig - Client ht.Client -} - -// ClientOption is client config option. -type ClientOption interface { - applyClient(*clientConfig) -} - -var _ = []ClientOption{ - (optionFunc[clientConfig])(nil), - (otelOptionFunc)(nil), -} - -func (o optionFunc[C]) applyClient(c *C) { - o(c) -} - -func (o otelOptionFunc) applyClient(c *clientConfig) { - o(&c.otelConfig) -} - -func newClientConfig(opts ...ClientOption) clientConfig { - cfg := clientConfig{ - Client: http.DefaultClient, - } - for _, opt := range opts { - opt.applyClient(&cfg) - } - cfg.initOTEL() - return cfg -} - -type baseClient struct { - cfg clientConfig - requests instrument.Int64Counter - errors instrument.Int64Counter - duration instrument.Int64Histogram -} - -func (cfg clientConfig) baseClient() (c baseClient, err error) { - c = baseClient{cfg: cfg} - if c.requests, err = c.cfg.Meter.Int64Counter(otelogen.ClientRequestCount); err != nil { - return c, err - } - if c.errors, err = c.cfg.Meter.Int64Counter(otelogen.ClientErrorsCount); err != nil { - return c, err - } - if c.duration, err = c.cfg.Meter.Int64Histogram(otelogen.ClientDuration); err != nil { - return c, err - } - return c, nil -} - -// Option is config option. -type Option interface { - ClientOption -} - -// WithTracerProvider specifies a tracer provider to use for creating a tracer. -// -// If none is specified, the global provider is used. -func WithTracerProvider(provider trace.TracerProvider) Option { - return otelOptionFunc(func(cfg *otelConfig) { - if provider != nil { - cfg.TracerProvider = provider - } - }) -} - -// WithMeterProvider specifies a meter provider to use for creating a meter. -// -// If none is specified, the global.MeterProvider() is used. -func WithMeterProvider(provider metric.MeterProvider) Option { - return otelOptionFunc(func(cfg *otelConfig) { - if provider != nil { - cfg.MeterProvider = provider - } - }) -} - -// WithClient specifies http client to use. -func WithClient(client ht.Client) ClientOption { - return optionFunc[clientConfig](func(cfg *clientConfig) { - if client != nil { - cfg.Client = client - } - }) -} diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_client_gen.go b/src/acceptance/assets/app/go_app/internal/custommetrics/oas_client_gen.go deleted file mode 100644 index 4a26d7502d..0000000000 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_client_gen.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "context" - "net/url" - "strings" - "time" - - "github.com/go-faster/errors" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/metric" - - "github.com/ogen-go/ogen/conv" - ht "github.com/ogen-go/ogen/http" - "github.com/ogen-go/ogen/uri" -) - -// Client implements OAS client. -type Client struct { - serverURL *url.URL - baseClient -} - -func trimTrailingSlashes(u *url.URL) { - u.Path = strings.TrimRight(u.Path, "/") - u.RawPath = strings.TrimRight(u.RawPath, "/") -} - -// NewClient initializes new Client defined by OAS. -func NewClient(serverURL string, opts ...ClientOption) (*Client, error) { - u, err := url.Parse(serverURL) - if err != nil { - return nil, err - } - trimTrailingSlashes(u) - - c, err := newClientConfig(opts...).baseClient() - if err != nil { - return nil, err - } - return &Client{ - serverURL: u, - baseClient: c, - }, nil -} - -type serverURLKey struct{} - -// WithServerURL sets context key to override server URL. -func WithServerURL(ctx context.Context, u *url.URL) context.Context { - return context.WithValue(ctx, serverURLKey{}, u) -} - -func (c *Client) requestURL(ctx context.Context) *url.URL { - u, ok := ctx.Value(serverURLKey{}).(*url.URL) - if !ok { - return c.serverURL - } - return u -} - -// V1AppsAppGuidMetricsPost invokes POST /v1/apps/{appGuid}/metrics operation. -// -// Use to submit custom metrics to app-autoscaler which are defined and used in a dynamic scaling -// policy to enable automatic scaling based on application-specific metrics. We recommend submitting -// the custom metrics every 40 seconds from every application instance. -// -// POST /v1/apps/{appGuid}/metrics -func (c *Client) V1AppsAppGuidMetricsPost(ctx context.Context, request *Metrics, params V1AppsAppGuidMetricsPostParams) error { - res, err := c.sendV1AppsAppGuidMetricsPost(ctx, request, params) - _ = res - return err -} - -func (c *Client) sendV1AppsAppGuidMetricsPost(ctx context.Context, request *Metrics, params V1AppsAppGuidMetricsPostParams) (res *V1AppsAppGuidMetricsPostOK, err error) { - var otelAttrs []attribute.KeyValue - // Validate request before sending. - if err := func() error { - if err := request.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "validate") - } - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), metric.WithAttributes(otelAttrs...)) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "V1AppsAppGuidMetricsPost", - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [3]string - pathParts[0] = "/v1/apps/" - { - // Encode "appGuid" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "appGuid", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.AppGuid)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/metrics" - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "POST", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - if err := encodeV1AppsAppGuidMetricsPostRequest(request, r); err != nil { - return res, errors.Wrap(err, "encode request") - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeV1AppsAppGuidMetricsPostResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_json_gen.go b/src/acceptance/assets/app/go_app/internal/custommetrics/oas_json_gen.go deleted file mode 100644 index fc186762cd..0000000000 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_json_gen.go +++ /dev/null @@ -1,381 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "math/bits" - "strconv" - - "github.com/go-faster/errors" - "github.com/go-faster/jx" - - "github.com/ogen-go/ogen/validate" -) - -// Encode implements json.Marshaler. -func (s *ErrorResponse) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ErrorResponse) encodeFields(e *jx.Encoder) { - { - if s.Code.Set { - e.FieldStart("code") - s.Code.Encode(e) - } - } - { - if s.Message.Set { - e.FieldStart("message") - s.Message.Encode(e) - } - } -} - -var jsonFieldsNameOfErrorResponse = [2]string{ - 0: "code", - 1: "message", -} - -// Decode decodes ErrorResponse from json. -func (s *ErrorResponse) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ErrorResponse to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "code": - if err := func() error { - s.Code.Reset() - if err := s.Code.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"code\"") - } - case "message": - if err := func() error { - s.Message.Reset() - if err := s.Message.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"message\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ErrorResponse") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ErrorResponse) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ErrorResponse) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *Metric) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *Metric) encodeFields(e *jx.Encoder) { - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("value") - e.Float64(s.Value) - } - { - if s.Unit.Set { - e.FieldStart("unit") - s.Unit.Encode(e) - } - } -} - -var jsonFieldsNameOfMetric = [3]string{ - 0: "name", - 1: "value", - 2: "unit", -} - -// Decode decodes Metric from json. -func (s *Metric) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode Metric to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "name": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "value": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Float64() - s.Value = float64(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"value\"") - } - case "unit": - if err := func() error { - s.Unit.Reset() - if err := s.Unit.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"unit\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode Metric") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfMetric) { - name = jsonFieldsNameOfMetric[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *Metric) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *Metric) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *Metrics) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *Metrics) encodeFields(e *jx.Encoder) { - { - e.FieldStart("instance_index") - e.Int64(s.InstanceIndex) - } - { - e.FieldStart("metrics") - e.ArrStart() - for _, elem := range s.Metrics { - elem.Encode(e) - } - e.ArrEnd() - } -} - -var jsonFieldsNameOfMetrics = [2]string{ - 0: "instance_index", - 1: "metrics", -} - -// Decode decodes Metrics from json. -func (s *Metrics) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode Metrics to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "instance_index": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Int64() - s.InstanceIndex = int64(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"instance_index\"") - } - case "metrics": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - s.Metrics = make([]Metric, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem Metric - if err := elem.Decode(d); err != nil { - return err - } - s.Metrics = append(s.Metrics, elem) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"metrics\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode Metrics") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfMetrics) { - name = jsonFieldsNameOfMetrics[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *Metrics) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *Metrics) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes string as json. -func (o OptString) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Str(string(o.Value)) -} - -// Decode decodes string from json. -func (o *OptString) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptString to nil") - } - o.Set = true - v, err := d.Str() - if err != nil { - return err - } - o.Value = string(v) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptString) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptString) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_parameters_gen.go b/src/acceptance/assets/app/go_app/internal/custommetrics/oas_parameters_gen.go deleted file mode 100644 index 92313d0d1b..0000000000 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_parameters_gen.go +++ /dev/null @@ -1,10 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -// V1AppsAppGuidMetricsPostParams is parameters of POST /v1/apps/{appGuid}/metrics operation. -type V1AppsAppGuidMetricsPostParams struct { - // The GUID identifying the application the custom metrics are submitted for. Can be found in the - // `application_id` property of the JSON object stored in the `VCAP_APPLICATION` environment variable. - AppGuid string -} diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_request_encoders_gen.go b/src/acceptance/assets/app/go_app/internal/custommetrics/oas_request_encoders_gen.go deleted file mode 100644 index b745d9e709..0000000000 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_request_encoders_gen.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "bytes" - "net/http" - - "github.com/go-faster/jx" - - ht "github.com/ogen-go/ogen/http" -) - -func encodeV1AppsAppGuidMetricsPostRequest( - req *Metrics, - r *http.Request, -) error { - const contentType = "application/json" - e := jx.GetEncoder() - { - req.Encode(e) - } - encoded := e.Bytes() - ht.SetBody(r, bytes.NewReader(encoded), contentType) - return nil -} diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_response_decoders_gen.go b/src/acceptance/assets/app/go_app/internal/custommetrics/oas_response_decoders_gen.go deleted file mode 100644 index 01f99f7ad1..0000000000 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_response_decoders_gen.go +++ /dev/null @@ -1,66 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "io" - "mime" - "net/http" - - "github.com/go-faster/errors" - "github.com/go-faster/jx" - - "github.com/ogen-go/ogen/ogenerrors" - "github.com/ogen-go/ogen/validate" -) - -func decodeV1AppsAppGuidMetricsPostResponse(resp *http.Response) (res *V1AppsAppGuidMetricsPostOK, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - return &V1AppsAppGuidMetricsPostOK{}, nil - } - // Convenient error response. - defRes, err := func() (res *ErrorResponseStatusCode, err error) { - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response ErrorResponse - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &ErrorResponseStatusCode{ - StatusCode: resp.StatusCode, - Response: response, - }, nil - default: - return res, validate.InvalidContentType(ct) - } - }() - if err != nil { - return res, errors.Wrapf(err, "default (code %d)", resp.StatusCode) - } - return res, errors.Wrap(defRes, "error") -} diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_schemas_gen.go b/src/acceptance/assets/app/go_app/internal/custommetrics/oas_schemas_gen.go deleted file mode 100644 index f632fe48ed..0000000000 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_schemas_gen.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "fmt" -) - -func (s *ErrorResponseStatusCode) Error() string { - return fmt.Sprintf("code %d: %+v", s.StatusCode, s.Response) -} - -// Ref: #/components/schemas/ErrorResponse -type ErrorResponse struct { - // The textual error code. - Code OptString `json:"code"` - // The message describing the cause of the error. - Message OptString `json:"message"` -} - -// GetCode returns the value of Code. -func (s *ErrorResponse) GetCode() OptString { - return s.Code -} - -// GetMessage returns the value of Message. -func (s *ErrorResponse) GetMessage() OptString { - return s.Message -} - -// SetCode sets the value of Code. -func (s *ErrorResponse) SetCode(val OptString) { - s.Code = val -} - -// SetMessage sets the value of Message. -func (s *ErrorResponse) SetMessage(val OptString) { - s.Message = val -} - -// ErrorResponseStatusCode wraps ErrorResponse with StatusCode. -type ErrorResponseStatusCode struct { - StatusCode int - Response ErrorResponse -} - -// GetStatusCode returns the value of StatusCode. -func (s *ErrorResponseStatusCode) GetStatusCode() int { - return s.StatusCode -} - -// GetResponse returns the value of Response. -func (s *ErrorResponseStatusCode) GetResponse() ErrorResponse { - return s.Response -} - -// SetStatusCode sets the value of StatusCode. -func (s *ErrorResponseStatusCode) SetStatusCode(val int) { - s.StatusCode = val -} - -// SetResponse sets the value of Response. -func (s *ErrorResponseStatusCode) SetResponse(val ErrorResponse) { - s.Response = val -} - -// Ref: #/components/schemas/Metric -type Metric struct { - // The name of the custom metric, must have been defined by using it in the scaling policy for the - // application before submitting. - Name string `json:"name"` - // The value of the custom metric. - Value float64 `json:"value"` - // An optional unit for the metric, for display purposes only. - Unit OptString `json:"unit"` -} - -// GetName returns the value of Name. -func (s *Metric) GetName() string { - return s.Name -} - -// GetValue returns the value of Value. -func (s *Metric) GetValue() float64 { - return s.Value -} - -// GetUnit returns the value of Unit. -func (s *Metric) GetUnit() OptString { - return s.Unit -} - -// SetName sets the value of Name. -func (s *Metric) SetName(val string) { - s.Name = val -} - -// SetValue sets the value of Value. -func (s *Metric) SetValue(val float64) { - s.Value = val -} - -// SetUnit sets the value of Unit. -func (s *Metric) SetUnit(val OptString) { - s.Unit = val -} - -// Ref: #/components/schemas/Metrics -type Metrics struct { - // The index of the application instance the custom metrics are submitted for. Can be found in the - // `CF_INSTANCE_INDEX` environment variable. - InstanceIndex int64 `json:"instance_index"` - // The custom metrics to be submitted. - Metrics []Metric `json:"metrics"` -} - -// GetInstanceIndex returns the value of InstanceIndex. -func (s *Metrics) GetInstanceIndex() int64 { - return s.InstanceIndex -} - -// GetMetrics returns the value of Metrics. -func (s *Metrics) GetMetrics() []Metric { - return s.Metrics -} - -// SetInstanceIndex sets the value of InstanceIndex. -func (s *Metrics) SetInstanceIndex(val int64) { - s.InstanceIndex = val -} - -// SetMetrics sets the value of Metrics. -func (s *Metrics) SetMetrics(val []Metric) { - s.Metrics = val -} - -// NewOptString returns new OptString with value set to v. -func NewOptString(v string) OptString { - return OptString{ - Value: v, - Set: true, - } -} - -// OptString is optional string. -type OptString struct { - Value string - Set bool -} - -// IsSet returns true if OptString was set. -func (o OptString) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptString) Reset() { - var v string - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptString) SetTo(v string) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptString) Get() (v string, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptString) Or(d string) string { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// V1AppsAppGuidMetricsPostOK is response for V1AppsAppGuidMetricsPost operation. -type V1AppsAppGuidMetricsPostOK struct{} diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_validators_gen.go b/src/acceptance/assets/app/go_app/internal/custommetrics/oas_validators_gen.go deleted file mode 100644 index a1adb4b77b..0000000000 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_validators_gen.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "fmt" - - "github.com/go-faster/errors" - - "github.com/ogen-go/ogen/validate" -) - -func (s *Metric) Validate() error { - var failures []validate.FieldError - if err := func() error { - if err := (validate.Float{}).Validate(float64(s.Value)); err != nil { - return errors.Wrap(err, "float") - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "value", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s *Metrics) Validate() error { - var failures []validate.FieldError - if err := func() error { - if s.Metrics == nil { - return errors.New("nil is invalid value") - } - var failures []validate.FieldError - for i, elem := range s.Metrics { - if err := func() error { - if err := elem.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: fmt.Sprintf("[%d]", i), - Error: err, - }) - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "metrics", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} diff --git a/src/acceptance/assets/app/go_app/internal/policy/oas_cfg_gen.go b/src/acceptance/assets/app/go_app/internal/policy/oas_cfg_gen.go deleted file mode 100644 index 2975fe8f63..0000000000 --- a/src/acceptance/assets/app/go_app/internal/policy/oas_cfg_gen.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "net/http" - - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/global" - "go.opentelemetry.io/otel/metric/instrument" - "go.opentelemetry.io/otel/trace" - - ht "github.com/ogen-go/ogen/http" - "github.com/ogen-go/ogen/ogenregex" - "github.com/ogen-go/ogen/otelogen" -) - -var regexMap = map[string]ogenregex.Regexp{ - "(\\d|[a-f]){8}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){12}": ogenregex.MustCompile("(\\d|[a-f]){8}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){12}"), -} -var ( - // Allocate option closure once. - clientSpanKind = trace.WithSpanKind(trace.SpanKindClient) -) - -type ( - optionFunc[C any] func(*C) - otelOptionFunc func(*otelConfig) -) - -type otelConfig struct { - TracerProvider trace.TracerProvider - Tracer trace.Tracer - MeterProvider metric.MeterProvider - Meter metric.Meter -} - -func (cfg *otelConfig) initOTEL() { - if cfg.TracerProvider == nil { - cfg.TracerProvider = otel.GetTracerProvider() - } - if cfg.MeterProvider == nil { - cfg.MeterProvider = global.MeterProvider() - } - cfg.Tracer = cfg.TracerProvider.Tracer(otelogen.Name, - trace.WithInstrumentationVersion(otelogen.SemVersion()), - ) - cfg.Meter = cfg.MeterProvider.Meter(otelogen.Name) -} - -type clientConfig struct { - otelConfig - Client ht.Client -} - -// ClientOption is client config option. -type ClientOption interface { - applyClient(*clientConfig) -} - -var _ = []ClientOption{ - (optionFunc[clientConfig])(nil), - (otelOptionFunc)(nil), -} - -func (o optionFunc[C]) applyClient(c *C) { - o(c) -} - -func (o otelOptionFunc) applyClient(c *clientConfig) { - o(&c.otelConfig) -} - -func newClientConfig(opts ...ClientOption) clientConfig { - cfg := clientConfig{ - Client: http.DefaultClient, - } - for _, opt := range opts { - opt.applyClient(&cfg) - } - cfg.initOTEL() - return cfg -} - -type baseClient struct { - cfg clientConfig - requests instrument.Int64Counter - errors instrument.Int64Counter - duration instrument.Int64Histogram -} - -func (cfg clientConfig) baseClient() (c baseClient, err error) { - c = baseClient{cfg: cfg} - if c.requests, err = c.cfg.Meter.Int64Counter(otelogen.ClientRequestCount); err != nil { - return c, err - } - if c.errors, err = c.cfg.Meter.Int64Counter(otelogen.ClientErrorsCount); err != nil { - return c, err - } - if c.duration, err = c.cfg.Meter.Int64Histogram(otelogen.ClientDuration); err != nil { - return c, err - } - return c, nil -} - -// Option is config option. -type Option interface { - ClientOption -} - -// WithTracerProvider specifies a tracer provider to use for creating a tracer. -// -// If none is specified, the global provider is used. -func WithTracerProvider(provider trace.TracerProvider) Option { - return otelOptionFunc(func(cfg *otelConfig) { - if provider != nil { - cfg.TracerProvider = provider - } - }) -} - -// WithMeterProvider specifies a meter provider to use for creating a meter. -// -// If none is specified, the global.MeterProvider() is used. -func WithMeterProvider(provider metric.MeterProvider) Option { - return otelOptionFunc(func(cfg *otelConfig) { - if provider != nil { - cfg.MeterProvider = provider - } - }) -} - -// WithClient specifies http client to use. -func WithClient(client ht.Client) ClientOption { - return optionFunc[clientConfig](func(cfg *clientConfig) { - if client != nil { - cfg.Client = client - } - }) -} diff --git a/src/acceptance/assets/app/go_app/internal/policy/oas_client_gen.go b/src/acceptance/assets/app/go_app/internal/policy/oas_client_gen.go deleted file mode 100644 index 4515da36c6..0000000000 --- a/src/acceptance/assets/app/go_app/internal/policy/oas_client_gen.go +++ /dev/null @@ -1,426 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "context" - "net/url" - "strings" - "time" - - "github.com/go-faster/errors" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/metric" - - "github.com/ogen-go/ogen/conv" - ht "github.com/ogen-go/ogen/http" - "github.com/ogen-go/ogen/ogenerrors" - "github.com/ogen-go/ogen/uri" -) - -// Client implements OAS client. -type Client struct { - serverURL *url.URL - sec SecuritySource - baseClient -} - -func trimTrailingSlashes(u *url.URL) { - u.Path = strings.TrimRight(u.Path, "/") - u.RawPath = strings.TrimRight(u.RawPath, "/") -} - -// NewClient initializes new Client defined by OAS. -func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error) { - u, err := url.Parse(serverURL) - if err != nil { - return nil, err - } - trimTrailingSlashes(u) - - c, err := newClientConfig(opts...).baseClient() - if err != nil { - return nil, err - } - return &Client{ - serverURL: u, - sec: sec, - baseClient: c, - }, nil -} - -type serverURLKey struct{} - -// WithServerURL sets context key to override server URL. -func WithServerURL(ctx context.Context, u *url.URL) context.Context { - return context.WithValue(ctx, serverURLKey{}, u) -} - -func (c *Client) requestURL(ctx context.Context) *url.URL { - u, ok := ctx.Value(serverURLKey{}).(*url.URL) - if !ok { - return c.serverURL - } - return u -} - -// V1AppsGUIDPolicyDelete invokes DELETE /v1/apps/{guid}/policy operation. -// -// This API is used to delete the policy. -// -// DELETE /v1/apps/{guid}/policy -func (c *Client) V1AppsGUIDPolicyDelete(ctx context.Context, params V1AppsGUIDPolicyDeleteParams) (*Policy, error) { - res, err := c.sendV1AppsGUIDPolicyDelete(ctx, params) - _ = res - return res, err -} - -func (c *Client) sendV1AppsGUIDPolicyDelete(ctx context.Context, params V1AppsGUIDPolicyDeleteParams) (res *Policy, err error) { - var otelAttrs []attribute.KeyValue - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), metric.WithAttributes(otelAttrs...)) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "V1AppsGUIDPolicyDelete", - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [3]string - pathParts[0] = "/v1/apps/" - { - // Encode "guid" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "guid", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.GUID)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/policy" - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "DELETE", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:BasicAuthentication" - switch err := c.securityBasicAuthentication(ctx, "V1AppsGUIDPolicyDelete", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"BasicAuthentication\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, errors.New("no security requirement satisfied") - } - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeV1AppsGUIDPolicyDeleteResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} - -// V1AppsGUIDPolicyGet invokes GET /v1/apps/{guid}/policy operation. -// -// This API is used to retrieve the policy. -// -// GET /v1/apps/{guid}/policy -func (c *Client) V1AppsGUIDPolicyGet(ctx context.Context, params V1AppsGUIDPolicyGetParams) (*Policy, error) { - res, err := c.sendV1AppsGUIDPolicyGet(ctx, params) - _ = res - return res, err -} - -func (c *Client) sendV1AppsGUIDPolicyGet(ctx context.Context, params V1AppsGUIDPolicyGetParams) (res *Policy, err error) { - var otelAttrs []attribute.KeyValue - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), metric.WithAttributes(otelAttrs...)) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "V1AppsGUIDPolicyGet", - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [3]string - pathParts[0] = "/v1/apps/" - { - // Encode "guid" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "guid", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.GUID)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/policy" - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "GET", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:BasicAuthentication" - switch err := c.securityBasicAuthentication(ctx, "V1AppsGUIDPolicyGet", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"BasicAuthentication\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, errors.New("no security requirement satisfied") - } - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeV1AppsGUIDPolicyGetResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} - -// V1AppsGUIDPolicyPut invokes PUT /v1/apps/{guid}/policy operation. -// -// This API is used to create the policy. -// -// PUT /v1/apps/{guid}/policy -func (c *Client) V1AppsGUIDPolicyPut(ctx context.Context, request OptPolicy, params V1AppsGUIDPolicyPutParams) (*Policy, error) { - res, err := c.sendV1AppsGUIDPolicyPut(ctx, request, params) - _ = res - return res, err -} - -func (c *Client) sendV1AppsGUIDPolicyPut(ctx context.Context, request OptPolicy, params V1AppsGUIDPolicyPutParams) (res *Policy, err error) { - var otelAttrs []attribute.KeyValue - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), metric.WithAttributes(otelAttrs...)) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "V1AppsGUIDPolicyPut", - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [3]string - pathParts[0] = "/v1/apps/" - { - // Encode "guid" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "guid", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.GUID)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/policy" - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "PUT", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - if err := encodeV1AppsGUIDPolicyPutRequest(request, r); err != nil { - return res, errors.Wrap(err, "encode request") - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:BasicAuthentication" - switch err := c.securityBasicAuthentication(ctx, "V1AppsGUIDPolicyPut", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"BasicAuthentication\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, errors.New("no security requirement satisfied") - } - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeV1AppsGUIDPolicyPutResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} diff --git a/src/acceptance/assets/app/go_app/internal/policy/oas_json_gen.go b/src/acceptance/assets/app/go_app/internal/policy/oas_json_gen.go deleted file mode 100644 index 88c0703e2a..0000000000 --- a/src/acceptance/assets/app/go_app/internal/policy/oas_json_gen.go +++ /dev/null @@ -1,271 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "github.com/go-faster/errors" - "github.com/go-faster/jx" -) - -// Encode implements json.Marshaler. -func (s *ErrorResponse) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ErrorResponse) encodeFields(e *jx.Encoder) { -} - -var jsonFieldsNameOfErrorResponse = [0]string{} - -// Decode decodes ErrorResponse from json. -func (s *ErrorResponse) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ErrorResponse to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ErrorResponse") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ErrorResponse) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ErrorResponse) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes int64 as json. -func (o OptInt64) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Int64(int64(o.Value)) -} - -// Decode decodes int64 from json. -func (o *OptInt64) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptInt64 to nil") - } - o.Set = true - v, err := d.Int64() - if err != nil { - return err - } - o.Value = int64(v) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptInt64) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptInt64) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes Policy as json. -func (o OptPolicy) Encode(e *jx.Encoder) { - if !o.Set { - return - } - o.Value.Encode(e) -} - -// Decode decodes Policy from json. -func (o *OptPolicy) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptPolicy to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptPolicy) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptPolicy) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *Policy) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *Policy) encodeFields(e *jx.Encoder) { - { - if s.InstanceMinCount.Set { - e.FieldStart("instance_min_count") - s.InstanceMinCount.Encode(e) - } - } - { - if s.InstanceMaxCount.Set { - e.FieldStart("instance_max_count") - s.InstanceMaxCount.Encode(e) - } - } - { - if s.ScalingRules != nil { - e.FieldStart("scaling_rules") - e.ArrStart() - for _, elem := range s.ScalingRules { - elem.Encode(e) - } - e.ArrEnd() - } - } -} - -var jsonFieldsNameOfPolicy = [3]string{ - 0: "instance_min_count", - 1: "instance_max_count", - 2: "scaling_rules", -} - -// Decode decodes Policy from json. -func (s *Policy) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode Policy to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "instance_min_count": - if err := func() error { - s.InstanceMinCount.Reset() - if err := s.InstanceMinCount.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"instance_min_count\"") - } - case "instance_max_count": - if err := func() error { - s.InstanceMaxCount.Reset() - if err := s.InstanceMaxCount.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"instance_max_count\"") - } - case "scaling_rules": - if err := func() error { - s.ScalingRules = make([]ScalingRule, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem ScalingRule - if err := elem.Decode(d); err != nil { - return err - } - s.ScalingRules = append(s.ScalingRules, elem) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"scaling_rules\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode Policy") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *Policy) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *Policy) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes ScalingRule as json. -func (s ScalingRule) Encode(e *jx.Encoder) { - unwrapped := jx.Raw(s) - - if len(unwrapped) != 0 { - e.Raw(unwrapped) - } -} - -// Decode decodes ScalingRule from json. -func (s *ScalingRule) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ScalingRule to nil") - } - var unwrapped jx.Raw - if err := func() error { - v, err := d.RawAppend(nil) - unwrapped = jx.Raw(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "alias") - } - *s = ScalingRule(unwrapped) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s ScalingRule) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ScalingRule) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} diff --git a/src/acceptance/assets/app/go_app/internal/policy/oas_parameters_gen.go b/src/acceptance/assets/app/go_app/internal/policy/oas_parameters_gen.go deleted file mode 100644 index 709b44bd20..0000000000 --- a/src/acceptance/assets/app/go_app/internal/policy/oas_parameters_gen.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -// V1AppsGUIDPolicyDeleteParams is parameters of DELETE /v1/apps/{guid}/policy operation. -type V1AppsGUIDPolicyDeleteParams struct { - // The GUID identifying the application for which the scaling history is fetched. - // It can be found in the `application_id` property of the JSON object stored in the - // `VCAP_APPLICATION` environment variable. - GUID string -} - -// V1AppsGUIDPolicyGetParams is parameters of GET /v1/apps/{guid}/policy operation. -type V1AppsGUIDPolicyGetParams struct { - // The GUID identifying the application for which the scaling history is fetched. - // It can be found in the `application_id` property of the JSON object stored in the - // `VCAP_APPLICATION` environment variable. - GUID string -} - -// V1AppsGUIDPolicyPutParams is parameters of PUT /v1/apps/{guid}/policy operation. -type V1AppsGUIDPolicyPutParams struct { - // The GUID identifying the application for which the scaling history is fetched. - // It can be found in the `application_id` property of the JSON object stored in the - // `VCAP_APPLICATION` environment variable. - GUID string -} diff --git a/src/acceptance/assets/app/go_app/internal/policy/oas_request_encoders_gen.go b/src/acceptance/assets/app/go_app/internal/policy/oas_request_encoders_gen.go deleted file mode 100644 index 130ae49b28..0000000000 --- a/src/acceptance/assets/app/go_app/internal/policy/oas_request_encoders_gen.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "bytes" - "net/http" - - "github.com/go-faster/jx" - - ht "github.com/ogen-go/ogen/http" -) - -func encodeV1AppsGUIDPolicyPutRequest( - req OptPolicy, - r *http.Request, -) error { - const contentType = "application/json" - if !req.Set { - // Keep request with empty body if value is not set. - return nil - } - e := jx.GetEncoder() - { - if req.Set { - req.Encode(e) - } - } - encoded := e.Bytes() - ht.SetBody(r, bytes.NewReader(encoded), contentType) - return nil -} diff --git a/src/acceptance/assets/app/go_app/internal/policy/oas_response_decoders_gen.go b/src/acceptance/assets/app/go_app/internal/policy/oas_response_decoders_gen.go deleted file mode 100644 index 89bd97ab0c..0000000000 --- a/src/acceptance/assets/app/go_app/internal/policy/oas_response_decoders_gen.go +++ /dev/null @@ -1,264 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "io" - "mime" - "net/http" - - "github.com/go-faster/errors" - "github.com/go-faster/jx" - - "github.com/ogen-go/ogen/ogenerrors" - "github.com/ogen-go/ogen/validate" -) - -func decodeV1AppsGUIDPolicyDeleteResponse(resp *http.Response) (res *Policy, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response Policy - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - // Convenient error response. - defRes, err := func() (res *ErrorResponseStatusCode, err error) { - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response ErrorResponse - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &ErrorResponseStatusCode{ - StatusCode: resp.StatusCode, - Response: response, - }, nil - default: - return res, validate.InvalidContentType(ct) - } - }() - if err != nil { - return res, errors.Wrapf(err, "default (code %d)", resp.StatusCode) - } - return res, errors.Wrap(defRes, "error") -} - -func decodeV1AppsGUIDPolicyGetResponse(resp *http.Response) (res *Policy, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response Policy - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - // Convenient error response. - defRes, err := func() (res *ErrorResponseStatusCode, err error) { - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response ErrorResponse - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &ErrorResponseStatusCode{ - StatusCode: resp.StatusCode, - Response: response, - }, nil - default: - return res, validate.InvalidContentType(ct) - } - }() - if err != nil { - return res, errors.Wrapf(err, "default (code %d)", resp.StatusCode) - } - return res, errors.Wrap(defRes, "error") -} - -func decodeV1AppsGUIDPolicyPutResponse(resp *http.Response) (res *Policy, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response Policy - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - // Convenient error response. - defRes, err := func() (res *ErrorResponseStatusCode, err error) { - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response ErrorResponse - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &ErrorResponseStatusCode{ - StatusCode: resp.StatusCode, - Response: response, - }, nil - default: - return res, validate.InvalidContentType(ct) - } - }() - if err != nil { - return res, errors.Wrapf(err, "default (code %d)", resp.StatusCode) - } - return res, errors.Wrap(defRes, "error") -} diff --git a/src/acceptance/assets/app/go_app/internal/policy/oas_schemas_gen.go b/src/acceptance/assets/app/go_app/internal/policy/oas_schemas_gen.go deleted file mode 100644 index 29f8306c86..0000000000 --- a/src/acceptance/assets/app/go_app/internal/policy/oas_schemas_gen.go +++ /dev/null @@ -1,201 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "fmt" - - "github.com/go-faster/jx" -) - -func (s *ErrorResponseStatusCode) Error() string { - return fmt.Sprintf("code %d: %+v", s.StatusCode, s.Response) -} - -type BasicAuthentication struct { - Username string - Password string -} - -// GetUsername returns the value of Username. -func (s *BasicAuthentication) GetUsername() string { - return s.Username -} - -// GetPassword returns the value of Password. -func (s *BasicAuthentication) GetPassword() string { - return s.Password -} - -// SetUsername sets the value of Username. -func (s *BasicAuthentication) SetUsername(val string) { - s.Username = val -} - -// SetPassword sets the value of Password. -func (s *BasicAuthentication) SetPassword(val string) { - s.Password = val -} - -// Ref: #/components/schemas/ErrorResponse -type ErrorResponse struct{} - -// ErrorResponseStatusCode wraps ErrorResponse with StatusCode. -type ErrorResponseStatusCode struct { - StatusCode int - Response ErrorResponse -} - -// GetStatusCode returns the value of StatusCode. -func (s *ErrorResponseStatusCode) GetStatusCode() int { - return s.StatusCode -} - -// GetResponse returns the value of Response. -func (s *ErrorResponseStatusCode) GetResponse() ErrorResponse { - return s.Response -} - -// SetStatusCode sets the value of StatusCode. -func (s *ErrorResponseStatusCode) SetStatusCode(val int) { - s.StatusCode = val -} - -// SetResponse sets the value of Response. -func (s *ErrorResponseStatusCode) SetResponse(val ErrorResponse) { - s.Response = val -} - -// NewOptInt64 returns new OptInt64 with value set to v. -func NewOptInt64(v int64) OptInt64 { - return OptInt64{ - Value: v, - Set: true, - } -} - -// OptInt64 is optional int64. -type OptInt64 struct { - Value int64 - Set bool -} - -// IsSet returns true if OptInt64 was set. -func (o OptInt64) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptInt64) Reset() { - var v int64 - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptInt64) SetTo(v int64) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptInt64) Get() (v int64, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptInt64) Or(d int64) int64 { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptPolicy returns new OptPolicy with value set to v. -func NewOptPolicy(v Policy) OptPolicy { - return OptPolicy{ - Value: v, - Set: true, - } -} - -// OptPolicy is optional Policy. -type OptPolicy struct { - Value Policy - Set bool -} - -// IsSet returns true if OptPolicy was set. -func (o OptPolicy) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptPolicy) Reset() { - var v Policy - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptPolicy) SetTo(v Policy) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptPolicy) Get() (v Policy, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptPolicy) Or(d Policy) Policy { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// Object creating Policy. -// Ref: #/components/schemas/Policy -type Policy struct { - // Minimal number of instance count. - InstanceMinCount OptInt64 `json:"instance_min_count"` - // Maximal number of instance count. - InstanceMaxCount OptInt64 `json:"instance_max_count"` - ScalingRules []ScalingRule `json:"scaling_rules"` -} - -// GetInstanceMinCount returns the value of InstanceMinCount. -func (s *Policy) GetInstanceMinCount() OptInt64 { - return s.InstanceMinCount -} - -// GetInstanceMaxCount returns the value of InstanceMaxCount. -func (s *Policy) GetInstanceMaxCount() OptInt64 { - return s.InstanceMaxCount -} - -// GetScalingRules returns the value of ScalingRules. -func (s *Policy) GetScalingRules() []ScalingRule { - return s.ScalingRules -} - -// SetInstanceMinCount sets the value of InstanceMinCount. -func (s *Policy) SetInstanceMinCount(val OptInt64) { - s.InstanceMinCount = val -} - -// SetInstanceMaxCount sets the value of InstanceMaxCount. -func (s *Policy) SetInstanceMaxCount(val OptInt64) { - s.InstanceMaxCount = val -} - -// SetScalingRules sets the value of ScalingRules. -func (s *Policy) SetScalingRules(val []ScalingRule) { - s.ScalingRules = val -} - -type ScalingRule jx.Raw diff --git a/src/acceptance/assets/app/go_app/internal/policy/oas_security_gen.go b/src/acceptance/assets/app/go_app/internal/policy/oas_security_gen.go deleted file mode 100644 index 60555f78c7..0000000000 --- a/src/acceptance/assets/app/go_app/internal/policy/oas_security_gen.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "context" - "net/http" - - "github.com/go-faster/errors" -) - -// SecuritySource is provider of security values (tokens, passwords, etc.). -type SecuritySource interface { - // BasicAuthentication provides basicAuthentication security value. - BasicAuthentication(ctx context.Context, operationName string) (BasicAuthentication, error) -} - -func (s *Client) securityBasicAuthentication(ctx context.Context, operationName string, req *http.Request) error { - t, err := s.sec.BasicAuthentication(ctx, operationName) - if err != nil { - return errors.Wrap(err, "security source \"BasicAuthentication\"") - } - req.SetBasicAuth(t.Username, t.Password) - return nil -} diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_cfg_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_cfg_gen.go deleted file mode 100644 index 2975fe8f63..0000000000 --- a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_cfg_gen.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "net/http" - - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/global" - "go.opentelemetry.io/otel/metric/instrument" - "go.opentelemetry.io/otel/trace" - - ht "github.com/ogen-go/ogen/http" - "github.com/ogen-go/ogen/ogenregex" - "github.com/ogen-go/ogen/otelogen" -) - -var regexMap = map[string]ogenregex.Regexp{ - "(\\d|[a-f]){8}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){12}": ogenregex.MustCompile("(\\d|[a-f]){8}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){12}"), -} -var ( - // Allocate option closure once. - clientSpanKind = trace.WithSpanKind(trace.SpanKindClient) -) - -type ( - optionFunc[C any] func(*C) - otelOptionFunc func(*otelConfig) -) - -type otelConfig struct { - TracerProvider trace.TracerProvider - Tracer trace.Tracer - MeterProvider metric.MeterProvider - Meter metric.Meter -} - -func (cfg *otelConfig) initOTEL() { - if cfg.TracerProvider == nil { - cfg.TracerProvider = otel.GetTracerProvider() - } - if cfg.MeterProvider == nil { - cfg.MeterProvider = global.MeterProvider() - } - cfg.Tracer = cfg.TracerProvider.Tracer(otelogen.Name, - trace.WithInstrumentationVersion(otelogen.SemVersion()), - ) - cfg.Meter = cfg.MeterProvider.Meter(otelogen.Name) -} - -type clientConfig struct { - otelConfig - Client ht.Client -} - -// ClientOption is client config option. -type ClientOption interface { - applyClient(*clientConfig) -} - -var _ = []ClientOption{ - (optionFunc[clientConfig])(nil), - (otelOptionFunc)(nil), -} - -func (o optionFunc[C]) applyClient(c *C) { - o(c) -} - -func (o otelOptionFunc) applyClient(c *clientConfig) { - o(&c.otelConfig) -} - -func newClientConfig(opts ...ClientOption) clientConfig { - cfg := clientConfig{ - Client: http.DefaultClient, - } - for _, opt := range opts { - opt.applyClient(&cfg) - } - cfg.initOTEL() - return cfg -} - -type baseClient struct { - cfg clientConfig - requests instrument.Int64Counter - errors instrument.Int64Counter - duration instrument.Int64Histogram -} - -func (cfg clientConfig) baseClient() (c baseClient, err error) { - c = baseClient{cfg: cfg} - if c.requests, err = c.cfg.Meter.Int64Counter(otelogen.ClientRequestCount); err != nil { - return c, err - } - if c.errors, err = c.cfg.Meter.Int64Counter(otelogen.ClientErrorsCount); err != nil { - return c, err - } - if c.duration, err = c.cfg.Meter.Int64Histogram(otelogen.ClientDuration); err != nil { - return c, err - } - return c, nil -} - -// Option is config option. -type Option interface { - ClientOption -} - -// WithTracerProvider specifies a tracer provider to use for creating a tracer. -// -// If none is specified, the global provider is used. -func WithTracerProvider(provider trace.TracerProvider) Option { - return otelOptionFunc(func(cfg *otelConfig) { - if provider != nil { - cfg.TracerProvider = provider - } - }) -} - -// WithMeterProvider specifies a meter provider to use for creating a meter. -// -// If none is specified, the global.MeterProvider() is used. -func WithMeterProvider(provider metric.MeterProvider) Option { - return otelOptionFunc(func(cfg *otelConfig) { - if provider != nil { - cfg.MeterProvider = provider - } - }) -} - -// WithClient specifies http client to use. -func WithClient(client ht.Client) ClientOption { - return optionFunc[clientConfig](func(cfg *clientConfig) { - if client != nil { - cfg.Client = client - } - }) -} diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_client_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_client_gen.go deleted file mode 100644 index 9a18d32e60..0000000000 --- a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_client_gen.go +++ /dev/null @@ -1,274 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "context" - "net/url" - "strings" - "time" - - "github.com/go-faster/errors" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/metric" - - "github.com/ogen-go/ogen/conv" - ht "github.com/ogen-go/ogen/http" - "github.com/ogen-go/ogen/ogenerrors" - "github.com/ogen-go/ogen/uri" -) - -// Client implements OAS client. -type Client struct { - serverURL *url.URL - sec SecuritySource - baseClient -} - -func trimTrailingSlashes(u *url.URL) { - u.Path = strings.TrimRight(u.Path, "/") - u.RawPath = strings.TrimRight(u.RawPath, "/") -} - -// NewClient initializes new Client defined by OAS. -func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error) { - u, err := url.Parse(serverURL) - if err != nil { - return nil, err - } - trimTrailingSlashes(u) - - c, err := newClientConfig(opts...).baseClient() - if err != nil { - return nil, err - } - return &Client{ - serverURL: u, - sec: sec, - baseClient: c, - }, nil -} - -type serverURLKey struct{} - -// WithServerURL sets context key to override server URL. -func WithServerURL(ctx context.Context, u *url.URL) context.Context { - return context.WithValue(ctx, serverURLKey{}, u) -} - -func (c *Client) requestURL(ctx context.Context) *url.URL { - u, ok := ctx.Value(serverURLKey{}).(*url.URL) - if !ok { - return c.serverURL - } - return u -} - -// V1AppsGUIDScalingHistoriesGet invokes GET /v1/apps/{guid}/scaling_histories operation. -// -// Use to retrieve scaling history for an app. -// -// GET /v1/apps/{guid}/scaling_histories -func (c *Client) V1AppsGUIDScalingHistoriesGet(ctx context.Context, params V1AppsGUIDScalingHistoriesGetParams) (*History, error) { - res, err := c.sendV1AppsGUIDScalingHistoriesGet(ctx, params) - _ = res - return res, err -} - -func (c *Client) sendV1AppsGUIDScalingHistoriesGet(ctx context.Context, params V1AppsGUIDScalingHistoriesGetParams) (res *History, err error) { - var otelAttrs []attribute.KeyValue - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), metric.WithAttributes(otelAttrs...)) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "V1AppsGUIDScalingHistoriesGet", - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [3]string - pathParts[0] = "/v1/apps/" - { - // Encode "guid" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "guid", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.GUID)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/scaling_histories" - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeQueryParams" - q := uri.NewQueryEncoder() - { - // Encode "start-time" parameter. - cfg := uri.QueryParameterEncodingConfig{ - Name: "start-time", - Style: uri.QueryStyleForm, - Explode: true, - } - - if err := q.EncodeParam(cfg, func(e uri.Encoder) error { - if val, ok := params.StartTime.Get(); ok { - return e.EncodeValue(conv.IntToString(val)) - } - return nil - }); err != nil { - return res, errors.Wrap(err, "encode query") - } - } - { - // Encode "end-time" parameter. - cfg := uri.QueryParameterEncodingConfig{ - Name: "end-time", - Style: uri.QueryStyleForm, - Explode: true, - } - - if err := q.EncodeParam(cfg, func(e uri.Encoder) error { - if val, ok := params.EndTime.Get(); ok { - return e.EncodeValue(conv.IntToString(val)) - } - return nil - }); err != nil { - return res, errors.Wrap(err, "encode query") - } - } - { - // Encode "order-direction" parameter. - cfg := uri.QueryParameterEncodingConfig{ - Name: "order-direction", - Style: uri.QueryStyleForm, - Explode: true, - } - - if err := q.EncodeParam(cfg, func(e uri.Encoder) error { - if val, ok := params.OrderDirection.Get(); ok { - return e.EncodeValue(conv.StringToString(string(val))) - } - return nil - }); err != nil { - return res, errors.Wrap(err, "encode query") - } - } - { - // Encode "page" parameter. - cfg := uri.QueryParameterEncodingConfig{ - Name: "page", - Style: uri.QueryStyleForm, - Explode: true, - } - - if err := q.EncodeParam(cfg, func(e uri.Encoder) error { - if val, ok := params.Page.Get(); ok { - return e.EncodeValue(conv.IntToString(val)) - } - return nil - }); err != nil { - return res, errors.Wrap(err, "encode query") - } - } - { - // Encode "results-per-page" parameter. - cfg := uri.QueryParameterEncodingConfig{ - Name: "results-per-page", - Style: uri.QueryStyleForm, - Explode: true, - } - - if err := q.EncodeParam(cfg, func(e uri.Encoder) error { - if val, ok := params.ResultsPerPage.Get(); ok { - return e.EncodeValue(conv.IntToString(val)) - } - return nil - }); err != nil { - return res, errors.Wrap(err, "encode query") - } - } - u.RawQuery = q.Values().Encode() - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "GET", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - - { - type bitset = [1]uint8 - var satisfied bitset - { - stage = "Security:BasicAuthentication" - switch err := c.securityBasicAuthentication(ctx, "V1AppsGUIDScalingHistoriesGet", r); { - case err == nil: // if NO error - satisfied[0] |= 1 << 0 - case errors.Is(err, ogenerrors.ErrSkipClientSecurity): - // Skip this security. - default: - return res, errors.Wrap(err, "security \"BasicAuthentication\"") - } - } - - if ok := func() bool { - nextRequirement: - for _, requirement := range []bitset{ - {0b00000001}, - } { - for i, mask := range requirement { - if satisfied[i]&mask != mask { - continue nextRequirement - } - } - return true - } - return false - }(); !ok { - return res, errors.New("no security requirement satisfied") - } - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeV1AppsGUIDScalingHistoriesGetResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_json_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_json_gen.go deleted file mode 100644 index 18330a1e06..0000000000 --- a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_json_gen.go +++ /dev/null @@ -1,649 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "github.com/go-faster/errors" - "github.com/go-faster/jx" - - "github.com/ogen-go/ogen/json" -) - -// Encode implements json.Marshaler. -func (s *ErrorResponse) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ErrorResponse) encodeFields(e *jx.Encoder) { -} - -var jsonFieldsNameOfErrorResponse = [0]string{} - -// Decode decodes ErrorResponse from json. -func (s *ErrorResponse) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ErrorResponse to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ErrorResponse") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ErrorResponse) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ErrorResponse) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *History) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *History) encodeFields(e *jx.Encoder) { - { - if s.TotalResults.Set { - e.FieldStart("total_results") - s.TotalResults.Encode(e) - } - } - { - if s.TotalPages.Set { - e.FieldStart("total_pages") - s.TotalPages.Encode(e) - } - } - { - if s.Page.Set { - e.FieldStart("page") - s.Page.Encode(e) - } - } - { - if s.PrevURL.Set { - e.FieldStart("prev_url") - s.PrevURL.Encode(e) - } - } - { - if s.NextURL.Set { - e.FieldStart("next_url") - s.NextURL.Encode(e) - } - } - { - if s.Resources != nil { - e.FieldStart("resources") - e.ArrStart() - for _, elem := range s.Resources { - elem.Encode(e) - } - e.ArrEnd() - } - } -} - -var jsonFieldsNameOfHistory = [6]string{ - 0: "total_results", - 1: "total_pages", - 2: "page", - 3: "prev_url", - 4: "next_url", - 5: "resources", -} - -// Decode decodes History from json. -func (s *History) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode History to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "total_results": - if err := func() error { - s.TotalResults.Reset() - if err := s.TotalResults.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"total_results\"") - } - case "total_pages": - if err := func() error { - s.TotalPages.Reset() - if err := s.TotalPages.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"total_pages\"") - } - case "page": - if err := func() error { - s.Page.Reset() - if err := s.Page.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"page\"") - } - case "prev_url": - if err := func() error { - s.PrevURL.Reset() - if err := s.PrevURL.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"prev_url\"") - } - case "next_url": - if err := func() error { - s.NextURL.Reset() - if err := s.NextURL.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"next_url\"") - } - case "resources": - if err := func() error { - s.Resources = make([]HistoryEntry, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem HistoryEntry - if err := elem.Decode(d); err != nil { - return err - } - s.Resources = append(s.Resources, elem) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"resources\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode History") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *History) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *History) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *HistoryEntry) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *HistoryEntry) encodeFields(e *jx.Encoder) { - { - if s.Status.Set { - e.FieldStart("status") - s.Status.Encode(e) - } - } - { - if s.AppGUID.Set { - e.FieldStart("app_guid") - s.AppGUID.Encode(e) - } - } - { - if s.Timestamp.Set { - e.FieldStart("timestamp") - s.Timestamp.Encode(e) - } - } - { - if s.ScalingType.Set { - e.FieldStart("scaling_type") - s.ScalingType.Encode(e) - } - } - { - if s.OldInstances.Set { - e.FieldStart("old_instances") - s.OldInstances.Encode(e) - } - } - { - if s.NewInstances.Set { - e.FieldStart("new_instances") - s.NewInstances.Encode(e) - } - } - { - if s.Reason.Set { - e.FieldStart("reason") - s.Reason.Encode(e) - } - } -} - -var jsonFieldsNameOfHistoryEntry = [7]string{ - 0: "status", - 1: "app_guid", - 2: "timestamp", - 3: "scaling_type", - 4: "old_instances", - 5: "new_instances", - 6: "reason", -} - -// Decode decodes HistoryEntry from json. -func (s *HistoryEntry) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode HistoryEntry to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "status": - if err := func() error { - s.Status.Reset() - if err := s.Status.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"status\"") - } - case "app_guid": - if err := func() error { - s.AppGUID.Reset() - if err := s.AppGUID.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"app_guid\"") - } - case "timestamp": - if err := func() error { - s.Timestamp.Reset() - if err := s.Timestamp.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"timestamp\"") - } - case "scaling_type": - if err := func() error { - s.ScalingType.Reset() - if err := s.ScalingType.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"scaling_type\"") - } - case "old_instances": - if err := func() error { - s.OldInstances.Reset() - if err := s.OldInstances.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"old_instances\"") - } - case "new_instances": - if err := func() error { - s.NewInstances.Reset() - if err := s.NewInstances.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"new_instances\"") - } - case "reason": - if err := func() error { - s.Reason.Reset() - if err := s.Reason.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"reason\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode HistoryEntry") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *HistoryEntry) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *HistoryEntry) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes HistoryEntryScalingType as json. -func (s HistoryEntryScalingType) Encode(e *jx.Encoder) { - e.Int64(int64(s)) -} - -// Decode decodes HistoryEntryScalingType from json. -func (s *HistoryEntryScalingType) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode HistoryEntryScalingType to nil") - } - v, err := d.Int64() - if err != nil { - return err - } - *s = HistoryEntryScalingType(v) - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s HistoryEntryScalingType) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *HistoryEntryScalingType) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes HistoryEntryStatus as json. -func (s HistoryEntryStatus) Encode(e *jx.Encoder) { - e.Int64(int64(s)) -} - -// Decode decodes HistoryEntryStatus from json. -func (s *HistoryEntryStatus) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode HistoryEntryStatus to nil") - } - v, err := d.Int64() - if err != nil { - return err - } - *s = HistoryEntryStatus(v) - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s HistoryEntryStatus) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *HistoryEntryStatus) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes HistoryEntryScalingType as json. -func (o OptHistoryEntryScalingType) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Int64(int64(o.Value)) -} - -// Decode decodes HistoryEntryScalingType from json. -func (o *OptHistoryEntryScalingType) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptHistoryEntryScalingType to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptHistoryEntryScalingType) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptHistoryEntryScalingType) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes HistoryEntryStatus as json. -func (o OptHistoryEntryStatus) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Int64(int64(o.Value)) -} - -// Decode decodes HistoryEntryStatus from json. -func (o *OptHistoryEntryStatus) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptHistoryEntryStatus to nil") - } - o.Set = true - if err := o.Value.Decode(d); err != nil { - return err - } - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptHistoryEntryStatus) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptHistoryEntryStatus) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes int as json. -func (o OptInt) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Int(int(o.Value)) -} - -// Decode decodes int from json. -func (o *OptInt) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptInt to nil") - } - o.Set = true - v, err := d.Int() - if err != nil { - return err - } - o.Value = int(v) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptInt) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptInt) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes int64 as json. -func (o OptInt64) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Int64(int64(o.Value)) -} - -// Decode decodes int64 from json. -func (o *OptInt64) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptInt64 to nil") - } - o.Set = true - v, err := d.Int64() - if err != nil { - return err - } - o.Value = int64(v) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptInt64) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptInt64) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes string as json. -func (o OptString) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Str(string(o.Value)) -} - -// Decode decodes string from json. -func (o *OptString) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptString to nil") - } - o.Set = true - v, err := d.Str() - if err != nil { - return err - } - o.Value = string(v) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptString) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptString) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes url.URL as json. -func (o OptURI) Encode(e *jx.Encoder) { - if !o.Set { - return - } - json.EncodeURI(e, o.Value) -} - -// Decode decodes url.URL from json. -func (o *OptURI) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptURI to nil") - } - o.Set = true - v, err := json.DecodeURI(d) - if err != nil { - return err - } - o.Value = v - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptURI) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptURI) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_parameters_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_parameters_gen.go deleted file mode 100644 index 4794cb5fb4..0000000000 --- a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_parameters_gen.go +++ /dev/null @@ -1,21 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -// V1AppsGUIDScalingHistoriesGetParams is parameters of GET /v1/apps/{guid}/scaling_histories operation. -type V1AppsGUIDScalingHistoriesGetParams struct { - // The GUID identifying the application for which the scaling history is fetched. - // It can be found in the `application_id` property of the JSON object stored in the - // `VCAP_APPLICATION` environment variable. - GUID string - // The start time in the number of nanoseconds elapsed since January 1, 1970 UTC. - StartTime OptInt - // The end time in the number of nanoseconds elapsed since January 1, 1970 UTC. - EndTime OptInt - // The sorting order. The scaling history will be order by timestamp ascending or descending. - OrderDirection OptV1AppsGUIDScalingHistoriesGetOrderDirection - // The page number to query. - Page OptInt - // Number of entries shown per page. - ResultsPerPage OptInt -} diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_request_encoders_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_request_encoders_gen.go deleted file mode 100644 index ae379a2db9..0000000000 --- a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_request_encoders_gen.go +++ /dev/null @@ -1,3 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_response_decoders_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_response_decoders_gen.go deleted file mode 100644 index bf1933b068..0000000000 --- a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_response_decoders_gen.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "io" - "mime" - "net/http" - - "github.com/go-faster/errors" - "github.com/go-faster/jx" - - "github.com/ogen-go/ogen/ogenerrors" - "github.com/ogen-go/ogen/validate" -) - -func decodeV1AppsGUIDScalingHistoriesGetResponse(resp *http.Response) (res *History, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response History - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &response, nil - default: - return res, validate.InvalidContentType(ct) - } - } - // Convenient error response. - defRes, err := func() (res *ErrorResponseStatusCode, err error) { - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response ErrorResponse - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &ErrorResponseStatusCode{ - StatusCode: resp.StatusCode, - Response: response, - }, nil - default: - return res, validate.InvalidContentType(ct) - } - }() - if err != nil { - return res, errors.Wrapf(err, "default (code %d)", resp.StatusCode) - } - return res, errors.Wrap(defRes, "error") -} diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_schemas_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_schemas_gen.go deleted file mode 100644 index aae57aa340..0000000000 --- a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_schemas_gen.go +++ /dev/null @@ -1,621 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "fmt" - "net/url" - - "github.com/go-faster/errors" -) - -func (s *ErrorResponseStatusCode) Error() string { - return fmt.Sprintf("code %d: %+v", s.StatusCode, s.Response) -} - -type BasicAuthentication struct { - Username string - Password string -} - -// GetUsername returns the value of Username. -func (s *BasicAuthentication) GetUsername() string { - return s.Username -} - -// GetPassword returns the value of Password. -func (s *BasicAuthentication) GetPassword() string { - return s.Password -} - -// SetUsername sets the value of Username. -func (s *BasicAuthentication) SetUsername(val string) { - s.Username = val -} - -// SetPassword sets the value of Password. -func (s *BasicAuthentication) SetPassword(val string) { - s.Password = val -} - -// Ref: #/components/schemas/ErrorResponse -type ErrorResponse struct{} - -// ErrorResponseStatusCode wraps ErrorResponse with StatusCode. -type ErrorResponseStatusCode struct { - StatusCode int - Response ErrorResponse -} - -// GetStatusCode returns the value of StatusCode. -func (s *ErrorResponseStatusCode) GetStatusCode() int { - return s.StatusCode -} - -// GetResponse returns the value of Response. -func (s *ErrorResponseStatusCode) GetResponse() ErrorResponse { - return s.Response -} - -// SetStatusCode sets the value of StatusCode. -func (s *ErrorResponseStatusCode) SetStatusCode(val int) { - s.StatusCode = val -} - -// SetResponse sets the value of Response. -func (s *ErrorResponseStatusCode) SetResponse(val ErrorResponse) { - s.Response = val -} - -// Object containing scaling history. -// Ref: #/components/schemas/History -type History struct { - // Number of history entries found for the given query. - TotalResults OptInt64 `json:"total_results"` - // Number of Pages from the query. - TotalPages OptInt64 `json:"total_pages"` - // Number of the current page. - Page OptInt64 `json:"page"` - PrevURL OptURI `json:"prev_url"` - NextURL OptURI `json:"next_url"` - Resources []HistoryEntry `json:"resources"` -} - -// GetTotalResults returns the value of TotalResults. -func (s *History) GetTotalResults() OptInt64 { - return s.TotalResults -} - -// GetTotalPages returns the value of TotalPages. -func (s *History) GetTotalPages() OptInt64 { - return s.TotalPages -} - -// GetPage returns the value of Page. -func (s *History) GetPage() OptInt64 { - return s.Page -} - -// GetPrevURL returns the value of PrevURL. -func (s *History) GetPrevURL() OptURI { - return s.PrevURL -} - -// GetNextURL returns the value of NextURL. -func (s *History) GetNextURL() OptURI { - return s.NextURL -} - -// GetResources returns the value of Resources. -func (s *History) GetResources() []HistoryEntry { - return s.Resources -} - -// SetTotalResults sets the value of TotalResults. -func (s *History) SetTotalResults(val OptInt64) { - s.TotalResults = val -} - -// SetTotalPages sets the value of TotalPages. -func (s *History) SetTotalPages(val OptInt64) { - s.TotalPages = val -} - -// SetPage sets the value of Page. -func (s *History) SetPage(val OptInt64) { - s.Page = val -} - -// SetPrevURL sets the value of PrevURL. -func (s *History) SetPrevURL(val OptURI) { - s.PrevURL = val -} - -// SetNextURL sets the value of NextURL. -func (s *History) SetNextURL(val OptURI) { - s.NextURL = val -} - -// SetResources sets the value of Resources. -func (s *History) SetResources(val []HistoryEntry) { - s.Resources = val -} - -// Merged schema. -// Ref: #/components/schemas/HistoryEntry -type HistoryEntry struct { - // Following stati are possible: - // + 0: The scaling was done successfully. - // + 1: The scaling failed explicitly. - // + 2: The scaling was ignored. - // This field is as well a selector of which of the other ones are used and which not. - Status OptHistoryEntryStatus `json:"status"` - // The GUID identifying the application for which the scaling history is fetched. - // It can be found in the `application_id` property of the JSON object stored in the - // `VCAP_APPLICATION` environment variable. - AppGUID OptString `json:"app_guid"` - // The scaling time in the number of nanoseconds elapsed since January 1, 1970 UTC. - Timestamp OptInt `json:"timestamp"` - // There are two different scaling types: - // + 0: This represents `ScalingTypeDynamic`. The scaling has been done due to a dynamic - // scaling rule, reacting on metrics provided by the app. - // + 1: This represents `ScalingTypeSchedule`. The scaling has been done due to a - // scheduled period changing the default instance limits. - ScalingType OptHistoryEntryScalingType `json:"scaling_type"` - // The number of instances before the scaling. - OldInstances OptInt64 `json:"old_instances"` - // The number of instances after the scaling. - NewInstances OptInt64 `json:"new_instances"` - // Textual information about what triggered the scaling event. - Reason OptString `json:"reason"` -} - -// GetStatus returns the value of Status. -func (s *HistoryEntry) GetStatus() OptHistoryEntryStatus { - return s.Status -} - -// GetAppGUID returns the value of AppGUID. -func (s *HistoryEntry) GetAppGUID() OptString { - return s.AppGUID -} - -// GetTimestamp returns the value of Timestamp. -func (s *HistoryEntry) GetTimestamp() OptInt { - return s.Timestamp -} - -// GetScalingType returns the value of ScalingType. -func (s *HistoryEntry) GetScalingType() OptHistoryEntryScalingType { - return s.ScalingType -} - -// GetOldInstances returns the value of OldInstances. -func (s *HistoryEntry) GetOldInstances() OptInt64 { - return s.OldInstances -} - -// GetNewInstances returns the value of NewInstances. -func (s *HistoryEntry) GetNewInstances() OptInt64 { - return s.NewInstances -} - -// GetReason returns the value of Reason. -func (s *HistoryEntry) GetReason() OptString { - return s.Reason -} - -// SetStatus sets the value of Status. -func (s *HistoryEntry) SetStatus(val OptHistoryEntryStatus) { - s.Status = val -} - -// SetAppGUID sets the value of AppGUID. -func (s *HistoryEntry) SetAppGUID(val OptString) { - s.AppGUID = val -} - -// SetTimestamp sets the value of Timestamp. -func (s *HistoryEntry) SetTimestamp(val OptInt) { - s.Timestamp = val -} - -// SetScalingType sets the value of ScalingType. -func (s *HistoryEntry) SetScalingType(val OptHistoryEntryScalingType) { - s.ScalingType = val -} - -// SetOldInstances sets the value of OldInstances. -func (s *HistoryEntry) SetOldInstances(val OptInt64) { - s.OldInstances = val -} - -// SetNewInstances sets the value of NewInstances. -func (s *HistoryEntry) SetNewInstances(val OptInt64) { - s.NewInstances = val -} - -// SetReason sets the value of Reason. -func (s *HistoryEntry) SetReason(val OptString) { - s.Reason = val -} - -// There are two different scaling types: -// + 0: This represents `ScalingTypeDynamic`. The scaling has been done due to a dynamic -// scaling rule, reacting on metrics provided by the app. -// + 1: This represents `ScalingTypeSchedule`. The scaling has been done due to a -// scheduled period changing the default instance limits. -type HistoryEntryScalingType int64 - -const ( - HistoryEntryScalingType0 HistoryEntryScalingType = 0 - HistoryEntryScalingType1 HistoryEntryScalingType = 1 -) - -// Following stati are possible: -// + 0: The scaling was done successfully. -// + 1: The scaling failed explicitly. -// + 2: The scaling was ignored. -// This field is as well a selector of which of the other ones are used and which not. -type HistoryEntryStatus int64 - -const ( - HistoryEntryStatus0 HistoryEntryStatus = 0 - HistoryEntryStatus1 HistoryEntryStatus = 1 - HistoryEntryStatus2 HistoryEntryStatus = 2 -) - -// NewOptHistoryEntryScalingType returns new OptHistoryEntryScalingType with value set to v. -func NewOptHistoryEntryScalingType(v HistoryEntryScalingType) OptHistoryEntryScalingType { - return OptHistoryEntryScalingType{ - Value: v, - Set: true, - } -} - -// OptHistoryEntryScalingType is optional HistoryEntryScalingType. -type OptHistoryEntryScalingType struct { - Value HistoryEntryScalingType - Set bool -} - -// IsSet returns true if OptHistoryEntryScalingType was set. -func (o OptHistoryEntryScalingType) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptHistoryEntryScalingType) Reset() { - var v HistoryEntryScalingType - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptHistoryEntryScalingType) SetTo(v HistoryEntryScalingType) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptHistoryEntryScalingType) Get() (v HistoryEntryScalingType, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptHistoryEntryScalingType) Or(d HistoryEntryScalingType) HistoryEntryScalingType { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptHistoryEntryStatus returns new OptHistoryEntryStatus with value set to v. -func NewOptHistoryEntryStatus(v HistoryEntryStatus) OptHistoryEntryStatus { - return OptHistoryEntryStatus{ - Value: v, - Set: true, - } -} - -// OptHistoryEntryStatus is optional HistoryEntryStatus. -type OptHistoryEntryStatus struct { - Value HistoryEntryStatus - Set bool -} - -// IsSet returns true if OptHistoryEntryStatus was set. -func (o OptHistoryEntryStatus) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptHistoryEntryStatus) Reset() { - var v HistoryEntryStatus - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptHistoryEntryStatus) SetTo(v HistoryEntryStatus) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptHistoryEntryStatus) Get() (v HistoryEntryStatus, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptHistoryEntryStatus) Or(d HistoryEntryStatus) HistoryEntryStatus { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptInt returns new OptInt with value set to v. -func NewOptInt(v int) OptInt { - return OptInt{ - Value: v, - Set: true, - } -} - -// OptInt is optional int. -type OptInt struct { - Value int - Set bool -} - -// IsSet returns true if OptInt was set. -func (o OptInt) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptInt) Reset() { - var v int - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptInt) SetTo(v int) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptInt) Get() (v int, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptInt) Or(d int) int { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptInt64 returns new OptInt64 with value set to v. -func NewOptInt64(v int64) OptInt64 { - return OptInt64{ - Value: v, - Set: true, - } -} - -// OptInt64 is optional int64. -type OptInt64 struct { - Value int64 - Set bool -} - -// IsSet returns true if OptInt64 was set. -func (o OptInt64) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptInt64) Reset() { - var v int64 - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptInt64) SetTo(v int64) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptInt64) Get() (v int64, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptInt64) Or(d int64) int64 { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptString returns new OptString with value set to v. -func NewOptString(v string) OptString { - return OptString{ - Value: v, - Set: true, - } -} - -// OptString is optional string. -type OptString struct { - Value string - Set bool -} - -// IsSet returns true if OptString was set. -func (o OptString) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptString) Reset() { - var v string - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptString) SetTo(v string) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptString) Get() (v string, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptString) Or(d string) string { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptURI returns new OptURI with value set to v. -func NewOptURI(v url.URL) OptURI { - return OptURI{ - Value: v, - Set: true, - } -} - -// OptURI is optional url.URL. -type OptURI struct { - Value url.URL - Set bool -} - -// IsSet returns true if OptURI was set. -func (o OptURI) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptURI) Reset() { - var v url.URL - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptURI) SetTo(v url.URL) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptURI) Get() (v url.URL, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptURI) Or(d url.URL) url.URL { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// NewOptV1AppsGUIDScalingHistoriesGetOrderDirection returns new OptV1AppsGUIDScalingHistoriesGetOrderDirection with value set to v. -func NewOptV1AppsGUIDScalingHistoriesGetOrderDirection(v V1AppsGUIDScalingHistoriesGetOrderDirection) OptV1AppsGUIDScalingHistoriesGetOrderDirection { - return OptV1AppsGUIDScalingHistoriesGetOrderDirection{ - Value: v, - Set: true, - } -} - -// OptV1AppsGUIDScalingHistoriesGetOrderDirection is optional V1AppsGUIDScalingHistoriesGetOrderDirection. -type OptV1AppsGUIDScalingHistoriesGetOrderDirection struct { - Value V1AppsGUIDScalingHistoriesGetOrderDirection - Set bool -} - -// IsSet returns true if OptV1AppsGUIDScalingHistoriesGetOrderDirection was set. -func (o OptV1AppsGUIDScalingHistoriesGetOrderDirection) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptV1AppsGUIDScalingHistoriesGetOrderDirection) Reset() { - var v V1AppsGUIDScalingHistoriesGetOrderDirection - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptV1AppsGUIDScalingHistoriesGetOrderDirection) SetTo(v V1AppsGUIDScalingHistoriesGetOrderDirection) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptV1AppsGUIDScalingHistoriesGetOrderDirection) Get() (v V1AppsGUIDScalingHistoriesGetOrderDirection, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptV1AppsGUIDScalingHistoriesGetOrderDirection) Or(d V1AppsGUIDScalingHistoriesGetOrderDirection) V1AppsGUIDScalingHistoriesGetOrderDirection { - if v, ok := o.Get(); ok { - return v - } - return d -} - -type V1AppsGUIDScalingHistoriesGetOrderDirection string - -const ( - V1AppsGUIDScalingHistoriesGetOrderDirectionAsc V1AppsGUIDScalingHistoriesGetOrderDirection = "asc" - V1AppsGUIDScalingHistoriesGetOrderDirectionDesc V1AppsGUIDScalingHistoriesGetOrderDirection = "desc" -) - -// MarshalText implements encoding.TextMarshaler. -func (s V1AppsGUIDScalingHistoriesGetOrderDirection) MarshalText() ([]byte, error) { - switch s { - case V1AppsGUIDScalingHistoriesGetOrderDirectionAsc: - return []byte(s), nil - case V1AppsGUIDScalingHistoriesGetOrderDirectionDesc: - return []byte(s), nil - default: - return nil, errors.Errorf("invalid value: %q", s) - } -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (s *V1AppsGUIDScalingHistoriesGetOrderDirection) UnmarshalText(data []byte) error { - switch V1AppsGUIDScalingHistoriesGetOrderDirection(data) { - case V1AppsGUIDScalingHistoriesGetOrderDirectionAsc: - *s = V1AppsGUIDScalingHistoriesGetOrderDirectionAsc - return nil - case V1AppsGUIDScalingHistoriesGetOrderDirectionDesc: - *s = V1AppsGUIDScalingHistoriesGetOrderDirectionDesc - return nil - default: - return errors.Errorf("invalid value: %q", data) - } -} diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_security_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_security_gen.go deleted file mode 100644 index 60555f78c7..0000000000 --- a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_security_gen.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "context" - "net/http" - - "github.com/go-faster/errors" -) - -// SecuritySource is provider of security values (tokens, passwords, etc.). -type SecuritySource interface { - // BasicAuthentication provides basicAuthentication security value. - BasicAuthentication(ctx context.Context, operationName string) (BasicAuthentication, error) -} - -func (s *Client) securityBasicAuthentication(ctx context.Context, operationName string, req *http.Request) error { - t, err := s.sec.BasicAuthentication(ctx, operationName) - if err != nil { - return errors.Wrap(err, "security source \"BasicAuthentication\"") - } - req.SetBasicAuth(t.Username, t.Password) - return nil -} diff --git a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_validators_gen.go b/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_validators_gen.go deleted file mode 100644 index 1c16219f91..0000000000 --- a/src/acceptance/assets/app/go_app/internal/scalinghistory/oas_validators_gen.go +++ /dev/null @@ -1,200 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "fmt" - - "github.com/go-faster/errors" - - "github.com/ogen-go/ogen/validate" -) - -func (s *History) Validate() error { - var failures []validate.FieldError - if err := func() error { - var failures []validate.FieldError - for i, elem := range s.Resources { - if err := func() error { - if err := elem.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: fmt.Sprintf("[%d]", i), - Error: err, - }) - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "resources", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s *HistoryEntry) Validate() error { - var failures []validate.FieldError - if err := func() error { - if s.Status.Set { - if err := func() error { - if err := s.Status.Value.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "status", - Error: err, - }) - } - if err := func() error { - if s.AppGUID.Set { - if err := func() error { - if err := (validate.String{ - MinLength: 0, - MinLengthSet: false, - MaxLength: 0, - MaxLengthSet: false, - Email: false, - Hostname: false, - Regex: regexMap["(\\d|[a-f]){8}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){4}-(\\d|[a-f]){12}"], - }).Validate(string(s.AppGUID.Value)); err != nil { - return errors.Wrap(err, "string") - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "app_guid", - Error: err, - }) - } - if err := func() error { - if s.ScalingType.Set { - if err := func() error { - if err := s.ScalingType.Value.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "scaling_type", - Error: err, - }) - } - if err := func() error { - if s.OldInstances.Set { - if err := func() error { - if err := (validate.Int{ - MinSet: true, - Min: 0, - MaxSet: false, - Max: 0, - MinExclusive: false, - MaxExclusive: false, - MultipleOfSet: false, - MultipleOf: 0, - }).Validate(int64(s.OldInstances.Value)); err != nil { - return errors.Wrap(err, "int") - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "old_instances", - Error: err, - }) - } - if err := func() error { - if s.NewInstances.Set { - if err := func() error { - if err := (validate.Int{ - MinSet: true, - Min: 0, - MaxSet: false, - Max: 0, - MinExclusive: false, - MaxExclusive: false, - MultipleOfSet: false, - MultipleOf: 0, - }).Validate(int64(s.NewInstances.Value)); err != nil { - return errors.Wrap(err, "int") - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "new_instances", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s HistoryEntryScalingType) Validate() error { - switch s { - case 0: - return nil - case 1: - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} -func (s HistoryEntryStatus) Validate() error { - switch s { - case 0: - return nil - case 1: - return nil - case 2: - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} - -func (s V1AppsGUIDScalingHistoriesGetOrderDirection) Validate() error { - switch s { - case "asc": - return nil - case "desc": - return nil - default: - return errors.Errorf("invalid value: %v", s) - } -} From 43727a47aa144ad8a8fe04ec4553720b5fb6f06f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Mon, 14 Aug 2023 12:10:29 +0200 Subject: [PATCH 115/294] Update software-versions and add swagger-cli; --- flake.lock | 6 +++--- flake.nix | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 3c9de8c10b..d3ac1f689c 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1683408522, - "narHash": "sha256-9kcPh6Uxo17a3kK3XCHhcWiV1Yu1kYj22RHiymUhMkU=", + "lastModified": 1691899779, + "narHash": "sha256-IBf4KVr/UQJlzrqB2/IHtlvmwsvyIVLPerSzCPU/6Xk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "897876e4c484f1e8f92009fd11b7d988a121a4e7", + "rev": "100a1550b0e7a64b960c625b656f9229bdef5f87", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 95531caf33..9e4b5a9140 100644 --- a/flake.nix +++ b/flake.nix @@ -52,6 +52,7 @@ # # jdwpkgs.rubyPackages.cf-uaac shellcheck + swagger-cli temurin-bin yq-go ]; From 6b49f0f3d3e0a96df5546271c1c2589500d48e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Mon, 14 Aug 2023 12:24:34 +0200 Subject: [PATCH 116/294] Add production of intermediate files and integrate it into the Makefile; --- .gitignore | 9 ++++++ src/acceptance/assets/app/go_app/Makefile | 29 +++++++++++++++++-- .../assets/app/go_app/internal/generate.go | 8 ++--- 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 848ad413ec..6be14f640a 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,12 @@ privkey.pem app-autoscaler-release docs/*.bkp build/* + +# Generated, intermediate openapi-specs: +src/acceptance/assets/app/go_app/internal/openapi-specs.bundled + +# Generated api-clients: +src/acceptance/assets/app/go_app/internal/applicationmetric +src/acceptance/assets/app/go_app/internal/custommetrics +src/acceptance/assets/app/go_app/internal/policy +src/acceptance/assets/app/go_app/internal/scalinghistory \ No newline at end of file diff --git a/src/acceptance/assets/app/go_app/Makefile b/src/acceptance/assets/app/go_app/Makefile index 5e884a220e..e3049602a9 100644 --- a/src/acceptance/assets/app/go_app/Makefile +++ b/src/acceptance/assets/app/go_app/Makefile @@ -1,5 +1,8 @@ +.ONESHELL: SHELL := /bin/bash .SHELLFLAGS := -eu -o pipefail -c ${SHELLFLAGS} + + MAKEFLAGS= GO_VERSION := $(shell go version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/') GO_DEPENDENCIES := $(shell find . -type f -name '*.go') @@ -13,7 +16,7 @@ GINKGO_OPTS=-r --race --require-suite --randomize-all --cover ${OPTS} export CONFIG?=../../../../acceptance_config.json .PHONY: build -build: +build: generate echo "# building test-app" rm -rf build/* || true mkdir -p build/ @@ -52,9 +55,29 @@ deploy: build ./deploy.sh openapi-spec-path := ../../../../../api -openapi-specs := $(wildcard ${openapi-spec-path}/*.yaml) +openapi-specs := $(wildcard ${openapi-spec-path}/*.openapi.yaml) +openapi-specs-bundled-path := ./internal/openapi-specs.bundled + +bundled-openapi-specs: ${bundled-openapi-specs-list} +bundled-openapi-specs-list := \ + ${openapi-specs-bundled-path}/application-metric-api.openapi.bundled.yaml \ + ${openapi-specs-bundled-path}/custom-metrics-api.openapi.bundled.yaml \ + ${openapi-specs-bundled-path}/policy-api.openapi.bundled.yaml \ + ${openapi-specs-bundled-path}/scaling-history-api.openapi.bundled.yaml + +# # Treat these files as intermediate ones and don't rebuild everything +# # just because they are missing. +.SECONDARY: ${bundled-openapi-specs-list} + +${bundled-openapi-specs-list}: ${openapi-specs} + swagger-cli bundle \ + '${openapi-spec-path}/$(patsubst %.openapi.bundled.yaml,%.openapi.yaml,$(notdir $@))' \ + --outfile '$@' + +openapi.go-client.target-directory := TODO +openapi.go-client.generated = $(wildcard ${openapi.java-client.target-directory}/**/*.java) -generate: go.mod ${openapi-specs} +generate: go.mod ${bundled-openapi-specs-list} go generate ./... .PHONY: clean diff --git a/src/acceptance/assets/app/go_app/internal/generate.go b/src/acceptance/assets/app/go_app/internal/generate.go index 0aaccabd3c..a5b8d6cd89 100644 --- a/src/acceptance/assets/app/go_app/internal/generate.go +++ b/src/acceptance/assets/app/go_app/internal/generate.go @@ -1,6 +1,6 @@ package internal -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target custommetrics --clean ../../../../../../api/custom-metrics-api.yaml -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target scalinghistory --clean ../../../../../../api/scaling-history-api.yaml -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target policy --clean ../../../../../../api/policy-api.yaml -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target applicationmetric --clean ../../../../../../api/application-metric-api.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target applicationmetric --clean ../../../../../../api/application-metric-api.openapi.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target custommetrics --clean ../../../../../../api/custom-metrics-api.openapi.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target policy --clean ../../../../../../api/policy-api.openapi.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target scalinghistory --clean ../../../../../../api/scaling-history-api.openapi.yaml From e29e613466244e15c9abda8d1450326bef7c8899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Mon, 14 Aug 2023 15:09:45 +0200 Subject: [PATCH 117/294] Adds common go-tools; --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index 9e4b5a9140..255a24072b 100644 --- a/flake.nix +++ b/flake.nix @@ -25,11 +25,13 @@ actionlint bosh-cli cloudfoundry-cli + delve fly ginkgo gh gnumake go + go-tools golangci-lint gopls # See: google-cloud-sdk From 1bcf936a77e8db47040334ff35658d677a198639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Mon, 14 Aug 2023 15:10:29 +0200 Subject: [PATCH 118/294] Fix paths for openapi-client-generation; --- src/acceptance/assets/app/go_app/internal/generate.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/acceptance/assets/app/go_app/internal/generate.go b/src/acceptance/assets/app/go_app/internal/generate.go index a5b8d6cd89..fb7f7f5a0e 100644 --- a/src/acceptance/assets/app/go_app/internal/generate.go +++ b/src/acceptance/assets/app/go_app/internal/generate.go @@ -1,6 +1,6 @@ package internal -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target applicationmetric --clean ../../../../../../api/application-metric-api.openapi.yaml -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target custommetrics --clean ../../../../../../api/custom-metrics-api.openapi.yaml -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target policy --clean ../../../../../../api/policy-api.openapi.yaml -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target scalinghistory --clean ../../../../../../api/scaling-history-api.openapi.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target applicationmetric --clean ../internal/openapi-specs.bundled/application-metric-api.openapi.bundled.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target custommetrics --clean ../internal/openapi-specs.bundled/custom-metrics-api.openapi.bundled.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target policy --clean ../internal/openapi-specs.bundled/policy-api.openapi.bundled.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target scalinghistory --clean ../internal/openapi-specs.bundled/scaling-history-api.openapi.bundled.yaml From ef1bc0ab593960e48c7b1b1b9bd2e3e4b17498df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Mon, 14 Aug 2023 16:29:54 +0200 Subject: [PATCH 119/294] Adapt to changed signature for client-creation and re-introduce falsley deleted files; --- .gitignore | 8 ++--- .../app/go_app/internal/app/custom_metrics.go | 2 +- .../internal/custommetrics/api_credentials.go | 19 +++++++++++ .../custommetrics/basic_auth_transport.go | 32 +++++++++++++++++++ 4 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 src/acceptance/assets/app/go_app/internal/custommetrics/api_credentials.go create mode 100644 src/acceptance/assets/app/go_app/internal/custommetrics/basic_auth_transport.go diff --git a/.gitignore b/.gitignore index 6be14f640a..16fb8bd7c4 100644 --- a/.gitignore +++ b/.gitignore @@ -39,7 +39,7 @@ build/* src/acceptance/assets/app/go_app/internal/openapi-specs.bundled # Generated api-clients: -src/acceptance/assets/app/go_app/internal/applicationmetric -src/acceptance/assets/app/go_app/internal/custommetrics -src/acceptance/assets/app/go_app/internal/policy -src/acceptance/assets/app/go_app/internal/scalinghistory \ No newline at end of file +src/acceptance/assets/app/go_app/internal/applicationmetric/oas*gen.go +src/acceptance/assets/app/go_app/internal/custommetrics/oas*gen.go +src/acceptance/assets/app/go_app/internal/policy/oas*gen.go +src/acceptance/assets/app/go_app/internal/scalinghistory/oas*gen.go \ No newline at end of file diff --git a/src/acceptance/assets/app/go_app/internal/app/custom_metrics.go b/src/acceptance/assets/app/go_app/internal/app/custom_metrics.go index 13804a8e17..44b2c84d72 100644 --- a/src/acceptance/assets/app/go_app/internal/app/custom_metrics.go +++ b/src/acceptance/assets/app/go_app/internal/app/custom_metrics.go @@ -94,7 +94,7 @@ func (_ *CustomMetricAPIClient) PostCustomMetric(ctx context.Context, appConfig return err } - apiClient, err := api.NewClient(autoscalerApiServerURL, api.WithClient(client)) + apiClient, err := api.NewClient(autoscalerApiServerURL, autoscalerCredentials, api.WithClient(client)) if err != nil { return err } diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/api_credentials.go b/src/acceptance/assets/app/go_app/internal/custommetrics/api_credentials.go new file mode 100644 index 0000000000..10db719d1a --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/custommetrics/api_credentials.go @@ -0,0 +1,19 @@ +package api + +import "context" + +type CustomMetricsCredentials struct { + Username string `mapstructure:"username" json:"username"` + Password string `mapstructure:"password" json:"password"` + URL string `mapstructure:"url" json:"url"` + MtlsURL string `mapstructure:"mtls_url" json:"mtls_url"` +} + +func (c CustomMetricsCredentials) BasicAuthentication(ctx context.Context, operationName string) (BasicAuthentication, error) { + credentials := BasicAuthentication { + Username: c.Username, + Password: c.Password, + } + + return credentials, nil +} \ No newline at end of file diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/basic_auth_transport.go b/src/acceptance/assets/app/go_app/internal/custommetrics/basic_auth_transport.go new file mode 100644 index 0000000000..7f1c0a5c47 --- /dev/null +++ b/src/acceptance/assets/app/go_app/internal/custommetrics/basic_auth_transport.go @@ -0,0 +1,32 @@ +package api + +import ( + "crypto/tls" + "encoding/base64" + "fmt" + "net/http" +) + +type BasicAuthTransport struct { + Username string + Password string + Transport *http.Transport +} + +func (bat BasicAuthTransport) RoundTrip(req *http.Request) (*http.Response, error) { + req.Header.Set("Authorization", fmt.Sprintf("Basic %s", + base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", + bat.Username, bat.Password))))) + return bat.Transport.RoundTrip(req) +} + +func (bat *BasicAuthTransport) Client() *http.Client { + return &http.Client{Transport: bat} +} + +func NewBasicAuthTransport(credentials CustomMetricsCredentials) *BasicAuthTransport { + tr := &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + } + return &BasicAuthTransport{credentials.Username, credentials.Password, tr} +} From 2bb4c9f8da7e62738c63ec4b57880b7a87dc4bf0 Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Fri, 11 Aug 2023 16:25:56 +0200 Subject: [PATCH 120/294] Add Go workspace and VSCode extension recommendations for better dev experience --- .gitignore | 9 +++++++++ .vscode/extensions.json | 11 +++++++++++ Makefile | 1 + go.work | 9 +++++++++ src/acceptance/Makefile | 1 + src/acceptance/assets/app/go_app/Makefile | 1 + src/autoscaler/Makefile | 2 ++ src/changelog/Makefile | 1 + src/changeloglockcleaner/Makefile | 1 + 9 files changed, 36 insertions(+) create mode 100644 .vscode/extensions.json create mode 100644 go.work diff --git a/.gitignore b/.gitignore index 416357470d..f743a7b7d2 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,12 @@ privkey.pem app-autoscaler-release docs/*.bkp build/* + +# Autogenerated files +go.work.sum + +# Plugins that the editor needs to work well with the code within this +# repository. Recommended, to put it under version-control for +# easy sharing, see: +# +!.vscode/extensions.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000000..a591b10ade --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,11 @@ +{ + "recommendations": [ + "sonarsource.sonarlint-vscode", + "joselitofilho.ginkgotestexplorer", + "onsi.vscode-ginkgo", + "vmware.vscode-boot-dev-pack", + "vscjava.vscode-java-pack", + "pinage404.nix-extension-pack", + "golang.go" + ] +} \ No newline at end of file diff --git a/Makefile b/Makefile index d8d4379918..bc598a8a2f 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ DEST?=build export BUILDIN_MODE?=false export DEBUG?=false export ACCEPTANCE_TESTS_FILE?=${DEST}/app-autoscaler-acceptance-tests-v${VERSION}.tgz +export GOWORK=off $(shell mkdir -p target) $(shell mkdir -p build) diff --git a/go.work b/go.work new file mode 100644 index 0000000000..3e6e2963d8 --- /dev/null +++ b/go.work @@ -0,0 +1,9 @@ +go 1.20 + +use ( + ./src/acceptance + ./src/acceptance/assets/app/go_app + ./src/autoscaler + ./src/changelog + ./src/changeloglockcleaner +) diff --git a/src/acceptance/Makefile b/src/acceptance/Makefile index 8b9fbb432a..a216cfc530 100644 --- a/src/acceptance/Makefile +++ b/src/acceptance/Makefile @@ -8,6 +8,7 @@ GO_DEPENDENCIES := $(shell find . -type f -name '*.go') PACKAGE_DIRS := $(shell $(GO) list ./... | grep -v /vendor/ | grep -v e2e) CGO_ENABLED = 0 +export GOWORK=off BUILDTAGS := test_dirs=$(shell find . -name "*_test.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq) diff --git a/src/acceptance/assets/app/go_app/Makefile b/src/acceptance/assets/app/go_app/Makefile index 58bc779898..c5abc0abd6 100644 --- a/src/acceptance/assets/app/go_app/Makefile +++ b/src/acceptance/assets/app/go_app/Makefile @@ -5,6 +5,7 @@ GO_VERSION := $(shell go version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/') GO_DEPENDENCIES := $(shell find . -type f -name '*.go') PACKAGE_DIRS := $(shell go list ./... | grep -v /vendor/ | grep -v e2e) CGO_ENABLED = 0 +export GOWORK=off binaries=$(shell find . -name "main.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq) test_dirs=$(shell find . -name "*_test.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq) diff --git a/src/autoscaler/Makefile b/src/autoscaler/Makefile index 5b1edeb755..44ebff0fd0 100644 --- a/src/autoscaler/Makefile +++ b/src/autoscaler/Makefile @@ -4,8 +4,10 @@ MAKEFLAGS = -s GO_VERSION := $(shell go version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/') GO_DEPENDENCIES := $(shell find . -type f -name '*.go') PACKAGE_DIRS := $(shell go list ./... | grep -v /vendor/ | grep -v e2e) + CGO_ENABLED = 1 # This is set to enforce dynamic linking which is a requirement of dynatrace. BUILDTAGS := +export GOWORK=off BUILDFLAGS := -ldflags '-linkmode=external' binaries=$(shell find . -name "main.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq) diff --git a/src/changelog/Makefile b/src/changelog/Makefile index c6afe53c82..f72f9da767 100644 --- a/src/changelog/Makefile +++ b/src/changelog/Makefile @@ -8,6 +8,7 @@ GO_DEPENDENCIES := $(shell find . -type f -name '*.go') PACKAGE_DIRS := $(shell $(GO) list ./... | grep -v /vendor/ | grep -v e2e) CGO_ENABLED = 0 +export GOWORK=off BUILDTAGS := build: diff --git a/src/changeloglockcleaner/Makefile b/src/changeloglockcleaner/Makefile index 99a1be6ea9..0042cb29f1 100644 --- a/src/changeloglockcleaner/Makefile +++ b/src/changeloglockcleaner/Makefile @@ -8,6 +8,7 @@ GO_DEPENDENCIES := $(shell find . -type f -name '*.go') PACKAGE_DIRS := $(shell $(GO) list ./... | grep -v /vendor/ | grep -v e2e) CGO_ENABLED = 0 +export GOWORK=off BUILDTAGS := build: From 371200ebda85278a4c6ad337678257d99a7dfcf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Mon, 14 Aug 2023 17:40:39 +0200 Subject: [PATCH 121/294] Clean up Makefile; --- src/acceptance/assets/app/go_app/Makefile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/acceptance/assets/app/go_app/Makefile b/src/acceptance/assets/app/go_app/Makefile index 7fce50d78f..28c6a55756 100644 --- a/src/acceptance/assets/app/go_app/Makefile +++ b/src/acceptance/assets/app/go_app/Makefile @@ -69,14 +69,11 @@ bundled-openapi-specs-list := \ # # just because they are missing. .SECONDARY: ${bundled-openapi-specs-list} -${bundled-openapi-specs-list}: ${openapi-specs} +${bundled-openapi-specs-list}: $(patsubst %.openapi.bundled.yaml,${openapi-spec-path}/%.openapi.yaml,$(notdir $@)) swagger-cli bundle \ - '${openapi-spec-path}/$(patsubst %.openapi.bundled.yaml,%.openapi.yaml,$(notdir $@))' \ + $(patsubst %.openapi.bundled.yaml,${openapi-spec-path}/%.openapi.yaml,$(notdir $@)) \ --outfile '$@' -openapi.go-client.target-directory := TODO -openapi.go-client.generated = $(wildcard ${openapi.java-client.target-directory}/**/*.java) - generate: go.mod ${bundled-openapi-specs-list} go generate ./... @@ -84,4 +81,4 @@ generate: go.mod ${bundled-openapi-specs-list} clean: @echo "# cleaning autoscaler" @go clean -cache -testcache - @rm -rf build + @rm -rf build \ No newline at end of file From 151466e70b1b4eb2e3d608509596c4d09a7652ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Mon, 14 Aug 2023 18:03:04 +0200 Subject: [PATCH 122/294] Update flake; --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 0151fbcf89..d3ac1f689c 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1688231357, - "narHash": "sha256-ZOn16X5jZ6X5ror58gOJAxPfFLAQhZJ6nOUeS4tfFwo=", + "lastModified": 1691899779, + "narHash": "sha256-IBf4KVr/UQJlzrqB2/IHtlvmwsvyIVLPerSzCPU/6Xk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "645ff62e09d294a30de823cb568e9c6d68e92606", + "rev": "100a1550b0e7a64b960c625b656f9229bdef5f87", "type": "github" }, "original": { From 9bced67fcf9b8da4f54474a63ed5ff55cce14c98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Mon, 14 Aug 2023 18:03:15 +0200 Subject: [PATCH 123/294] Add swagger-cli to Dockerfile; --- ci/dockerfiles/autoscaler-tools/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index b930d79543..4a5d36a3cc 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -141,6 +141,9 @@ RUN curl -sL "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | bash - \ && npm --version \ && node -v +# Install swagger-cli as described on +RUN npm install -g @apidevtools/swagger-cli + ENV CF_PLUGIN_HOME "/cf_plugins" RUN mkdir -p "${CF_PLUGIN_HOME}" \ && cf install-plugin -f -r CF-Community app-autoscaler-plugin \ From f29c2695e3be50ea8a9226b236722306b88b3804 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 15 Aug 2023 01:11:47 +0000 Subject: [PATCH 124/294] chore(deps): update dependency gruntwork-io/terragrunt to v0.50.0 (#2047) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 6e8dfdc2a7..e860348359 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.4 terraform 1.5.5 terraform-lsp -terragrunt 0.49.1 +terragrunt 0.50.0 From 89f478f259acc201cfa2dd33162bfa9a830ad704 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 15 Aug 2023 01:59:22 +0000 Subject: [PATCH 125/294] chore(deps): update golangci/golangci-lint-action action to v3.7.0 (#2055) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/golangci-lint.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml index 152cb40ad6..c891b0b36e 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/golangci-lint.yaml @@ -29,7 +29,7 @@ jobs: echo "version=${version}" >> $GITHUB_OUTPUT; - name: lint acceptance - uses: golangci/golangci-lint-action@v3.6.0 + uses: golangci/golangci-lint-action@v3.7.0 with: working-directory: src/acceptance args: --config='../../.golangci.yaml' -v --timeout='2m' @@ -37,7 +37,7 @@ jobs: skip-cache: true - name: lint autoscaler - uses: golangci/golangci-lint-action@v3.6.0 + uses: golangci/golangci-lint-action@v3.7.0 with: working-directory: src/autoscaler args: --config='../../.golangci.yaml' --timeout='2m' @@ -45,7 +45,7 @@ jobs: skip-cache: true - name: lint changelog - uses: golangci/golangci-lint-action@v3.6.0 + uses: golangci/golangci-lint-action@v3.7.0 with: working-directory: src/changelog args: --config ../../.golangci.yaml @@ -53,7 +53,7 @@ jobs: skip-cache: true - name: lint changeloglockcleaner - uses: golangci/golangci-lint-action@v3.6.0 + uses: golangci/golangci-lint-action@v3.7.0 with: working-directory: src/changeloglockcleaner args: --config ../../.golangci.yaml From ea271b31a61d2be541c1dd74b7231c986e641df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Tue, 15 Aug 2023 10:26:43 +0200 Subject: [PATCH 126/294] Make sonarcloud happy (fixing security-issue) --- ci/dockerfiles/autoscaler-tools/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index 4a5d36a3cc..c4d79462a6 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -142,7 +142,7 @@ RUN curl -sL "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | bash - \ && node -v # Install swagger-cli as described on -RUN npm install -g @apidevtools/swagger-cli +RUN npm install --global --ignore-scripts @apidevtools/swagger-cli ENV CF_PLUGIN_HOME "/cf_plugins" RUN mkdir -p "${CF_PLUGIN_HOME}" \ From 84b4a5d83e1ec6589e31d405d0e9ceea03ba12bc Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Tue, 15 Aug 2023 09:57:55 +0100 Subject: [PATCH 127/294] Introducing LABEL instead of MAINTAINER(deprecated) in DockerFile --- ci/dockerfiles/autoscaler-deploy/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/dockerfiles/autoscaler-deploy/Dockerfile b/ci/dockerfiles/autoscaler-deploy/Dockerfile index 97f4ae101f..1f3ffa24fc 100644 --- a/ci/dockerfiles/autoscaler-deploy/Dockerfile +++ b/ci/dockerfiles/autoscaler-deploy/Dockerfile @@ -1,5 +1,5 @@ -FROM ubuntu:jammy -MAINTAINER autoscaler-team +FROM ubuntu:jammy +LABEL org.opencontainers.image.authors="autoscaler-team" RUN apt-get update && \ apt-get -qqy install --fix-missing gnupg apt-transport-https wget && \ From 17898e6bbb778855892765303a7bc2b9f5b9d197 Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Tue, 15 Aug 2023 13:58:21 +0100 Subject: [PATCH 128/294] Code generation using OpenAPI Specifications --- Makefile | 4 ++++ api/custom-metrics-api.openapi.yaml | 6 +++++- src/acceptance/assets/app/go_app/internal/generate.go | 8 ++++---- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index bc598a8a2f..fb19515a0e 100644 --- a/Makefile +++ b/Makefile @@ -394,3 +394,7 @@ docker-image: docker-login build-tools: make -C src/autoscaler buildtools +validate-openapi-specs: $(wildcard ./api/*.openapi.yaml) + for file in $^ ; do \ + swagger-cli validate "$${file}" ; \ + done \ No newline at end of file diff --git a/api/custom-metrics-api.openapi.yaml b/api/custom-metrics-api.openapi.yaml index ea8764a835..4eedf5b11a 100644 --- a/api/custom-metrics-api.openapi.yaml +++ b/api/custom-metrics-api.openapi.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.0 +openapi: 3.1.0 info: title: app-autoscaler custom metrics API description: | @@ -45,6 +45,7 @@ paths: $ref: "./shared_definitions.yaml#/responses/Error" security: - basicAuthentication: [] + - mtls: [] x-codegen-request-body-name: body components: schemas: @@ -83,6 +84,9 @@ components: description: An optional unit for the metric, for display purposes only. example: jobs securitySchemes: + mtls: + type: mutualTLS + description: Use the Instance Identity Credentials provided by the Cloud Foundry runtime basicAuthentication: type: http scheme: basic \ No newline at end of file diff --git a/src/acceptance/assets/app/go_app/internal/generate.go b/src/acceptance/assets/app/go_app/internal/generate.go index fb7f7f5a0e..b59a8a8387 100644 --- a/src/acceptance/assets/app/go_app/internal/generate.go +++ b/src/acceptance/assets/app/go_app/internal/generate.go @@ -1,6 +1,6 @@ package internal -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target applicationmetric --clean ../internal/openapi-specs.bundled/application-metric-api.openapi.bundled.yaml -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target custommetrics --clean ../internal/openapi-specs.bundled/custom-metrics-api.openapi.bundled.yaml -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target policy --clean ../internal/openapi-specs.bundled/policy-api.openapi.bundled.yaml -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target scalinghistory --clean ../internal/openapi-specs.bundled/scaling-history-api.openapi.bundled.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --allow-remote --target applicationmetric --clean ../internal/openapi-specs.bundled/application-metric-api.openapi.bundled.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --allow-remote --debug.ignoreNotImplemented "mutualTLS security" --target custommetrics --clean ../internal/openapi-specs.bundled/custom-metrics-api.openapi.bundled.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --allow-remote --target policy --clean ../internal/openapi-specs.bundled/policy-api.openapi.bundled.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --allow-remote --target scalinghistory --clean ../internal/openapi-specs.bundled/scaling-history-api.openapi.bundled.yaml From 421c5d711088a76b5ee7d7723670a390f020ec30 Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Tue, 15 Aug 2023 14:27:51 +0100 Subject: [PATCH 129/294] Swagger-Tool for Docker tests --- ci/dockerfiles/autoscaler-tools/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index c4d79462a6..570065df2d 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -142,7 +142,7 @@ RUN curl -sL "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | bash - \ && node -v # Install swagger-cli as described on -RUN npm install --global --ignore-scripts @apidevtools/swagger-cli +RUN npm install --global --ignore-scripts 'https://github.com/empire-medical/swagger-cli' ENV CF_PLUGIN_HOME "/cf_plugins" RUN mkdir -p "${CF_PLUGIN_HOME}" \ From dbe71c98965d2af2b0df3d4490dd3788cfaa2a53 Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Tue, 15 Aug 2023 14:47:12 +0100 Subject: [PATCH 130/294] Github Workflow-Used Make for validating OpenAPI Specifications --- .github/workflows/openapi-specs-check.yaml | 26 +++++----------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/.github/workflows/openapi-specs-check.yaml b/.github/workflows/openapi-specs-check.yaml index 97c974874c..4ac4999475 100644 --- a/.github/workflows/openapi-specs-check.yaml +++ b/.github/workflows/openapi-specs-check.yaml @@ -4,31 +4,15 @@ on: jobs: validate: runs-on: ubuntu-latest + container: + image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main steps: - - name: Get OpenAPI files - id: getfiles + - name: Get Repository content uses: actions/checkout@v3 - - name: Determine schema-files - id: schema-files + - name: Validating OpenAPI Specifications shell: bash run: | #! /usr/bin/env bash set -eu -o pipefail - - # Using step output (space separated file list) - FILES="$(find api -type f -iname '*.openapi.yaml')" - - # Github documentation on multiline-strings does not work - # (). - # Here, we successfully use instead. - { - echo 'file_list<> "${GITHUB_OUTPUT}" - - name: swagger-validator - uses: mbowman100/swagger-validator-action@master - # if: env.FILE_COUNT != '0' # Comment out if you want it to fail if no files found - with: - files: ${{ steps.schema-files.outputs.file_list }} \ No newline at end of file + make validate-openapi-specs \ No newline at end of file From e3df06c528402083f751052be9b40cb341cbaf52 Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Tue, 15 Aug 2023 16:19:39 +0100 Subject: [PATCH 131/294] WIP- Modifying Flake.nix for Swagger cli tool --- flake.nix | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/flake.nix b/flake.nix index 71225e69a8..c02f0e749b 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,40 @@ # Nixpkgs instantiated for supported system types. nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); in { + packages = forAllSystems (system: + let + pkgs = nixpkgsFor.${system}; + in { + swagger-cli = pkgs.buildNpmPackage rec { + pname = "swagger-cli"; + version = "4.0.4"; + + src = pkgs.fetchFromGitHub { + owner = "empire-medical"; + repo = pname; + rev = "v${version}"; + hash = null; # "sha256-BR+ZGkBBfd0dSQqAvujsbgsEPFYw/ThrylxUbOksYxM="; + }; + + npmDepsHash = null; # "sha256-tuEfyePwlOy2/mOPdXbqJskO6IowvAP4DWg8xSZwbJw="; + + # The prepack script runs the build script, which we'd rather do in the build phase. + npmPackFlags = [ "--ignore-scripts" ]; + + # NODE_OPTIONS = "--openssl-legacy-provider"; + + meta = { + description = '' + Validate Swagger/OpenAPI files in JSON or YAML format + Supports multi-file API definitions via $ref pointers + Bundle multiple Swagger/OpenAPI files into one combined file + ''; + homepage = ""; + # license = licenses.mit; + }; + }; + }); + devShells = forAllSystems (system: let pkgs = nixpkgsFor.${system}; From 870ddce2007668d3d6472b8a236818a54b7d5e22 Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Wed, 16 Aug 2023 09:32:02 +0100 Subject: [PATCH 132/294] WIP- Modifying flake.nix for Swagger tool --- flake.nix | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/flake.nix b/flake.nix index c02f0e749b..e6bd13d6a7 100644 --- a/flake.nix +++ b/flake.nix @@ -21,21 +21,34 @@ in { swagger-cli = pkgs.buildNpmPackage rec { pname = "swagger-cli"; - version = "4.0.4"; + version = "4.0.5"; src = pkgs.fetchFromGitHub { owner = "empire-medical"; repo = pname; - rev = "v${version}"; - hash = null; # "sha256-BR+ZGkBBfd0dSQqAvujsbgsEPFYw/ThrylxUbOksYxM="; + rev = "d2a9e4d9b6675a6003ba74669e69df23db979e07"; + hash = "sha256-fvKWQibOume+r3ScLTxJMapdD/FUtKh9V6gBHH5dL7o="; # This is already correct! }; - npmDepsHash = null; # "sha256-tuEfyePwlOy2/mOPdXbqJskO6IowvAP4DWg8xSZwbJw="; + npmDepsHash = "sha256-go9eYGCZmbwRArHVTVa6mxL+kjvBcrLxKw2iVv0a5hY="; - # The prepack script runs the build script, which we'd rather do in the build phase. - npmPackFlags = [ "--ignore-scripts" ]; + # # The prepack script runs the build script, which we'd rather do in the build phase. + npmFlags = [ "--legacy-peer-deps" ]; + makeCacheWritable = true; - # NODE_OPTIONS = "--openssl-legacy-provider"; + # # NODE_OPTIONS = "--openssl-legacy-provider"; + # src = pkgs.fetchFromGitHub { + # owner = "APIDevTools"; + # repo = "swagger-cli"; + # rev = "v${version}"; + # sha256 = "sha256-WgzfSd57vRwa1HrSgNxD0F5ckczBkOaVmrEZ9tMAcRA="; + # }; + + # npmDepsHash = "sha256-go9eYGCZmbwRArHVTVa6mxL+kjvBcrLxKw2iVv0a5hY="; + + buildPhase = '' + npm run bump + ''; meta = { description = '' @@ -88,7 +101,7 @@ # # jdwpkgs.rubyPackages.cf-uaac shellcheck - swagger-cli + # swagger-cli temurin-bin yq-go ]; From 56acf50ffb33d07ac4f12bccb52849240f3fafa5 Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Wed, 16 Aug 2023 15:30:26 +0100 Subject: [PATCH 133/294] WIP- Adding forked swagger tool as dependency for nix --- flake.lock | 8 ++++---- flake.nix | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index d3ac1f689c..9805f1ea4e 100644 --- a/flake.lock +++ b/flake.lock @@ -2,16 +2,16 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1691899779, - "narHash": "sha256-IBf4KVr/UQJlzrqB2/IHtlvmwsvyIVLPerSzCPU/6Xk=", + "lastModified": 1692134936, + "narHash": "sha256-Z68O969cioC6I3k/AFBxsuEwpJwt4l9fzwuAMUhCCs0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "100a1550b0e7a64b960c625b656f9229bdef5f87", + "rev": "bfd953b2c6de4f550f75461bcc5768b6f966be10", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixos-23.05", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index e6bd13d6a7..41599b377f 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Dependencies of app-autoscaler-release"; inputs = { - nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable; + nixpkgs.url = github:NixOS/nixpkgs/nixos-23.05; }; outputs = { self, nixpkgs }: @@ -29,6 +29,11 @@ rev = "d2a9e4d9b6675a6003ba74669e69df23db979e07"; hash = "sha256-fvKWQibOume+r3ScLTxJMapdD/FUtKh9V6gBHH5dL7o="; # This is already correct! }; + # npmDeps = pkgs.fetchNpmDeps { + # inherit forceGitDeps src srcs sourceRoot prePatch patches postPatch; + # name = "${name}-npm-deps"; + # hash = npmDepsHash; + # }; npmDepsHash = "sha256-go9eYGCZmbwRArHVTVa6mxL+kjvBcrLxKw2iVv0a5hY="; From a33e7debe2516f8fb3638007fb20d0ee3a4c6f5d Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Wed, 16 Aug 2023 15:56:50 +0100 Subject: [PATCH 134/294] Using --allow-remote to generate OpenAPI Specs --- flake.nix | 56 +------------------ src/acceptance/assets/app/go_app/Makefile | 4 +- .../app/go_app/internal/app/custom_metrics.go | 2 +- .../assets/app/go_app/internal/generate.go | 8 +-- 4 files changed, 9 insertions(+), 61 deletions(-) diff --git a/flake.nix b/flake.nix index 41599b377f..71225e69a8 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Dependencies of app-autoscaler-release"; inputs = { - nixpkgs.url = github:NixOS/nixpkgs/nixos-23.05; + nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable; }; outputs = { self, nixpkgs }: @@ -15,58 +15,6 @@ # Nixpkgs instantiated for supported system types. nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); in { - packages = forAllSystems (system: - let - pkgs = nixpkgsFor.${system}; - in { - swagger-cli = pkgs.buildNpmPackage rec { - pname = "swagger-cli"; - version = "4.0.5"; - - src = pkgs.fetchFromGitHub { - owner = "empire-medical"; - repo = pname; - rev = "d2a9e4d9b6675a6003ba74669e69df23db979e07"; - hash = "sha256-fvKWQibOume+r3ScLTxJMapdD/FUtKh9V6gBHH5dL7o="; # This is already correct! - }; - # npmDeps = pkgs.fetchNpmDeps { - # inherit forceGitDeps src srcs sourceRoot prePatch patches postPatch; - # name = "${name}-npm-deps"; - # hash = npmDepsHash; - # }; - - npmDepsHash = "sha256-go9eYGCZmbwRArHVTVa6mxL+kjvBcrLxKw2iVv0a5hY="; - - # # The prepack script runs the build script, which we'd rather do in the build phase. - npmFlags = [ "--legacy-peer-deps" ]; - makeCacheWritable = true; - - # # NODE_OPTIONS = "--openssl-legacy-provider"; - # src = pkgs.fetchFromGitHub { - # owner = "APIDevTools"; - # repo = "swagger-cli"; - # rev = "v${version}"; - # sha256 = "sha256-WgzfSd57vRwa1HrSgNxD0F5ckczBkOaVmrEZ9tMAcRA="; - # }; - - # npmDepsHash = "sha256-go9eYGCZmbwRArHVTVa6mxL+kjvBcrLxKw2iVv0a5hY="; - - buildPhase = '' - npm run bump - ''; - - meta = { - description = '' - Validate Swagger/OpenAPI files in JSON or YAML format - Supports multi-file API definitions via $ref pointers - Bundle multiple Swagger/OpenAPI files into one combined file - ''; - homepage = ""; - # license = licenses.mit; - }; - }; - }); - devShells = forAllSystems (system: let pkgs = nixpkgsFor.${system}; @@ -106,7 +54,7 @@ # # jdwpkgs.rubyPackages.cf-uaac shellcheck - # swagger-cli + swagger-cli temurin-bin yq-go ]; diff --git a/src/acceptance/assets/app/go_app/Makefile b/src/acceptance/assets/app/go_app/Makefile index 1acc9e3d40..10af4ae81c 100644 --- a/src/acceptance/assets/app/go_app/Makefile +++ b/src/acceptance/assets/app/go_app/Makefile @@ -56,7 +56,7 @@ deploy: build ./deploy.sh openapi-spec-path := ../../../../../api -openapi-specs := $(wildcard ${openapi-spec-path}/*.openapi.yaml) +openapi-specs-list := $(wildcard ${openapi-spec-path}/*.openapi.yaml) openapi-specs-bundled-path := ./internal/openapi-specs.bundled bundled-openapi-specs: ${bundled-openapi-specs-list} @@ -75,7 +75,7 @@ ${bundled-openapi-specs-list}: $(patsubst %.openapi.bundled.yaml,${openapi-spec- $(patsubst %.openapi.bundled.yaml,${openapi-spec-path}/%.openapi.yaml,$(notdir $@)) \ --outfile '$@' -generate: go.mod ${bundled-openapi-specs-list} +generate: go.mod ${openapi-specs-list} go generate ./... .PHONY: clean diff --git a/src/acceptance/assets/app/go_app/internal/app/custom_metrics.go b/src/acceptance/assets/app/go_app/internal/app/custom_metrics.go index 44b2c84d72..fd6232dc1a 100644 --- a/src/acceptance/assets/app/go_app/internal/app/custom_metrics.go +++ b/src/acceptance/assets/app/go_app/internal/app/custom_metrics.go @@ -69,7 +69,7 @@ func (_ *CustomMetricAPIClient) PostCustomMetric(ctx context.Context, appConfig } } - appId := appConfig.AppID + appId := api.GUID(appConfig.AppID) autoscalerCredentials, err := getAutoscalerCredentials(appConfig) if err != nil { return err diff --git a/src/acceptance/assets/app/go_app/internal/generate.go b/src/acceptance/assets/app/go_app/internal/generate.go index b59a8a8387..0e92d5202b 100644 --- a/src/acceptance/assets/app/go_app/internal/generate.go +++ b/src/acceptance/assets/app/go_app/internal/generate.go @@ -1,6 +1,6 @@ package internal -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --allow-remote --target applicationmetric --clean ../internal/openapi-specs.bundled/application-metric-api.openapi.bundled.yaml -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --allow-remote --debug.ignoreNotImplemented "mutualTLS security" --target custommetrics --clean ../internal/openapi-specs.bundled/custom-metrics-api.openapi.bundled.yaml -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --allow-remote --target policy --clean ../internal/openapi-specs.bundled/policy-api.openapi.bundled.yaml -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --allow-remote --target scalinghistory --clean ../internal/openapi-specs.bundled/scaling-history-api.openapi.bundled.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --allow-remote --target applicationmetric --clean ../../../../../../api/application-metric-api.openapi.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --allow-remote --debug.ignoreNotImplemented "mutualTLS security" --target custommetrics --clean ../../../../../../api/custom-metrics-api.openapi.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --allow-remote --target policy --clean ../../../../../../api/policy-api.openapi.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --allow-remote --target scalinghistory --clean ../../../../../../api/scaling-history-api.openapi.yaml From f520c16d49c7ea7272300cf7c018442f1667c765 Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Wed, 16 Aug 2023 16:28:30 +0100 Subject: [PATCH 135/294] Cleanup for API files --- api/policy-api.openapi.yaml | 36 ++++------------------------ api/scaling-history-api.openapi.yaml | 14 ++++------- 2 files changed, 9 insertions(+), 41 deletions(-) diff --git a/api/policy-api.openapi.yaml b/api/policy-api.openapi.yaml index 9c423b3b9f..f68e03fd26 100644 --- a/api/policy-api.openapi.yaml +++ b/api/policy-api.openapi.yaml @@ -31,7 +31,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Policy" #TODO + $ref: "#/components/schemas/Policy" responses: "200": description: "OK" @@ -92,24 +92,16 @@ components: items: $ref: '#/components/schemas/ScalingRule' ScalingRule: - required: # https://github.com/go-swagger/go-swagger/issues/1425 + required: - threshold - operator - adjustment properties: metric_type: - # schema: - # description: | - # One user-defined custom metric type or one of the system-default metric types, which are: - # "memoryused", "memoryutil", "responsetime", "throughput" and "cpu" - # type: string - # example: memoryused $ref: "./shared_definitions.yaml#/schemas/metric_type" threshold: description: | The boundary when metric value exceeds is considered as a breach - # required: true - # schema: type: integer format: int64 example: 30 @@ -132,13 +124,13 @@ components: description: | Time duration(in seconds) to fire scaling event if it keeps breaching type: integer - format: int64 # this is time in seconds + format: int64 example: 600 cool_down_secs: description: | The time duration (in seconds) to wait before the next scaling kicks in type: integer - format: int64 # this is time in seconds + format: int64 example: 300 schedules: type: array @@ -149,9 +141,7 @@ components: - timezone properties: timezone: - description: Using timezone definition of Java #https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html - Do we need to implement it? - #required: true - # schema: + description: Using timezone definition of Java type: string example: Asia/Shanghai # TODO: Try to make use of @@ -179,15 +169,11 @@ components: example: 2016-07-23 start_time: description: the start time of the schedule in HH:MM format - #required: true - # schema: type: string pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ example: 11:00 end_time: description: the end time of the schedule in HH:MM format - #required: true - # schema: type: string pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ example: 19:30 @@ -198,15 +184,11 @@ components: example: [5, 15, 25] instance_min_count: description: minimal number of instance count for this schedule - #required: true - # schema: type: integer format: int64 example: 3 instance_max_count: description: maximal number of instance count for this schedule - #required: true - # schema: type: integer format: int64 example: 10 @@ -228,29 +210,21 @@ components: properties: start_date_time: description: the start time of the schedule. Must be a future time - #required: true - # schema: type: string pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/ example: 2015-01-04T20:00 end_date_time: description: the start time of the schedule. Must be a future time - #required: true - # schema: type: string pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/ example: 2015-01-04T20:00 instance_min_count: description: minimal number of instance count for this schedule - #required: true - # schema: type: integer format: int64 example: 2 instance_max_count: description: maximal number of instance count for this schedule - #required: true - # schema: type: integer format: int64 example: 5 diff --git a/api/scaling-history-api.openapi.yaml b/api/scaling-history-api.openapi.yaml index 3d4f740f3b..7839b7f8ee 100644 --- a/api/scaling-history-api.openapi.yaml +++ b/api/scaling-history-api.openapi.yaml @@ -50,7 +50,7 @@ paths: description: The page number to query schema: type: integer - minimum: 1 # Or Should it be "1"? + minimum: 1 default: 1 example: page=1 - name: results-per-page @@ -58,7 +58,7 @@ paths: description: Number of entries shown per page. schema: type: integer - minimum: 0 # Or Should it be "1"? + minimum: 0 default: 50 example: results-per-page=10 get: @@ -112,12 +112,6 @@ components: items: $ref: '#/components/schemas/HistoryEntry' HistoryEntry: - # Here we create manually a tagged union. For discrimination, we use the property "status". - # - # See as well: - # + - # + - # + allOf: - $ref: "#/components/schemas/HistoryEntryCommon" - oneOf: @@ -193,7 +187,7 @@ components: description: Description of an ignored scaling event in history. type: object properties: - message: # Why not `scaling_ignoration_reason`? + ignore_reason: type: string description: | In case the scaling was ignored, the reason is provided in this field. @@ -201,7 +195,7 @@ components: HistorySuccessEntry: description: Description of a successful scaling event event in history. type: object - properties: {} # No extra fields needed in this variant. + properties: {} securitySchemes: bearerAuth: type: http From 028453a3e7673c3420b4f1e41d818a0a90eda354 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 16 Aug 2023 19:24:07 +0000 Subject: [PATCH 136/294] chore(deps): update dependency gruntwork-io/terragrunt to v0.50.3 (#2058) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index e860348359..8ba4856c2c 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.4 terraform 1.5.5 terraform-lsp -terragrunt 0.50.0 +terragrunt 0.50.3 From 03fd07fe024a3f341e2c9c0c814249c3000b009d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 16 Aug 2023 20:11:46 +0000 Subject: [PATCH 137/294] chore(deps): update google/cloud-sdk docker tag to v443 (#2059) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- ci/terragrunt/.tool-versions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.tool-versions b/.tool-versions index 6e7986ba36..1f7b479a8c 100644 --- a/.tool-versions +++ b/.tool-versions @@ -4,7 +4,7 @@ bosh 7.3.1 cf 8.7.1 concourse 7.10.0 direnv 2.32.3 -gcloud 442.0.0 +gcloud 443.0.0 ginkgo 2.11.0 golang 1.20.6 golangci-lint 1.54.1 diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 8ba4856c2c..7a1735bf72 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,4 +1,4 @@ -gcloud 442.0.0 +gcloud 443.0.0 helm 3.12.3 python 3.11.4 terraform 1.5.5 From 09b92abb571697a4517b3b216e8130053d3e2c1e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 16 Aug 2023 23:56:32 +0000 Subject: [PATCH 138/294] chore(deps): update dependency bosh-cli to v7.4.0 (#2060) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/dockerfiles/autoscaler-deploy/Dockerfile | 2 +- ci/dockerfiles/autoscaler-test/Dockerfile | 2 +- ci/dockerfiles/autoscaler-tools/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/dockerfiles/autoscaler-deploy/Dockerfile b/ci/dockerfiles/autoscaler-deploy/Dockerfile index 97f4ae101f..987c813bdf 100644 --- a/ci/dockerfiles/autoscaler-deploy/Dockerfile +++ b/ci/dockerfiles/autoscaler-deploy/Dockerfile @@ -46,7 +46,7 @@ ENV PATH $PATH:$GOPATH/bin:/usr/local/go/bin # Install bosh_cli # renovate: datasource=github-releases depName=bosh-cli lookupName=cloudfoundry/bosh-cli -ENV BOSH_VERSION 7.3.1 +ENV BOSH_VERSION 7.4.0 RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_VERSION}/bosh-cli-${BOSH_VERSION}-linux-amd64 && \ mv bosh-cli-* /usr/local/bin/bosh && \ chmod +x /usr/local/bin/bosh diff --git a/ci/dockerfiles/autoscaler-test/Dockerfile b/ci/dockerfiles/autoscaler-test/Dockerfile index 4d7e8b7e27..47538c119d 100644 --- a/ci/dockerfiles/autoscaler-test/Dockerfile +++ b/ci/dockerfiles/autoscaler-test/Dockerfile @@ -57,7 +57,7 @@ RUN \ # Install bosh_cli # renovate: datasource=github-releases depName=bosh-cli lookupName=cloudfoundry/bosh-cli -ENV BOSH_VERSION 7.3.1 +ENV BOSH_VERSION 7.4.0 RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_VERSION}/bosh-cli-${BOSH_VERSION}-linux-amd64 && \ mv bosh-cli-* /usr/local/bin/bosh && \ chmod +x /usr/local/bin/bosh diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index 570065df2d..f4b073509c 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -62,7 +62,7 @@ RUN apt-get update && \ # Install bosh_cli # renovate: datasource=github-releases depName=bosh-cli lookupName=cloudfoundry/bosh-cli -ARG BOSH_VERSION=7.3.1 +ARG BOSH_VERSION=7.4.0 RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_VERSION}/bosh-cli-${BOSH_VERSION}-linux-amd64 && \ mv bosh-cli-* /usr/local/bin/bosh && \ chmod +x /usr/local/bin/bosh From 628aae88be4de2ce45d214ff887c6c469f008d8e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 17 Aug 2023 00:43:31 +0000 Subject: [PATCH 139/294] chore(deps): update dependency cloudfoundry/bosh-cli to v7.4.0 (#2061) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index 1f7b479a8c..b571d5b846 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,6 +1,6 @@ act 0.2.49 actionlint 1.6.25 -bosh 7.3.1 +bosh 7.4.0 cf 8.7.1 concourse 7.10.0 direnv 2.32.3 From 19efc79b1cf1c5f6b39402527305a56d51c9e30a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 17 Aug 2023 01:44:28 +0000 Subject: [PATCH 140/294] fix(deps): update module github.com/maxbrunsfeld/counterfeiter/v6 to v6.7.0 (#2063) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 2 +- src/acceptance/assets/app/go_app/go.sum | 4 ++-- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index 8d44e28004..a8bf0d4231 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -12,7 +12,7 @@ require ( github.com/go-logr/logr v1.2.4 github.com/go-logr/zapr v1.2.4 github.com/json-iterator/go v1.1.12 - github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2 + github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0 github.com/mitchellh/mapstructure v1.5.0 github.com/ogen-go/ogen v0.73.0 github.com/onsi/ginkgo/v2 v2.11.0 diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index 2f5ebf1a54..38aa41f734 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -99,8 +99,8 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2 h1:CEy7VRV/Vbm7YLuZo3pGKa5GlPX4zzric6dEubIJTx0= -github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2/go.mod h1:otjOyjeqm3LALYcmX2AQIGH0VlojDoSd8aGOzsHAnBc= +github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0 h1:z0CfPybq3CxaJvrrpf7Gme1psZTqHhJxf83q6apkSpI= +github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0/go.mod h1:RVP6/F85JyxTrbJxWIdKU2vlSvK48iCMnMXRkSz7xtg= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 7e1ae3b8a3..bc8e743df3 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -20,7 +20,7 @@ require ( github.com/hashicorp/go-retryablehttp v0.7.4 github.com/jackc/pgx/v5 v5.4.3 github.com/jmoiron/sqlx v1.3.5 - github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2 + github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0 github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d github.com/onsi/ginkgo/v2 v2.11.0 github.com/onsi/gomega v1.27.10 diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index c778969b49..ac211b070b 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1107,8 +1107,8 @@ github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4 github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2 h1:CEy7VRV/Vbm7YLuZo3pGKa5GlPX4zzric6dEubIJTx0= -github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2/go.mod h1:otjOyjeqm3LALYcmX2AQIGH0VlojDoSd8aGOzsHAnBc= +github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0 h1:z0CfPybq3CxaJvrrpf7Gme1psZTqHhJxf83q6apkSpI= +github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0/go.mod h1:RVP6/F85JyxTrbJxWIdKU2vlSvK48iCMnMXRkSz7xtg= github.com/mbilski/exhaustivestruct v1.2.0 h1:wCBmUnSYufAHO6J4AVWY6ff+oxWxsVFrwgOdMUQePUo= github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= github.com/mgechev/revive v1.3.2 h1:Wb8NQKBaALBJ3xrrj4zpwJwqwNA6nDpyJSEQWcCka6U= From c2af612b8163fbc5c0bb91e1b261edede8e300d9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 17 Aug 2023 02:52:02 +0000 Subject: [PATCH 141/294] fix(deps): update module github.com/cloudfoundry/cf-test-helpers/v2 to v2.7.0 (#2062) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/go.mod | 2 +- src/acceptance/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/acceptance/go.mod b/src/acceptance/go.mod index ff06dae55d..fd80f52e40 100644 --- a/src/acceptance/go.mod +++ b/src/acceptance/go.mod @@ -3,7 +3,7 @@ module acceptance go 1.20 require ( - github.com/cloudfoundry/cf-test-helpers/v2 v2.6.0 + github.com/cloudfoundry/cf-test-helpers/v2 v2.7.0 github.com/onsi/ginkgo/v2 v2.11.0 github.com/onsi/gomega v1.27.10 github.com/stretchr/testify v1.8.4 diff --git a/src/acceptance/go.sum b/src/acceptance/go.sum index a6f5854efd..2bbcc4ee51 100644 --- a/src/acceptance/go.sum +++ b/src/acceptance/go.sum @@ -1,5 +1,5 @@ -github.com/cloudfoundry/cf-test-helpers/v2 v2.6.0 h1:7Qg0kpKz8uDpYO9ekoV6r0/tA2Yxp15TOFottL4puyU= -github.com/cloudfoundry/cf-test-helpers/v2 v2.6.0/go.mod h1:F9lO5YQLrrF7xf5liS/pRTE9uuyZ8TQ8N2ft/mR5hv8= +github.com/cloudfoundry/cf-test-helpers/v2 v2.7.0 h1:QYPAI6JCL62F8ht6Tz9sDWKwTdoWTV5tKKvDDCZwoJ0= +github.com/cloudfoundry/cf-test-helpers/v2 v2.7.0/go.mod h1:F9lO5YQLrrF7xf5liS/pRTE9uuyZ8TQ8N2ft/mR5hv8= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= From d2c99acfc63f2a8ef003d3fd3a419c93a30517a1 Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Thu, 17 Aug 2023 14:55:02 +0100 Subject: [PATCH 142/294] Clean-Up for MakeFile --- src/acceptance/assets/app/go_app/Makefile | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/acceptance/assets/app/go_app/Makefile b/src/acceptance/assets/app/go_app/Makefile index 10af4ae81c..9b2ce1138f 100644 --- a/src/acceptance/assets/app/go_app/Makefile +++ b/src/acceptance/assets/app/go_app/Makefile @@ -57,23 +57,6 @@ deploy: build openapi-spec-path := ../../../../../api openapi-specs-list := $(wildcard ${openapi-spec-path}/*.openapi.yaml) -openapi-specs-bundled-path := ./internal/openapi-specs.bundled - -bundled-openapi-specs: ${bundled-openapi-specs-list} -bundled-openapi-specs-list := \ - ${openapi-specs-bundled-path}/application-metric-api.openapi.bundled.yaml \ - ${openapi-specs-bundled-path}/custom-metrics-api.openapi.bundled.yaml \ - ${openapi-specs-bundled-path}/policy-api.openapi.bundled.yaml \ - ${openapi-specs-bundled-path}/scaling-history-api.openapi.bundled.yaml - -# # Treat these files as intermediate ones and don't rebuild everything -# # just because they are missing. -.SECONDARY: ${bundled-openapi-specs-list} - -${bundled-openapi-specs-list}: $(patsubst %.openapi.bundled.yaml,${openapi-spec-path}/%.openapi.yaml,$(notdir $@)) - swagger-cli bundle \ - $(patsubst %.openapi.bundled.yaml,${openapi-spec-path}/%.openapi.yaml,$(notdir $@)) \ - --outfile '$@' generate: go.mod ${openapi-specs-list} go generate ./... From 88547538d8b007196c629c8ca0722e02d8e06f32 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 18 Aug 2023 02:49:41 +0000 Subject: [PATCH 143/294] fix(deps): update golang.org/x/exp digest to d852ddb (#2069) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 4 ++-- src/acceptance/assets/app/go_app/go.sum | 8 ++++---- src/autoscaler/go.mod | 4 ++-- src/autoscaler/go.sum | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index a8bf0d4231..8f213630b2 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -25,7 +25,7 @@ require ( go.opentelemetry.io/otel/metric v1.16.0 go.opentelemetry.io/otel/trace v1.16.0 go.uber.org/zap v1.25.0 - golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb + golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 ) require ( @@ -66,7 +66,7 @@ require ( golang.org/x/sync v0.3.0 // indirect golang.org/x/sys v0.11.0 // indirect golang.org/x/text v0.12.0 // indirect - golang.org/x/tools v0.12.0 // indirect + golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index 38aa41f734..a9a8897cc3 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -187,8 +187,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= -golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA= -golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= +golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= @@ -230,8 +230,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= -golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= +golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 h1:Vve/L0v7CXXuxUmaMGIEK/dEeq7uiqb5qBgQrZzIE7E= +golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index bc8e743df3..38dd261a29 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -35,7 +35,7 @@ require ( github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26 github.com/xeipuuv/gojsonschema v1.2.0 golang.org/x/crypto v0.12.0 - golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb + golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 golang.org/x/net v0.14.0 golang.org/x/time v0.3.0 google.golang.org/grpc v1.57.0 @@ -229,7 +229,7 @@ require ( golang.org/x/sys v0.11.0 // indirect golang.org/x/term v0.11.0 // indirect golang.org/x/text v0.12.0 // indirect - golang.org/x/tools v0.12.0 // indirect + golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index ac211b070b..4c48eb64b1 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1455,8 +1455,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA= -golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= +golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 h1:jWGQJV4niP+CCmFW9ekjA9Zx8vYORzOUH2/Nl5WPuLQ= @@ -1842,8 +1842,8 @@ golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= -golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= -golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= +golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 h1:Vve/L0v7CXXuxUmaMGIEK/dEeq7uiqb5qBgQrZzIE7E= +golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From df6624cda5a14accf7e107b8e2040216fb64a69c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 18 Aug 2023 04:00:37 +0000 Subject: [PATCH 144/294] chore(deps): update dependency gruntwork-io/terragrunt to v0.50.4 (#2070) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 7a1735bf72..f2867750e6 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.4 terraform 1.5.5 terraform-lsp -terragrunt 0.50.3 +terragrunt 0.50.4 From 726a063b7dce43707cf26ecf816ee6f345d2f2ce Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Fri, 18 Aug 2023 09:47:24 +0100 Subject: [PATCH 145/294] Updating nix.flake and changes for openapi file --- api/scaling-history-api.openapi.yaml | 2 +- flake.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/scaling-history-api.openapi.yaml b/api/scaling-history-api.openapi.yaml index 7839b7f8ee..eac49d6cf7 100644 --- a/api/scaling-history-api.openapi.yaml +++ b/api/scaling-history-api.openapi.yaml @@ -195,7 +195,7 @@ components: HistorySuccessEntry: description: Description of a successful scaling event event in history. type: object - properties: {} + properties: {} # No extra fields needed in this variant. securitySchemes: bearerAuth: type: http diff --git a/flake.lock b/flake.lock index 9805f1ea4e..bfc4792983 100644 --- a/flake.lock +++ b/flake.lock @@ -2,16 +2,16 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1692134936, - "narHash": "sha256-Z68O969cioC6I3k/AFBxsuEwpJwt4l9fzwuAMUhCCs0=", + "lastModified": 1692174805, + "narHash": "sha256-xmNPFDi/AUMIxwgOH/IVom55Dks34u1g7sFKKebxUm0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bfd953b2c6de4f550f75461bcc5768b6f966be10", + "rev": "caac0eb6bdcad0b32cb2522e03e4002c8975c62e", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.05", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } From 759c2d7c6944685e35417e6ff17c3a0a5603417f Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Fri, 18 Aug 2023 12:04:31 +0200 Subject: [PATCH 146/294] Trim down `tools.go` usage `tools.go` should only import packages that are used when running go generate and not be used as a generic tool installer, for that we use `.tool-versions` and the Nix flake. --- .github/workflows/golangci-lint.yaml | 2 +- .golangci.yaml | 4 +- Makefile | 46 +- .../scripts/run-integration-tests.sh | 1 - ci/autoscaler/scripts/run-unit-tests.sh | 1 - scripts/generate_test_certs.sh | 2 +- src/acceptance/Makefile | 6 +- .../assets/app/go_app/tools/tools.go | 5 +- src/acceptance/tools.go | 8 - src/autoscaler/Makefile | 17 +- src/autoscaler/fakes/fakes.go | 40 +- src/autoscaler/go.mod | 163 +----- src/autoscaler/go.sum | 472 +----------------- src/autoscaler/tools.go | 6 +- src/changelog/Makefile | 6 +- src/changeloglockcleaner/Makefile | 7 +- src/changeloglockcleaner/tools.go | 7 - 17 files changed, 71 insertions(+), 722 deletions(-) delete mode 100644 src/acceptance/tools.go delete mode 100644 src/changeloglockcleaner/tools.go diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml index c891b0b36e..3f8b777b59 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/golangci-lint.yaml @@ -24,7 +24,7 @@ jobs: - name: get golangci-lint version id: lint run: | - version=$(cat src/autoscaler/go.mod | grep golangci-lint | cut -d " " -f 2 | sed -E 's/(v[0-9]+\.[0-9]+.[0-9]+).*/\1/') + version=v$(cat .tool-versions | grep golangci-lint | cut -d " " -f 2 ) echo "golangci-lint version: '${version}'" echo "version=${version}" >> $GITHUB_OUTPUT; diff --git a/.golangci.yaml b/.golangci.yaml index 8505d36869..20fc310fcf 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -70,7 +70,7 @@ linters-settings: staticcheck: checks: ["all"] stylecheck: - go: "1.15" + go: "1.20" # https://staticcheck.io/docs/options#checks checks: ["all", "-ST1003", "-ST1005"] dot-import-whitelist: @@ -101,7 +101,7 @@ linters: - goprintffuncname - gosec - gosimple - # - gomoddirectives - commented out to allow replace directives + - gomoddirectives - gomodguard - ineffassign - misspell diff --git a/Makefile b/Makefile index bc598a8a2f..1a79a678db 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,8 @@ CI?=false VERSION?=0.0.testing DEST?=build +GOLANGCI_LINT_VERSION=v$(shell cat .tool-versions | grep golangci-lint | cut -d " " -f 2 ) + export BUILDIN_MODE?=false export DEBUG?=false export ACCEPTANCE_TESTS_FILE?=${DEST}/app-autoscaler-acceptance-tests-v${VERSION}.tgz @@ -46,12 +48,6 @@ target/init-db-${db_type}: @./scripts/initialise_db.sh ${db_type} @touch $@ -.PHONY: init -init: target/init -target/init: - @make -C src/autoscaler buildtools - @touch $@ - .PHONY: clean-autoscaler clean-java clean-vendor clean-acceptance clean: clean-vendor clean-autoscaler clean-java clean-targets clean-scheduler clean-certs clean-bosh-release clean-build clean-acceptance @make stop-db db_type=mysql @@ -86,23 +82,23 @@ clean-acceptance: @rm -rf src/acceptance/results &> /dev/null || true .PHONY: build build-test build-tests build-all $(all_modules) -build: init $(all_modules) +build: $(all_modules) build-tests: build-test -build-test: init $(addprefix test_,$(go_modules)) +build-test: $(addprefix test_,$(go_modules)) build-all: build build-test db: target/db target/db: @echo "# building $@" @cd src && mvn --no-transfer-progress package -pl db ${MVN_OPTS} && cd .. @touch $@ -scheduler: init +scheduler: @echo "# building $@" @cd src && mvn --no-transfer-progress package -pl scheduler ${MVN_OPTS} && cd .. -autoscaler: init +autoscaler: @make -C src/autoscaler build -changeloglockcleaner: init +changeloglockcleaner: @make -C src/changeloglockcleaner build -changelog: init +changelog: @make -C src/changelog build $(addprefix test_,$(go_modules)): @echo "# Compiling '$(patsubst test_%,%,$@)' tests" @@ -121,18 +117,18 @@ target/scheduler_test_certs: .PHONY: test test-autoscaler test-scheduler test-changelog test-changeloglockcleaner test: test-autoscaler test-scheduler test-changelog test-changeloglockcleaner test-acceptance-unit -test-autoscaler: check-db_type init init-db test-certs +test-autoscaler: check-db_type init-db test-certs @echo " - using DBURL=${DBURL} OPTS=${OPTS}" @make -C src/autoscaler test DBURL="${DBURL}" OPTS="${OPTS}" -test-autoscaler-suite: check-db_type init init-db test-certs +test-autoscaler-suite: check-db_type init-db test-certs @echo " - using DBURL=${DBURL} TEST=${TEST} OPTS=${OPTS}" @make -C src/autoscaler testsuite TEST=${TEST} DBURL="${DBURL}" OPTS="${OPTS}" -test-scheduler: check-db_type init init-db test-certs +test-scheduler: check-db_type init-db test-certs @export DB_HOST=${DB_HOST}; \ cd src && mvn test --no-transfer-progress -Dspring.profiles.include=${db_type} && cd .. test-changelog: init @make -C src/changelog test -test-changeloglockcleaner: init init-db test-certs +test-changeloglockcleaner: init-db test-certs @make -C src/changeloglockcleaner test DBURL="${DBURL}" test-acceptance-unit: @make -C src/acceptance test-unit @@ -221,16 +217,7 @@ integration: build init-db test-certs .PHONY:lint $(addprefix lint_,$(go_modules)) -lint: golangci-lint_check $(addprefix lint_,$(go_modules)) rubocop - -golangci-lint_check: - @current_version=$(shell golangci-lint version | cut -d " " -f 4);\ - current_major_version=$(shell golangci-lint version | cut -d " " -f 4| sed -E 's/v*([0-9]+\.[0-9]+)\..*/\1/');\ - expected_version=$(shell cat src/autoscaler/go.mod | grep golangci-lint | cut -d " " -f 2 | sed -E 's/v([0-9]+\.[0-9]+)\..*/\1/');\ - if [ "$${current_major_version}" != "$${expected_version}" ]; then \ - echo "ERROR: Expected to have golangci-lint version '$${expected_version}.x' but we have $${current_version}";\ - exit 1;\ - fi +lint: $(addprefix lint_,$(go_modules)) rubocop rubocop: @echo " - ruby scripts" @@ -249,7 +236,7 @@ lint-actions: $(addprefix lint_,$(go_modules)): lint_%: @echo " - linting: $(patsubst lint_%,%,$@)" - @pushd src/$(patsubst lint_%,%,$@) >/dev/null && golangci-lint run --config ${lint_config} ${OPTS} + @pushd src/$(patsubst lint_%,%,$@) >/dev/null && go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run --config ${lint_config} ${OPTS} .PHONY: spec-test spec-test: @@ -389,8 +376,3 @@ target/docker-login: docker-image: docker-login docker build -t ghcr.io/cloudfoundry/app-autoscaler-release-tools:latest ci/dockerfiles/autoscaler-tools docker push ghcr.io/cloudfoundry/app-autoscaler-release-tools:latest - -.PHONY: build-tools -build-tools: - make -C src/autoscaler buildtools - diff --git a/ci/autoscaler/scripts/run-integration-tests.sh b/ci/autoscaler/scripts/run-integration-tests.sh index e22173827e..3befe0c00a 100755 --- a/ci/autoscaler/scripts/run-integration-tests.sh +++ b/ci/autoscaler/scripts/run-integration-tests.sh @@ -12,7 +12,6 @@ pushd app-autoscaler-release POSTGRES_OPTS='--username=postgres --url=jdbc:postgresql://127.0.0.1/autoscaler --driver=org.postgresql.Driver' - make -C src/autoscaler buildtools ./src/scheduler/scripts/generate_unit_test_certs.sh ./scripts/generate_test_certs.sh diff --git a/ci/autoscaler/scripts/run-unit-tests.sh b/ci/autoscaler/scripts/run-unit-tests.sh index f810f3df99..0a09dd98f4 100755 --- a/ci/autoscaler/scripts/run-unit-tests.sh +++ b/ci/autoscaler/scripts/run-unit-tests.sh @@ -14,7 +14,6 @@ pushd app-autoscaler-release POSTGRES_OPTS='--username=postgres --url=jdbc:postgresql://127.0.0.1/autoscaler --driver=org.postgresql.Driver' - make -C src/autoscaler buildtools ./src/scheduler/scripts/generate_unit_test_certs.sh ./scripts/generate_test_certs.sh diff --git a/scripts/generate_test_certs.sh b/scripts/generate_test_certs.sh index d92db967d2..9397172a43 100755 --- a/scripts/generate_test_certs.sh +++ b/scripts/generate_test_certs.sh @@ -8,7 +8,7 @@ depot_path="${script_dir}/../test-certs" rm -rf "${depot_path}" mkdir -p "${depot_path}" -CERTSTRAP="go run github.com/square/certstrap@v1.2.0" +CERTSTRAP="go run github.com/square/certstrap@v1.3.0" # CA to distribute to autoscaler certs ${CERTSTRAP} --depot-path "${depot_path}" init --passphrase '' --common-name autoscalerCA --years "20" diff --git a/src/acceptance/Makefile b/src/acceptance/Makefile index a216cfc530..b89d3ab1c1 100644 --- a/src/acceptance/Makefile +++ b/src/acceptance/Makefile @@ -11,6 +11,8 @@ CGO_ENABLED = 0 export GOWORK=off BUILDTAGS := +GOLANGCI_LINT_VERSION=v$(shell cat ../../.tool-versions | grep golangci-lint | cut -d " " -f 2 ) + test_dirs=$(shell find . -name "*_test.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq) build_tests: $(addprefix build_test-,$(test_dirs)) build_test-%: @@ -34,7 +36,7 @@ test: bin/test $(filter-out $@,$(MAKECMDGOALS)) lint: - @golangci-lint run + @go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run lint-fix: - golangci-lint run --fix + go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run --fix diff --git a/src/acceptance/assets/app/go_app/tools/tools.go b/src/acceptance/assets/app/go_app/tools/tools.go index e86fd7753b..da48870917 100644 --- a/src/acceptance/assets/app/go_app/tools/tools.go +++ b/src/acceptance/assets/app/go_app/tools/tools.go @@ -7,6 +7,5 @@ import ( _ "github.com/ogen-go/ogen" ) -// This file imports packages that are used when running go generate, or used -// during the development process but not otherwise depended on by built code. - +// This file imports packages that are used when running go generate, +// but not otherwise depended on by built code. diff --git a/src/acceptance/tools.go b/src/acceptance/tools.go deleted file mode 100644 index 3bac4c0bb9..0000000000 --- a/src/acceptance/tools.go +++ /dev/null @@ -1,8 +0,0 @@ -//go:build tools -// +build tools - -package tools - -import ( - _ "github.com/onsi/ginkgo/v2/ginkgo" -) diff --git a/src/autoscaler/Makefile b/src/autoscaler/Makefile index 44ebff0fd0..4b1b405240 100644 --- a/src/autoscaler/Makefile +++ b/src/autoscaler/Makefile @@ -10,7 +10,7 @@ BUILDTAGS := export GOWORK=off BUILDFLAGS := -ldflags '-linkmode=external' -binaries=$(shell find . -name "main.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq) +binaries=$(shell find . -name "main.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq | grep -v vendor) test_dirs=$(shell find . -name "*_test.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq) export GO111MODULE=on @@ -75,21 +75,6 @@ fmt: importfmt @FORMATTED=`go fmt $(PACKAGE_DIRS)` @([[ ! -z "$(FORMATTED)" ]] && printf "Fixed unformatted files:\n$(FORMATTED)") || true -buildtools-force: - @echo "# Installing build tools" - go mod download - go install github.com/square/certstrap - go install github.com/onsi/ginkgo/v2/ginkgo - go install github.com/maxbrunsfeld/counterfeiter/v6 - go install github.com/golangci/golangci-lint/cmd/golangci-lint - -.PHONY: buildtools -buildtools: - @echo "# Installing build tools" - @which certstrap >/dev/null || go install github.com/square/certstrap - @which ginkgo >/dev/null && [ "v$(shell ginkgo version | awk '{ print $$3}')" = "$(shell cat go.mod | grep ginkgo | awk '{ print $$2}')" ] || go install github.com/onsi/ginkgo/v2/ginkgo - @which counterfeiter >/dev/null || go install github.com/maxbrunsfeld/counterfeiter/v6 - lint: @cd ../../; make lint_autoscaler OPTS=${OPTS} diff --git a/src/autoscaler/fakes/fakes.go b/src/autoscaler/fakes/fakes.go index 86dd0266f9..b4175329ca 100644 --- a/src/autoscaler/fakes/fakes.go +++ b/src/autoscaler/fakes/fakes.go @@ -1,21 +1,23 @@ package fakes -//go:generate counterfeiter -o ./fake_wshelper.go ../metricsgateway/helpers WSHelper -//go:generate counterfeiter -o ./fake_cf_client.go ../cf CFClient -//go:generate counterfeiter -o ./fake_policy_db.go ../db PolicyDB -//go:generate counterfeiter -o ./fake_scalingengine_db.go ../db ScalingEngineDB -//go:generate counterfeiter -o ./fake_scheduler_db.go ../db SchedulerDB -//go:generate counterfeiter -o ./fake_scalingengine.go ../scalingengine ScalingEngine -//go:generate counterfeiter -o ./fake_binding_db.go ../db BindingDB -//go:generate counterfeiter -o ./fake_credentials.go ../cred_helper Credentials -//go:generate counterfeiter -o ./fake_storedprocedure_db.go ../db StoredProcedureDB -//go:generate counterfeiter -o ./fake_metric_forwarder.go ../metricsforwarder/forwarder MetricForwarder -//go:generate counterfeiter -o ./fake_plan_checker.go ../api/plancheck PlanChecker -//go:generate counterfeiter -o ./fake_log_cache_client.go ../eventgenerator/client LogCacheClientReader -//go:generate counterfeiter -o ./fake_envelope_processor.go ../envelopeprocessor EnvelopeProcessor -//go:generate counterfeiter -o ./fake_log_cache_creator.go ../eventgenerator/client LogCacheClientCreator -//go:generate counterfeiter -o ./fake_metric_server_creator_creator.go ../eventgenerator/client MetricServerClientCreator -//go:generate counterfeiter -o ./fake_go_log_cache_client.go ../eventgenerator/client GoLogCacheClient -//go:generate counterfeiter -o ./fake_grpc.go ../eventgenerator/client GRPCOptions -//go:generate counterfeiter -o ./fake_envelope_processor_creator.go ../envelopeprocessor EnvelopeProcessorCreator -//go:generate counterfeiter -o ./fake_plan_checker.go ../api/plancheck PlanChecker +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate + +//counterfeiter:generate -o ./fake_wshelper.go ../metricsgateway/helpers WSHelper +//counterfeiter:generate -o ./fake_cf_client.go ../cf CFClient +//counterfeiter:generate -o ./fake_policy_db.go ../db PolicyDB +//counterfeiter:generate -o ./fake_scalingengine_db.go ../db ScalingEngineDB +//counterfeiter:generate -o ./fake_scheduler_db.go ../db SchedulerDB +//counterfeiter:generate -o ./fake_scalingengine.go ../scalingengine ScalingEngine +//counterfeiter:generate -o ./fake_binding_db.go ../db BindingDB +//counterfeiter:generate -o ./fake_credentials.go ../cred_helper Credentials +//counterfeiter:generate -o ./fake_storedprocedure_db.go ../db StoredProcedureDB +//counterfeiter:generate -o ./fake_metric_forwarder.go ../metricsforwarder/forwarder MetricForwarder +//counterfeiter:generate -o ./fake_plan_checker.go ../api/plancheck PlanChecker +//counterfeiter:generate -o ./fake_log_cache_client.go ../eventgenerator/client LogCacheClientReader +//counterfeiter:generate -o ./fake_envelope_processor.go ../envelopeprocessor EnvelopeProcessor +//counterfeiter:generate -o ./fake_log_cache_creator.go ../eventgenerator/client LogCacheClientCreator +//counterfeiter:generate -o ./fake_metric_server_creator_creator.go ../eventgenerator/client MetricServerClientCreator +//counterfeiter:generate -o ./fake_go_log_cache_client.go ../eventgenerator/client GoLogCacheClient +//counterfeiter:generate -o ./fake_grpc.go ../eventgenerator/client GRPCOptions +//counterfeiter:generate -o ./fake_envelope_processor_creator.go ../envelopeprocessor EnvelopeProcessorCreator +//counterfeiter:generate -o ./fake_plan_checker.go ../api/plancheck PlanChecker diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 38dd261a29..e07bad01d2 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -14,7 +14,6 @@ require ( github.com/go-chi/chi/v5 v5.0.10 github.com/go-sql-driver/mysql v1.7.1 github.com/golang/protobuf v1.5.3 - github.com/golangci/golangci-lint v1.54.1 github.com/gorilla/mux v1.8.0 github.com/gorilla/websocket v1.5.0 github.com/hashicorp/go-retryablehttp v0.7.4 @@ -29,7 +28,6 @@ require ( github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.16.0 github.com/rubyist/circuitbreaker v2.2.1+incompatible - github.com/square/certstrap v1.3.0 github.com/steinfletcher/apitest v1.5.15 github.com/stretchr/testify v1.8.4 github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26 @@ -43,202 +41,47 @@ require ( ) require ( - 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect - 4d63.com/gochecknoglobals v0.2.1 // indirect code.cloudfoundry.org/go-diodes v0.0.0-20221212174934-b8cb650f2489 // indirect - filippo.io/edwards25519 v1.0.0-rc.1 // indirect - github.com/4meepo/tagalign v1.3.2 // indirect - github.com/Abirdcfly/dupword v0.0.12 // indirect - github.com/Antonboom/errname v0.1.10 // indirect - github.com/Antonboom/nilnil v0.1.5 // indirect - github.com/BurntSushi/toml v1.3.2 // indirect - github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect - github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0 // indirect - github.com/Masterminds/semver v1.5.0 // indirect - github.com/OpenPeeDeeP/depguard/v2 v2.1.0 // indirect - github.com/alexkohler/nakedret/v2 v2.0.2 // indirect - github.com/alexkohler/prealloc v1.0.0 // indirect - github.com/alingse/asasalint v0.0.11 // indirect - github.com/ashanbrown/forbidigo v1.6.0 // indirect - github.com/ashanbrown/makezero v1.1.1 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bkielbasa/cyclop v1.2.1 // indirect github.com/blang/semver v3.5.1+incompatible // indirect - github.com/blizzy78/varnamelen v0.8.0 // indirect - github.com/bombsimon/wsl/v3 v3.4.0 // indirect - github.com/breml/bidichk v0.2.4 // indirect - github.com/breml/errchkjson v0.3.1 // indirect - github.com/butuzov/ireturn v0.2.0 // indirect - github.com/butuzov/mirror v1.1.0 // indirect github.com/cenk/backoff v2.2.1+incompatible // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/charithe/durationcheck v0.0.10 // indirect - github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect - github.com/curioswitch/go-reassign v0.2.0 // indirect - github.com/daixiang0/gci v0.11.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/denis-tingaikin/go-header v0.4.3 // indirect - github.com/esimonov/ifshort v1.0.4 // indirect - github.com/ettle/strcase v0.1.1 // indirect github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect github.com/fatih/color v1.15.0 // indirect - github.com/fatih/structtag v1.2.0 // indirect - github.com/firefart/nonamedreturns v1.0.4 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect - github.com/fzipp/gocyclo v0.6.0 // indirect - github.com/go-critic/go-critic v0.9.0 // indirect github.com/go-logr/logr v1.2.4 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect - github.com/go-toolsmith/astcast v1.1.0 // indirect - github.com/go-toolsmith/astcopy v1.1.0 // indirect - github.com/go-toolsmith/astequal v1.1.0 // indirect - github.com/go-toolsmith/astfmt v1.1.0 // indirect - github.com/go-toolsmith/astp v1.1.0 // indirect - github.com/go-toolsmith/strparse v1.1.0 // indirect - github.com/go-toolsmith/typep v1.1.0 // indirect - github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect - github.com/gobwas/glob v0.2.3 // indirect - github.com/gofrs/flock v0.8.1 // indirect - github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect - github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect - github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect - github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2 // indirect - github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect - github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect - github.com/golangci/misspell v0.4.1 // indirect - github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect - github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 // indirect - github.com/gostaticanalysis/analysisutil v0.7.1 // indirect - github.com/gostaticanalysis/comment v1.4.2 // indirect - github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect - github.com/gostaticanalysis/nilerr v0.1.1 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hexops/gotextdiff v1.0.3 // indirect - github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c // indirect - github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/hashicorp/go-hclog v1.2.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect github.com/jackc/puddle/v2 v2.2.1 // indirect - github.com/jgautheron/goconst v1.5.1 // indirect - github.com/jingyugao/rowserrcheck v1.1.1 // indirect - github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect - github.com/julz/importas v0.1.0 // indirect - github.com/kisielk/errcheck v1.6.3 // indirect - github.com/kisielk/gotool v1.0.0 // indirect - github.com/kkHAIKE/contextcheck v1.1.4 // indirect - github.com/kulti/thelper v0.6.3 // indirect - github.com/kunwardeep/paralleltest v1.0.8 // indirect - github.com/kyoh86/exportloopref v0.1.11 // indirect - github.com/ldez/gomoddirectives v0.2.3 // indirect - github.com/ldez/tagliatelle v0.5.0 // indirect - github.com/leonklingele/grouper v1.1.1 // indirect - github.com/lufeee/execinquery v1.2.1 // indirect - github.com/magiconair/properties v1.8.6 // indirect - github.com/maratori/testableexamples v1.0.0 // indirect - github.com/maratori/testpackage v1.1.1 // indirect - github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 // indirect + github.com/lib/pq v1.10.9 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.17 // indirect - github.com/mattn/go-runewidth v0.0.9 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/mbilski/exhaustivestruct v1.2.0 // indirect - github.com/mgechev/revive v1.3.2 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/moricho/tparallel v0.3.1 // indirect - github.com/nakabonne/nestif v0.3.1 // indirect - github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect - github.com/nishanths/exhaustive v0.11.0 // indirect - github.com/nishanths/predeclared v0.2.2 // indirect - github.com/nunnatsa/ginkgolinter v0.13.3 // indirect - github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/openzipkin/zipkin-go v0.4.1 // indirect github.com/pborman/uuid v1.2.1 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.5 // indirect github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/polyfloyd/go-errorlint v1.4.3 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.10.1 // indirect - github.com/quasilyte/go-ruleguard v0.4.0 // indirect - github.com/quasilyte/gogrep v0.5.0 // indirect - github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect - github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect - github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/ryancurrah/gomodguard v1.3.0 // indirect - github.com/ryanrolds/sqlclosecheck v0.4.0 // indirect - github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect - github.com/sashamelentyev/interfacebloat v1.1.0 // indirect - github.com/sashamelentyev/usestdlibvars v1.23.0 // indirect - github.com/securego/gosec/v2 v2.16.0 // indirect - github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect - github.com/sirupsen/logrus v1.9.3 // indirect - github.com/sivchari/containedctx v1.0.3 // indirect - github.com/sivchari/nosnakecase v1.7.0 // indirect - github.com/sivchari/tenv v1.7.1 // indirect - github.com/sonatard/noctx v0.0.2 // indirect - github.com/sourcegraph/go-diff v0.7.0 // indirect - github.com/spf13/afero v1.9.2 // indirect - github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/cobra v1.7.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.13.0 // indirect - github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect - github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect - github.com/stretchr/objx v0.5.0 // indirect - github.com/subosito/gotenv v1.4.1 // indirect - github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect - github.com/tdakkota/asciicheck v0.2.0 // indirect - github.com/tetafro/godot v1.4.11 // indirect - github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect - github.com/timonwong/loggercheck v0.9.4 // indirect - github.com/tomarrell/wrapcheck/v2 v2.8.1 // indirect - github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect - github.com/ultraware/funlen v0.1.0 // indirect - github.com/ultraware/whitespace v0.0.5 // indirect - github.com/urfave/cli v1.22.9 // indirect - github.com/uudashr/gocognit v1.0.7 // indirect + github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - github.com/xen0n/gosmopolitan v1.2.1 // indirect - github.com/yagipy/maintidx v1.0.0 // indirect - github.com/yeya24/promlinter v0.2.0 // indirect - github.com/ykadowak/zerologlint v0.1.3 // indirect - gitlab.com/bosi/decorder v0.4.0 // indirect - go.step.sm/crypto v0.16.2 // indirect - go.tmz.dev/musttag v0.7.1 // indirect - go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.6.0 // indirect - go.uber.org/zap v1.24.0 // indirect - golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 // indirect golang.org/x/mod v0.12.0 // indirect golang.org/x/sync v0.3.0 // indirect golang.org/x/sys v0.11.0 // indirect - golang.org/x/term v0.11.0 // indirect golang.org/x/text v0.12.0 // indirect golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect - honnef.co/go/tools v0.4.3 // indirect - mvdan.cc/gofumpt v0.5.0 // indirect - mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect - mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect - mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d // indirect ) diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index 4c48eb64b1..c91a57c419 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1,7 +1,3 @@ -4d63.com/gocheckcompilerdirectives v1.2.1 h1:AHcMYuw56NPjq/2y615IGg2kYkBdTvOaojYCBcRE7MA= -4d63.com/gocheckcompilerdirectives v1.2.1/go.mod h1:yjDJSxmDTtIHHCqX0ufRYZDL6vQtMG7tJdKVeWwsqvs= -4d63.com/gochecknoglobals v0.2.1 h1:1eiorGsgHOFOuoOiJDy2psSrQbRdIHrlge0IJIkUgDc= -4d63.com/gochecknoglobals v0.2.1/go.mod h1:KRE8wtJB3CXCsb1xy421JfTHIIbmT3U5ruxw2Qu8fSU= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -613,82 +609,27 @@ code.cloudfoundry.org/tlsconfig v0.0.0-20220621140725-0e6fbd869921/go.mod h1:oIt dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= -filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= -github.com/4meepo/tagalign v1.3.2 h1:1idD3yxlRGV18VjqtDbqYvQ5pXqQS0wO2dn6M3XstvI= -github.com/4meepo/tagalign v1.3.2/go.mod h1:Q9c1rYMZJc9dPRkbQPpcBNCLEmY2njbAsXhQOZFE2dE= -github.com/Abirdcfly/dupword v0.0.12 h1:56NnOyrXzChj07BDFjeRA+IUzSz01jmzEq+G4kEgFhc= -github.com/Abirdcfly/dupword v0.0.12/go.mod h1:+us/TGct/nI9Ndcbcp3rgNcQzctTj68pq7TcgNpLfdI= -github.com/Antonboom/errname v0.1.10 h1:RZ7cYo/GuZqjr1nuJLNe8ZH+a+Jd9DaZzttWzak9Bls= -github.com/Antonboom/errname v0.1.10/go.mod h1:xLeiCIrvVNpUtsN0wxAh05bNIZpqE22/qDMnTBTttiA= -github.com/Antonboom/nilnil v0.1.5 h1:X2JAdEVcbPaOom2TUa1FxZ3uyuUlex0XMLGYMemu6l0= -github.com/Antonboom/nilnil v0.1.5/go.mod h1:I24toVuBKhfP5teihGWctrRiPbRKHwZIFOvc6v3HZXk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= -github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= -github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0 h1:3ZBs7LAezy8gh0uECsA6CGU43FF3zsx5f4eah5FxTMA= -github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0/go.mod h1:rZLTje5A9kFBe0pzhpe2TdhRniBF++PRHQuRpR8esVc= github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= -github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OpenPeeDeeP/depguard/v2 v2.1.0 h1:aQl70G173h/GZYhWf36aE5H0KaujXfVMnn/f1kSDVYY= -github.com/OpenPeeDeeP/depguard/v2 v2.1.0/go.mod h1:PUBgk35fX4i7JDmwzlJwJ+GMe6NfO1723wmJMgPThNQ= github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alexkohler/nakedret/v2 v2.0.2 h1:qnXuZNvv3/AxkAb22q/sEsEpcA99YxLFACDtEw9TPxE= -github.com/alexkohler/nakedret/v2 v2.0.2/go.mod h1:2b8Gkk0GsOrqQv/gPWjNLDSKwG8I5moSXG1K4VIBcTQ= -github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= -github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= -github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= -github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= -github.com/ashanbrown/forbidigo v1.6.0 h1:D3aewfM37Yb3pxHujIPSpTf6oQk9sc9WZi8gerOIVIY= -github.com/ashanbrown/forbidigo v1.6.0/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= -github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= -github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bkielbasa/cyclop v1.2.1 h1:AeF71HZDob1P2/pRm1so9cd1alZnrpyc4q2uP2l0gJY= -github.com/bkielbasa/cyclop v1.2.1/go.mod h1:K/dT/M0FPAiYjBgQGau7tz+3TMh4FWAEqlMhzFWCrgM= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= -github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= -github.com/bombsimon/wsl/v3 v3.4.0 h1:RkSxjT3tmlptwfgEgTgU+KYKLI35p/tviNXNXiL2aNU= -github.com/bombsimon/wsl/v3 v3.4.0/go.mod h1:KkIB+TXkqy6MvK9BDZVbZxKNYsE1/oLRJbIFtf14qqo= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/breml/bidichk v0.2.4 h1:i3yedFWWQ7YzjdZJHnPo9d/xURinSq3OM+gyM43K4/8= -github.com/breml/bidichk v0.2.4/go.mod h1:7Zk0kRFt1LIZxtQdl9W9JwGAcLTTkOs+tN7wuEYGJ3s= -github.com/breml/errchkjson v0.3.1 h1:hlIeXuspTyt8Y/UmP5qy1JocGNR00KQHgfaNtRAjoxQ= -github.com/breml/errchkjson v0.3.1/go.mod h1:XroxrzKjdiutFyW3nWhw34VGg7kiMsDQox73yWCGI2U= -github.com/butuzov/ireturn v0.2.0 h1:kCHi+YzC150GE98WFuZQu9yrTn6GEydO2AuPLbTgnO4= -github.com/butuzov/ireturn v0.2.0/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= -github.com/butuzov/mirror v1.1.0 h1:ZqX54gBVMXu78QLoiqdwpl2mgmoOJTk7s4p4o+0avZI= -github.com/butuzov/mirror v1.1.0/go.mod h1:8Q0BdQU6rC6WILDiBM60DBfvV78OLJmMmixe7GF45AE= github.com/cenk/backoff v2.2.1+incompatible h1:djdFT7f4gF2ttuzRKPbMOWgZajgesItGLwG5FTQKmmE= github.com/cenk/backoff v2.2.1+incompatible/go.mod h1:7FtoeaSnHoZnmZzz47cM35Y9nSW7tNyaidugnHTaFDE= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= @@ -698,13 +639,8 @@ github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/charithe/durationcheck v0.0.10 h1:wgw73BiocdBDQPik+zcEoBG/ob8uyBHf2iyoHGPf5w4= -github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoGOY1C1L6uouGNreQ= -github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 h1:W9o46d2kbNL06lq7UNDPV0zYLzkrde/bjIqO02eoll0= -github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8/go.mod h1:gakxgyXaaPkxvLw1XQxNGK4I37ys9iBRzNUx/B7pUCo= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -722,19 +658,10 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= -github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= -github.com/daixiang0/gci v0.11.0 h1:XeQbFKkCRxvVyn06EOuNY6LPGBLVuB/W130c8FrnX6A= -github.com/daixiang0/gci v0.11.0/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/denis-tingaikin/go-header v0.4.3 h1:tEaZKAlqql6SKCY++utLmkPLd6K8IBM20Ha7UVm+mtU= -github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/drewolson/testflight v1.0.0 h1:jgA0pHcFIPnXoBmyFzrdoR2ka4UvReMDsjYc7Jcvl80= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -755,32 +682,20 @@ github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= -github.com/esimonov/ifshort v1.0.4 h1:6SID4yGWfRae/M7hkVDVVyppy8q/v9OuxNdmjLQStBA= -github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= -github.com/ettle/strcase v0.1.1 h1:htFueZyVeE1XNnMEfbqp5r67qAN/4r6ya1ysq8Q+Zcw= -github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= -github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= -github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= -github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-chi/chi/v5 v5.0.10 h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk= github.com/go-chi/chi/v5 v5.0.10/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= -github.com/go-critic/go-critic v0.9.0 h1:Pmys9qvU3pSML/3GEQ2Xd9RZ/ip+aXHKILuxczKGV/U= -github.com/go-critic/go-critic v0.9.0/go.mod h1:5P8tdXL7m/6qnyG6oRAlYLORvoXH0WDypYgAEmagT40= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= @@ -789,14 +704,8 @@ github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmn github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -805,35 +714,10 @@ github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhO github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= -github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= -github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= -github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= -github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= -github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= -github.com/go-toolsmith/astequal v1.1.0 h1:kHKm1AWqClYn15R0K1KKE4RG614D46n+nqUQ06E1dTw= -github.com/go-toolsmith/astequal v1.1.0/go.mod h1:sedf7VIdCL22LD8qIvv7Nn9MuWJruQA/ysswh64lffQ= -github.com/go-toolsmith/astfmt v1.1.0 h1:iJVPDPp6/7AaeLJEruMsBUlOYCmvg0MoCfJprsOmcco= -github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlNMV634mhwuQ4= -github.com/go-toolsmith/astp v1.1.0 h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA= -github.com/go-toolsmith/astp v1.1.0/go.mod h1:0T1xFGz9hicKs8Z5MfAqSUitoUYS30pDMsRVIDHs8CA= -github.com/go-toolsmith/pkgload v1.2.2 h1:0CtmHq/02QhxcF7E9N5LIFcYFsMR5rdovfqTtRKkgIk= -github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw= -github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= -github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus= -github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= -github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80U= -github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= -github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= @@ -872,26 +756,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe h1:6RGUuS7EGotKx6J5HIP8ZtyMdiDscjMLfRBSPuzVVeo= -github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= -github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2 h1:amWTbTGqOZ71ruzrdA+Nx5WA3tV1N0goTspwmKCQvBY= -github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2/go.mod h1:9wOXstvyDRshQ9LggQuzBCGysxs3b6Uo/1MvYCR2NMs= -github.com/golangci/golangci-lint v1.54.1 h1:0qMrH1gkeIBqCZaaAm5Fwq4xys9rO/lJofHfZURIFFk= -github.com/golangci/golangci-lint v1.54.1/go.mod h1:JK47+qksV/t2mAz9YvndwT0ZLW4A1rvDljOs3g9jblo= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.4.1 h1:+y73iSicVy2PqyX7kmUefHusENlrP9YwuHZHPLGQj/g= -github.com/golangci/misspell v0.4.1/go.mod h1:9mAN1quEo3DlpbaIKKyEvRxK1pwqR9s/Sea1bJCtlNI= -github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 h1:DIPQnGy2Gv2FSA4B/hh8Q7xx3B7AIDk3DAMeHclH1vQ= -github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6/go.mod h1:0AKcRCkMoKvUvlf89F6O7H2LYdhr1zBh736mBItOdRs= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= @@ -911,7 +775,6 @@ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8 github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -937,7 +800,6 @@ github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10 h1:CqYfpuYIjnlNxM3msd github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -959,60 +821,28 @@ github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57Q github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 h1:mrEEilTAUmaAORhssPPkxj84TsHrPMLBGW2Z4SoTxm8= -github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= -github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= -github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= -github.com/gostaticanalysis/comment v1.4.2 h1:hlnx5+S2fY9Zo9ePo4AhgYsYHbM2+eAv8m/s1JiCd6Q= -github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= -github.com/gostaticanalysis/forcetypeassert v0.1.0 h1:6eUflI3DiGusXGK6X7cCcIgVCpZ2CiZ1Q7jl6ZxNV70= -github.com/gostaticanalysis/forcetypeassert v0.1.0/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= -github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3Uqrmrcpk= -github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= -github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= -github.com/gostaticanalysis/testutil v0.4.0 h1:nhdCmubdmDF6VEatUNjgUZBJKWRqugoISdUv3PPQgHY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 h1:1JYBfzqrWPcCclBwxFCPAou9n+q86mfnu7NAeHfte7A= github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0/go.mod h1:YDZoGHuwE+ov0c8smSH49WLF3F2LaWnYYuDVd+EWrc0= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZnpUv3/+BxzFA= github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= -github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= -github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c h1:kQWxfPIHVLbgLzphqk3QUflDy9QdksZR4ygR807bpy0= -github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= -github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= @@ -1021,41 +851,18 @@ github.com/jackc/pgx/v5 v5.4.3 h1:cxFyXhxlvAifxnkKKdlxv8XqUf59tDlYjnV5YYfsJJY= github.com/jackc/pgx/v5 v5.4.3/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA= github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= -github.com/jgautheron/goconst v1.5.1 h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM= -github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= -github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= -github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= -github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= -github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= -github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/kisielk/errcheck v1.6.3 h1:dEKh+GLHcWm2oN34nMvDzn1sqI0i0WxPvrgiJA5JuM8= -github.com/kisielk/errcheck v1.6.3/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kkHAIKE/contextcheck v1.1.4 h1:B6zAaLhOEEcjvUgIYEqystmnFk1Oemn8bvJhbt0GMb8= -github.com/kkHAIKE/contextcheck v1.1.4/go.mod h1:1+i/gWqokIa+dm31mqGLZhZJ7Uh44DJGZVmr6QRBNJg= github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= @@ -1064,91 +871,35 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs= -github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= -github.com/kunwardeep/paralleltest v1.0.8 h1:Ul2KsqtzFxTlSU7IP0JusWlLiNqQaloB9vguyjbE558= -github.com/kunwardeep/paralleltest v1.0.8/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= -github.com/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ymEyhQ= -github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= -github.com/ldez/gomoddirectives v0.2.3 h1:y7MBaisZVDYmKvt9/l1mjNCiSA1BVn34U0ObUcJwlhA= -github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= -github.com/ldez/tagliatelle v0.5.0 h1:epgfuYt9v0CG3fms0pEgIMNPuFf/LpPIfjk4kyqSioo= -github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5jtPYz9xa4= -github.com/leonklingele/grouper v1.1.1 h1:suWXRU57D4/Enn6pXR0QVqqWWrnJ9Osrz+5rjt8ivzU= -github.com/leonklingele/grouper v1.1.1/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= -github.com/lufeee/execinquery v1.2.1 h1:hf0Ems4SHcUGBxpGN7Jz78z1ppVkP/837ZlETPCEtOM= -github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/maratori/testableexamples v1.0.0 h1:dU5alXRrD8WKSjOUnmJZuzdxWOEQ57+7s93SLMxb2vI= -github.com/maratori/testableexamples v1.0.0/go.mod h1:4rhjL1n20TUTT4vdh3RDqSizKLyXp7K2u6HgraZCGzE= -github.com/maratori/testpackage v1.1.1 h1:S58XVV5AD7HADMmD0fNnziNHqKvSdDuEKdPD1rNTU04= -github.com/maratori/testpackage v1.1.1/go.mod h1:s4gRK/ym6AMrqpOa/kEbQTV4Q4jb7WeLZzVhVVVOQMc= -github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 h1:gWg6ZQ4JhDfJPqlo2srm/LN17lpybq15AryXIRcWYLE= -github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.14 h1:qZgc/Rwetq+MtyE18WhzjokPD93dNqLGNT3QJuLvBGw= github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0 h1:z0CfPybq3CxaJvrrpf7Gme1psZTqHhJxf83q6apkSpI= github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0/go.mod h1:RVP6/F85JyxTrbJxWIdKU2vlSvK48iCMnMXRkSz7xtg= -github.com/mbilski/exhaustivestruct v1.2.0 h1:wCBmUnSYufAHO6J4AVWY6ff+oxWxsVFrwgOdMUQePUo= -github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= -github.com/mgechev/revive v1.3.2 h1:Wb8NQKBaALBJ3xrrj4zpwJwqwNA6nDpyJSEQWcCka6U= -github.com/mgechev/revive v1.3.2/go.mod h1:UCLtc7o5vg5aXCwdUTU1kEBQ1v+YXPAkYDIDXbrs5I0= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= -github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/moricho/tparallel v0.3.1 h1:fQKD4U1wRMAYNngDonW5XupoB/ZGJHdpzrWqgyg9krA= -github.com/moricho/tparallel v0.3.1/go.mod h1:leENX2cUv7Sv2qDgdi0D0fCftN8fRC67Bcn8pqzeYNI= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= -github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= -github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 h1:4kuARK6Y6FxaNu/BnU2OAaLF86eTVhP2hjTB6iMvItA= -github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= -github.com/nishanths/exhaustive v0.11.0 h1:T3I8nUGhl/Cwu5Z2hfc92l0e04D2GEW6e0l8pzda2l0= -github.com/nishanths/exhaustive v0.11.0/go.mod h1:RqwDsZ1xY0dNdqHho2z6X+bgzizwbLYOWnZbbl2wLB4= -github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= -github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= -github.com/nunnatsa/ginkgolinter v0.13.3 h1:wEvjrzSMfDdnoWkctignX9QTf4rT9f4GkQ3uVoXBmiU= -github.com/nunnatsa/ginkgolinter v0.13.3/go.mod h1:aTKXo8WddENYxNEFT+4ZxEgWXqlD9uMD3w9Bfw/ABEc= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= @@ -1186,20 +937,10 @@ github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/openzipkin/zipkin-go v0.4.1 h1:kNd/ST2yLLWhaWrkgchya40TJabe8Hioj9udfPcEO5A= github.com/openzipkin/zipkin-go v0.4.1/go.mod h1:qY0VqDSN1pOBN94dBc6w2GJlWLiovAyg7Qt6/I9HecM= -github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k= -github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= -github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= -github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= -github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= -github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw= github.com/pborman/uuid v1.2.1/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= -github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea h1:sKwxy1H95npauwu8vtF95vG/syrL0p8fSZo/XlDg5gk= github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea/go.mod h1:1VcHEd3ro4QMoHfiNl/j7Jkln9+KQuorp0PItHMJYNg= github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= @@ -1209,7 +950,6 @@ github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFu github.com/pivotal-cf/brokerapi/v10 v10.0.0 h1:cC2zdIF1jh1twD196xWpHjiX2JEbU+RMLH2jpmLDRT8= github.com/pivotal-cf/brokerapi/v10 v10.0.0/go.mod h1:LVexXnzj0Zj7lxIJXnDqc794/XHwEzkOPzAZdEaKM5M= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -1217,122 +957,38 @@ github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polyfloyd/go-errorlint v1.4.3 h1:P6NALOLV8BrWhm6PsqOraUK05E5h8IZnpXYJ+CIg+0U= -github.com/polyfloyd/go-errorlint v1.4.3/go.mod h1:VPlWPh6hB/wruVG803SuNpLuTGNjLHYlvcdSy4RhdPA= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/quasilyte/go-ruleguard v0.4.0 h1:DyM6r+TKL+xbKB4Nm7Afd1IQh9kEUKQs2pboWGKtvQo= -github.com/quasilyte/go-ruleguard v0.4.0/go.mod h1:Eu76Z/R8IXtViWUIHkE3p8gdH3/PKk1eh3YGfaEof10= -github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= -github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= -github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= -github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= -github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= -github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rubyist/circuitbreaker v2.2.1+incompatible h1:KUKd/pV8Geg77+8LNDwdow6rVCAYOp8+kHUyFvL6Mhk= github.com/rubyist/circuitbreaker v2.2.1+incompatible/go.mod h1:Ycs3JgJADPuzJDwffe12k6BZT8hxVi6lFK+gWYJLN4A= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= -github.com/ryancurrah/gomodguard v1.3.0 h1:q15RT/pd6UggBXVBuLps8BXRvl5GPBcwVA7BJHMLuTw= -github.com/ryancurrah/gomodguard v1.3.0/go.mod h1:ggBxb3luypPEzqVtq33ee7YSN35V28XeGnid8dnni50= -github.com/ryanrolds/sqlclosecheck v0.4.0 h1:i8SX60Rppc1wRuyQjMciLqIzV3xnoHB7/tXbr6RGYNI= -github.com/ryanrolds/sqlclosecheck v0.4.0/go.mod h1:TBRRjzL31JONc9i4XMinicuo+s+E8yKZ5FN8X3G6CKQ= -github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= -github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= -github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= -github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= -github.com/sashamelentyev/usestdlibvars v1.23.0 h1:01h+/2Kd+NblNItNeux0veSL5cBF1jbEOPrEhDzGYq0= -github.com/sashamelentyev/usestdlibvars v1.23.0/go.mod h1:YPwr/Y1LATzHI93CqoPUN/2BzGQ/6N/cl/KwgR0B/aU= github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8= -github.com/securego/gosec/v2 v2.16.0 h1:Pi0JKoasQQ3NnoRao/ww/N/XdynIB9NRYYZT5CyOs5U= -github.com/securego/gosec/v2 v2.16.0/go.mod h1:xvLcVZqUfo4aAQu56TNv7/Ltz6emAOQAEsrZrt7uGlI= -github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= -github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= -github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= -github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= -github.com/sivchari/nosnakecase v1.7.0 h1:7QkpWIRMe8x25gckkFd2A5Pi6Ymo0qgr4JrhGt95do8= -github.com/sivchari/nosnakecase v1.7.0/go.mod h1:CwDzrzPea40/GB6uynrNLiorAlgFRvRbFSgJx2Gs+QY= -github.com/sivchari/tenv v1.7.1 h1:PSpuD4bu6fSmtWMxSGWcvqUUgIn7k3yOJhOIzVWn8Ak= -github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= -github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262 h1:unQFBIznI+VYD1/1fApl1A+9VcBk+9dcqGfnePY87LY= -github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262/go.mod h1:MyOHs9Po2fbM1LHej6sBUT8ozbxmMOFG+E+rx/GSGuc= -github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= -github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo= -github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= -github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU= -github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= -github.com/square/certstrap v1.3.0 h1:N9P0ZRA+DjT8pq5fGDj0z3FjafRKnBDypP0QHpMlaAk= -github.com/square/certstrap v1.3.0/go.mod h1:wGZo9eE1B7WX2GKBn0htJ+B3OuRl2UsdCFySNooy9hU= -github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= -github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= -github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= -github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= +github.com/square/certstrap v1.2.0 h1:ecgyABrbFLr8jSbOC6oTBmBek0t/HqtgrMUZCPuyfdw= github.com/steinfletcher/apitest v1.5.15 h1:AAdTN0yMbf0VMH/PMt9uB2I7jljepO6i+5uhm1PjH3c= github.com/steinfletcher/apitest v1.5.15/go.mod h1:mF+KnYaIkuHM0C4JgGzkIIOJAEjo+EA5tTjJ+bHXnQc= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1342,54 +998,17 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= -github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c h1:+aPplBwWcHBo6q9xrfWdMrT9o4kltkmmvpemgIjep/8= -github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c/go.mod h1:SbErYREK7xXdsRiigaQiQkI9McGRzYMvlKYaP3Nimdk= -github.com/tdakkota/asciicheck v0.2.0 h1:o8jvnUANo0qXtnslk2d3nMKTFNlOnJjRrNcj0j9qkHM= -github.com/tdakkota/asciicheck v0.2.0/go.mod h1:Qb7Y9EgjCLJGup51gDHFzbI08/gbGhL/UVhYIPWG2rg= github.com/tedsuo/ifrit v0.0.0-20230330192023-5cba443a66c4/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26 h1:mWCRvpoEMVlslxEvvptKgIUb35va9yj9Oq5wGw/er5I= github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26/go.mod h1:0uD3VMXkZ7Bw0ojGCwDzebBBzPBXtzEZeXai+56BLX4= -github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= -github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= -github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= -github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= -github.com/tetafro/godot v1.4.11 h1:BVoBIqAf/2QdbFmSwAWnaIqDivZdOV0ZRwEm6jivLKw= -github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= -github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 h1:quvGphlmUVU+nhpFa4gg4yJyTRJ13reZMDHrKwYw53M= -github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= -github.com/timonwong/loggercheck v0.9.4 h1:HKKhqrjcVj8sxL7K77beXh0adEm6DLjV/QOGeMXEVi4= -github.com/timonwong/loggercheck v0.9.4/go.mod h1:caz4zlPcgvpEkXgVnAJGowHAMW2NwHaNlpS8xDbVhTg= -github.com/tomarrell/wrapcheck/v2 v2.8.1 h1:HxSqDSN0sAt0yJYsrcYVoEeyM4aI9yAm3KQpIXDJRhQ= -github.com/tomarrell/wrapcheck/v2 v2.8.1/go.mod h1:/n2Q3NZ4XFT50ho6Hbxg+RV1uyo2Uow/Vdm9NQcl5SE= -github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= -github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= -github.com/ultraware/funlen v0.1.0 h1:BuqclbkY6pO+cvxoq7OsktIXZpgBSkYTQtmwhAK81vI= -github.com/ultraware/funlen v0.1.0/go.mod h1:XJqmOQja6DpxarLj6Jj1U7JuoS8PvL4nEqDaQhy22p4= -github.com/ultraware/whitespace v0.0.5 h1:hh+/cpIcopyMYbZNVov9iSxvJU3OYQg78Sfaqzi/CzI= -github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= -github.com/urfave/cli v1.22.9 h1:cv3/KhXGBGjEXLC4bH0sLuJ9BewaAbpk5oyMOveu4pw= -github.com/urfave/cli v1.22.9/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/uudashr/gocognit v1.0.7 h1:e9aFXgKgUJrQ5+bs61zBigmj7bFJ/5cC6HmMahVzuDo= -github.com/uudashr/gocognit v1.0.7/go.mod h1:nAIUuVBnYU7pcninia3BHOvQkpQCeO76Uscky5BOwcY= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xen0n/gosmopolitan v1.2.1 h1:3pttnTuFumELBRSh+KQs1zcz4fN6Zy7aB0xlnQSn1Iw= -github.com/xen0n/gosmopolitan v1.2.1/go.mod h1:JsHq/Brs1o050OOdmzHeOr0N7OtlnKRAGAsElF8xBQA= -github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= -github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= -github.com/yeya24/promlinter v0.2.0 h1:xFKDQ82orCU5jQujdaD8stOHiv8UN68BSdn2a8u8Y3o= -github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= -github.com/ykadowak/zerologlint v0.1.3 h1:TLy1dTW3Nuc+YE3bYRPToG1Q9Ej78b5UUN6bjbGdxPE= -github.com/ykadowak/zerologlint v0.1.3/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1399,9 +1018,6 @@ github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= -gitlab.com/bosi/decorder v0.4.0 h1:HWuxAhSxIvsITcXeP+iIRg9d1cVfvVkmlF7M68GaoDY= -gitlab.com/bosi/decorder v0.4.0/go.mod h1:xarnteyUoJiOTEldDysquWKTVDCKo2TOIOIibSuWqOg= -go-simpler.org/assert v0.5.0 h1:+5L/lajuQtzmbtEfh69sr5cRf2/xZzyJhFjoOz/PPqs= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -1413,30 +1029,15 @@ go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.step.sm/crypto v0.16.2 h1:Pr9aazTwWBBZNogUsOqhOrPSdwAa9pPs+lMB602lnDA= -go.step.sm/crypto v0.16.2/go.mod h1:1WkTOTY+fOX/RY4TnZREp6trQAsBHRQ7nu6QJBiNQF8= -go.tmz.dev/musttag v0.7.1 h1:9lFmeSFnFfPuMq4IksHGomItE6NgKMNW2Nt2FPOhCfU= -go.tmz.dev/musttag v0.7.1/go.mod h1:oJLkpR56EsIryktZJk/B0IroSMi37YWver47fibGh5U= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= -go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= @@ -1457,10 +1058,6 @@ golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMk golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= -golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 h1:jWGQJV4niP+CCmFW9ekjA9Zx8vYORzOUH2/Nl5WPuLQ= -golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1511,7 +1108,6 @@ golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1519,7 +1115,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1549,11 +1144,8 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1626,13 +1218,11 @@ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1641,10 +1231,10 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1658,8 +1248,6 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1668,7 +1256,6 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1680,7 +1267,6 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1689,14 +1275,11 @@ golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210915083310-ed5796bab164/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1710,8 +1293,6 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1736,8 +1317,6 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= -golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1771,7 +1350,6 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3 golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1779,11 +1357,9 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1801,21 +1377,15 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -1824,8 +1394,6 @@ golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= -golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -1833,12 +1401,10 @@ golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= -golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= @@ -2127,26 +1693,18 @@ google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= @@ -2159,8 +1717,6 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -honnef.co/go/tools v0.4.3 h1:o/n5/K5gXqk8Gozvs2cnL0F2S1/g1vcGCAx2vETjITw= -honnef.co/go/tools v0.4.3/go.mod h1:36ZgoUOrqOk1GxwHhyryEkq8FQWkUO2xGuSMhUCcdvA= lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= @@ -2195,14 +1751,6 @@ modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= -mvdan.cc/gofumpt v0.5.0 h1:0EQ+Z56k8tXjj/6TQD25BFNKQXpCvT0rnansIc7Ug5E= -mvdan.cc/gofumpt v0.5.0/go.mod h1:HBeVDtMKRZpXyxFciAirzdKklDlGu8aAy1wEbH5Y9js= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d h1:3rvTIIM22r9pvXk+q3swxUQAQOxksVMGK7sml4nG57w= -mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d/go.mod h1:IeHQjmn6TOD+e4Z3RFiZMMsLVL+A96Nvptar8Fj71is= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/src/autoscaler/tools.go b/src/autoscaler/tools.go index 26b4e78683..49cc8c3467 100644 --- a/src/autoscaler/tools.go +++ b/src/autoscaler/tools.go @@ -3,8 +3,8 @@ package main import ( - _ "github.com/golangci/golangci-lint/cmd/golangci-lint" _ "github.com/maxbrunsfeld/counterfeiter/v6" - _ "github.com/onsi/ginkgo/v2/ginkgo" - _ "github.com/square/certstrap" ) + +// This file imports packages that are used when running go generate, +// but not otherwise depended on by built code. diff --git a/src/changelog/Makefile b/src/changelog/Makefile index f72f9da767..d89504c3b8 100644 --- a/src/changelog/Makefile +++ b/src/changelog/Makefile @@ -11,6 +11,8 @@ CGO_ENABLED = 0 export GOWORK=off BUILDTAGS := +GOLANGCI_LINT_VERSION=v$(shell cat ../../.tool-versions | grep golangci-lint | cut -d " " -f 2 ) + build: @echo "# building changelog" @CGO_ENABLED=$(CGO_ENABLED) $(GO) build $(BUILDTAGS) $(BUILDFLAGS) -o changelog main.go @@ -45,7 +47,7 @@ fmt: importfmt @([[ ! -z "$(FORMATTED)" ]] && printf "Fixed unformatted files:\n$(FORMATTED)") || true lint: - golangci-lint run + @go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run lint-fix: - golangci-lint run --fix + go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run --fix diff --git a/src/changeloglockcleaner/Makefile b/src/changeloglockcleaner/Makefile index 0042cb29f1..d4700a1170 100644 --- a/src/changeloglockcleaner/Makefile +++ b/src/changeloglockcleaner/Makefile @@ -11,6 +11,8 @@ CGO_ENABLED = 0 export GOWORK=off BUILDTAGS := +GOLANGCI_LINT_VERSION=v$(shell cat ../../.tool-versions | grep golangci-lint | cut -d " " -f 2 ) + build: @echo "# building changeloglockcleaner" @CGO_ENABLED=$(CGO_ENABLED) $(GO) build $(BUILDTAGS) $(BUILDFLAGS) -o changeloglockcleaner main.go @@ -46,7 +48,8 @@ fmt: importfmt @([[ ! -z "$(FORMATTED)" ]] && printf "Fixed unformatted files:\n$(FORMATTED)") || true lint: - golangci-lint run + @go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run lint-fix: - golangci-lint run --fix + go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run --fix + diff --git a/src/changeloglockcleaner/tools.go b/src/changeloglockcleaner/tools.go deleted file mode 100644 index 5f2ebed160..0000000000 --- a/src/changeloglockcleaner/tools.go +++ /dev/null @@ -1,7 +0,0 @@ -// +build tools - -package main - -import ( - _ "github.com/onsi/ginkgo/v2/ginkgo" -) From bf582cbb736e4f748fa2af8d81dd0806e6b2e00b Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Fri, 18 Aug 2023 13:20:14 +0200 Subject: [PATCH 147/294] Remove generated fakes --- src/acceptance/assets/app/go_app/.gitignore | 3 +- src/acceptance/assets/app/go_app/Makefile | 3 +- .../internal/app/appfakes/fake_cpuwaster.go | 174 --------------- .../app/appfakes/fake_custom_metric_client.go | 121 ---------- .../app/appfakes/fake_memory_gobbler.go | 211 ------------------ .../internal/app/appfakes/fake_time_waster.go | 77 ------- 6 files changed, 4 insertions(+), 585 deletions(-) delete mode 100644 src/acceptance/assets/app/go_app/internal/app/appfakes/fake_cpuwaster.go delete mode 100644 src/acceptance/assets/app/go_app/internal/app/appfakes/fake_custom_metric_client.go delete mode 100644 src/acceptance/assets/app/go_app/internal/app/appfakes/fake_memory_gobbler.go delete mode 100644 src/acceptance/assets/app/go_app/internal/app/appfakes/fake_time_waster.go diff --git a/src/acceptance/assets/app/go_app/.gitignore b/src/acceptance/assets/app/go_app/.gitignore index 07ed7069a2..d0d3211870 100644 --- a/src/acceptance/assets/app/go_app/.gitignore +++ b/src/acceptance/assets/app/go_app/.gitignore @@ -1 +1,2 @@ -build/* \ No newline at end of file +build/* +internal/app/appfakes/* diff --git a/src/acceptance/assets/app/go_app/Makefile b/src/acceptance/assets/app/go_app/Makefile index c5abc0abd6..8bcc4ca252 100644 --- a/src/acceptance/assets/app/go_app/Makefile +++ b/src/acceptance/assets/app/go_app/Makefile @@ -14,7 +14,7 @@ GINKGO_OPTS=-r --race --require-suite --randomize-all --cover ${OPTS} export CONFIG?=../../../../acceptance_config.json .PHONY: build -build: +build: generate echo "# building test-app" rm -rf build/* || true mkdir -p build/ @@ -60,3 +60,4 @@ clean: @echo "# cleaning autoscaler" @go clean -cache -testcache @rm -rf build + @rm -rf internal/app/appfakes \ No newline at end of file diff --git a/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_cpuwaster.go b/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_cpuwaster.go deleted file mode 100644 index 0a4a51c732..0000000000 --- a/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_cpuwaster.go +++ /dev/null @@ -1,174 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package appfakes - -import ( - "sync" - "time" - - "code.cloudfoundry.org/app-autoscaler-release/src/acceptance/assets/app/go_app/internal/app" -) - -type FakeCPUWaster struct { - IsRunningStub func() bool - isRunningMutex sync.RWMutex - isRunningArgsForCall []struct { - } - isRunningReturns struct { - result1 bool - } - isRunningReturnsOnCall map[int]struct { - result1 bool - } - StopTestStub func() - stopTestMutex sync.RWMutex - stopTestArgsForCall []struct { - } - UseCPUStub func(uint64, time.Duration) - useCPUMutex sync.RWMutex - useCPUArgsForCall []struct { - arg1 uint64 - arg2 time.Duration - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeCPUWaster) IsRunning() bool { - fake.isRunningMutex.Lock() - ret, specificReturn := fake.isRunningReturnsOnCall[len(fake.isRunningArgsForCall)] - fake.isRunningArgsForCall = append(fake.isRunningArgsForCall, struct { - }{}) - stub := fake.IsRunningStub - fakeReturns := fake.isRunningReturns - fake.recordInvocation("IsRunning", []interface{}{}) - fake.isRunningMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeCPUWaster) IsRunningCallCount() int { - fake.isRunningMutex.RLock() - defer fake.isRunningMutex.RUnlock() - return len(fake.isRunningArgsForCall) -} - -func (fake *FakeCPUWaster) IsRunningCalls(stub func() bool) { - fake.isRunningMutex.Lock() - defer fake.isRunningMutex.Unlock() - fake.IsRunningStub = stub -} - -func (fake *FakeCPUWaster) IsRunningReturns(result1 bool) { - fake.isRunningMutex.Lock() - defer fake.isRunningMutex.Unlock() - fake.IsRunningStub = nil - fake.isRunningReturns = struct { - result1 bool - }{result1} -} - -func (fake *FakeCPUWaster) IsRunningReturnsOnCall(i int, result1 bool) { - fake.isRunningMutex.Lock() - defer fake.isRunningMutex.Unlock() - fake.IsRunningStub = nil - if fake.isRunningReturnsOnCall == nil { - fake.isRunningReturnsOnCall = make(map[int]struct { - result1 bool - }) - } - fake.isRunningReturnsOnCall[i] = struct { - result1 bool - }{result1} -} - -func (fake *FakeCPUWaster) StopTest() { - fake.stopTestMutex.Lock() - fake.stopTestArgsForCall = append(fake.stopTestArgsForCall, struct { - }{}) - stub := fake.StopTestStub - fake.recordInvocation("StopTest", []interface{}{}) - fake.stopTestMutex.Unlock() - if stub != nil { - fake.StopTestStub() - } -} - -func (fake *FakeCPUWaster) StopTestCallCount() int { - fake.stopTestMutex.RLock() - defer fake.stopTestMutex.RUnlock() - return len(fake.stopTestArgsForCall) -} - -func (fake *FakeCPUWaster) StopTestCalls(stub func()) { - fake.stopTestMutex.Lock() - defer fake.stopTestMutex.Unlock() - fake.StopTestStub = stub -} - -func (fake *FakeCPUWaster) UseCPU(arg1 uint64, arg2 time.Duration) { - fake.useCPUMutex.Lock() - fake.useCPUArgsForCall = append(fake.useCPUArgsForCall, struct { - arg1 uint64 - arg2 time.Duration - }{arg1, arg2}) - stub := fake.UseCPUStub - fake.recordInvocation("UseCPU", []interface{}{arg1, arg2}) - fake.useCPUMutex.Unlock() - if stub != nil { - fake.UseCPUStub(arg1, arg2) - } -} - -func (fake *FakeCPUWaster) UseCPUCallCount() int { - fake.useCPUMutex.RLock() - defer fake.useCPUMutex.RUnlock() - return len(fake.useCPUArgsForCall) -} - -func (fake *FakeCPUWaster) UseCPUCalls(stub func(uint64, time.Duration)) { - fake.useCPUMutex.Lock() - defer fake.useCPUMutex.Unlock() - fake.UseCPUStub = stub -} - -func (fake *FakeCPUWaster) UseCPUArgsForCall(i int) (uint64, time.Duration) { - fake.useCPUMutex.RLock() - defer fake.useCPUMutex.RUnlock() - argsForCall := fake.useCPUArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeCPUWaster) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.isRunningMutex.RLock() - defer fake.isRunningMutex.RUnlock() - fake.stopTestMutex.RLock() - defer fake.stopTestMutex.RUnlock() - fake.useCPUMutex.RLock() - defer fake.useCPUMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeCPUWaster) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ app.CPUWaster = new(FakeCPUWaster) diff --git a/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_custom_metric_client.go b/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_custom_metric_client.go deleted file mode 100644 index 3ecd7aa456..0000000000 --- a/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_custom_metric_client.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package appfakes - -import ( - "context" - "sync" - - "code.cloudfoundry.org/app-autoscaler-release/src/acceptance/assets/app/go_app/internal/app" - cfenv "github.com/cloudfoundry-community/go-cfenv" -) - -type FakeCustomMetricClient struct { - PostCustomMetricStub func(context.Context, *cfenv.App, float64, string, bool) error - postCustomMetricMutex sync.RWMutex - postCustomMetricArgsForCall []struct { - arg1 context.Context - arg2 *cfenv.App - arg3 float64 - arg4 string - arg5 bool - } - postCustomMetricReturns struct { - result1 error - } - postCustomMetricReturnsOnCall map[int]struct { - result1 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeCustomMetricClient) PostCustomMetric(arg1 context.Context, arg2 *cfenv.App, arg3 float64, arg4 string, arg5 bool) error { - fake.postCustomMetricMutex.Lock() - ret, specificReturn := fake.postCustomMetricReturnsOnCall[len(fake.postCustomMetricArgsForCall)] - fake.postCustomMetricArgsForCall = append(fake.postCustomMetricArgsForCall, struct { - arg1 context.Context - arg2 *cfenv.App - arg3 float64 - arg4 string - arg5 bool - }{arg1, arg2, arg3, arg4, arg5}) - stub := fake.PostCustomMetricStub - fakeReturns := fake.postCustomMetricReturns - fake.recordInvocation("PostCustomMetric", []interface{}{arg1, arg2, arg3, arg4, arg5}) - fake.postCustomMetricMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4, arg5) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeCustomMetricClient) PostCustomMetricCallCount() int { - fake.postCustomMetricMutex.RLock() - defer fake.postCustomMetricMutex.RUnlock() - return len(fake.postCustomMetricArgsForCall) -} - -func (fake *FakeCustomMetricClient) PostCustomMetricCalls(stub func(context.Context, *cfenv.App, float64, string, bool) error) { - fake.postCustomMetricMutex.Lock() - defer fake.postCustomMetricMutex.Unlock() - fake.PostCustomMetricStub = stub -} - -func (fake *FakeCustomMetricClient) PostCustomMetricArgsForCall(i int) (context.Context, *cfenv.App, float64, string, bool) { - fake.postCustomMetricMutex.RLock() - defer fake.postCustomMetricMutex.RUnlock() - argsForCall := fake.postCustomMetricArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5 -} - -func (fake *FakeCustomMetricClient) PostCustomMetricReturns(result1 error) { - fake.postCustomMetricMutex.Lock() - defer fake.postCustomMetricMutex.Unlock() - fake.PostCustomMetricStub = nil - fake.postCustomMetricReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeCustomMetricClient) PostCustomMetricReturnsOnCall(i int, result1 error) { - fake.postCustomMetricMutex.Lock() - defer fake.postCustomMetricMutex.Unlock() - fake.PostCustomMetricStub = nil - if fake.postCustomMetricReturnsOnCall == nil { - fake.postCustomMetricReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.postCustomMetricReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeCustomMetricClient) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.postCustomMetricMutex.RLock() - defer fake.postCustomMetricMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeCustomMetricClient) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ app.CustomMetricClient = new(FakeCustomMetricClient) diff --git a/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_memory_gobbler.go b/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_memory_gobbler.go deleted file mode 100644 index d487cc8df2..0000000000 --- a/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_memory_gobbler.go +++ /dev/null @@ -1,211 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package appfakes - -import ( - "sync" - "time" - - "code.cloudfoundry.org/app-autoscaler-release/src/acceptance/assets/app/go_app/internal/app" -) - -type FakeMemoryGobbler struct { - IsRunningStub func() bool - isRunningMutex sync.RWMutex - isRunningArgsForCall []struct { - } - isRunningReturns struct { - result1 bool - } - isRunningReturnsOnCall map[int]struct { - result1 bool - } - SleepStub func(time.Duration) - sleepMutex sync.RWMutex - sleepArgsForCall []struct { - arg1 time.Duration - } - StopTestStub func() - stopTestMutex sync.RWMutex - stopTestArgsForCall []struct { - } - UseMemoryStub func(uint64) - useMemoryMutex sync.RWMutex - useMemoryArgsForCall []struct { - arg1 uint64 - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeMemoryGobbler) IsRunning() bool { - fake.isRunningMutex.Lock() - ret, specificReturn := fake.isRunningReturnsOnCall[len(fake.isRunningArgsForCall)] - fake.isRunningArgsForCall = append(fake.isRunningArgsForCall, struct { - }{}) - stub := fake.IsRunningStub - fakeReturns := fake.isRunningReturns - fake.recordInvocation("IsRunning", []interface{}{}) - fake.isRunningMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeMemoryGobbler) IsRunningCallCount() int { - fake.isRunningMutex.RLock() - defer fake.isRunningMutex.RUnlock() - return len(fake.isRunningArgsForCall) -} - -func (fake *FakeMemoryGobbler) IsRunningCalls(stub func() bool) { - fake.isRunningMutex.Lock() - defer fake.isRunningMutex.Unlock() - fake.IsRunningStub = stub -} - -func (fake *FakeMemoryGobbler) IsRunningReturns(result1 bool) { - fake.isRunningMutex.Lock() - defer fake.isRunningMutex.Unlock() - fake.IsRunningStub = nil - fake.isRunningReturns = struct { - result1 bool - }{result1} -} - -func (fake *FakeMemoryGobbler) IsRunningReturnsOnCall(i int, result1 bool) { - fake.isRunningMutex.Lock() - defer fake.isRunningMutex.Unlock() - fake.IsRunningStub = nil - if fake.isRunningReturnsOnCall == nil { - fake.isRunningReturnsOnCall = make(map[int]struct { - result1 bool - }) - } - fake.isRunningReturnsOnCall[i] = struct { - result1 bool - }{result1} -} - -func (fake *FakeMemoryGobbler) Sleep(arg1 time.Duration) { - fake.sleepMutex.Lock() - fake.sleepArgsForCall = append(fake.sleepArgsForCall, struct { - arg1 time.Duration - }{arg1}) - stub := fake.SleepStub - fake.recordInvocation("Sleep", []interface{}{arg1}) - fake.sleepMutex.Unlock() - if stub != nil { - fake.SleepStub(arg1) - } -} - -func (fake *FakeMemoryGobbler) SleepCallCount() int { - fake.sleepMutex.RLock() - defer fake.sleepMutex.RUnlock() - return len(fake.sleepArgsForCall) -} - -func (fake *FakeMemoryGobbler) SleepCalls(stub func(time.Duration)) { - fake.sleepMutex.Lock() - defer fake.sleepMutex.Unlock() - fake.SleepStub = stub -} - -func (fake *FakeMemoryGobbler) SleepArgsForCall(i int) time.Duration { - fake.sleepMutex.RLock() - defer fake.sleepMutex.RUnlock() - argsForCall := fake.sleepArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeMemoryGobbler) StopTest() { - fake.stopTestMutex.Lock() - fake.stopTestArgsForCall = append(fake.stopTestArgsForCall, struct { - }{}) - stub := fake.StopTestStub - fake.recordInvocation("StopTest", []interface{}{}) - fake.stopTestMutex.Unlock() - if stub != nil { - fake.StopTestStub() - } -} - -func (fake *FakeMemoryGobbler) StopTestCallCount() int { - fake.stopTestMutex.RLock() - defer fake.stopTestMutex.RUnlock() - return len(fake.stopTestArgsForCall) -} - -func (fake *FakeMemoryGobbler) StopTestCalls(stub func()) { - fake.stopTestMutex.Lock() - defer fake.stopTestMutex.Unlock() - fake.StopTestStub = stub -} - -func (fake *FakeMemoryGobbler) UseMemory(arg1 uint64) { - fake.useMemoryMutex.Lock() - fake.useMemoryArgsForCall = append(fake.useMemoryArgsForCall, struct { - arg1 uint64 - }{arg1}) - stub := fake.UseMemoryStub - fake.recordInvocation("UseMemory", []interface{}{arg1}) - fake.useMemoryMutex.Unlock() - if stub != nil { - fake.UseMemoryStub(arg1) - } -} - -func (fake *FakeMemoryGobbler) UseMemoryCallCount() int { - fake.useMemoryMutex.RLock() - defer fake.useMemoryMutex.RUnlock() - return len(fake.useMemoryArgsForCall) -} - -func (fake *FakeMemoryGobbler) UseMemoryCalls(stub func(uint64)) { - fake.useMemoryMutex.Lock() - defer fake.useMemoryMutex.Unlock() - fake.UseMemoryStub = stub -} - -func (fake *FakeMemoryGobbler) UseMemoryArgsForCall(i int) uint64 { - fake.useMemoryMutex.RLock() - defer fake.useMemoryMutex.RUnlock() - argsForCall := fake.useMemoryArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeMemoryGobbler) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.isRunningMutex.RLock() - defer fake.isRunningMutex.RUnlock() - fake.sleepMutex.RLock() - defer fake.sleepMutex.RUnlock() - fake.stopTestMutex.RLock() - defer fake.stopTestMutex.RUnlock() - fake.useMemoryMutex.RLock() - defer fake.useMemoryMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeMemoryGobbler) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ app.MemoryGobbler = new(FakeMemoryGobbler) diff --git a/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_time_waster.go b/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_time_waster.go deleted file mode 100644 index b5d2849bd4..0000000000 --- a/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_time_waster.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package appfakes - -import ( - "sync" - "time" - - "code.cloudfoundry.org/app-autoscaler-release/src/acceptance/assets/app/go_app/internal/app" -) - -type FakeTimeWaster struct { - SleepStub func(time.Duration) - sleepMutex sync.RWMutex - sleepArgsForCall []struct { - arg1 time.Duration - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeTimeWaster) Sleep(arg1 time.Duration) { - fake.sleepMutex.Lock() - fake.sleepArgsForCall = append(fake.sleepArgsForCall, struct { - arg1 time.Duration - }{arg1}) - stub := fake.SleepStub - fake.recordInvocation("Sleep", []interface{}{arg1}) - fake.sleepMutex.Unlock() - if stub != nil { - fake.SleepStub(arg1) - } -} - -func (fake *FakeTimeWaster) SleepCallCount() int { - fake.sleepMutex.RLock() - defer fake.sleepMutex.RUnlock() - return len(fake.sleepArgsForCall) -} - -func (fake *FakeTimeWaster) SleepCalls(stub func(time.Duration)) { - fake.sleepMutex.Lock() - defer fake.sleepMutex.Unlock() - fake.SleepStub = stub -} - -func (fake *FakeTimeWaster) SleepArgsForCall(i int) time.Duration { - fake.sleepMutex.RLock() - defer fake.sleepMutex.RUnlock() - argsForCall := fake.sleepArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeTimeWaster) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.sleepMutex.RLock() - defer fake.sleepMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeTimeWaster) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ app.TimeWaster = new(FakeTimeWaster) From eefdded0c99fa2cfc7aebbdd30dd07e7afefaa05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 18 Aug 2023 15:44:18 +0200 Subject: [PATCH 148/294] Add dependency for generated openapi-client-code to test-target; --- src/acceptance/assets/app/go_app/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/acceptance/assets/app/go_app/Makefile b/src/acceptance/assets/app/go_app/Makefile index 9b2ce1138f..04f1ff9bce 100644 --- a/src/acceptance/assets/app/go_app/Makefile +++ b/src/acceptance/assets/app/go_app/Makefile @@ -40,7 +40,7 @@ build_test-%: done; check: lint build test -test: +test: generate @echo "Running tests" ginkgo run ${GINKGO_OPTS} ./... From 7844fb8459f453186318dbfd5a84ae98aa192ad1 Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Fri, 18 Aug 2023 13:21:52 +0200 Subject: [PATCH 149/294] Fix lint target and fix/ignore found issues --- .vscode/extensions.json | 3 ++- src/acceptance/assets/app/go_app/Makefile | 11 ++++++++--- .../assets/app/go_app/internal/app/app_test.go | 1 + src/acceptance/assets/app/go_app/internal/app/cpu.go | 3 +-- .../assets/app/go_app/internal/app/custom_metrics.go | 5 ++--- .../assets/app/go_app/internal/app/memory.go | 1 - .../assets/app/go_app/internal/app/memory_test.go | 10 +++++----- .../assets/app/go_app/internal/app/responsetime.go | 2 +- .../app/go_app/internal/app/responsetime_test.go | 3 ++- .../internal/custommetrics/basic_auth_transport.go | 1 + 10 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index a591b10ade..cde2285970 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -6,6 +6,7 @@ "vmware.vscode-boot-dev-pack", "vscjava.vscode-java-pack", "pinage404.nix-extension-pack", - "golang.go" + "golang.go", + "trunk.io" ] } \ No newline at end of file diff --git a/src/acceptance/assets/app/go_app/Makefile b/src/acceptance/assets/app/go_app/Makefile index 8bcc4ca252..95a357869f 100644 --- a/src/acceptance/assets/app/go_app/Makefile +++ b/src/acceptance/assets/app/go_app/Makefile @@ -13,6 +13,8 @@ test_dirs=$(shell find . -name "*_test.go" -exec dirname {} \; | cut -d/ -f2 GINKGO_OPTS=-r --race --require-suite --randomize-all --cover ${OPTS} export CONFIG?=../../../../acceptance_config.json +GOLANGCI_LINT_VERSION=v$(shell cat ../../../../../.tool-versions | grep golangci-lint | cut -d " " -f 2 ) + .PHONY: build build: generate echo "# building test-app" @@ -37,12 +39,15 @@ build_test-%: done; check: lint build test -test: +test: generate @echo "Running tests" ginkgo run ${GINKGO_OPTS} ./... -lint: - @cd ../../../../../; make lint_acceptance OPTS=${OPTS} +lint: generate + @go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run + +lint-fix: generate + go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run --fix .PHONY: start start: build diff --git a/src/acceptance/assets/app/go_app/internal/app/app_test.go b/src/acceptance/assets/app/go_app/internal/app/app_test.go index 41d4a4104e..df720ce4ca 100644 --- a/src/acceptance/assets/app/go_app/internal/app/app_test.go +++ b/src/acceptance/assets/app/go_app/internal/app/app_test.go @@ -49,6 +49,7 @@ var _ = Describe("Ginkgo/Server", func() { var port int BeforeEach(func() { logger := zaptest.LoggerWriter(GinkgoWriter) + /* #nosec G102 -- CF apps run in a container */ l, err := net.Listen("tcp", ":0") Expect(err).ToNot(HaveOccurred()) port = l.Addr().(*net.TCPAddr).Port diff --git a/src/acceptance/assets/app/go_app/internal/app/cpu.go b/src/acceptance/assets/app/go_app/internal/app/cpu.go index 2ef442b37f..0de5f6d565 100644 --- a/src/acceptance/assets/app/go_app/internal/app/cpu.go +++ b/src/acceptance/assets/app/go_app/internal/app/cpu.go @@ -27,7 +27,6 @@ type ConcurrentBusyLoopCPUWaster struct { var _ CPUWaster = &ConcurrentBusyLoopCPUWaster{} func CPUTests(logger logr.Logger, r *gin.RouterGroup, cpuTest CPUWaster) *gin.RouterGroup { - r.GET("/:utilization/:minutes", func(c *gin.Context) { if cpuTest.IsRunning() { Error(c, http.StatusConflict, "CPU test is already running") @@ -79,7 +78,7 @@ func (m *ConcurrentBusyLoopCPUWaster) UseCPU(utilisation uint64, duration time.D runtime.LockOSThread() for m.IsRunning() { begin := time.Now() - for time.Now().Sub(begin) < run { + for time.Since(begin) < run { // burn cpu time } time.Sleep(sleep) diff --git a/src/acceptance/assets/app/go_app/internal/app/custom_metrics.go b/src/acceptance/assets/app/go_app/internal/app/custom_metrics.go index 13804a8e17..680c18ddc3 100644 --- a/src/acceptance/assets/app/go_app/internal/app/custom_metrics.go +++ b/src/acceptance/assets/app/go_app/internal/app/custom_metrics.go @@ -27,7 +27,6 @@ type CustomMetricAPIClient struct{} var _ CustomMetricClient = &CustomMetricAPIClient{} func CustomMetricsTests(logger logr.Logger, r *gin.RouterGroup, customMetricTest CustomMetricClient) *gin.RouterGroup { - r.GET("/mtls/:name/:value", handleCustomMetricsEndpoint(customMetricTest, true)) r.GET("/:name/:value", handleCustomMetricsEndpoint(customMetricTest, false)) @@ -59,13 +58,12 @@ func handleCustomMetricsEndpoint(customMetricTest CustomMetricClient, useMtls bo } } -func (_ *CustomMetricAPIClient) PostCustomMetric(ctx context.Context, appConfig *cfenv.App, metricValue float64, metricName string, useMtls bool) error { +func (*CustomMetricAPIClient) PostCustomMetric(ctx context.Context, appConfig *cfenv.App, metricValue float64, metricName string, useMtls bool) error { var err error if appConfig == nil { appConfig, err = cfenv.Current() if err != nil { return fmt.Errorf("cloud foundry environment not found %w", err) - } } @@ -166,6 +164,7 @@ func getCFInstanceIdentityCertificateClient() (*http.Client, error) { caCertPool := x509.NewCertPool() caCertPool.AppendCertsFromPEM(caCertBytes) + /* #nosec G402 -- test app that shall run on dev foundations without proper certs */ tlsConfig := &tls.Config{ Certificates: []tls.Certificate{cert}, InsecureSkipVerify: true, diff --git a/src/acceptance/assets/app/go_app/internal/app/memory.go b/src/acceptance/assets/app/go_app/internal/app/memory.go index 6aabb2fd20..a4ec9c2915 100644 --- a/src/acceptance/assets/app/go_app/internal/app/memory.go +++ b/src/acceptance/assets/app/go_app/internal/app/memory.go @@ -39,7 +39,6 @@ type ListBasedMemoryGobbler struct { var _ MemoryGobbler = &ListBasedMemoryGobbler{} func MemoryTests(logger logr.Logger, r *gin.RouterGroup, memoryTest MemoryGobbler) *gin.RouterGroup { - r.GET("/:memoryMiB/:minutes", func(c *gin.Context) { if memoryTest.IsRunning() { Error(c, http.StatusConflict, "memory test is already running") diff --git a/src/acceptance/assets/app/go_app/internal/app/memory_test.go b/src/acceptance/assets/app/go_app/internal/app/memory_test.go index 07fd958965..53e037510b 100644 --- a/src/acceptance/assets/app/go_app/internal/app/memory_test.go +++ b/src/acceptance/assets/app/go_app/internal/app/memory_test.go @@ -76,13 +76,13 @@ var _ = Describe("Memory tests", func() { newMem := getTotalMemoryUsage("during memTest info test") msg := - ` + ` If this test fails, please consider to rewrite internal/app/memory.go.UseMemory() to make use of syscalls directly (e.g. “malloc”) to make sure of not having issues due to the go-runtime. ` GinkgoWriter.Printf(msg) - Expect(newMem - oldMem).To(BeNumerically(">=", allocInMebi - slack)) + Expect(newMem - oldMem).To(BeNumerically(">=", allocInMebi-slack)) By("and releasing it after the test ends") memInfo.StopTest() @@ -90,7 +90,7 @@ var _ = Describe("Memory tests", func() { slack = getMemorySlack() - Eventually(getTotalMemoryUsage).WithArguments("after memTest info test").Should(BeNumerically("<=", newMem - allocInMebi + slack)) + Eventually(getTotalMemoryUsage).WithArguments("after memTest info test").Should(BeNumerically("<=", newMem-allocInMebi+slack)) }) }) }) @@ -106,7 +106,7 @@ func getTotalMemoryUsage(action string) uint64 { result := stat.VmRSS + stat.VmSwap - GinkgoWriter.Printf("total memory usage %s: %d MiB\n", action, result / app.Mebi) + GinkgoWriter.Printf("total memory usage %s: %d MiB\n", action, result/app.Mebi) return result } @@ -123,7 +123,7 @@ func getMemorySlack() uint64 { slack := ms.HeapInuse - ms.HeapAlloc - GinkgoWriter.Printf("slack: %d MiB\n", slack / app.Mebi) + GinkgoWriter.Printf("slack: %d MiB\n", slack/app.Mebi) return slack } diff --git a/src/acceptance/assets/app/go_app/internal/app/responsetime.go b/src/acceptance/assets/app/go_app/internal/app/responsetime.go index 42fe204b2f..b42a87c12b 100644 --- a/src/acceptance/assets/app/go_app/internal/app/responsetime.go +++ b/src/acceptance/assets/app/go_app/internal/app/responsetime.go @@ -37,6 +37,6 @@ func ResponseTimeTests(logger logr.Logger, r *gin.RouterGroup, timeWaster TimeWa return r } -func (_ Sleeper) Sleep(sleepTime time.Duration) { +func (Sleeper) Sleep(sleepTime time.Duration) { time.Sleep(sleepTime) } diff --git a/src/acceptance/assets/app/go_app/internal/app/responsetime_test.go b/src/acceptance/assets/app/go_app/internal/app/responsetime_test.go index bf8057a3c6..bf0f00d076 100644 --- a/src/acceptance/assets/app/go_app/internal/app/responsetime_test.go +++ b/src/acceptance/assets/app/go_app/internal/app/responsetime_test.go @@ -1,10 +1,11 @@ package app_test import ( - "code.cloudfoundry.org/app-autoscaler-release/src/acceptance/assets/app/go_app/internal/app/appfakes" "net/http" "time" + "code.cloudfoundry.org/app-autoscaler-release/src/acceptance/assets/app/go_app/internal/app/appfakes" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/basic_auth_transport.go b/src/acceptance/assets/app/go_app/internal/custommetrics/basic_auth_transport.go index 7f1c0a5c47..c49ea764cc 100644 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/basic_auth_transport.go +++ b/src/acceptance/assets/app/go_app/internal/custommetrics/basic_auth_transport.go @@ -25,6 +25,7 @@ func (bat *BasicAuthTransport) Client() *http.Client { } func NewBasicAuthTransport(credentials CustomMetricsCredentials) *BasicAuthTransport { + /* #nosec G402 -- test app that shall run on dev foundations without proper certs */ tr := &http.Transport{ TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, } From 7a5a90ab2795cba5b6f327d614772d843f280b8d Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Fri, 18 Aug 2023 13:22:40 +0200 Subject: [PATCH 150/294] Update `go:build` statements --- src/acceptance/assets/app/go_app/tools/tools.go | 2 +- src/autoscaler/tools.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/acceptance/assets/app/go_app/tools/tools.go b/src/acceptance/assets/app/go_app/tools/tools.go index da48870917..26944e2dc3 100644 --- a/src/acceptance/assets/app/go_app/tools/tools.go +++ b/src/acceptance/assets/app/go_app/tools/tools.go @@ -1,4 +1,4 @@ -// +build tools +//go:build tools package tools diff --git a/src/autoscaler/tools.go b/src/autoscaler/tools.go index 49cc8c3467..26fb269986 100644 --- a/src/autoscaler/tools.go +++ b/src/autoscaler/tools.go @@ -1,4 +1,4 @@ -// +build tools +//go:build tools package main From 29eb8941c4288eb06acb32202d0ddc72d78631d6 Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Fri, 18 Aug 2023 15:34:50 +0200 Subject: [PATCH 151/294] Remove generated fakes some where even missing their generate statement --- .github/workflows/generate.yaml | 40 - src/autoscaler/Makefile | 6 +- src/autoscaler/fakes/.gitignore | 1 + src/autoscaler/fakes/fake_app_metric_db.go | 282 ---- src/autoscaler/fakes/fake_binding_db.go | 1267 ----------------- src/autoscaler/fakes/fake_cf_client.go | 1121 --------------- src/autoscaler/fakes/fake_credentials.go | 411 ------ src/autoscaler/fakes/fake_database_status.go | 103 -- src/autoscaler/fakes/fake_emitter.go | 161 --- .../fakes/fake_envelope_processor.go | 208 --- .../fakes/fake_envelope_processor_creator.go | 115 -- .../fakes/fake_go_log_cache_client.go | 417 ------ src/autoscaler/fakes/fake_grpc.go | 113 -- .../fakes/fake_httpstatus_collector.go | 139 -- .../fakes/fake_instancemetrics_db.go | 284 ---- src/autoscaler/fakes/fake_log_cache_client.go | 126 -- .../fakes/fake_log_cache_creator.go | 120 -- src/autoscaler/fakes/fake_metric_forwarder.go | 77 - .../fake_metric_server_creator_creator.go | 117 -- src/autoscaler/fakes/fake_operator.go | 57 - src/autoscaler/fakes/fake_plan_checker.go | 203 --- src/autoscaler/fakes/fake_policy_db.go | 1018 ------------- src/autoscaler/fakes/fake_ratelimiter.go | 97 -- src/autoscaler/fakes/fake_scalingengine.go | 352 ----- src/autoscaler/fakes/fake_scalingengine_db.go | 863 ----------- src/autoscaler/fakes/fake_scheduler_db.go | 239 ---- .../fakes/fake_storedprocedure_db.go | 483 ------- src/autoscaler/fakes/fake_sychronizer.go | 57 - src/autoscaler/fakes/fake_wshelper.go | 437 ------ src/autoscaler/fakes/fakes.go | 8 + 30 files changed, 12 insertions(+), 8910 deletions(-) delete mode 100644 .github/workflows/generate.yaml create mode 100644 src/autoscaler/fakes/.gitignore delete mode 100644 src/autoscaler/fakes/fake_app_metric_db.go delete mode 100644 src/autoscaler/fakes/fake_binding_db.go delete mode 100644 src/autoscaler/fakes/fake_cf_client.go delete mode 100644 src/autoscaler/fakes/fake_credentials.go delete mode 100644 src/autoscaler/fakes/fake_database_status.go delete mode 100644 src/autoscaler/fakes/fake_emitter.go delete mode 100644 src/autoscaler/fakes/fake_envelope_processor.go delete mode 100644 src/autoscaler/fakes/fake_envelope_processor_creator.go delete mode 100644 src/autoscaler/fakes/fake_go_log_cache_client.go delete mode 100644 src/autoscaler/fakes/fake_grpc.go delete mode 100644 src/autoscaler/fakes/fake_httpstatus_collector.go delete mode 100644 src/autoscaler/fakes/fake_instancemetrics_db.go delete mode 100644 src/autoscaler/fakes/fake_log_cache_client.go delete mode 100644 src/autoscaler/fakes/fake_log_cache_creator.go delete mode 100644 src/autoscaler/fakes/fake_metric_forwarder.go delete mode 100644 src/autoscaler/fakes/fake_metric_server_creator_creator.go delete mode 100644 src/autoscaler/fakes/fake_operator.go delete mode 100644 src/autoscaler/fakes/fake_plan_checker.go delete mode 100644 src/autoscaler/fakes/fake_policy_db.go delete mode 100644 src/autoscaler/fakes/fake_ratelimiter.go delete mode 100644 src/autoscaler/fakes/fake_scalingengine.go delete mode 100644 src/autoscaler/fakes/fake_scalingengine_db.go delete mode 100644 src/autoscaler/fakes/fake_scheduler_db.go delete mode 100644 src/autoscaler/fakes/fake_storedprocedure_db.go delete mode 100644 src/autoscaler/fakes/fake_sychronizer.go delete mode 100644 src/autoscaler/fakes/fake_wshelper.go diff --git a/.github/workflows/generate.yaml b/.github/workflows/generate.yaml deleted file mode 100644 index 829bd0ae5e..0000000000 --- a/.github/workflows/generate.yaml +++ /dev/null @@ -1,40 +0,0 @@ -name: generate -on: - pull_request: - -defaults: - run: - shell: bash - -concurrency: - group: "${{ github.workflow }}/${{ github.ref }}" - cancel-in-progress: true - -jobs: - generate: - name: ensure fakes are up to date - runs-on: ubuntu-latest - container: - image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main - steps: - - uses: actions/checkout@v3 - - name: Go Build - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - - pushd src/autoscaler - make buildtools - make generate - git diff - git status - popd - - - name: Check if there is any change - id: get_changes - run: echo "changed=$(git status --porcelain | wc -l)" >> "${GITHUB_OUTPUT}" - - name: Process changes - if: steps.get_changes.outputs.changed != 0 - run: | - git status - echo "::error::Fakes are out of date, run make generate to update" - exit 1 diff --git a/src/autoscaler/Makefile b/src/autoscaler/Makefile index 4b1b405240..484c7cfc23 100644 --- a/src/autoscaler/Makefile +++ b/src/autoscaler/Makefile @@ -28,7 +28,7 @@ build: $(addprefix build-,$(binaries)) build_tests: $(addprefix build_test-,$(test_dirs)) -build_test-%: +build_test-%: generate @echo " - building '$*' tests" @export build_folder=${PWD}/build/tests/$* &&\ mkdir -p $${build_folder} &&\ @@ -61,8 +61,7 @@ integration: ginkgo_check @echo "# Running integration tests" APP_AUTOSCALER_TEST_RUN=true ginkgo ${GINKGO_OPTS} integration -.PHONY: fakes generate -fakes: generate +.PHONY: generate generate: @echo "# Generating counterfeits" @COUNTERFEITER_NO_GENERATE_WARNING=true go generate ./... @@ -83,3 +82,4 @@ clean: @echo "# cleaning autoscaler" @go clean -cache -testcache @rm -rf build + @rm -rf fakes/fake_*.go diff --git a/src/autoscaler/fakes/.gitignore b/src/autoscaler/fakes/.gitignore new file mode 100644 index 0000000000..e3834a00fe --- /dev/null +++ b/src/autoscaler/fakes/.gitignore @@ -0,0 +1 @@ +fake_*.go \ No newline at end of file diff --git a/src/autoscaler/fakes/fake_app_metric_db.go b/src/autoscaler/fakes/fake_app_metric_db.go deleted file mode 100644 index bcc6aac07f..0000000000 --- a/src/autoscaler/fakes/fake_app_metric_db.go +++ /dev/null @@ -1,282 +0,0 @@ -// This file was generated by counterfeiter -package fakes - -import ( - "database/sql" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/db" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakeAppMetricDB struct { - GetDBStatusStub func() sql.DBStats - getDBStatusMutex sync.RWMutex - getDBStatusArgsForCall []struct{} - getDBStatusReturns struct { - result1 sql.DBStats - } - SaveAppMetricStub func(appMetric *models.AppMetric) error - saveAppMetricMutex sync.RWMutex - saveAppMetricArgsForCall []struct { - appMetric *models.AppMetric - } - saveAppMetricReturns struct { - result1 error - } - SaveAppMetricsInBulkStub func(metrics []*models.AppMetric) error - saveAppMetricsInBulkMutex sync.RWMutex - saveAppMetricsInBulkArgsForCall []struct { - metrics []*models.AppMetric - } - saveAppMetricsInBulkReturns struct { - result1 error - } - RetrieveAppMetricsStub func(appId string, metricType string, start int64, end int64, orderType db.OrderType) ([]*models.AppMetric, error) - retrieveAppMetricsMutex sync.RWMutex - retrieveAppMetricsArgsForCall []struct { - appId string - metricType string - start int64 - end int64 - orderType db.OrderType - } - retrieveAppMetricsReturns struct { - result1 []*models.AppMetric - result2 error - } - PruneAppMetricsStub func(before int64) error - pruneAppMetricsMutex sync.RWMutex - pruneAppMetricsArgsForCall []struct { - before int64 - } - pruneAppMetricsReturns struct { - result1 error - } - CloseStub func() error - closeMutex sync.RWMutex - closeArgsForCall []struct{} - closeReturns struct { - result1 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeAppMetricDB) GetDBStatus() sql.DBStats { - fake.getDBStatusMutex.Lock() - fake.getDBStatusArgsForCall = append(fake.getDBStatusArgsForCall, struct{}{}) - fake.recordInvocation("GetDBStatus", []interface{}{}) - fake.getDBStatusMutex.Unlock() - if fake.GetDBStatusStub != nil { - return fake.GetDBStatusStub() - } - return fake.getDBStatusReturns.result1 -} - -func (fake *FakeAppMetricDB) GetDBStatusCallCount() int { - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - return len(fake.getDBStatusArgsForCall) -} - -func (fake *FakeAppMetricDB) GetDBStatusReturns(result1 sql.DBStats) { - fake.GetDBStatusStub = nil - fake.getDBStatusReturns = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeAppMetricDB) SaveAppMetric(appMetric *models.AppMetric) error { - fake.saveAppMetricMutex.Lock() - fake.saveAppMetricArgsForCall = append(fake.saveAppMetricArgsForCall, struct { - appMetric *models.AppMetric - }{appMetric}) - fake.recordInvocation("SaveAppMetric", []interface{}{appMetric}) - fake.saveAppMetricMutex.Unlock() - if fake.SaveAppMetricStub != nil { - return fake.SaveAppMetricStub(appMetric) - } - return fake.saveAppMetricReturns.result1 -} - -func (fake *FakeAppMetricDB) SaveAppMetricCallCount() int { - fake.saveAppMetricMutex.RLock() - defer fake.saveAppMetricMutex.RUnlock() - return len(fake.saveAppMetricArgsForCall) -} - -func (fake *FakeAppMetricDB) SaveAppMetricArgsForCall(i int) *models.AppMetric { - fake.saveAppMetricMutex.RLock() - defer fake.saveAppMetricMutex.RUnlock() - return fake.saveAppMetricArgsForCall[i].appMetric -} - -func (fake *FakeAppMetricDB) SaveAppMetricReturns(result1 error) { - fake.SaveAppMetricStub = nil - fake.saveAppMetricReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeAppMetricDB) SaveAppMetricsInBulk(metrics []*models.AppMetric) error { - var metricsCopy []*models.AppMetric - if metrics != nil { - metricsCopy = make([]*models.AppMetric, len(metrics)) - copy(metricsCopy, metrics) - } - fake.saveAppMetricsInBulkMutex.Lock() - fake.saveAppMetricsInBulkArgsForCall = append(fake.saveAppMetricsInBulkArgsForCall, struct { - metrics []*models.AppMetric - }{metricsCopy}) - fake.recordInvocation("SaveAppMetricsInBulk", []interface{}{metricsCopy}) - fake.saveAppMetricsInBulkMutex.Unlock() - if fake.SaveAppMetricsInBulkStub != nil { - return fake.SaveAppMetricsInBulkStub(metrics) - } - return fake.saveAppMetricsInBulkReturns.result1 -} - -func (fake *FakeAppMetricDB) SaveAppMetricsInBulkCallCount() int { - fake.saveAppMetricsInBulkMutex.RLock() - defer fake.saveAppMetricsInBulkMutex.RUnlock() - return len(fake.saveAppMetricsInBulkArgsForCall) -} - -func (fake *FakeAppMetricDB) SaveAppMetricsInBulkArgsForCall(i int) []*models.AppMetric { - fake.saveAppMetricsInBulkMutex.RLock() - defer fake.saveAppMetricsInBulkMutex.RUnlock() - return fake.saveAppMetricsInBulkArgsForCall[i].metrics -} - -func (fake *FakeAppMetricDB) SaveAppMetricsInBulkReturns(result1 error) { - fake.SaveAppMetricsInBulkStub = nil - fake.saveAppMetricsInBulkReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeAppMetricDB) RetrieveAppMetrics(appId string, metricType string, start int64, end int64, orderType db.OrderType) ([]*models.AppMetric, error) { - fake.retrieveAppMetricsMutex.Lock() - fake.retrieveAppMetricsArgsForCall = append(fake.retrieveAppMetricsArgsForCall, struct { - appId string - metricType string - start int64 - end int64 - orderType db.OrderType - }{appId, metricType, start, end, orderType}) - fake.recordInvocation("RetrieveAppMetrics", []interface{}{appId, metricType, start, end, orderType}) - fake.retrieveAppMetricsMutex.Unlock() - if fake.RetrieveAppMetricsStub != nil { - return fake.RetrieveAppMetricsStub(appId, metricType, start, end, orderType) - } - return fake.retrieveAppMetricsReturns.result1, fake.retrieveAppMetricsReturns.result2 -} - -func (fake *FakeAppMetricDB) RetrieveAppMetricsCallCount() int { - fake.retrieveAppMetricsMutex.RLock() - defer fake.retrieveAppMetricsMutex.RUnlock() - return len(fake.retrieveAppMetricsArgsForCall) -} - -func (fake *FakeAppMetricDB) RetrieveAppMetricsArgsForCall(i int) (string, string, int64, int64, db.OrderType) { - fake.retrieveAppMetricsMutex.RLock() - defer fake.retrieveAppMetricsMutex.RUnlock() - return fake.retrieveAppMetricsArgsForCall[i].appId, fake.retrieveAppMetricsArgsForCall[i].metricType, fake.retrieveAppMetricsArgsForCall[i].start, fake.retrieveAppMetricsArgsForCall[i].end, fake.retrieveAppMetricsArgsForCall[i].orderType -} - -func (fake *FakeAppMetricDB) RetrieveAppMetricsReturns(result1 []*models.AppMetric, result2 error) { - fake.RetrieveAppMetricsStub = nil - fake.retrieveAppMetricsReturns = struct { - result1 []*models.AppMetric - result2 error - }{result1, result2} -} - -func (fake *FakeAppMetricDB) PruneAppMetrics(before int64) error { - fake.pruneAppMetricsMutex.Lock() - fake.pruneAppMetricsArgsForCall = append(fake.pruneAppMetricsArgsForCall, struct { - before int64 - }{before}) - fake.recordInvocation("PruneAppMetrics", []interface{}{before}) - fake.pruneAppMetricsMutex.Unlock() - if fake.PruneAppMetricsStub != nil { - return fake.PruneAppMetricsStub(before) - } - return fake.pruneAppMetricsReturns.result1 -} - -func (fake *FakeAppMetricDB) PruneAppMetricsCallCount() int { - fake.pruneAppMetricsMutex.RLock() - defer fake.pruneAppMetricsMutex.RUnlock() - return len(fake.pruneAppMetricsArgsForCall) -} - -func (fake *FakeAppMetricDB) PruneAppMetricsArgsForCall(i int) int64 { - fake.pruneAppMetricsMutex.RLock() - defer fake.pruneAppMetricsMutex.RUnlock() - return fake.pruneAppMetricsArgsForCall[i].before -} - -func (fake *FakeAppMetricDB) PruneAppMetricsReturns(result1 error) { - fake.PruneAppMetricsStub = nil - fake.pruneAppMetricsReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeAppMetricDB) Close() error { - fake.closeMutex.Lock() - fake.closeArgsForCall = append(fake.closeArgsForCall, struct{}{}) - fake.recordInvocation("Close", []interface{}{}) - fake.closeMutex.Unlock() - if fake.CloseStub != nil { - return fake.CloseStub() - } - return fake.closeReturns.result1 -} - -func (fake *FakeAppMetricDB) CloseCallCount() int { - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return len(fake.closeArgsForCall) -} - -func (fake *FakeAppMetricDB) CloseReturns(result1 error) { - fake.CloseStub = nil - fake.closeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeAppMetricDB) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - fake.saveAppMetricMutex.RLock() - defer fake.saveAppMetricMutex.RUnlock() - fake.saveAppMetricsInBulkMutex.RLock() - defer fake.saveAppMetricsInBulkMutex.RUnlock() - fake.retrieveAppMetricsMutex.RLock() - defer fake.retrieveAppMetricsMutex.RUnlock() - fake.pruneAppMetricsMutex.RLock() - defer fake.pruneAppMetricsMutex.RUnlock() - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return fake.invocations -} - -func (fake *FakeAppMetricDB) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ db.AppMetricDB = new(FakeAppMetricDB) diff --git a/src/autoscaler/fakes/fake_binding_db.go b/src/autoscaler/fakes/fake_binding_db.go deleted file mode 100644 index 946e6fd1b7..0000000000 --- a/src/autoscaler/fakes/fake_binding_db.go +++ /dev/null @@ -1,1267 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "context" - "database/sql" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/db" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakeBindingDB struct { - CheckServiceBindingStub func(string) bool - checkServiceBindingMutex sync.RWMutex - checkServiceBindingArgsForCall []struct { - arg1 string - } - checkServiceBindingReturns struct { - result1 bool - } - checkServiceBindingReturnsOnCall map[int]struct { - result1 bool - } - CloseStub func() error - closeMutex sync.RWMutex - closeArgsForCall []struct { - } - closeReturns struct { - result1 error - } - closeReturnsOnCall map[int]struct { - result1 error - } - CountServiceInstancesInOrgStub func(string) (int, error) - countServiceInstancesInOrgMutex sync.RWMutex - countServiceInstancesInOrgArgsForCall []struct { - arg1 string - } - countServiceInstancesInOrgReturns struct { - result1 int - result2 error - } - countServiceInstancesInOrgReturnsOnCall map[int]struct { - result1 int - result2 error - } - CreateServiceBindingStub func(context.Context, string, string, string) error - createServiceBindingMutex sync.RWMutex - createServiceBindingArgsForCall []struct { - arg1 context.Context - arg2 string - arg3 string - arg4 string - } - createServiceBindingReturns struct { - result1 error - } - createServiceBindingReturnsOnCall map[int]struct { - result1 error - } - CreateServiceInstanceStub func(context.Context, models.ServiceInstance) error - createServiceInstanceMutex sync.RWMutex - createServiceInstanceArgsForCall []struct { - arg1 context.Context - arg2 models.ServiceInstance - } - createServiceInstanceReturns struct { - result1 error - } - createServiceInstanceReturnsOnCall map[int]struct { - result1 error - } - DeleteServiceBindingStub func(context.Context, string) error - deleteServiceBindingMutex sync.RWMutex - deleteServiceBindingArgsForCall []struct { - arg1 context.Context - arg2 string - } - deleteServiceBindingReturns struct { - result1 error - } - deleteServiceBindingReturnsOnCall map[int]struct { - result1 error - } - DeleteServiceBindingByAppIdStub func(context.Context, string) error - deleteServiceBindingByAppIdMutex sync.RWMutex - deleteServiceBindingByAppIdArgsForCall []struct { - arg1 context.Context - arg2 string - } - deleteServiceBindingByAppIdReturns struct { - result1 error - } - deleteServiceBindingByAppIdReturnsOnCall map[int]struct { - result1 error - } - DeleteServiceInstanceStub func(context.Context, string) error - deleteServiceInstanceMutex sync.RWMutex - deleteServiceInstanceArgsForCall []struct { - arg1 context.Context - arg2 string - } - deleteServiceInstanceReturns struct { - result1 error - } - deleteServiceInstanceReturnsOnCall map[int]struct { - result1 error - } - GetAppIdByBindingIdStub func(context.Context, string) (string, error) - getAppIdByBindingIdMutex sync.RWMutex - getAppIdByBindingIdArgsForCall []struct { - arg1 context.Context - arg2 string - } - getAppIdByBindingIdReturns struct { - result1 string - result2 error - } - getAppIdByBindingIdReturnsOnCall map[int]struct { - result1 string - result2 error - } - GetAppIdsByInstanceIdStub func(context.Context, string) ([]string, error) - getAppIdsByInstanceIdMutex sync.RWMutex - getAppIdsByInstanceIdArgsForCall []struct { - arg1 context.Context - arg2 string - } - getAppIdsByInstanceIdReturns struct { - result1 []string - result2 error - } - getAppIdsByInstanceIdReturnsOnCall map[int]struct { - result1 []string - result2 error - } - GetBindingIdsByInstanceIdStub func(context.Context, string) ([]string, error) - getBindingIdsByInstanceIdMutex sync.RWMutex - getBindingIdsByInstanceIdArgsForCall []struct { - arg1 context.Context - arg2 string - } - getBindingIdsByInstanceIdReturns struct { - result1 []string - result2 error - } - getBindingIdsByInstanceIdReturnsOnCall map[int]struct { - result1 []string - result2 error - } - GetDBStatusStub func() sql.DBStats - getDBStatusMutex sync.RWMutex - getDBStatusArgsForCall []struct { - } - getDBStatusReturns struct { - result1 sql.DBStats - } - getDBStatusReturnsOnCall map[int]struct { - result1 sql.DBStats - } - GetServiceBindingStub func(context.Context, string) (*models.ServiceBinding, error) - getServiceBindingMutex sync.RWMutex - getServiceBindingArgsForCall []struct { - arg1 context.Context - arg2 string - } - getServiceBindingReturns struct { - result1 *models.ServiceBinding - result2 error - } - getServiceBindingReturnsOnCall map[int]struct { - result1 *models.ServiceBinding - result2 error - } - GetServiceInstanceStub func(context.Context, string) (*models.ServiceInstance, error) - getServiceInstanceMutex sync.RWMutex - getServiceInstanceArgsForCall []struct { - arg1 context.Context - arg2 string - } - getServiceInstanceReturns struct { - result1 *models.ServiceInstance - result2 error - } - getServiceInstanceReturnsOnCall map[int]struct { - result1 *models.ServiceInstance - result2 error - } - GetServiceInstanceByAppIdStub func(string) (*models.ServiceInstance, error) - getServiceInstanceByAppIdMutex sync.RWMutex - getServiceInstanceByAppIdArgsForCall []struct { - arg1 string - } - getServiceInstanceByAppIdReturns struct { - result1 *models.ServiceInstance - result2 error - } - getServiceInstanceByAppIdReturnsOnCall map[int]struct { - result1 *models.ServiceInstance - result2 error - } - UpdateServiceInstanceStub func(context.Context, models.ServiceInstance) error - updateServiceInstanceMutex sync.RWMutex - updateServiceInstanceArgsForCall []struct { - arg1 context.Context - arg2 models.ServiceInstance - } - updateServiceInstanceReturns struct { - result1 error - } - updateServiceInstanceReturnsOnCall map[int]struct { - result1 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeBindingDB) CheckServiceBinding(arg1 string) bool { - fake.checkServiceBindingMutex.Lock() - ret, specificReturn := fake.checkServiceBindingReturnsOnCall[len(fake.checkServiceBindingArgsForCall)] - fake.checkServiceBindingArgsForCall = append(fake.checkServiceBindingArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.CheckServiceBindingStub - fakeReturns := fake.checkServiceBindingReturns - fake.recordInvocation("CheckServiceBinding", []interface{}{arg1}) - fake.checkServiceBindingMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeBindingDB) CheckServiceBindingCallCount() int { - fake.checkServiceBindingMutex.RLock() - defer fake.checkServiceBindingMutex.RUnlock() - return len(fake.checkServiceBindingArgsForCall) -} - -func (fake *FakeBindingDB) CheckServiceBindingCalls(stub func(string) bool) { - fake.checkServiceBindingMutex.Lock() - defer fake.checkServiceBindingMutex.Unlock() - fake.CheckServiceBindingStub = stub -} - -func (fake *FakeBindingDB) CheckServiceBindingArgsForCall(i int) string { - fake.checkServiceBindingMutex.RLock() - defer fake.checkServiceBindingMutex.RUnlock() - argsForCall := fake.checkServiceBindingArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeBindingDB) CheckServiceBindingReturns(result1 bool) { - fake.checkServiceBindingMutex.Lock() - defer fake.checkServiceBindingMutex.Unlock() - fake.CheckServiceBindingStub = nil - fake.checkServiceBindingReturns = struct { - result1 bool - }{result1} -} - -func (fake *FakeBindingDB) CheckServiceBindingReturnsOnCall(i int, result1 bool) { - fake.checkServiceBindingMutex.Lock() - defer fake.checkServiceBindingMutex.Unlock() - fake.CheckServiceBindingStub = nil - if fake.checkServiceBindingReturnsOnCall == nil { - fake.checkServiceBindingReturnsOnCall = make(map[int]struct { - result1 bool - }) - } - fake.checkServiceBindingReturnsOnCall[i] = struct { - result1 bool - }{result1} -} - -func (fake *FakeBindingDB) Close() error { - fake.closeMutex.Lock() - ret, specificReturn := fake.closeReturnsOnCall[len(fake.closeArgsForCall)] - fake.closeArgsForCall = append(fake.closeArgsForCall, struct { - }{}) - stub := fake.CloseStub - fakeReturns := fake.closeReturns - fake.recordInvocation("Close", []interface{}{}) - fake.closeMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeBindingDB) CloseCallCount() int { - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return len(fake.closeArgsForCall) -} - -func (fake *FakeBindingDB) CloseCalls(stub func() error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = stub -} - -func (fake *FakeBindingDB) CloseReturns(result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - fake.closeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) CloseReturnsOnCall(i int, result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - if fake.closeReturnsOnCall == nil { - fake.closeReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.closeReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) CountServiceInstancesInOrg(arg1 string) (int, error) { - fake.countServiceInstancesInOrgMutex.Lock() - ret, specificReturn := fake.countServiceInstancesInOrgReturnsOnCall[len(fake.countServiceInstancesInOrgArgsForCall)] - fake.countServiceInstancesInOrgArgsForCall = append(fake.countServiceInstancesInOrgArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.CountServiceInstancesInOrgStub - fakeReturns := fake.countServiceInstancesInOrgReturns - fake.recordInvocation("CountServiceInstancesInOrg", []interface{}{arg1}) - fake.countServiceInstancesInOrgMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeBindingDB) CountServiceInstancesInOrgCallCount() int { - fake.countServiceInstancesInOrgMutex.RLock() - defer fake.countServiceInstancesInOrgMutex.RUnlock() - return len(fake.countServiceInstancesInOrgArgsForCall) -} - -func (fake *FakeBindingDB) CountServiceInstancesInOrgCalls(stub func(string) (int, error)) { - fake.countServiceInstancesInOrgMutex.Lock() - defer fake.countServiceInstancesInOrgMutex.Unlock() - fake.CountServiceInstancesInOrgStub = stub -} - -func (fake *FakeBindingDB) CountServiceInstancesInOrgArgsForCall(i int) string { - fake.countServiceInstancesInOrgMutex.RLock() - defer fake.countServiceInstancesInOrgMutex.RUnlock() - argsForCall := fake.countServiceInstancesInOrgArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeBindingDB) CountServiceInstancesInOrgReturns(result1 int, result2 error) { - fake.countServiceInstancesInOrgMutex.Lock() - defer fake.countServiceInstancesInOrgMutex.Unlock() - fake.CountServiceInstancesInOrgStub = nil - fake.countServiceInstancesInOrgReturns = struct { - result1 int - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) CountServiceInstancesInOrgReturnsOnCall(i int, result1 int, result2 error) { - fake.countServiceInstancesInOrgMutex.Lock() - defer fake.countServiceInstancesInOrgMutex.Unlock() - fake.CountServiceInstancesInOrgStub = nil - if fake.countServiceInstancesInOrgReturnsOnCall == nil { - fake.countServiceInstancesInOrgReturnsOnCall = make(map[int]struct { - result1 int - result2 error - }) - } - fake.countServiceInstancesInOrgReturnsOnCall[i] = struct { - result1 int - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) CreateServiceBinding(arg1 context.Context, arg2 string, arg3 string, arg4 string) error { - fake.createServiceBindingMutex.Lock() - ret, specificReturn := fake.createServiceBindingReturnsOnCall[len(fake.createServiceBindingArgsForCall)] - fake.createServiceBindingArgsForCall = append(fake.createServiceBindingArgsForCall, struct { - arg1 context.Context - arg2 string - arg3 string - arg4 string - }{arg1, arg2, arg3, arg4}) - stub := fake.CreateServiceBindingStub - fakeReturns := fake.createServiceBindingReturns - fake.recordInvocation("CreateServiceBinding", []interface{}{arg1, arg2, arg3, arg4}) - fake.createServiceBindingMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeBindingDB) CreateServiceBindingCallCount() int { - fake.createServiceBindingMutex.RLock() - defer fake.createServiceBindingMutex.RUnlock() - return len(fake.createServiceBindingArgsForCall) -} - -func (fake *FakeBindingDB) CreateServiceBindingCalls(stub func(context.Context, string, string, string) error) { - fake.createServiceBindingMutex.Lock() - defer fake.createServiceBindingMutex.Unlock() - fake.CreateServiceBindingStub = stub -} - -func (fake *FakeBindingDB) CreateServiceBindingArgsForCall(i int) (context.Context, string, string, string) { - fake.createServiceBindingMutex.RLock() - defer fake.createServiceBindingMutex.RUnlock() - argsForCall := fake.createServiceBindingArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 -} - -func (fake *FakeBindingDB) CreateServiceBindingReturns(result1 error) { - fake.createServiceBindingMutex.Lock() - defer fake.createServiceBindingMutex.Unlock() - fake.CreateServiceBindingStub = nil - fake.createServiceBindingReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) CreateServiceBindingReturnsOnCall(i int, result1 error) { - fake.createServiceBindingMutex.Lock() - defer fake.createServiceBindingMutex.Unlock() - fake.CreateServiceBindingStub = nil - if fake.createServiceBindingReturnsOnCall == nil { - fake.createServiceBindingReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.createServiceBindingReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) CreateServiceInstance(arg1 context.Context, arg2 models.ServiceInstance) error { - fake.createServiceInstanceMutex.Lock() - ret, specificReturn := fake.createServiceInstanceReturnsOnCall[len(fake.createServiceInstanceArgsForCall)] - fake.createServiceInstanceArgsForCall = append(fake.createServiceInstanceArgsForCall, struct { - arg1 context.Context - arg2 models.ServiceInstance - }{arg1, arg2}) - stub := fake.CreateServiceInstanceStub - fakeReturns := fake.createServiceInstanceReturns - fake.recordInvocation("CreateServiceInstance", []interface{}{arg1, arg2}) - fake.createServiceInstanceMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeBindingDB) CreateServiceInstanceCallCount() int { - fake.createServiceInstanceMutex.RLock() - defer fake.createServiceInstanceMutex.RUnlock() - return len(fake.createServiceInstanceArgsForCall) -} - -func (fake *FakeBindingDB) CreateServiceInstanceCalls(stub func(context.Context, models.ServiceInstance) error) { - fake.createServiceInstanceMutex.Lock() - defer fake.createServiceInstanceMutex.Unlock() - fake.CreateServiceInstanceStub = stub -} - -func (fake *FakeBindingDB) CreateServiceInstanceArgsForCall(i int) (context.Context, models.ServiceInstance) { - fake.createServiceInstanceMutex.RLock() - defer fake.createServiceInstanceMutex.RUnlock() - argsForCall := fake.createServiceInstanceArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) CreateServiceInstanceReturns(result1 error) { - fake.createServiceInstanceMutex.Lock() - defer fake.createServiceInstanceMutex.Unlock() - fake.CreateServiceInstanceStub = nil - fake.createServiceInstanceReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) CreateServiceInstanceReturnsOnCall(i int, result1 error) { - fake.createServiceInstanceMutex.Lock() - defer fake.createServiceInstanceMutex.Unlock() - fake.CreateServiceInstanceStub = nil - if fake.createServiceInstanceReturnsOnCall == nil { - fake.createServiceInstanceReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.createServiceInstanceReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) DeleteServiceBinding(arg1 context.Context, arg2 string) error { - fake.deleteServiceBindingMutex.Lock() - ret, specificReturn := fake.deleteServiceBindingReturnsOnCall[len(fake.deleteServiceBindingArgsForCall)] - fake.deleteServiceBindingArgsForCall = append(fake.deleteServiceBindingArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.DeleteServiceBindingStub - fakeReturns := fake.deleteServiceBindingReturns - fake.recordInvocation("DeleteServiceBinding", []interface{}{arg1, arg2}) - fake.deleteServiceBindingMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeBindingDB) DeleteServiceBindingCallCount() int { - fake.deleteServiceBindingMutex.RLock() - defer fake.deleteServiceBindingMutex.RUnlock() - return len(fake.deleteServiceBindingArgsForCall) -} - -func (fake *FakeBindingDB) DeleteServiceBindingCalls(stub func(context.Context, string) error) { - fake.deleteServiceBindingMutex.Lock() - defer fake.deleteServiceBindingMutex.Unlock() - fake.DeleteServiceBindingStub = stub -} - -func (fake *FakeBindingDB) DeleteServiceBindingArgsForCall(i int) (context.Context, string) { - fake.deleteServiceBindingMutex.RLock() - defer fake.deleteServiceBindingMutex.RUnlock() - argsForCall := fake.deleteServiceBindingArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) DeleteServiceBindingReturns(result1 error) { - fake.deleteServiceBindingMutex.Lock() - defer fake.deleteServiceBindingMutex.Unlock() - fake.DeleteServiceBindingStub = nil - fake.deleteServiceBindingReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) DeleteServiceBindingReturnsOnCall(i int, result1 error) { - fake.deleteServiceBindingMutex.Lock() - defer fake.deleteServiceBindingMutex.Unlock() - fake.DeleteServiceBindingStub = nil - if fake.deleteServiceBindingReturnsOnCall == nil { - fake.deleteServiceBindingReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.deleteServiceBindingReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) DeleteServiceBindingByAppId(arg1 context.Context, arg2 string) error { - fake.deleteServiceBindingByAppIdMutex.Lock() - ret, specificReturn := fake.deleteServiceBindingByAppIdReturnsOnCall[len(fake.deleteServiceBindingByAppIdArgsForCall)] - fake.deleteServiceBindingByAppIdArgsForCall = append(fake.deleteServiceBindingByAppIdArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.DeleteServiceBindingByAppIdStub - fakeReturns := fake.deleteServiceBindingByAppIdReturns - fake.recordInvocation("DeleteServiceBindingByAppId", []interface{}{arg1, arg2}) - fake.deleteServiceBindingByAppIdMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeBindingDB) DeleteServiceBindingByAppIdCallCount() int { - fake.deleteServiceBindingByAppIdMutex.RLock() - defer fake.deleteServiceBindingByAppIdMutex.RUnlock() - return len(fake.deleteServiceBindingByAppIdArgsForCall) -} - -func (fake *FakeBindingDB) DeleteServiceBindingByAppIdCalls(stub func(context.Context, string) error) { - fake.deleteServiceBindingByAppIdMutex.Lock() - defer fake.deleteServiceBindingByAppIdMutex.Unlock() - fake.DeleteServiceBindingByAppIdStub = stub -} - -func (fake *FakeBindingDB) DeleteServiceBindingByAppIdArgsForCall(i int) (context.Context, string) { - fake.deleteServiceBindingByAppIdMutex.RLock() - defer fake.deleteServiceBindingByAppIdMutex.RUnlock() - argsForCall := fake.deleteServiceBindingByAppIdArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) DeleteServiceBindingByAppIdReturns(result1 error) { - fake.deleteServiceBindingByAppIdMutex.Lock() - defer fake.deleteServiceBindingByAppIdMutex.Unlock() - fake.DeleteServiceBindingByAppIdStub = nil - fake.deleteServiceBindingByAppIdReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) DeleteServiceBindingByAppIdReturnsOnCall(i int, result1 error) { - fake.deleteServiceBindingByAppIdMutex.Lock() - defer fake.deleteServiceBindingByAppIdMutex.Unlock() - fake.DeleteServiceBindingByAppIdStub = nil - if fake.deleteServiceBindingByAppIdReturnsOnCall == nil { - fake.deleteServiceBindingByAppIdReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.deleteServiceBindingByAppIdReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) DeleteServiceInstance(arg1 context.Context, arg2 string) error { - fake.deleteServiceInstanceMutex.Lock() - ret, specificReturn := fake.deleteServiceInstanceReturnsOnCall[len(fake.deleteServiceInstanceArgsForCall)] - fake.deleteServiceInstanceArgsForCall = append(fake.deleteServiceInstanceArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.DeleteServiceInstanceStub - fakeReturns := fake.deleteServiceInstanceReturns - fake.recordInvocation("DeleteServiceInstance", []interface{}{arg1, arg2}) - fake.deleteServiceInstanceMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeBindingDB) DeleteServiceInstanceCallCount() int { - fake.deleteServiceInstanceMutex.RLock() - defer fake.deleteServiceInstanceMutex.RUnlock() - return len(fake.deleteServiceInstanceArgsForCall) -} - -func (fake *FakeBindingDB) DeleteServiceInstanceCalls(stub func(context.Context, string) error) { - fake.deleteServiceInstanceMutex.Lock() - defer fake.deleteServiceInstanceMutex.Unlock() - fake.DeleteServiceInstanceStub = stub -} - -func (fake *FakeBindingDB) DeleteServiceInstanceArgsForCall(i int) (context.Context, string) { - fake.deleteServiceInstanceMutex.RLock() - defer fake.deleteServiceInstanceMutex.RUnlock() - argsForCall := fake.deleteServiceInstanceArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) DeleteServiceInstanceReturns(result1 error) { - fake.deleteServiceInstanceMutex.Lock() - defer fake.deleteServiceInstanceMutex.Unlock() - fake.DeleteServiceInstanceStub = nil - fake.deleteServiceInstanceReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) DeleteServiceInstanceReturnsOnCall(i int, result1 error) { - fake.deleteServiceInstanceMutex.Lock() - defer fake.deleteServiceInstanceMutex.Unlock() - fake.DeleteServiceInstanceStub = nil - if fake.deleteServiceInstanceReturnsOnCall == nil { - fake.deleteServiceInstanceReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.deleteServiceInstanceReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) GetAppIdByBindingId(arg1 context.Context, arg2 string) (string, error) { - fake.getAppIdByBindingIdMutex.Lock() - ret, specificReturn := fake.getAppIdByBindingIdReturnsOnCall[len(fake.getAppIdByBindingIdArgsForCall)] - fake.getAppIdByBindingIdArgsForCall = append(fake.getAppIdByBindingIdArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.GetAppIdByBindingIdStub - fakeReturns := fake.getAppIdByBindingIdReturns - fake.recordInvocation("GetAppIdByBindingId", []interface{}{arg1, arg2}) - fake.getAppIdByBindingIdMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeBindingDB) GetAppIdByBindingIdCallCount() int { - fake.getAppIdByBindingIdMutex.RLock() - defer fake.getAppIdByBindingIdMutex.RUnlock() - return len(fake.getAppIdByBindingIdArgsForCall) -} - -func (fake *FakeBindingDB) GetAppIdByBindingIdCalls(stub func(context.Context, string) (string, error)) { - fake.getAppIdByBindingIdMutex.Lock() - defer fake.getAppIdByBindingIdMutex.Unlock() - fake.GetAppIdByBindingIdStub = stub -} - -func (fake *FakeBindingDB) GetAppIdByBindingIdArgsForCall(i int) (context.Context, string) { - fake.getAppIdByBindingIdMutex.RLock() - defer fake.getAppIdByBindingIdMutex.RUnlock() - argsForCall := fake.getAppIdByBindingIdArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) GetAppIdByBindingIdReturns(result1 string, result2 error) { - fake.getAppIdByBindingIdMutex.Lock() - defer fake.getAppIdByBindingIdMutex.Unlock() - fake.GetAppIdByBindingIdStub = nil - fake.getAppIdByBindingIdReturns = struct { - result1 string - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetAppIdByBindingIdReturnsOnCall(i int, result1 string, result2 error) { - fake.getAppIdByBindingIdMutex.Lock() - defer fake.getAppIdByBindingIdMutex.Unlock() - fake.GetAppIdByBindingIdStub = nil - if fake.getAppIdByBindingIdReturnsOnCall == nil { - fake.getAppIdByBindingIdReturnsOnCall = make(map[int]struct { - result1 string - result2 error - }) - } - fake.getAppIdByBindingIdReturnsOnCall[i] = struct { - result1 string - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetAppIdsByInstanceId(arg1 context.Context, arg2 string) ([]string, error) { - fake.getAppIdsByInstanceIdMutex.Lock() - ret, specificReturn := fake.getAppIdsByInstanceIdReturnsOnCall[len(fake.getAppIdsByInstanceIdArgsForCall)] - fake.getAppIdsByInstanceIdArgsForCall = append(fake.getAppIdsByInstanceIdArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.GetAppIdsByInstanceIdStub - fakeReturns := fake.getAppIdsByInstanceIdReturns - fake.recordInvocation("GetAppIdsByInstanceId", []interface{}{arg1, arg2}) - fake.getAppIdsByInstanceIdMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeBindingDB) GetAppIdsByInstanceIdCallCount() int { - fake.getAppIdsByInstanceIdMutex.RLock() - defer fake.getAppIdsByInstanceIdMutex.RUnlock() - return len(fake.getAppIdsByInstanceIdArgsForCall) -} - -func (fake *FakeBindingDB) GetAppIdsByInstanceIdCalls(stub func(context.Context, string) ([]string, error)) { - fake.getAppIdsByInstanceIdMutex.Lock() - defer fake.getAppIdsByInstanceIdMutex.Unlock() - fake.GetAppIdsByInstanceIdStub = stub -} - -func (fake *FakeBindingDB) GetAppIdsByInstanceIdArgsForCall(i int) (context.Context, string) { - fake.getAppIdsByInstanceIdMutex.RLock() - defer fake.getAppIdsByInstanceIdMutex.RUnlock() - argsForCall := fake.getAppIdsByInstanceIdArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) GetAppIdsByInstanceIdReturns(result1 []string, result2 error) { - fake.getAppIdsByInstanceIdMutex.Lock() - defer fake.getAppIdsByInstanceIdMutex.Unlock() - fake.GetAppIdsByInstanceIdStub = nil - fake.getAppIdsByInstanceIdReturns = struct { - result1 []string - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetAppIdsByInstanceIdReturnsOnCall(i int, result1 []string, result2 error) { - fake.getAppIdsByInstanceIdMutex.Lock() - defer fake.getAppIdsByInstanceIdMutex.Unlock() - fake.GetAppIdsByInstanceIdStub = nil - if fake.getAppIdsByInstanceIdReturnsOnCall == nil { - fake.getAppIdsByInstanceIdReturnsOnCall = make(map[int]struct { - result1 []string - result2 error - }) - } - fake.getAppIdsByInstanceIdReturnsOnCall[i] = struct { - result1 []string - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetBindingIdsByInstanceId(arg1 context.Context, arg2 string) ([]string, error) { - fake.getBindingIdsByInstanceIdMutex.Lock() - ret, specificReturn := fake.getBindingIdsByInstanceIdReturnsOnCall[len(fake.getBindingIdsByInstanceIdArgsForCall)] - fake.getBindingIdsByInstanceIdArgsForCall = append(fake.getBindingIdsByInstanceIdArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.GetBindingIdsByInstanceIdStub - fakeReturns := fake.getBindingIdsByInstanceIdReturns - fake.recordInvocation("GetBindingIdsByInstanceId", []interface{}{arg1, arg2}) - fake.getBindingIdsByInstanceIdMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeBindingDB) GetBindingIdsByInstanceIdCallCount() int { - fake.getBindingIdsByInstanceIdMutex.RLock() - defer fake.getBindingIdsByInstanceIdMutex.RUnlock() - return len(fake.getBindingIdsByInstanceIdArgsForCall) -} - -func (fake *FakeBindingDB) GetBindingIdsByInstanceIdCalls(stub func(context.Context, string) ([]string, error)) { - fake.getBindingIdsByInstanceIdMutex.Lock() - defer fake.getBindingIdsByInstanceIdMutex.Unlock() - fake.GetBindingIdsByInstanceIdStub = stub -} - -func (fake *FakeBindingDB) GetBindingIdsByInstanceIdArgsForCall(i int) (context.Context, string) { - fake.getBindingIdsByInstanceIdMutex.RLock() - defer fake.getBindingIdsByInstanceIdMutex.RUnlock() - argsForCall := fake.getBindingIdsByInstanceIdArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) GetBindingIdsByInstanceIdReturns(result1 []string, result2 error) { - fake.getBindingIdsByInstanceIdMutex.Lock() - defer fake.getBindingIdsByInstanceIdMutex.Unlock() - fake.GetBindingIdsByInstanceIdStub = nil - fake.getBindingIdsByInstanceIdReturns = struct { - result1 []string - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetBindingIdsByInstanceIdReturnsOnCall(i int, result1 []string, result2 error) { - fake.getBindingIdsByInstanceIdMutex.Lock() - defer fake.getBindingIdsByInstanceIdMutex.Unlock() - fake.GetBindingIdsByInstanceIdStub = nil - if fake.getBindingIdsByInstanceIdReturnsOnCall == nil { - fake.getBindingIdsByInstanceIdReturnsOnCall = make(map[int]struct { - result1 []string - result2 error - }) - } - fake.getBindingIdsByInstanceIdReturnsOnCall[i] = struct { - result1 []string - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetDBStatus() sql.DBStats { - fake.getDBStatusMutex.Lock() - ret, specificReturn := fake.getDBStatusReturnsOnCall[len(fake.getDBStatusArgsForCall)] - fake.getDBStatusArgsForCall = append(fake.getDBStatusArgsForCall, struct { - }{}) - stub := fake.GetDBStatusStub - fakeReturns := fake.getDBStatusReturns - fake.recordInvocation("GetDBStatus", []interface{}{}) - fake.getDBStatusMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeBindingDB) GetDBStatusCallCount() int { - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - return len(fake.getDBStatusArgsForCall) -} - -func (fake *FakeBindingDB) GetDBStatusCalls(stub func() sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = stub -} - -func (fake *FakeBindingDB) GetDBStatusReturns(result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - fake.getDBStatusReturns = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeBindingDB) GetDBStatusReturnsOnCall(i int, result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - if fake.getDBStatusReturnsOnCall == nil { - fake.getDBStatusReturnsOnCall = make(map[int]struct { - result1 sql.DBStats - }) - } - fake.getDBStatusReturnsOnCall[i] = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeBindingDB) GetServiceBinding(arg1 context.Context, arg2 string) (*models.ServiceBinding, error) { - fake.getServiceBindingMutex.Lock() - ret, specificReturn := fake.getServiceBindingReturnsOnCall[len(fake.getServiceBindingArgsForCall)] - fake.getServiceBindingArgsForCall = append(fake.getServiceBindingArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.GetServiceBindingStub - fakeReturns := fake.getServiceBindingReturns - fake.recordInvocation("GetServiceBinding", []interface{}{arg1, arg2}) - fake.getServiceBindingMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeBindingDB) GetServiceBindingCallCount() int { - fake.getServiceBindingMutex.RLock() - defer fake.getServiceBindingMutex.RUnlock() - return len(fake.getServiceBindingArgsForCall) -} - -func (fake *FakeBindingDB) GetServiceBindingCalls(stub func(context.Context, string) (*models.ServiceBinding, error)) { - fake.getServiceBindingMutex.Lock() - defer fake.getServiceBindingMutex.Unlock() - fake.GetServiceBindingStub = stub -} - -func (fake *FakeBindingDB) GetServiceBindingArgsForCall(i int) (context.Context, string) { - fake.getServiceBindingMutex.RLock() - defer fake.getServiceBindingMutex.RUnlock() - argsForCall := fake.getServiceBindingArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) GetServiceBindingReturns(result1 *models.ServiceBinding, result2 error) { - fake.getServiceBindingMutex.Lock() - defer fake.getServiceBindingMutex.Unlock() - fake.GetServiceBindingStub = nil - fake.getServiceBindingReturns = struct { - result1 *models.ServiceBinding - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetServiceBindingReturnsOnCall(i int, result1 *models.ServiceBinding, result2 error) { - fake.getServiceBindingMutex.Lock() - defer fake.getServiceBindingMutex.Unlock() - fake.GetServiceBindingStub = nil - if fake.getServiceBindingReturnsOnCall == nil { - fake.getServiceBindingReturnsOnCall = make(map[int]struct { - result1 *models.ServiceBinding - result2 error - }) - } - fake.getServiceBindingReturnsOnCall[i] = struct { - result1 *models.ServiceBinding - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetServiceInstance(arg1 context.Context, arg2 string) (*models.ServiceInstance, error) { - fake.getServiceInstanceMutex.Lock() - ret, specificReturn := fake.getServiceInstanceReturnsOnCall[len(fake.getServiceInstanceArgsForCall)] - fake.getServiceInstanceArgsForCall = append(fake.getServiceInstanceArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.GetServiceInstanceStub - fakeReturns := fake.getServiceInstanceReturns - fake.recordInvocation("GetServiceInstance", []interface{}{arg1, arg2}) - fake.getServiceInstanceMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeBindingDB) GetServiceInstanceCallCount() int { - fake.getServiceInstanceMutex.RLock() - defer fake.getServiceInstanceMutex.RUnlock() - return len(fake.getServiceInstanceArgsForCall) -} - -func (fake *FakeBindingDB) GetServiceInstanceCalls(stub func(context.Context, string) (*models.ServiceInstance, error)) { - fake.getServiceInstanceMutex.Lock() - defer fake.getServiceInstanceMutex.Unlock() - fake.GetServiceInstanceStub = stub -} - -func (fake *FakeBindingDB) GetServiceInstanceArgsForCall(i int) (context.Context, string) { - fake.getServiceInstanceMutex.RLock() - defer fake.getServiceInstanceMutex.RUnlock() - argsForCall := fake.getServiceInstanceArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) GetServiceInstanceReturns(result1 *models.ServiceInstance, result2 error) { - fake.getServiceInstanceMutex.Lock() - defer fake.getServiceInstanceMutex.Unlock() - fake.GetServiceInstanceStub = nil - fake.getServiceInstanceReturns = struct { - result1 *models.ServiceInstance - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetServiceInstanceReturnsOnCall(i int, result1 *models.ServiceInstance, result2 error) { - fake.getServiceInstanceMutex.Lock() - defer fake.getServiceInstanceMutex.Unlock() - fake.GetServiceInstanceStub = nil - if fake.getServiceInstanceReturnsOnCall == nil { - fake.getServiceInstanceReturnsOnCall = make(map[int]struct { - result1 *models.ServiceInstance - result2 error - }) - } - fake.getServiceInstanceReturnsOnCall[i] = struct { - result1 *models.ServiceInstance - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetServiceInstanceByAppId(arg1 string) (*models.ServiceInstance, error) { - fake.getServiceInstanceByAppIdMutex.Lock() - ret, specificReturn := fake.getServiceInstanceByAppIdReturnsOnCall[len(fake.getServiceInstanceByAppIdArgsForCall)] - fake.getServiceInstanceByAppIdArgsForCall = append(fake.getServiceInstanceByAppIdArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.GetServiceInstanceByAppIdStub - fakeReturns := fake.getServiceInstanceByAppIdReturns - fake.recordInvocation("GetServiceInstanceByAppId", []interface{}{arg1}) - fake.getServiceInstanceByAppIdMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeBindingDB) GetServiceInstanceByAppIdCallCount() int { - fake.getServiceInstanceByAppIdMutex.RLock() - defer fake.getServiceInstanceByAppIdMutex.RUnlock() - return len(fake.getServiceInstanceByAppIdArgsForCall) -} - -func (fake *FakeBindingDB) GetServiceInstanceByAppIdCalls(stub func(string) (*models.ServiceInstance, error)) { - fake.getServiceInstanceByAppIdMutex.Lock() - defer fake.getServiceInstanceByAppIdMutex.Unlock() - fake.GetServiceInstanceByAppIdStub = stub -} - -func (fake *FakeBindingDB) GetServiceInstanceByAppIdArgsForCall(i int) string { - fake.getServiceInstanceByAppIdMutex.RLock() - defer fake.getServiceInstanceByAppIdMutex.RUnlock() - argsForCall := fake.getServiceInstanceByAppIdArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeBindingDB) GetServiceInstanceByAppIdReturns(result1 *models.ServiceInstance, result2 error) { - fake.getServiceInstanceByAppIdMutex.Lock() - defer fake.getServiceInstanceByAppIdMutex.Unlock() - fake.GetServiceInstanceByAppIdStub = nil - fake.getServiceInstanceByAppIdReturns = struct { - result1 *models.ServiceInstance - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetServiceInstanceByAppIdReturnsOnCall(i int, result1 *models.ServiceInstance, result2 error) { - fake.getServiceInstanceByAppIdMutex.Lock() - defer fake.getServiceInstanceByAppIdMutex.Unlock() - fake.GetServiceInstanceByAppIdStub = nil - if fake.getServiceInstanceByAppIdReturnsOnCall == nil { - fake.getServiceInstanceByAppIdReturnsOnCall = make(map[int]struct { - result1 *models.ServiceInstance - result2 error - }) - } - fake.getServiceInstanceByAppIdReturnsOnCall[i] = struct { - result1 *models.ServiceInstance - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) UpdateServiceInstance(arg1 context.Context, arg2 models.ServiceInstance) error { - fake.updateServiceInstanceMutex.Lock() - ret, specificReturn := fake.updateServiceInstanceReturnsOnCall[len(fake.updateServiceInstanceArgsForCall)] - fake.updateServiceInstanceArgsForCall = append(fake.updateServiceInstanceArgsForCall, struct { - arg1 context.Context - arg2 models.ServiceInstance - }{arg1, arg2}) - stub := fake.UpdateServiceInstanceStub - fakeReturns := fake.updateServiceInstanceReturns - fake.recordInvocation("UpdateServiceInstance", []interface{}{arg1, arg2}) - fake.updateServiceInstanceMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeBindingDB) UpdateServiceInstanceCallCount() int { - fake.updateServiceInstanceMutex.RLock() - defer fake.updateServiceInstanceMutex.RUnlock() - return len(fake.updateServiceInstanceArgsForCall) -} - -func (fake *FakeBindingDB) UpdateServiceInstanceCalls(stub func(context.Context, models.ServiceInstance) error) { - fake.updateServiceInstanceMutex.Lock() - defer fake.updateServiceInstanceMutex.Unlock() - fake.UpdateServiceInstanceStub = stub -} - -func (fake *FakeBindingDB) UpdateServiceInstanceArgsForCall(i int) (context.Context, models.ServiceInstance) { - fake.updateServiceInstanceMutex.RLock() - defer fake.updateServiceInstanceMutex.RUnlock() - argsForCall := fake.updateServiceInstanceArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) UpdateServiceInstanceReturns(result1 error) { - fake.updateServiceInstanceMutex.Lock() - defer fake.updateServiceInstanceMutex.Unlock() - fake.UpdateServiceInstanceStub = nil - fake.updateServiceInstanceReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) UpdateServiceInstanceReturnsOnCall(i int, result1 error) { - fake.updateServiceInstanceMutex.Lock() - defer fake.updateServiceInstanceMutex.Unlock() - fake.UpdateServiceInstanceStub = nil - if fake.updateServiceInstanceReturnsOnCall == nil { - fake.updateServiceInstanceReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.updateServiceInstanceReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.checkServiceBindingMutex.RLock() - defer fake.checkServiceBindingMutex.RUnlock() - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - fake.countServiceInstancesInOrgMutex.RLock() - defer fake.countServiceInstancesInOrgMutex.RUnlock() - fake.createServiceBindingMutex.RLock() - defer fake.createServiceBindingMutex.RUnlock() - fake.createServiceInstanceMutex.RLock() - defer fake.createServiceInstanceMutex.RUnlock() - fake.deleteServiceBindingMutex.RLock() - defer fake.deleteServiceBindingMutex.RUnlock() - fake.deleteServiceBindingByAppIdMutex.RLock() - defer fake.deleteServiceBindingByAppIdMutex.RUnlock() - fake.deleteServiceInstanceMutex.RLock() - defer fake.deleteServiceInstanceMutex.RUnlock() - fake.getAppIdByBindingIdMutex.RLock() - defer fake.getAppIdByBindingIdMutex.RUnlock() - fake.getAppIdsByInstanceIdMutex.RLock() - defer fake.getAppIdsByInstanceIdMutex.RUnlock() - fake.getBindingIdsByInstanceIdMutex.RLock() - defer fake.getBindingIdsByInstanceIdMutex.RUnlock() - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - fake.getServiceBindingMutex.RLock() - defer fake.getServiceBindingMutex.RUnlock() - fake.getServiceInstanceMutex.RLock() - defer fake.getServiceInstanceMutex.RUnlock() - fake.getServiceInstanceByAppIdMutex.RLock() - defer fake.getServiceInstanceByAppIdMutex.RUnlock() - fake.updateServiceInstanceMutex.RLock() - defer fake.updateServiceInstanceMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeBindingDB) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ db.BindingDB = new(FakeBindingDB) diff --git a/src/autoscaler/fakes/fake_cf_client.go b/src/autoscaler/fakes/fake_cf_client.go deleted file mode 100644 index 761c57fd52..0000000000 --- a/src/autoscaler/fakes/fake_cf_client.go +++ /dev/null @@ -1,1121 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/cf" -) - -type FakeCFClient struct { - GetAppStub func(cf.Guid) (*cf.App, error) - getAppMutex sync.RWMutex - getAppArgsForCall []struct { - arg1 cf.Guid - } - getAppReturns struct { - result1 *cf.App - result2 error - } - getAppReturnsOnCall map[int]struct { - result1 *cf.App - result2 error - } - GetAppAndProcessesStub func(cf.Guid) (*cf.AppAndProcesses, error) - getAppAndProcessesMutex sync.RWMutex - getAppAndProcessesArgsForCall []struct { - arg1 cf.Guid - } - getAppAndProcessesReturns struct { - result1 *cf.AppAndProcesses - result2 error - } - getAppAndProcessesReturnsOnCall map[int]struct { - result1 *cf.AppAndProcesses - result2 error - } - GetAppProcessesStub func(cf.Guid, ...string) (cf.Processes, error) - getAppProcessesMutex sync.RWMutex - getAppProcessesArgsForCall []struct { - arg1 cf.Guid - arg2 []string - } - getAppProcessesReturns struct { - result1 cf.Processes - result2 error - } - getAppProcessesReturnsOnCall map[int]struct { - result1 cf.Processes - result2 error - } - GetCtxClientStub func() cf.ContextClient - getCtxClientMutex sync.RWMutex - getCtxClientArgsForCall []struct { - } - getCtxClientReturns struct { - result1 cf.ContextClient - } - getCtxClientReturnsOnCall map[int]struct { - result1 cf.ContextClient - } - GetEndpointsStub func() (cf.Endpoints, error) - getEndpointsMutex sync.RWMutex - getEndpointsArgsForCall []struct { - } - getEndpointsReturns struct { - result1 cf.Endpoints - result2 error - } - getEndpointsReturnsOnCall map[int]struct { - result1 cf.Endpoints - result2 error - } - GetServiceInstanceStub func(string) (*cf.ServiceInstance, error) - getServiceInstanceMutex sync.RWMutex - getServiceInstanceArgsForCall []struct { - arg1 string - } - getServiceInstanceReturns struct { - result1 *cf.ServiceInstance - result2 error - } - getServiceInstanceReturnsOnCall map[int]struct { - result1 *cf.ServiceInstance - result2 error - } - GetServicePlanStub func(string) (*cf.ServicePlan, error) - getServicePlanMutex sync.RWMutex - getServicePlanArgsForCall []struct { - arg1 string - } - getServicePlanReturns struct { - result1 *cf.ServicePlan - result2 error - } - getServicePlanReturnsOnCall map[int]struct { - result1 *cf.ServicePlan - result2 error - } - GetTokensStub func() (cf.Tokens, error) - getTokensMutex sync.RWMutex - getTokensArgsForCall []struct { - } - getTokensReturns struct { - result1 cf.Tokens - result2 error - } - getTokensReturnsOnCall map[int]struct { - result1 cf.Tokens - result2 error - } - InvalidateTokenStub func() - invalidateTokenMutex sync.RWMutex - invalidateTokenArgsForCall []struct { - } - IsTokenAuthorizedStub func(string, string) (bool, error) - isTokenAuthorizedMutex sync.RWMutex - isTokenAuthorizedArgsForCall []struct { - arg1 string - arg2 string - } - isTokenAuthorizedReturns struct { - result1 bool - result2 error - } - isTokenAuthorizedReturnsOnCall map[int]struct { - result1 bool - result2 error - } - IsUserAdminStub func(string) (bool, error) - isUserAdminMutex sync.RWMutex - isUserAdminArgsForCall []struct { - arg1 string - } - isUserAdminReturns struct { - result1 bool - result2 error - } - isUserAdminReturnsOnCall map[int]struct { - result1 bool - result2 error - } - IsUserSpaceDeveloperStub func(string, cf.Guid) (bool, error) - isUserSpaceDeveloperMutex sync.RWMutex - isUserSpaceDeveloperArgsForCall []struct { - arg1 string - arg2 cf.Guid - } - isUserSpaceDeveloperReturns struct { - result1 bool - result2 error - } - isUserSpaceDeveloperReturnsOnCall map[int]struct { - result1 bool - result2 error - } - LoginStub func() error - loginMutex sync.RWMutex - loginArgsForCall []struct { - } - loginReturns struct { - result1 error - } - loginReturnsOnCall map[int]struct { - result1 error - } - RefreshAuthTokenStub func() (cf.Tokens, error) - refreshAuthTokenMutex sync.RWMutex - refreshAuthTokenArgsForCall []struct { - } - refreshAuthTokenReturns struct { - result1 cf.Tokens - result2 error - } - refreshAuthTokenReturnsOnCall map[int]struct { - result1 cf.Tokens - result2 error - } - ScaleAppWebProcessStub func(cf.Guid, int) error - scaleAppWebProcessMutex sync.RWMutex - scaleAppWebProcessArgsForCall []struct { - arg1 cf.Guid - arg2 int - } - scaleAppWebProcessReturns struct { - result1 error - } - scaleAppWebProcessReturnsOnCall map[int]struct { - result1 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeCFClient) GetApp(arg1 cf.Guid) (*cf.App, error) { - fake.getAppMutex.Lock() - ret, specificReturn := fake.getAppReturnsOnCall[len(fake.getAppArgsForCall)] - fake.getAppArgsForCall = append(fake.getAppArgsForCall, struct { - arg1 cf.Guid - }{arg1}) - stub := fake.GetAppStub - fakeReturns := fake.getAppReturns - fake.recordInvocation("GetApp", []interface{}{arg1}) - fake.getAppMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) GetAppCallCount() int { - fake.getAppMutex.RLock() - defer fake.getAppMutex.RUnlock() - return len(fake.getAppArgsForCall) -} - -func (fake *FakeCFClient) GetAppCalls(stub func(cf.Guid) (*cf.App, error)) { - fake.getAppMutex.Lock() - defer fake.getAppMutex.Unlock() - fake.GetAppStub = stub -} - -func (fake *FakeCFClient) GetAppArgsForCall(i int) cf.Guid { - fake.getAppMutex.RLock() - defer fake.getAppMutex.RUnlock() - argsForCall := fake.getAppArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeCFClient) GetAppReturns(result1 *cf.App, result2 error) { - fake.getAppMutex.Lock() - defer fake.getAppMutex.Unlock() - fake.GetAppStub = nil - fake.getAppReturns = struct { - result1 *cf.App - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetAppReturnsOnCall(i int, result1 *cf.App, result2 error) { - fake.getAppMutex.Lock() - defer fake.getAppMutex.Unlock() - fake.GetAppStub = nil - if fake.getAppReturnsOnCall == nil { - fake.getAppReturnsOnCall = make(map[int]struct { - result1 *cf.App - result2 error - }) - } - fake.getAppReturnsOnCall[i] = struct { - result1 *cf.App - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetAppAndProcesses(arg1 cf.Guid) (*cf.AppAndProcesses, error) { - fake.getAppAndProcessesMutex.Lock() - ret, specificReturn := fake.getAppAndProcessesReturnsOnCall[len(fake.getAppAndProcessesArgsForCall)] - fake.getAppAndProcessesArgsForCall = append(fake.getAppAndProcessesArgsForCall, struct { - arg1 cf.Guid - }{arg1}) - stub := fake.GetAppAndProcessesStub - fakeReturns := fake.getAppAndProcessesReturns - fake.recordInvocation("GetAppAndProcesses", []interface{}{arg1}) - fake.getAppAndProcessesMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) GetAppAndProcessesCallCount() int { - fake.getAppAndProcessesMutex.RLock() - defer fake.getAppAndProcessesMutex.RUnlock() - return len(fake.getAppAndProcessesArgsForCall) -} - -func (fake *FakeCFClient) GetAppAndProcessesCalls(stub func(cf.Guid) (*cf.AppAndProcesses, error)) { - fake.getAppAndProcessesMutex.Lock() - defer fake.getAppAndProcessesMutex.Unlock() - fake.GetAppAndProcessesStub = stub -} - -func (fake *FakeCFClient) GetAppAndProcessesArgsForCall(i int) cf.Guid { - fake.getAppAndProcessesMutex.RLock() - defer fake.getAppAndProcessesMutex.RUnlock() - argsForCall := fake.getAppAndProcessesArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeCFClient) GetAppAndProcessesReturns(result1 *cf.AppAndProcesses, result2 error) { - fake.getAppAndProcessesMutex.Lock() - defer fake.getAppAndProcessesMutex.Unlock() - fake.GetAppAndProcessesStub = nil - fake.getAppAndProcessesReturns = struct { - result1 *cf.AppAndProcesses - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetAppAndProcessesReturnsOnCall(i int, result1 *cf.AppAndProcesses, result2 error) { - fake.getAppAndProcessesMutex.Lock() - defer fake.getAppAndProcessesMutex.Unlock() - fake.GetAppAndProcessesStub = nil - if fake.getAppAndProcessesReturnsOnCall == nil { - fake.getAppAndProcessesReturnsOnCall = make(map[int]struct { - result1 *cf.AppAndProcesses - result2 error - }) - } - fake.getAppAndProcessesReturnsOnCall[i] = struct { - result1 *cf.AppAndProcesses - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetAppProcesses(arg1 cf.Guid, arg2 ...string) (cf.Processes, error) { - fake.getAppProcessesMutex.Lock() - ret, specificReturn := fake.getAppProcessesReturnsOnCall[len(fake.getAppProcessesArgsForCall)] - fake.getAppProcessesArgsForCall = append(fake.getAppProcessesArgsForCall, struct { - arg1 cf.Guid - arg2 []string - }{arg1, arg2}) - stub := fake.GetAppProcessesStub - fakeReturns := fake.getAppProcessesReturns - fake.recordInvocation("GetAppProcesses", []interface{}{arg1, arg2}) - fake.getAppProcessesMutex.Unlock() - if stub != nil { - return stub(arg1, arg2...) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) GetAppProcessesCallCount() int { - fake.getAppProcessesMutex.RLock() - defer fake.getAppProcessesMutex.RUnlock() - return len(fake.getAppProcessesArgsForCall) -} - -func (fake *FakeCFClient) GetAppProcessesCalls(stub func(cf.Guid, ...string) (cf.Processes, error)) { - fake.getAppProcessesMutex.Lock() - defer fake.getAppProcessesMutex.Unlock() - fake.GetAppProcessesStub = stub -} - -func (fake *FakeCFClient) GetAppProcessesArgsForCall(i int) (cf.Guid, []string) { - fake.getAppProcessesMutex.RLock() - defer fake.getAppProcessesMutex.RUnlock() - argsForCall := fake.getAppProcessesArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeCFClient) GetAppProcessesReturns(result1 cf.Processes, result2 error) { - fake.getAppProcessesMutex.Lock() - defer fake.getAppProcessesMutex.Unlock() - fake.GetAppProcessesStub = nil - fake.getAppProcessesReturns = struct { - result1 cf.Processes - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetAppProcessesReturnsOnCall(i int, result1 cf.Processes, result2 error) { - fake.getAppProcessesMutex.Lock() - defer fake.getAppProcessesMutex.Unlock() - fake.GetAppProcessesStub = nil - if fake.getAppProcessesReturnsOnCall == nil { - fake.getAppProcessesReturnsOnCall = make(map[int]struct { - result1 cf.Processes - result2 error - }) - } - fake.getAppProcessesReturnsOnCall[i] = struct { - result1 cf.Processes - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetCtxClient() cf.ContextClient { - fake.getCtxClientMutex.Lock() - ret, specificReturn := fake.getCtxClientReturnsOnCall[len(fake.getCtxClientArgsForCall)] - fake.getCtxClientArgsForCall = append(fake.getCtxClientArgsForCall, struct { - }{}) - stub := fake.GetCtxClientStub - fakeReturns := fake.getCtxClientReturns - fake.recordInvocation("GetCtxClient", []interface{}{}) - fake.getCtxClientMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeCFClient) GetCtxClientCallCount() int { - fake.getCtxClientMutex.RLock() - defer fake.getCtxClientMutex.RUnlock() - return len(fake.getCtxClientArgsForCall) -} - -func (fake *FakeCFClient) GetCtxClientCalls(stub func() cf.ContextClient) { - fake.getCtxClientMutex.Lock() - defer fake.getCtxClientMutex.Unlock() - fake.GetCtxClientStub = stub -} - -func (fake *FakeCFClient) GetCtxClientReturns(result1 cf.ContextClient) { - fake.getCtxClientMutex.Lock() - defer fake.getCtxClientMutex.Unlock() - fake.GetCtxClientStub = nil - fake.getCtxClientReturns = struct { - result1 cf.ContextClient - }{result1} -} - -func (fake *FakeCFClient) GetCtxClientReturnsOnCall(i int, result1 cf.ContextClient) { - fake.getCtxClientMutex.Lock() - defer fake.getCtxClientMutex.Unlock() - fake.GetCtxClientStub = nil - if fake.getCtxClientReturnsOnCall == nil { - fake.getCtxClientReturnsOnCall = make(map[int]struct { - result1 cf.ContextClient - }) - } - fake.getCtxClientReturnsOnCall[i] = struct { - result1 cf.ContextClient - }{result1} -} - -func (fake *FakeCFClient) GetEndpoints() (cf.Endpoints, error) { - fake.getEndpointsMutex.Lock() - ret, specificReturn := fake.getEndpointsReturnsOnCall[len(fake.getEndpointsArgsForCall)] - fake.getEndpointsArgsForCall = append(fake.getEndpointsArgsForCall, struct { - }{}) - stub := fake.GetEndpointsStub - fakeReturns := fake.getEndpointsReturns - fake.recordInvocation("GetEndpoints", []interface{}{}) - fake.getEndpointsMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) GetEndpointsCallCount() int { - fake.getEndpointsMutex.RLock() - defer fake.getEndpointsMutex.RUnlock() - return len(fake.getEndpointsArgsForCall) -} - -func (fake *FakeCFClient) GetEndpointsCalls(stub func() (cf.Endpoints, error)) { - fake.getEndpointsMutex.Lock() - defer fake.getEndpointsMutex.Unlock() - fake.GetEndpointsStub = stub -} - -func (fake *FakeCFClient) GetEndpointsReturns(result1 cf.Endpoints, result2 error) { - fake.getEndpointsMutex.Lock() - defer fake.getEndpointsMutex.Unlock() - fake.GetEndpointsStub = nil - fake.getEndpointsReturns = struct { - result1 cf.Endpoints - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetEndpointsReturnsOnCall(i int, result1 cf.Endpoints, result2 error) { - fake.getEndpointsMutex.Lock() - defer fake.getEndpointsMutex.Unlock() - fake.GetEndpointsStub = nil - if fake.getEndpointsReturnsOnCall == nil { - fake.getEndpointsReturnsOnCall = make(map[int]struct { - result1 cf.Endpoints - result2 error - }) - } - fake.getEndpointsReturnsOnCall[i] = struct { - result1 cf.Endpoints - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetServiceInstance(arg1 string) (*cf.ServiceInstance, error) { - fake.getServiceInstanceMutex.Lock() - ret, specificReturn := fake.getServiceInstanceReturnsOnCall[len(fake.getServiceInstanceArgsForCall)] - fake.getServiceInstanceArgsForCall = append(fake.getServiceInstanceArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.GetServiceInstanceStub - fakeReturns := fake.getServiceInstanceReturns - fake.recordInvocation("GetServiceInstance", []interface{}{arg1}) - fake.getServiceInstanceMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) GetServiceInstanceCallCount() int { - fake.getServiceInstanceMutex.RLock() - defer fake.getServiceInstanceMutex.RUnlock() - return len(fake.getServiceInstanceArgsForCall) -} - -func (fake *FakeCFClient) GetServiceInstanceCalls(stub func(string) (*cf.ServiceInstance, error)) { - fake.getServiceInstanceMutex.Lock() - defer fake.getServiceInstanceMutex.Unlock() - fake.GetServiceInstanceStub = stub -} - -func (fake *FakeCFClient) GetServiceInstanceArgsForCall(i int) string { - fake.getServiceInstanceMutex.RLock() - defer fake.getServiceInstanceMutex.RUnlock() - argsForCall := fake.getServiceInstanceArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeCFClient) GetServiceInstanceReturns(result1 *cf.ServiceInstance, result2 error) { - fake.getServiceInstanceMutex.Lock() - defer fake.getServiceInstanceMutex.Unlock() - fake.GetServiceInstanceStub = nil - fake.getServiceInstanceReturns = struct { - result1 *cf.ServiceInstance - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetServiceInstanceReturnsOnCall(i int, result1 *cf.ServiceInstance, result2 error) { - fake.getServiceInstanceMutex.Lock() - defer fake.getServiceInstanceMutex.Unlock() - fake.GetServiceInstanceStub = nil - if fake.getServiceInstanceReturnsOnCall == nil { - fake.getServiceInstanceReturnsOnCall = make(map[int]struct { - result1 *cf.ServiceInstance - result2 error - }) - } - fake.getServiceInstanceReturnsOnCall[i] = struct { - result1 *cf.ServiceInstance - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetServicePlan(arg1 string) (*cf.ServicePlan, error) { - fake.getServicePlanMutex.Lock() - ret, specificReturn := fake.getServicePlanReturnsOnCall[len(fake.getServicePlanArgsForCall)] - fake.getServicePlanArgsForCall = append(fake.getServicePlanArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.GetServicePlanStub - fakeReturns := fake.getServicePlanReturns - fake.recordInvocation("GetServicePlan", []interface{}{arg1}) - fake.getServicePlanMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) GetServicePlanCallCount() int { - fake.getServicePlanMutex.RLock() - defer fake.getServicePlanMutex.RUnlock() - return len(fake.getServicePlanArgsForCall) -} - -func (fake *FakeCFClient) GetServicePlanCalls(stub func(string) (*cf.ServicePlan, error)) { - fake.getServicePlanMutex.Lock() - defer fake.getServicePlanMutex.Unlock() - fake.GetServicePlanStub = stub -} - -func (fake *FakeCFClient) GetServicePlanArgsForCall(i int) string { - fake.getServicePlanMutex.RLock() - defer fake.getServicePlanMutex.RUnlock() - argsForCall := fake.getServicePlanArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeCFClient) GetServicePlanReturns(result1 *cf.ServicePlan, result2 error) { - fake.getServicePlanMutex.Lock() - defer fake.getServicePlanMutex.Unlock() - fake.GetServicePlanStub = nil - fake.getServicePlanReturns = struct { - result1 *cf.ServicePlan - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetServicePlanReturnsOnCall(i int, result1 *cf.ServicePlan, result2 error) { - fake.getServicePlanMutex.Lock() - defer fake.getServicePlanMutex.Unlock() - fake.GetServicePlanStub = nil - if fake.getServicePlanReturnsOnCall == nil { - fake.getServicePlanReturnsOnCall = make(map[int]struct { - result1 *cf.ServicePlan - result2 error - }) - } - fake.getServicePlanReturnsOnCall[i] = struct { - result1 *cf.ServicePlan - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetTokens() (cf.Tokens, error) { - fake.getTokensMutex.Lock() - ret, specificReturn := fake.getTokensReturnsOnCall[len(fake.getTokensArgsForCall)] - fake.getTokensArgsForCall = append(fake.getTokensArgsForCall, struct { - }{}) - stub := fake.GetTokensStub - fakeReturns := fake.getTokensReturns - fake.recordInvocation("GetTokens", []interface{}{}) - fake.getTokensMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) GetTokensCallCount() int { - fake.getTokensMutex.RLock() - defer fake.getTokensMutex.RUnlock() - return len(fake.getTokensArgsForCall) -} - -func (fake *FakeCFClient) GetTokensCalls(stub func() (cf.Tokens, error)) { - fake.getTokensMutex.Lock() - defer fake.getTokensMutex.Unlock() - fake.GetTokensStub = stub -} - -func (fake *FakeCFClient) GetTokensReturns(result1 cf.Tokens, result2 error) { - fake.getTokensMutex.Lock() - defer fake.getTokensMutex.Unlock() - fake.GetTokensStub = nil - fake.getTokensReturns = struct { - result1 cf.Tokens - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetTokensReturnsOnCall(i int, result1 cf.Tokens, result2 error) { - fake.getTokensMutex.Lock() - defer fake.getTokensMutex.Unlock() - fake.GetTokensStub = nil - if fake.getTokensReturnsOnCall == nil { - fake.getTokensReturnsOnCall = make(map[int]struct { - result1 cf.Tokens - result2 error - }) - } - fake.getTokensReturnsOnCall[i] = struct { - result1 cf.Tokens - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) InvalidateToken() { - fake.invalidateTokenMutex.Lock() - fake.invalidateTokenArgsForCall = append(fake.invalidateTokenArgsForCall, struct { - }{}) - stub := fake.InvalidateTokenStub - fake.recordInvocation("InvalidateToken", []interface{}{}) - fake.invalidateTokenMutex.Unlock() - if stub != nil { - fake.InvalidateTokenStub() - } -} - -func (fake *FakeCFClient) InvalidateTokenCallCount() int { - fake.invalidateTokenMutex.RLock() - defer fake.invalidateTokenMutex.RUnlock() - return len(fake.invalidateTokenArgsForCall) -} - -func (fake *FakeCFClient) InvalidateTokenCalls(stub func()) { - fake.invalidateTokenMutex.Lock() - defer fake.invalidateTokenMutex.Unlock() - fake.InvalidateTokenStub = stub -} - -func (fake *FakeCFClient) IsTokenAuthorized(arg1 string, arg2 string) (bool, error) { - fake.isTokenAuthorizedMutex.Lock() - ret, specificReturn := fake.isTokenAuthorizedReturnsOnCall[len(fake.isTokenAuthorizedArgsForCall)] - fake.isTokenAuthorizedArgsForCall = append(fake.isTokenAuthorizedArgsForCall, struct { - arg1 string - arg2 string - }{arg1, arg2}) - stub := fake.IsTokenAuthorizedStub - fakeReturns := fake.isTokenAuthorizedReturns - fake.recordInvocation("IsTokenAuthorized", []interface{}{arg1, arg2}) - fake.isTokenAuthorizedMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) IsTokenAuthorizedCallCount() int { - fake.isTokenAuthorizedMutex.RLock() - defer fake.isTokenAuthorizedMutex.RUnlock() - return len(fake.isTokenAuthorizedArgsForCall) -} - -func (fake *FakeCFClient) IsTokenAuthorizedCalls(stub func(string, string) (bool, error)) { - fake.isTokenAuthorizedMutex.Lock() - defer fake.isTokenAuthorizedMutex.Unlock() - fake.IsTokenAuthorizedStub = stub -} - -func (fake *FakeCFClient) IsTokenAuthorizedArgsForCall(i int) (string, string) { - fake.isTokenAuthorizedMutex.RLock() - defer fake.isTokenAuthorizedMutex.RUnlock() - argsForCall := fake.isTokenAuthorizedArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeCFClient) IsTokenAuthorizedReturns(result1 bool, result2 error) { - fake.isTokenAuthorizedMutex.Lock() - defer fake.isTokenAuthorizedMutex.Unlock() - fake.IsTokenAuthorizedStub = nil - fake.isTokenAuthorizedReturns = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) IsTokenAuthorizedReturnsOnCall(i int, result1 bool, result2 error) { - fake.isTokenAuthorizedMutex.Lock() - defer fake.isTokenAuthorizedMutex.Unlock() - fake.IsTokenAuthorizedStub = nil - if fake.isTokenAuthorizedReturnsOnCall == nil { - fake.isTokenAuthorizedReturnsOnCall = make(map[int]struct { - result1 bool - result2 error - }) - } - fake.isTokenAuthorizedReturnsOnCall[i] = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) IsUserAdmin(arg1 string) (bool, error) { - fake.isUserAdminMutex.Lock() - ret, specificReturn := fake.isUserAdminReturnsOnCall[len(fake.isUserAdminArgsForCall)] - fake.isUserAdminArgsForCall = append(fake.isUserAdminArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.IsUserAdminStub - fakeReturns := fake.isUserAdminReturns - fake.recordInvocation("IsUserAdmin", []interface{}{arg1}) - fake.isUserAdminMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) IsUserAdminCallCount() int { - fake.isUserAdminMutex.RLock() - defer fake.isUserAdminMutex.RUnlock() - return len(fake.isUserAdminArgsForCall) -} - -func (fake *FakeCFClient) IsUserAdminCalls(stub func(string) (bool, error)) { - fake.isUserAdminMutex.Lock() - defer fake.isUserAdminMutex.Unlock() - fake.IsUserAdminStub = stub -} - -func (fake *FakeCFClient) IsUserAdminArgsForCall(i int) string { - fake.isUserAdminMutex.RLock() - defer fake.isUserAdminMutex.RUnlock() - argsForCall := fake.isUserAdminArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeCFClient) IsUserAdminReturns(result1 bool, result2 error) { - fake.isUserAdminMutex.Lock() - defer fake.isUserAdminMutex.Unlock() - fake.IsUserAdminStub = nil - fake.isUserAdminReturns = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) IsUserAdminReturnsOnCall(i int, result1 bool, result2 error) { - fake.isUserAdminMutex.Lock() - defer fake.isUserAdminMutex.Unlock() - fake.IsUserAdminStub = nil - if fake.isUserAdminReturnsOnCall == nil { - fake.isUserAdminReturnsOnCall = make(map[int]struct { - result1 bool - result2 error - }) - } - fake.isUserAdminReturnsOnCall[i] = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) IsUserSpaceDeveloper(arg1 string, arg2 cf.Guid) (bool, error) { - fake.isUserSpaceDeveloperMutex.Lock() - ret, specificReturn := fake.isUserSpaceDeveloperReturnsOnCall[len(fake.isUserSpaceDeveloperArgsForCall)] - fake.isUserSpaceDeveloperArgsForCall = append(fake.isUserSpaceDeveloperArgsForCall, struct { - arg1 string - arg2 cf.Guid - }{arg1, arg2}) - stub := fake.IsUserSpaceDeveloperStub - fakeReturns := fake.isUserSpaceDeveloperReturns - fake.recordInvocation("IsUserSpaceDeveloper", []interface{}{arg1, arg2}) - fake.isUserSpaceDeveloperMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) IsUserSpaceDeveloperCallCount() int { - fake.isUserSpaceDeveloperMutex.RLock() - defer fake.isUserSpaceDeveloperMutex.RUnlock() - return len(fake.isUserSpaceDeveloperArgsForCall) -} - -func (fake *FakeCFClient) IsUserSpaceDeveloperCalls(stub func(string, cf.Guid) (bool, error)) { - fake.isUserSpaceDeveloperMutex.Lock() - defer fake.isUserSpaceDeveloperMutex.Unlock() - fake.IsUserSpaceDeveloperStub = stub -} - -func (fake *FakeCFClient) IsUserSpaceDeveloperArgsForCall(i int) (string, cf.Guid) { - fake.isUserSpaceDeveloperMutex.RLock() - defer fake.isUserSpaceDeveloperMutex.RUnlock() - argsForCall := fake.isUserSpaceDeveloperArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeCFClient) IsUserSpaceDeveloperReturns(result1 bool, result2 error) { - fake.isUserSpaceDeveloperMutex.Lock() - defer fake.isUserSpaceDeveloperMutex.Unlock() - fake.IsUserSpaceDeveloperStub = nil - fake.isUserSpaceDeveloperReturns = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) IsUserSpaceDeveloperReturnsOnCall(i int, result1 bool, result2 error) { - fake.isUserSpaceDeveloperMutex.Lock() - defer fake.isUserSpaceDeveloperMutex.Unlock() - fake.IsUserSpaceDeveloperStub = nil - if fake.isUserSpaceDeveloperReturnsOnCall == nil { - fake.isUserSpaceDeveloperReturnsOnCall = make(map[int]struct { - result1 bool - result2 error - }) - } - fake.isUserSpaceDeveloperReturnsOnCall[i] = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) Login() error { - fake.loginMutex.Lock() - ret, specificReturn := fake.loginReturnsOnCall[len(fake.loginArgsForCall)] - fake.loginArgsForCall = append(fake.loginArgsForCall, struct { - }{}) - stub := fake.LoginStub - fakeReturns := fake.loginReturns - fake.recordInvocation("Login", []interface{}{}) - fake.loginMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeCFClient) LoginCallCount() int { - fake.loginMutex.RLock() - defer fake.loginMutex.RUnlock() - return len(fake.loginArgsForCall) -} - -func (fake *FakeCFClient) LoginCalls(stub func() error) { - fake.loginMutex.Lock() - defer fake.loginMutex.Unlock() - fake.LoginStub = stub -} - -func (fake *FakeCFClient) LoginReturns(result1 error) { - fake.loginMutex.Lock() - defer fake.loginMutex.Unlock() - fake.LoginStub = nil - fake.loginReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeCFClient) LoginReturnsOnCall(i int, result1 error) { - fake.loginMutex.Lock() - defer fake.loginMutex.Unlock() - fake.LoginStub = nil - if fake.loginReturnsOnCall == nil { - fake.loginReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.loginReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeCFClient) RefreshAuthToken() (cf.Tokens, error) { - fake.refreshAuthTokenMutex.Lock() - ret, specificReturn := fake.refreshAuthTokenReturnsOnCall[len(fake.refreshAuthTokenArgsForCall)] - fake.refreshAuthTokenArgsForCall = append(fake.refreshAuthTokenArgsForCall, struct { - }{}) - stub := fake.RefreshAuthTokenStub - fakeReturns := fake.refreshAuthTokenReturns - fake.recordInvocation("RefreshAuthToken", []interface{}{}) - fake.refreshAuthTokenMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) RefreshAuthTokenCallCount() int { - fake.refreshAuthTokenMutex.RLock() - defer fake.refreshAuthTokenMutex.RUnlock() - return len(fake.refreshAuthTokenArgsForCall) -} - -func (fake *FakeCFClient) RefreshAuthTokenCalls(stub func() (cf.Tokens, error)) { - fake.refreshAuthTokenMutex.Lock() - defer fake.refreshAuthTokenMutex.Unlock() - fake.RefreshAuthTokenStub = stub -} - -func (fake *FakeCFClient) RefreshAuthTokenReturns(result1 cf.Tokens, result2 error) { - fake.refreshAuthTokenMutex.Lock() - defer fake.refreshAuthTokenMutex.Unlock() - fake.RefreshAuthTokenStub = nil - fake.refreshAuthTokenReturns = struct { - result1 cf.Tokens - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) RefreshAuthTokenReturnsOnCall(i int, result1 cf.Tokens, result2 error) { - fake.refreshAuthTokenMutex.Lock() - defer fake.refreshAuthTokenMutex.Unlock() - fake.RefreshAuthTokenStub = nil - if fake.refreshAuthTokenReturnsOnCall == nil { - fake.refreshAuthTokenReturnsOnCall = make(map[int]struct { - result1 cf.Tokens - result2 error - }) - } - fake.refreshAuthTokenReturnsOnCall[i] = struct { - result1 cf.Tokens - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) ScaleAppWebProcess(arg1 cf.Guid, arg2 int) error { - fake.scaleAppWebProcessMutex.Lock() - ret, specificReturn := fake.scaleAppWebProcessReturnsOnCall[len(fake.scaleAppWebProcessArgsForCall)] - fake.scaleAppWebProcessArgsForCall = append(fake.scaleAppWebProcessArgsForCall, struct { - arg1 cf.Guid - arg2 int - }{arg1, arg2}) - stub := fake.ScaleAppWebProcessStub - fakeReturns := fake.scaleAppWebProcessReturns - fake.recordInvocation("ScaleAppWebProcess", []interface{}{arg1, arg2}) - fake.scaleAppWebProcessMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeCFClient) ScaleAppWebProcessCallCount() int { - fake.scaleAppWebProcessMutex.RLock() - defer fake.scaleAppWebProcessMutex.RUnlock() - return len(fake.scaleAppWebProcessArgsForCall) -} - -func (fake *FakeCFClient) ScaleAppWebProcessCalls(stub func(cf.Guid, int) error) { - fake.scaleAppWebProcessMutex.Lock() - defer fake.scaleAppWebProcessMutex.Unlock() - fake.ScaleAppWebProcessStub = stub -} - -func (fake *FakeCFClient) ScaleAppWebProcessArgsForCall(i int) (cf.Guid, int) { - fake.scaleAppWebProcessMutex.RLock() - defer fake.scaleAppWebProcessMutex.RUnlock() - argsForCall := fake.scaleAppWebProcessArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeCFClient) ScaleAppWebProcessReturns(result1 error) { - fake.scaleAppWebProcessMutex.Lock() - defer fake.scaleAppWebProcessMutex.Unlock() - fake.ScaleAppWebProcessStub = nil - fake.scaleAppWebProcessReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeCFClient) ScaleAppWebProcessReturnsOnCall(i int, result1 error) { - fake.scaleAppWebProcessMutex.Lock() - defer fake.scaleAppWebProcessMutex.Unlock() - fake.ScaleAppWebProcessStub = nil - if fake.scaleAppWebProcessReturnsOnCall == nil { - fake.scaleAppWebProcessReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.scaleAppWebProcessReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeCFClient) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.getAppMutex.RLock() - defer fake.getAppMutex.RUnlock() - fake.getAppAndProcessesMutex.RLock() - defer fake.getAppAndProcessesMutex.RUnlock() - fake.getAppProcessesMutex.RLock() - defer fake.getAppProcessesMutex.RUnlock() - fake.getCtxClientMutex.RLock() - defer fake.getCtxClientMutex.RUnlock() - fake.getEndpointsMutex.RLock() - defer fake.getEndpointsMutex.RUnlock() - fake.getServiceInstanceMutex.RLock() - defer fake.getServiceInstanceMutex.RUnlock() - fake.getServicePlanMutex.RLock() - defer fake.getServicePlanMutex.RUnlock() - fake.getTokensMutex.RLock() - defer fake.getTokensMutex.RUnlock() - fake.invalidateTokenMutex.RLock() - defer fake.invalidateTokenMutex.RUnlock() - fake.isTokenAuthorizedMutex.RLock() - defer fake.isTokenAuthorizedMutex.RUnlock() - fake.isUserAdminMutex.RLock() - defer fake.isUserAdminMutex.RUnlock() - fake.isUserSpaceDeveloperMutex.RLock() - defer fake.isUserSpaceDeveloperMutex.RUnlock() - fake.loginMutex.RLock() - defer fake.loginMutex.RUnlock() - fake.refreshAuthTokenMutex.RLock() - defer fake.refreshAuthTokenMutex.RUnlock() - fake.scaleAppWebProcessMutex.RLock() - defer fake.scaleAppWebProcessMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeCFClient) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ cf.CFClient = new(FakeCFClient) diff --git a/src/autoscaler/fakes/fake_credentials.go b/src/autoscaler/fakes/fake_credentials.go deleted file mode 100644 index fc87314cec..0000000000 --- a/src/autoscaler/fakes/fake_credentials.go +++ /dev/null @@ -1,411 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "context" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/cred_helper" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakeCredentials struct { - CloseStub func() error - closeMutex sync.RWMutex - closeArgsForCall []struct { - } - closeReturns struct { - result1 error - } - closeReturnsOnCall map[int]struct { - result1 error - } - CreateStub func(context.Context, string, *models.Credential) (*models.Credential, error) - createMutex sync.RWMutex - createArgsForCall []struct { - arg1 context.Context - arg2 string - arg3 *models.Credential - } - createReturns struct { - result1 *models.Credential - result2 error - } - createReturnsOnCall map[int]struct { - result1 *models.Credential - result2 error - } - DeleteStub func(context.Context, string) error - deleteMutex sync.RWMutex - deleteArgsForCall []struct { - arg1 context.Context - arg2 string - } - deleteReturns struct { - result1 error - } - deleteReturnsOnCall map[int]struct { - result1 error - } - PingStub func() error - pingMutex sync.RWMutex - pingArgsForCall []struct { - } - pingReturns struct { - result1 error - } - pingReturnsOnCall map[int]struct { - result1 error - } - ValidateStub func(context.Context, string, models.Credential) (bool, error) - validateMutex sync.RWMutex - validateArgsForCall []struct { - arg1 context.Context - arg2 string - arg3 models.Credential - } - validateReturns struct { - result1 bool - result2 error - } - validateReturnsOnCall map[int]struct { - result1 bool - result2 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeCredentials) Close() error { - fake.closeMutex.Lock() - ret, specificReturn := fake.closeReturnsOnCall[len(fake.closeArgsForCall)] - fake.closeArgsForCall = append(fake.closeArgsForCall, struct { - }{}) - stub := fake.CloseStub - fakeReturns := fake.closeReturns - fake.recordInvocation("Close", []interface{}{}) - fake.closeMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeCredentials) CloseCallCount() int { - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return len(fake.closeArgsForCall) -} - -func (fake *FakeCredentials) CloseCalls(stub func() error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = stub -} - -func (fake *FakeCredentials) CloseReturns(result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - fake.closeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeCredentials) CloseReturnsOnCall(i int, result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - if fake.closeReturnsOnCall == nil { - fake.closeReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.closeReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeCredentials) Create(arg1 context.Context, arg2 string, arg3 *models.Credential) (*models.Credential, error) { - fake.createMutex.Lock() - ret, specificReturn := fake.createReturnsOnCall[len(fake.createArgsForCall)] - fake.createArgsForCall = append(fake.createArgsForCall, struct { - arg1 context.Context - arg2 string - arg3 *models.Credential - }{arg1, arg2, arg3}) - stub := fake.CreateStub - fakeReturns := fake.createReturns - fake.recordInvocation("Create", []interface{}{arg1, arg2, arg3}) - fake.createMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCredentials) CreateCallCount() int { - fake.createMutex.RLock() - defer fake.createMutex.RUnlock() - return len(fake.createArgsForCall) -} - -func (fake *FakeCredentials) CreateCalls(stub func(context.Context, string, *models.Credential) (*models.Credential, error)) { - fake.createMutex.Lock() - defer fake.createMutex.Unlock() - fake.CreateStub = stub -} - -func (fake *FakeCredentials) CreateArgsForCall(i int) (context.Context, string, *models.Credential) { - fake.createMutex.RLock() - defer fake.createMutex.RUnlock() - argsForCall := fake.createArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 -} - -func (fake *FakeCredentials) CreateReturns(result1 *models.Credential, result2 error) { - fake.createMutex.Lock() - defer fake.createMutex.Unlock() - fake.CreateStub = nil - fake.createReturns = struct { - result1 *models.Credential - result2 error - }{result1, result2} -} - -func (fake *FakeCredentials) CreateReturnsOnCall(i int, result1 *models.Credential, result2 error) { - fake.createMutex.Lock() - defer fake.createMutex.Unlock() - fake.CreateStub = nil - if fake.createReturnsOnCall == nil { - fake.createReturnsOnCall = make(map[int]struct { - result1 *models.Credential - result2 error - }) - } - fake.createReturnsOnCall[i] = struct { - result1 *models.Credential - result2 error - }{result1, result2} -} - -func (fake *FakeCredentials) Delete(arg1 context.Context, arg2 string) error { - fake.deleteMutex.Lock() - ret, specificReturn := fake.deleteReturnsOnCall[len(fake.deleteArgsForCall)] - fake.deleteArgsForCall = append(fake.deleteArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.DeleteStub - fakeReturns := fake.deleteReturns - fake.recordInvocation("Delete", []interface{}{arg1, arg2}) - fake.deleteMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeCredentials) DeleteCallCount() int { - fake.deleteMutex.RLock() - defer fake.deleteMutex.RUnlock() - return len(fake.deleteArgsForCall) -} - -func (fake *FakeCredentials) DeleteCalls(stub func(context.Context, string) error) { - fake.deleteMutex.Lock() - defer fake.deleteMutex.Unlock() - fake.DeleteStub = stub -} - -func (fake *FakeCredentials) DeleteArgsForCall(i int) (context.Context, string) { - fake.deleteMutex.RLock() - defer fake.deleteMutex.RUnlock() - argsForCall := fake.deleteArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeCredentials) DeleteReturns(result1 error) { - fake.deleteMutex.Lock() - defer fake.deleteMutex.Unlock() - fake.DeleteStub = nil - fake.deleteReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeCredentials) DeleteReturnsOnCall(i int, result1 error) { - fake.deleteMutex.Lock() - defer fake.deleteMutex.Unlock() - fake.DeleteStub = nil - if fake.deleteReturnsOnCall == nil { - fake.deleteReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.deleteReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeCredentials) Ping() error { - fake.pingMutex.Lock() - ret, specificReturn := fake.pingReturnsOnCall[len(fake.pingArgsForCall)] - fake.pingArgsForCall = append(fake.pingArgsForCall, struct { - }{}) - stub := fake.PingStub - fakeReturns := fake.pingReturns - fake.recordInvocation("Ping", []interface{}{}) - fake.pingMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeCredentials) PingCallCount() int { - fake.pingMutex.RLock() - defer fake.pingMutex.RUnlock() - return len(fake.pingArgsForCall) -} - -func (fake *FakeCredentials) PingCalls(stub func() error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = stub -} - -func (fake *FakeCredentials) PingReturns(result1 error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = nil - fake.pingReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeCredentials) PingReturnsOnCall(i int, result1 error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = nil - if fake.pingReturnsOnCall == nil { - fake.pingReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.pingReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeCredentials) Validate(arg1 context.Context, arg2 string, arg3 models.Credential) (bool, error) { - fake.validateMutex.Lock() - ret, specificReturn := fake.validateReturnsOnCall[len(fake.validateArgsForCall)] - fake.validateArgsForCall = append(fake.validateArgsForCall, struct { - arg1 context.Context - arg2 string - arg3 models.Credential - }{arg1, arg2, arg3}) - stub := fake.ValidateStub - fakeReturns := fake.validateReturns - fake.recordInvocation("Validate", []interface{}{arg1, arg2, arg3}) - fake.validateMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCredentials) ValidateCallCount() int { - fake.validateMutex.RLock() - defer fake.validateMutex.RUnlock() - return len(fake.validateArgsForCall) -} - -func (fake *FakeCredentials) ValidateCalls(stub func(context.Context, string, models.Credential) (bool, error)) { - fake.validateMutex.Lock() - defer fake.validateMutex.Unlock() - fake.ValidateStub = stub -} - -func (fake *FakeCredentials) ValidateArgsForCall(i int) (context.Context, string, models.Credential) { - fake.validateMutex.RLock() - defer fake.validateMutex.RUnlock() - argsForCall := fake.validateArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 -} - -func (fake *FakeCredentials) ValidateReturns(result1 bool, result2 error) { - fake.validateMutex.Lock() - defer fake.validateMutex.Unlock() - fake.ValidateStub = nil - fake.validateReturns = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakeCredentials) ValidateReturnsOnCall(i int, result1 bool, result2 error) { - fake.validateMutex.Lock() - defer fake.validateMutex.Unlock() - fake.ValidateStub = nil - if fake.validateReturnsOnCall == nil { - fake.validateReturnsOnCall = make(map[int]struct { - result1 bool - result2 error - }) - } - fake.validateReturnsOnCall[i] = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakeCredentials) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - fake.createMutex.RLock() - defer fake.createMutex.RUnlock() - fake.deleteMutex.RLock() - defer fake.deleteMutex.RUnlock() - fake.pingMutex.RLock() - defer fake.pingMutex.RUnlock() - fake.validateMutex.RLock() - defer fake.validateMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeCredentials) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ cred_helper.Credentials = new(FakeCredentials) diff --git a/src/autoscaler/fakes/fake_database_status.go b/src/autoscaler/fakes/fake_database_status.go deleted file mode 100644 index 4005998dfa..0000000000 --- a/src/autoscaler/fakes/fake_database_status.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "database/sql" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/healthendpoint" -) - -type FakeDatabaseStatus struct { - GetDBStatusStub func() sql.DBStats - getDBStatusMutex sync.RWMutex - getDBStatusArgsForCall []struct { - } - getDBStatusReturns struct { - result1 sql.DBStats - } - getDBStatusReturnsOnCall map[int]struct { - result1 sql.DBStats - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeDatabaseStatus) GetDBStatus() sql.DBStats { - fake.getDBStatusMutex.Lock() - ret, specificReturn := fake.getDBStatusReturnsOnCall[len(fake.getDBStatusArgsForCall)] - fake.getDBStatusArgsForCall = append(fake.getDBStatusArgsForCall, struct { - }{}) - stub := fake.GetDBStatusStub - fakeReturns := fake.getDBStatusReturns - fake.recordInvocation("GetDBStatus", []interface{}{}) - fake.getDBStatusMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeDatabaseStatus) GetDBStatusCallCount() int { - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - return len(fake.getDBStatusArgsForCall) -} - -func (fake *FakeDatabaseStatus) GetDBStatusCalls(stub func() sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = stub -} - -func (fake *FakeDatabaseStatus) GetDBStatusReturns(result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - fake.getDBStatusReturns = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeDatabaseStatus) GetDBStatusReturnsOnCall(i int, result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - if fake.getDBStatusReturnsOnCall == nil { - fake.getDBStatusReturnsOnCall = make(map[int]struct { - result1 sql.DBStats - }) - } - fake.getDBStatusReturnsOnCall[i] = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeDatabaseStatus) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeDatabaseStatus) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ healthendpoint.DatabaseStatus = new(FakeDatabaseStatus) diff --git a/src/autoscaler/fakes/fake_emitter.go b/src/autoscaler/fakes/fake_emitter.go deleted file mode 100644 index f4b4a64fe9..0000000000 --- a/src/autoscaler/fakes/fake_emitter.go +++ /dev/null @@ -1,161 +0,0 @@ -// This file was generated by counterfeiter -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/metricsgateway" - - "code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2" -) - -type FakeEmitter struct { - AcceptStub func(envelope *loggregator_v2.Envelope) - acceptMutex sync.RWMutex - acceptArgsForCall []struct { - envelope *loggregator_v2.Envelope - } - EmitStub func(envelope *loggregator_v2.Envelope) error - emitMutex sync.RWMutex - emitArgsForCall []struct { - envelope *loggregator_v2.Envelope - } - emitReturns struct { - result1 error - } - StartStub func() error - startMutex sync.RWMutex - startArgsForCall []struct{} - startReturns struct { - result1 error - } - StopStub func() - stopMutex sync.RWMutex - stopArgsForCall []struct{} - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeEmitter) Accept(envelope *loggregator_v2.Envelope) { - fake.acceptMutex.Lock() - fake.acceptArgsForCall = append(fake.acceptArgsForCall, struct { - envelope *loggregator_v2.Envelope - }{envelope}) - fake.recordInvocation("Accept", []interface{}{envelope}) - fake.acceptMutex.Unlock() - if fake.AcceptStub != nil { - fake.AcceptStub(envelope) - } -} - -func (fake *FakeEmitter) AcceptCallCount() int { - fake.acceptMutex.RLock() - defer fake.acceptMutex.RUnlock() - return len(fake.acceptArgsForCall) -} - -func (fake *FakeEmitter) AcceptArgsForCall(i int) *loggregator_v2.Envelope { - fake.acceptMutex.RLock() - defer fake.acceptMutex.RUnlock() - return fake.acceptArgsForCall[i].envelope -} - -func (fake *FakeEmitter) Emit(envelope *loggregator_v2.Envelope) error { - fake.emitMutex.Lock() - fake.emitArgsForCall = append(fake.emitArgsForCall, struct { - envelope *loggregator_v2.Envelope - }{envelope}) - fake.recordInvocation("Emit", []interface{}{envelope}) - fake.emitMutex.Unlock() - if fake.EmitStub != nil { - return fake.EmitStub(envelope) - } - return fake.emitReturns.result1 -} - -func (fake *FakeEmitter) EmitCallCount() int { - fake.emitMutex.RLock() - defer fake.emitMutex.RUnlock() - return len(fake.emitArgsForCall) -} - -func (fake *FakeEmitter) EmitArgsForCall(i int) *loggregator_v2.Envelope { - fake.emitMutex.RLock() - defer fake.emitMutex.RUnlock() - return fake.emitArgsForCall[i].envelope -} - -func (fake *FakeEmitter) EmitReturns(result1 error) { - fake.EmitStub = nil - fake.emitReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeEmitter) Start() error { - fake.startMutex.Lock() - fake.startArgsForCall = append(fake.startArgsForCall, struct{}{}) - fake.recordInvocation("Start", []interface{}{}) - fake.startMutex.Unlock() - if fake.StartStub != nil { - return fake.StartStub() - } - return fake.startReturns.result1 -} - -func (fake *FakeEmitter) StartCallCount() int { - fake.startMutex.RLock() - defer fake.startMutex.RUnlock() - return len(fake.startArgsForCall) -} - -func (fake *FakeEmitter) StartReturns(result1 error) { - fake.StartStub = nil - fake.startReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeEmitter) Stop() { - fake.stopMutex.Lock() - fake.stopArgsForCall = append(fake.stopArgsForCall, struct{}{}) - fake.recordInvocation("Stop", []interface{}{}) - fake.stopMutex.Unlock() - if fake.StopStub != nil { - fake.StopStub() - } -} - -func (fake *FakeEmitter) StopCallCount() int { - fake.stopMutex.RLock() - defer fake.stopMutex.RUnlock() - return len(fake.stopArgsForCall) -} - -func (fake *FakeEmitter) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.acceptMutex.RLock() - defer fake.acceptMutex.RUnlock() - fake.emitMutex.RLock() - defer fake.emitMutex.RUnlock() - fake.startMutex.RLock() - defer fake.startMutex.RUnlock() - fake.stopMutex.RLock() - defer fake.stopMutex.RUnlock() - return fake.invocations -} - -func (fake *FakeEmitter) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ metricsgateway.Emitter = new(FakeEmitter) diff --git a/src/autoscaler/fakes/fake_envelope_processor.go b/src/autoscaler/fakes/fake_envelope_processor.go deleted file mode 100644 index 36f8483994..0000000000 --- a/src/autoscaler/fakes/fake_envelope_processor.go +++ /dev/null @@ -1,208 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/envelopeprocessor" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" - "code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2" -) - -type FakeEnvelopeProcessor struct { - GetGaugeMetricsStub func([]*loggregator_v2.Envelope, int64) ([]models.AppInstanceMetric, error) - getGaugeMetricsMutex sync.RWMutex - getGaugeMetricsArgsForCall []struct { - arg1 []*loggregator_v2.Envelope - arg2 int64 - } - getGaugeMetricsReturns struct { - result1 []models.AppInstanceMetric - result2 error - } - getGaugeMetricsReturnsOnCall map[int]struct { - result1 []models.AppInstanceMetric - result2 error - } - GetTimerMetricsStub func([]*loggregator_v2.Envelope, string, int64) []models.AppInstanceMetric - getTimerMetricsMutex sync.RWMutex - getTimerMetricsArgsForCall []struct { - arg1 []*loggregator_v2.Envelope - arg2 string - arg3 int64 - } - getTimerMetricsReturns struct { - result1 []models.AppInstanceMetric - } - getTimerMetricsReturnsOnCall map[int]struct { - result1 []models.AppInstanceMetric - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeEnvelopeProcessor) GetGaugeMetrics(arg1 []*loggregator_v2.Envelope, arg2 int64) ([]models.AppInstanceMetric, error) { - var arg1Copy []*loggregator_v2.Envelope - if arg1 != nil { - arg1Copy = make([]*loggregator_v2.Envelope, len(arg1)) - copy(arg1Copy, arg1) - } - fake.getGaugeMetricsMutex.Lock() - ret, specificReturn := fake.getGaugeMetricsReturnsOnCall[len(fake.getGaugeMetricsArgsForCall)] - fake.getGaugeMetricsArgsForCall = append(fake.getGaugeMetricsArgsForCall, struct { - arg1 []*loggregator_v2.Envelope - arg2 int64 - }{arg1Copy, arg2}) - stub := fake.GetGaugeMetricsStub - fakeReturns := fake.getGaugeMetricsReturns - fake.recordInvocation("GetGaugeMetrics", []interface{}{arg1Copy, arg2}) - fake.getGaugeMetricsMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeEnvelopeProcessor) GetGaugeMetricsCallCount() int { - fake.getGaugeMetricsMutex.RLock() - defer fake.getGaugeMetricsMutex.RUnlock() - return len(fake.getGaugeMetricsArgsForCall) -} - -func (fake *FakeEnvelopeProcessor) GetGaugeMetricsCalls(stub func([]*loggregator_v2.Envelope, int64) ([]models.AppInstanceMetric, error)) { - fake.getGaugeMetricsMutex.Lock() - defer fake.getGaugeMetricsMutex.Unlock() - fake.GetGaugeMetricsStub = stub -} - -func (fake *FakeEnvelopeProcessor) GetGaugeMetricsArgsForCall(i int) ([]*loggregator_v2.Envelope, int64) { - fake.getGaugeMetricsMutex.RLock() - defer fake.getGaugeMetricsMutex.RUnlock() - argsForCall := fake.getGaugeMetricsArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeEnvelopeProcessor) GetGaugeMetricsReturns(result1 []models.AppInstanceMetric, result2 error) { - fake.getGaugeMetricsMutex.Lock() - defer fake.getGaugeMetricsMutex.Unlock() - fake.GetGaugeMetricsStub = nil - fake.getGaugeMetricsReturns = struct { - result1 []models.AppInstanceMetric - result2 error - }{result1, result2} -} - -func (fake *FakeEnvelopeProcessor) GetGaugeMetricsReturnsOnCall(i int, result1 []models.AppInstanceMetric, result2 error) { - fake.getGaugeMetricsMutex.Lock() - defer fake.getGaugeMetricsMutex.Unlock() - fake.GetGaugeMetricsStub = nil - if fake.getGaugeMetricsReturnsOnCall == nil { - fake.getGaugeMetricsReturnsOnCall = make(map[int]struct { - result1 []models.AppInstanceMetric - result2 error - }) - } - fake.getGaugeMetricsReturnsOnCall[i] = struct { - result1 []models.AppInstanceMetric - result2 error - }{result1, result2} -} - -func (fake *FakeEnvelopeProcessor) GetTimerMetrics(arg1 []*loggregator_v2.Envelope, arg2 string, arg3 int64) []models.AppInstanceMetric { - var arg1Copy []*loggregator_v2.Envelope - if arg1 != nil { - arg1Copy = make([]*loggregator_v2.Envelope, len(arg1)) - copy(arg1Copy, arg1) - } - fake.getTimerMetricsMutex.Lock() - ret, specificReturn := fake.getTimerMetricsReturnsOnCall[len(fake.getTimerMetricsArgsForCall)] - fake.getTimerMetricsArgsForCall = append(fake.getTimerMetricsArgsForCall, struct { - arg1 []*loggregator_v2.Envelope - arg2 string - arg3 int64 - }{arg1Copy, arg2, arg3}) - stub := fake.GetTimerMetricsStub - fakeReturns := fake.getTimerMetricsReturns - fake.recordInvocation("GetTimerMetrics", []interface{}{arg1Copy, arg2, arg3}) - fake.getTimerMetricsMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeEnvelopeProcessor) GetTimerMetricsCallCount() int { - fake.getTimerMetricsMutex.RLock() - defer fake.getTimerMetricsMutex.RUnlock() - return len(fake.getTimerMetricsArgsForCall) -} - -func (fake *FakeEnvelopeProcessor) GetTimerMetricsCalls(stub func([]*loggregator_v2.Envelope, string, int64) []models.AppInstanceMetric) { - fake.getTimerMetricsMutex.Lock() - defer fake.getTimerMetricsMutex.Unlock() - fake.GetTimerMetricsStub = stub -} - -func (fake *FakeEnvelopeProcessor) GetTimerMetricsArgsForCall(i int) ([]*loggregator_v2.Envelope, string, int64) { - fake.getTimerMetricsMutex.RLock() - defer fake.getTimerMetricsMutex.RUnlock() - argsForCall := fake.getTimerMetricsArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 -} - -func (fake *FakeEnvelopeProcessor) GetTimerMetricsReturns(result1 []models.AppInstanceMetric) { - fake.getTimerMetricsMutex.Lock() - defer fake.getTimerMetricsMutex.Unlock() - fake.GetTimerMetricsStub = nil - fake.getTimerMetricsReturns = struct { - result1 []models.AppInstanceMetric - }{result1} -} - -func (fake *FakeEnvelopeProcessor) GetTimerMetricsReturnsOnCall(i int, result1 []models.AppInstanceMetric) { - fake.getTimerMetricsMutex.Lock() - defer fake.getTimerMetricsMutex.Unlock() - fake.GetTimerMetricsStub = nil - if fake.getTimerMetricsReturnsOnCall == nil { - fake.getTimerMetricsReturnsOnCall = make(map[int]struct { - result1 []models.AppInstanceMetric - }) - } - fake.getTimerMetricsReturnsOnCall[i] = struct { - result1 []models.AppInstanceMetric - }{result1} -} - -func (fake *FakeEnvelopeProcessor) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.getGaugeMetricsMutex.RLock() - defer fake.getGaugeMetricsMutex.RUnlock() - fake.getTimerMetricsMutex.RLock() - defer fake.getTimerMetricsMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeEnvelopeProcessor) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ envelopeprocessor.EnvelopeProcessor = new(FakeEnvelopeProcessor) diff --git a/src/autoscaler/fakes/fake_envelope_processor_creator.go b/src/autoscaler/fakes/fake_envelope_processor_creator.go deleted file mode 100644 index ee9e7c7e75..0000000000 --- a/src/autoscaler/fakes/fake_envelope_processor_creator.go +++ /dev/null @@ -1,115 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - "time" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/envelopeprocessor" - lager "code.cloudfoundry.org/lager/v3" -) - -type FakeEnvelopeProcessorCreator struct { - NewProcessorStub func(lager.Logger, time.Duration) envelopeprocessor.Processor - newProcessorMutex sync.RWMutex - newProcessorArgsForCall []struct { - arg1 lager.Logger - arg2 time.Duration - } - newProcessorReturns struct { - result1 envelopeprocessor.Processor - } - newProcessorReturnsOnCall map[int]struct { - result1 envelopeprocessor.Processor - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeEnvelopeProcessorCreator) NewProcessor(arg1 lager.Logger, arg2 time.Duration) envelopeprocessor.Processor { - fake.newProcessorMutex.Lock() - ret, specificReturn := fake.newProcessorReturnsOnCall[len(fake.newProcessorArgsForCall)] - fake.newProcessorArgsForCall = append(fake.newProcessorArgsForCall, struct { - arg1 lager.Logger - arg2 time.Duration - }{arg1, arg2}) - stub := fake.NewProcessorStub - fakeReturns := fake.newProcessorReturns - fake.recordInvocation("NewProcessor", []interface{}{arg1, arg2}) - fake.newProcessorMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeEnvelopeProcessorCreator) NewProcessorCallCount() int { - fake.newProcessorMutex.RLock() - defer fake.newProcessorMutex.RUnlock() - return len(fake.newProcessorArgsForCall) -} - -func (fake *FakeEnvelopeProcessorCreator) NewProcessorCalls(stub func(lager.Logger, time.Duration) envelopeprocessor.Processor) { - fake.newProcessorMutex.Lock() - defer fake.newProcessorMutex.Unlock() - fake.NewProcessorStub = stub -} - -func (fake *FakeEnvelopeProcessorCreator) NewProcessorArgsForCall(i int) (lager.Logger, time.Duration) { - fake.newProcessorMutex.RLock() - defer fake.newProcessorMutex.RUnlock() - argsForCall := fake.newProcessorArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeEnvelopeProcessorCreator) NewProcessorReturns(result1 envelopeprocessor.Processor) { - fake.newProcessorMutex.Lock() - defer fake.newProcessorMutex.Unlock() - fake.NewProcessorStub = nil - fake.newProcessorReturns = struct { - result1 envelopeprocessor.Processor - }{result1} -} - -func (fake *FakeEnvelopeProcessorCreator) NewProcessorReturnsOnCall(i int, result1 envelopeprocessor.Processor) { - fake.newProcessorMutex.Lock() - defer fake.newProcessorMutex.Unlock() - fake.NewProcessorStub = nil - if fake.newProcessorReturnsOnCall == nil { - fake.newProcessorReturnsOnCall = make(map[int]struct { - result1 envelopeprocessor.Processor - }) - } - fake.newProcessorReturnsOnCall[i] = struct { - result1 envelopeprocessor.Processor - }{result1} -} - -func (fake *FakeEnvelopeProcessorCreator) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.newProcessorMutex.RLock() - defer fake.newProcessorMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeEnvelopeProcessorCreator) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ envelopeprocessor.EnvelopeProcessorCreator = new(FakeEnvelopeProcessorCreator) diff --git a/src/autoscaler/fakes/fake_go_log_cache_client.go b/src/autoscaler/fakes/fake_go_log_cache_client.go deleted file mode 100644 index 93f57c750a..0000000000 --- a/src/autoscaler/fakes/fake_go_log_cache_client.go +++ /dev/null @@ -1,417 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/eventgenerator/client" - clienta "code.cloudfoundry.org/go-log-cache" - "google.golang.org/grpc" -) - -type FakeGoLogCacheClient struct { - NewClientStub func(string, ...clienta.ClientOption) *clienta.Client - newClientMutex sync.RWMutex - newClientArgsForCall []struct { - arg1 string - arg2 []clienta.ClientOption - } - newClientReturns struct { - result1 *clienta.Client - } - newClientReturnsOnCall map[int]struct { - result1 *clienta.Client - } - NewOauth2HTTPClientStub func(string, string, string, ...clienta.Oauth2Option) *clienta.Oauth2HTTPClient - newOauth2HTTPClientMutex sync.RWMutex - newOauth2HTTPClientArgsForCall []struct { - arg1 string - arg2 string - arg3 string - arg4 []clienta.Oauth2Option - } - newOauth2HTTPClientReturns struct { - result1 *clienta.Oauth2HTTPClient - } - newOauth2HTTPClientReturnsOnCall map[int]struct { - result1 *clienta.Oauth2HTTPClient - } - WithHTTPClientStub func(clienta.HTTPClient) clienta.ClientOption - withHTTPClientMutex sync.RWMutex - withHTTPClientArgsForCall []struct { - arg1 clienta.HTTPClient - } - withHTTPClientReturns struct { - result1 clienta.ClientOption - } - withHTTPClientReturnsOnCall map[int]struct { - result1 clienta.ClientOption - } - WithOauth2HTTPClientStub func(clienta.HTTPClient) clienta.Oauth2Option - withOauth2HTTPClientMutex sync.RWMutex - withOauth2HTTPClientArgsForCall []struct { - arg1 clienta.HTTPClient - } - withOauth2HTTPClientReturns struct { - result1 clienta.Oauth2Option - } - withOauth2HTTPClientReturnsOnCall map[int]struct { - result1 clienta.Oauth2Option - } - WithViaGRPCStub func(...grpc.DialOption) clienta.ClientOption - withViaGRPCMutex sync.RWMutex - withViaGRPCArgsForCall []struct { - arg1 []grpc.DialOption - } - withViaGRPCReturns struct { - result1 clienta.ClientOption - } - withViaGRPCReturnsOnCall map[int]struct { - result1 clienta.ClientOption - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeGoLogCacheClient) NewClient(arg1 string, arg2 ...clienta.ClientOption) *clienta.Client { - fake.newClientMutex.Lock() - ret, specificReturn := fake.newClientReturnsOnCall[len(fake.newClientArgsForCall)] - fake.newClientArgsForCall = append(fake.newClientArgsForCall, struct { - arg1 string - arg2 []clienta.ClientOption - }{arg1, arg2}) - stub := fake.NewClientStub - fakeReturns := fake.newClientReturns - fake.recordInvocation("NewClient", []interface{}{arg1, arg2}) - fake.newClientMutex.Unlock() - if stub != nil { - return stub(arg1, arg2...) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeGoLogCacheClient) NewClientCallCount() int { - fake.newClientMutex.RLock() - defer fake.newClientMutex.RUnlock() - return len(fake.newClientArgsForCall) -} - -func (fake *FakeGoLogCacheClient) NewClientCalls(stub func(string, ...clienta.ClientOption) *clienta.Client) { - fake.newClientMutex.Lock() - defer fake.newClientMutex.Unlock() - fake.NewClientStub = stub -} - -func (fake *FakeGoLogCacheClient) NewClientArgsForCall(i int) (string, []clienta.ClientOption) { - fake.newClientMutex.RLock() - defer fake.newClientMutex.RUnlock() - argsForCall := fake.newClientArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeGoLogCacheClient) NewClientReturns(result1 *clienta.Client) { - fake.newClientMutex.Lock() - defer fake.newClientMutex.Unlock() - fake.NewClientStub = nil - fake.newClientReturns = struct { - result1 *clienta.Client - }{result1} -} - -func (fake *FakeGoLogCacheClient) NewClientReturnsOnCall(i int, result1 *clienta.Client) { - fake.newClientMutex.Lock() - defer fake.newClientMutex.Unlock() - fake.NewClientStub = nil - if fake.newClientReturnsOnCall == nil { - fake.newClientReturnsOnCall = make(map[int]struct { - result1 *clienta.Client - }) - } - fake.newClientReturnsOnCall[i] = struct { - result1 *clienta.Client - }{result1} -} - -func (fake *FakeGoLogCacheClient) NewOauth2HTTPClient(arg1 string, arg2 string, arg3 string, arg4 ...clienta.Oauth2Option) *clienta.Oauth2HTTPClient { - fake.newOauth2HTTPClientMutex.Lock() - ret, specificReturn := fake.newOauth2HTTPClientReturnsOnCall[len(fake.newOauth2HTTPClientArgsForCall)] - fake.newOauth2HTTPClientArgsForCall = append(fake.newOauth2HTTPClientArgsForCall, struct { - arg1 string - arg2 string - arg3 string - arg4 []clienta.Oauth2Option - }{arg1, arg2, arg3, arg4}) - stub := fake.NewOauth2HTTPClientStub - fakeReturns := fake.newOauth2HTTPClientReturns - fake.recordInvocation("NewOauth2HTTPClient", []interface{}{arg1, arg2, arg3, arg4}) - fake.newOauth2HTTPClientMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4...) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeGoLogCacheClient) NewOauth2HTTPClientCallCount() int { - fake.newOauth2HTTPClientMutex.RLock() - defer fake.newOauth2HTTPClientMutex.RUnlock() - return len(fake.newOauth2HTTPClientArgsForCall) -} - -func (fake *FakeGoLogCacheClient) NewOauth2HTTPClientCalls(stub func(string, string, string, ...clienta.Oauth2Option) *clienta.Oauth2HTTPClient) { - fake.newOauth2HTTPClientMutex.Lock() - defer fake.newOauth2HTTPClientMutex.Unlock() - fake.NewOauth2HTTPClientStub = stub -} - -func (fake *FakeGoLogCacheClient) NewOauth2HTTPClientArgsForCall(i int) (string, string, string, []clienta.Oauth2Option) { - fake.newOauth2HTTPClientMutex.RLock() - defer fake.newOauth2HTTPClientMutex.RUnlock() - argsForCall := fake.newOauth2HTTPClientArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 -} - -func (fake *FakeGoLogCacheClient) NewOauth2HTTPClientReturns(result1 *clienta.Oauth2HTTPClient) { - fake.newOauth2HTTPClientMutex.Lock() - defer fake.newOauth2HTTPClientMutex.Unlock() - fake.NewOauth2HTTPClientStub = nil - fake.newOauth2HTTPClientReturns = struct { - result1 *clienta.Oauth2HTTPClient - }{result1} -} - -func (fake *FakeGoLogCacheClient) NewOauth2HTTPClientReturnsOnCall(i int, result1 *clienta.Oauth2HTTPClient) { - fake.newOauth2HTTPClientMutex.Lock() - defer fake.newOauth2HTTPClientMutex.Unlock() - fake.NewOauth2HTTPClientStub = nil - if fake.newOauth2HTTPClientReturnsOnCall == nil { - fake.newOauth2HTTPClientReturnsOnCall = make(map[int]struct { - result1 *clienta.Oauth2HTTPClient - }) - } - fake.newOauth2HTTPClientReturnsOnCall[i] = struct { - result1 *clienta.Oauth2HTTPClient - }{result1} -} - -func (fake *FakeGoLogCacheClient) WithHTTPClient(arg1 clienta.HTTPClient) clienta.ClientOption { - fake.withHTTPClientMutex.Lock() - ret, specificReturn := fake.withHTTPClientReturnsOnCall[len(fake.withHTTPClientArgsForCall)] - fake.withHTTPClientArgsForCall = append(fake.withHTTPClientArgsForCall, struct { - arg1 clienta.HTTPClient - }{arg1}) - stub := fake.WithHTTPClientStub - fakeReturns := fake.withHTTPClientReturns - fake.recordInvocation("WithHTTPClient", []interface{}{arg1}) - fake.withHTTPClientMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeGoLogCacheClient) WithHTTPClientCallCount() int { - fake.withHTTPClientMutex.RLock() - defer fake.withHTTPClientMutex.RUnlock() - return len(fake.withHTTPClientArgsForCall) -} - -func (fake *FakeGoLogCacheClient) WithHTTPClientCalls(stub func(clienta.HTTPClient) clienta.ClientOption) { - fake.withHTTPClientMutex.Lock() - defer fake.withHTTPClientMutex.Unlock() - fake.WithHTTPClientStub = stub -} - -func (fake *FakeGoLogCacheClient) WithHTTPClientArgsForCall(i int) clienta.HTTPClient { - fake.withHTTPClientMutex.RLock() - defer fake.withHTTPClientMutex.RUnlock() - argsForCall := fake.withHTTPClientArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeGoLogCacheClient) WithHTTPClientReturns(result1 clienta.ClientOption) { - fake.withHTTPClientMutex.Lock() - defer fake.withHTTPClientMutex.Unlock() - fake.WithHTTPClientStub = nil - fake.withHTTPClientReturns = struct { - result1 clienta.ClientOption - }{result1} -} - -func (fake *FakeGoLogCacheClient) WithHTTPClientReturnsOnCall(i int, result1 clienta.ClientOption) { - fake.withHTTPClientMutex.Lock() - defer fake.withHTTPClientMutex.Unlock() - fake.WithHTTPClientStub = nil - if fake.withHTTPClientReturnsOnCall == nil { - fake.withHTTPClientReturnsOnCall = make(map[int]struct { - result1 clienta.ClientOption - }) - } - fake.withHTTPClientReturnsOnCall[i] = struct { - result1 clienta.ClientOption - }{result1} -} - -func (fake *FakeGoLogCacheClient) WithOauth2HTTPClient(arg1 clienta.HTTPClient) clienta.Oauth2Option { - fake.withOauth2HTTPClientMutex.Lock() - ret, specificReturn := fake.withOauth2HTTPClientReturnsOnCall[len(fake.withOauth2HTTPClientArgsForCall)] - fake.withOauth2HTTPClientArgsForCall = append(fake.withOauth2HTTPClientArgsForCall, struct { - arg1 clienta.HTTPClient - }{arg1}) - stub := fake.WithOauth2HTTPClientStub - fakeReturns := fake.withOauth2HTTPClientReturns - fake.recordInvocation("WithOauth2HTTPClient", []interface{}{arg1}) - fake.withOauth2HTTPClientMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeGoLogCacheClient) WithOauth2HTTPClientCallCount() int { - fake.withOauth2HTTPClientMutex.RLock() - defer fake.withOauth2HTTPClientMutex.RUnlock() - return len(fake.withOauth2HTTPClientArgsForCall) -} - -func (fake *FakeGoLogCacheClient) WithOauth2HTTPClientCalls(stub func(clienta.HTTPClient) clienta.Oauth2Option) { - fake.withOauth2HTTPClientMutex.Lock() - defer fake.withOauth2HTTPClientMutex.Unlock() - fake.WithOauth2HTTPClientStub = stub -} - -func (fake *FakeGoLogCacheClient) WithOauth2HTTPClientArgsForCall(i int) clienta.HTTPClient { - fake.withOauth2HTTPClientMutex.RLock() - defer fake.withOauth2HTTPClientMutex.RUnlock() - argsForCall := fake.withOauth2HTTPClientArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeGoLogCacheClient) WithOauth2HTTPClientReturns(result1 clienta.Oauth2Option) { - fake.withOauth2HTTPClientMutex.Lock() - defer fake.withOauth2HTTPClientMutex.Unlock() - fake.WithOauth2HTTPClientStub = nil - fake.withOauth2HTTPClientReturns = struct { - result1 clienta.Oauth2Option - }{result1} -} - -func (fake *FakeGoLogCacheClient) WithOauth2HTTPClientReturnsOnCall(i int, result1 clienta.Oauth2Option) { - fake.withOauth2HTTPClientMutex.Lock() - defer fake.withOauth2HTTPClientMutex.Unlock() - fake.WithOauth2HTTPClientStub = nil - if fake.withOauth2HTTPClientReturnsOnCall == nil { - fake.withOauth2HTTPClientReturnsOnCall = make(map[int]struct { - result1 clienta.Oauth2Option - }) - } - fake.withOauth2HTTPClientReturnsOnCall[i] = struct { - result1 clienta.Oauth2Option - }{result1} -} - -func (fake *FakeGoLogCacheClient) WithViaGRPC(arg1 ...grpc.DialOption) clienta.ClientOption { - fake.withViaGRPCMutex.Lock() - ret, specificReturn := fake.withViaGRPCReturnsOnCall[len(fake.withViaGRPCArgsForCall)] - fake.withViaGRPCArgsForCall = append(fake.withViaGRPCArgsForCall, struct { - arg1 []grpc.DialOption - }{arg1}) - stub := fake.WithViaGRPCStub - fakeReturns := fake.withViaGRPCReturns - fake.recordInvocation("WithViaGRPC", []interface{}{arg1}) - fake.withViaGRPCMutex.Unlock() - if stub != nil { - return stub(arg1...) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeGoLogCacheClient) WithViaGRPCCallCount() int { - fake.withViaGRPCMutex.RLock() - defer fake.withViaGRPCMutex.RUnlock() - return len(fake.withViaGRPCArgsForCall) -} - -func (fake *FakeGoLogCacheClient) WithViaGRPCCalls(stub func(...grpc.DialOption) clienta.ClientOption) { - fake.withViaGRPCMutex.Lock() - defer fake.withViaGRPCMutex.Unlock() - fake.WithViaGRPCStub = stub -} - -func (fake *FakeGoLogCacheClient) WithViaGRPCArgsForCall(i int) []grpc.DialOption { - fake.withViaGRPCMutex.RLock() - defer fake.withViaGRPCMutex.RUnlock() - argsForCall := fake.withViaGRPCArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeGoLogCacheClient) WithViaGRPCReturns(result1 clienta.ClientOption) { - fake.withViaGRPCMutex.Lock() - defer fake.withViaGRPCMutex.Unlock() - fake.WithViaGRPCStub = nil - fake.withViaGRPCReturns = struct { - result1 clienta.ClientOption - }{result1} -} - -func (fake *FakeGoLogCacheClient) WithViaGRPCReturnsOnCall(i int, result1 clienta.ClientOption) { - fake.withViaGRPCMutex.Lock() - defer fake.withViaGRPCMutex.Unlock() - fake.WithViaGRPCStub = nil - if fake.withViaGRPCReturnsOnCall == nil { - fake.withViaGRPCReturnsOnCall = make(map[int]struct { - result1 clienta.ClientOption - }) - } - fake.withViaGRPCReturnsOnCall[i] = struct { - result1 clienta.ClientOption - }{result1} -} - -func (fake *FakeGoLogCacheClient) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.newClientMutex.RLock() - defer fake.newClientMutex.RUnlock() - fake.newOauth2HTTPClientMutex.RLock() - defer fake.newOauth2HTTPClientMutex.RUnlock() - fake.withHTTPClientMutex.RLock() - defer fake.withHTTPClientMutex.RUnlock() - fake.withOauth2HTTPClientMutex.RLock() - defer fake.withOauth2HTTPClientMutex.RUnlock() - fake.withViaGRPCMutex.RLock() - defer fake.withViaGRPCMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeGoLogCacheClient) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ client.GoLogCacheClient = new(FakeGoLogCacheClient) diff --git a/src/autoscaler/fakes/fake_grpc.go b/src/autoscaler/fakes/fake_grpc.go deleted file mode 100644 index 6c21dcd033..0000000000 --- a/src/autoscaler/fakes/fake_grpc.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/eventgenerator/client" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials" -) - -type FakeGRPCOptions struct { - WithTransportCredentialsStub func(credentials.TransportCredentials) grpc.DialOption - withTransportCredentialsMutex sync.RWMutex - withTransportCredentialsArgsForCall []struct { - arg1 credentials.TransportCredentials - } - withTransportCredentialsReturns struct { - result1 grpc.DialOption - } - withTransportCredentialsReturnsOnCall map[int]struct { - result1 grpc.DialOption - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeGRPCOptions) WithTransportCredentials(arg1 credentials.TransportCredentials) grpc.DialOption { - fake.withTransportCredentialsMutex.Lock() - ret, specificReturn := fake.withTransportCredentialsReturnsOnCall[len(fake.withTransportCredentialsArgsForCall)] - fake.withTransportCredentialsArgsForCall = append(fake.withTransportCredentialsArgsForCall, struct { - arg1 credentials.TransportCredentials - }{arg1}) - stub := fake.WithTransportCredentialsStub - fakeReturns := fake.withTransportCredentialsReturns - fake.recordInvocation("WithTransportCredentials", []interface{}{arg1}) - fake.withTransportCredentialsMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeGRPCOptions) WithTransportCredentialsCallCount() int { - fake.withTransportCredentialsMutex.RLock() - defer fake.withTransportCredentialsMutex.RUnlock() - return len(fake.withTransportCredentialsArgsForCall) -} - -func (fake *FakeGRPCOptions) WithTransportCredentialsCalls(stub func(credentials.TransportCredentials) grpc.DialOption) { - fake.withTransportCredentialsMutex.Lock() - defer fake.withTransportCredentialsMutex.Unlock() - fake.WithTransportCredentialsStub = stub -} - -func (fake *FakeGRPCOptions) WithTransportCredentialsArgsForCall(i int) credentials.TransportCredentials { - fake.withTransportCredentialsMutex.RLock() - defer fake.withTransportCredentialsMutex.RUnlock() - argsForCall := fake.withTransportCredentialsArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeGRPCOptions) WithTransportCredentialsReturns(result1 grpc.DialOption) { - fake.withTransportCredentialsMutex.Lock() - defer fake.withTransportCredentialsMutex.Unlock() - fake.WithTransportCredentialsStub = nil - fake.withTransportCredentialsReturns = struct { - result1 grpc.DialOption - }{result1} -} - -func (fake *FakeGRPCOptions) WithTransportCredentialsReturnsOnCall(i int, result1 grpc.DialOption) { - fake.withTransportCredentialsMutex.Lock() - defer fake.withTransportCredentialsMutex.Unlock() - fake.WithTransportCredentialsStub = nil - if fake.withTransportCredentialsReturnsOnCall == nil { - fake.withTransportCredentialsReturnsOnCall = make(map[int]struct { - result1 grpc.DialOption - }) - } - fake.withTransportCredentialsReturnsOnCall[i] = struct { - result1 grpc.DialOption - }{result1} -} - -func (fake *FakeGRPCOptions) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.withTransportCredentialsMutex.RLock() - defer fake.withTransportCredentialsMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeGRPCOptions) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ client.GRPCOptions = new(FakeGRPCOptions) diff --git a/src/autoscaler/fakes/fake_httpstatus_collector.go b/src/autoscaler/fakes/fake_httpstatus_collector.go deleted file mode 100644 index a7eb3ae8d5..0000000000 --- a/src/autoscaler/fakes/fake_httpstatus_collector.go +++ /dev/null @@ -1,139 +0,0 @@ -// This file was generated by counterfeiter -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/healthendpoint" - - "github.com/prometheus/client_golang/prometheus" -) - -type FakeHTTPStatusCollector struct { - DescribeStub func(chan<- *prometheus.Desc) - describeMutex sync.RWMutex - describeArgsForCall []struct { - arg1 chan<- *prometheus.Desc - } - CollectStub func(chan<- prometheus.Metric) - collectMutex sync.RWMutex - collectArgsForCall []struct { - arg1 chan<- prometheus.Metric - } - IncConcurrentHTTPRequestStub func() - incConcurrentHTTPRequestMutex sync.RWMutex - incConcurrentHTTPRequestArgsForCall []struct{} - DecConcurrentHTTPRequestStub func() - decConcurrentHTTPRequestMutex sync.RWMutex - decConcurrentHTTPRequestArgsForCall []struct{} - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeHTTPStatusCollector) Describe(arg1 chan<- *prometheus.Desc) { - fake.describeMutex.Lock() - fake.describeArgsForCall = append(fake.describeArgsForCall, struct { - arg1 chan<- *prometheus.Desc - }{arg1}) - fake.recordInvocation("Describe", []interface{}{arg1}) - fake.describeMutex.Unlock() - if fake.DescribeStub != nil { - fake.DescribeStub(arg1) - } -} - -func (fake *FakeHTTPStatusCollector) DescribeCallCount() int { - fake.describeMutex.RLock() - defer fake.describeMutex.RUnlock() - return len(fake.describeArgsForCall) -} - -func (fake *FakeHTTPStatusCollector) DescribeArgsForCall(i int) chan<- *prometheus.Desc { - fake.describeMutex.RLock() - defer fake.describeMutex.RUnlock() - return fake.describeArgsForCall[i].arg1 -} - -func (fake *FakeHTTPStatusCollector) Collect(arg1 chan<- prometheus.Metric) { - fake.collectMutex.Lock() - fake.collectArgsForCall = append(fake.collectArgsForCall, struct { - arg1 chan<- prometheus.Metric - }{arg1}) - fake.recordInvocation("Collect", []interface{}{arg1}) - fake.collectMutex.Unlock() - if fake.CollectStub != nil { - fake.CollectStub(arg1) - } -} - -func (fake *FakeHTTPStatusCollector) CollectCallCount() int { - fake.collectMutex.RLock() - defer fake.collectMutex.RUnlock() - return len(fake.collectArgsForCall) -} - -func (fake *FakeHTTPStatusCollector) CollectArgsForCall(i int) chan<- prometheus.Metric { - fake.collectMutex.RLock() - defer fake.collectMutex.RUnlock() - return fake.collectArgsForCall[i].arg1 -} - -func (fake *FakeHTTPStatusCollector) IncConcurrentHTTPRequest() { - fake.incConcurrentHTTPRequestMutex.Lock() - fake.incConcurrentHTTPRequestArgsForCall = append(fake.incConcurrentHTTPRequestArgsForCall, struct{}{}) - fake.recordInvocation("IncConcurrentHTTPRequest", []interface{}{}) - fake.incConcurrentHTTPRequestMutex.Unlock() - if fake.IncConcurrentHTTPRequestStub != nil { - fake.IncConcurrentHTTPRequestStub() - } -} - -func (fake *FakeHTTPStatusCollector) IncConcurrentHTTPRequestCallCount() int { - fake.incConcurrentHTTPRequestMutex.RLock() - defer fake.incConcurrentHTTPRequestMutex.RUnlock() - return len(fake.incConcurrentHTTPRequestArgsForCall) -} - -func (fake *FakeHTTPStatusCollector) DecConcurrentHTTPRequest() { - fake.decConcurrentHTTPRequestMutex.Lock() - fake.decConcurrentHTTPRequestArgsForCall = append(fake.decConcurrentHTTPRequestArgsForCall, struct{}{}) - fake.recordInvocation("DecConcurrentHTTPRequest", []interface{}{}) - fake.decConcurrentHTTPRequestMutex.Unlock() - if fake.DecConcurrentHTTPRequestStub != nil { - fake.DecConcurrentHTTPRequestStub() - } -} - -func (fake *FakeHTTPStatusCollector) DecConcurrentHTTPRequestCallCount() int { - fake.decConcurrentHTTPRequestMutex.RLock() - defer fake.decConcurrentHTTPRequestMutex.RUnlock() - return len(fake.decConcurrentHTTPRequestArgsForCall) -} - -func (fake *FakeHTTPStatusCollector) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.describeMutex.RLock() - defer fake.describeMutex.RUnlock() - fake.collectMutex.RLock() - defer fake.collectMutex.RUnlock() - fake.incConcurrentHTTPRequestMutex.RLock() - defer fake.incConcurrentHTTPRequestMutex.RUnlock() - fake.decConcurrentHTTPRequestMutex.RLock() - defer fake.decConcurrentHTTPRequestMutex.RUnlock() - return fake.invocations -} - -func (fake *FakeHTTPStatusCollector) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ healthendpoint.HTTPStatusCollector = new(FakeHTTPStatusCollector) diff --git a/src/autoscaler/fakes/fake_instancemetrics_db.go b/src/autoscaler/fakes/fake_instancemetrics_db.go deleted file mode 100644 index e9b6c466c1..0000000000 --- a/src/autoscaler/fakes/fake_instancemetrics_db.go +++ /dev/null @@ -1,284 +0,0 @@ -// This file was generated by counterfeiter -package fakes - -import ( - "database/sql" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/db" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakeInstanceMetricsDB struct { - GetDBStatusStub func() sql.DBStats - getDBStatusMutex sync.RWMutex - getDBStatusArgsForCall []struct{} - getDBStatusReturns struct { - result1 sql.DBStats - } - RetrieveInstanceMetricsStub func(appid string, instanceIndex int, name string, start int64, end int64, orderType db.OrderType) ([]*models.AppInstanceMetric, error) - retrieveInstanceMetricsMutex sync.RWMutex - retrieveInstanceMetricsArgsForCall []struct { - appid string - instanceIndex int - name string - start int64 - end int64 - orderType db.OrderType - } - retrieveInstanceMetricsReturns struct { - result1 []*models.AppInstanceMetric - result2 error - } - SaveMetricStub func(metric *models.AppInstanceMetric) error - saveMetricMutex sync.RWMutex - saveMetricArgsForCall []struct { - metric *models.AppInstanceMetric - } - saveMetricReturns struct { - result1 error - } - SaveMetricsInBulkStub func(metrics []*models.AppInstanceMetric) error - saveMetricsInBulkMutex sync.RWMutex - saveMetricsInBulkArgsForCall []struct { - metrics []*models.AppInstanceMetric - } - saveMetricsInBulkReturns struct { - result1 error - } - PruneInstanceMetricsStub func(before int64) error - pruneInstanceMetricsMutex sync.RWMutex - pruneInstanceMetricsArgsForCall []struct { - before int64 - } - pruneInstanceMetricsReturns struct { - result1 error - } - CloseStub func() error - closeMutex sync.RWMutex - closeArgsForCall []struct{} - closeReturns struct { - result1 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeInstanceMetricsDB) GetDBStatus() sql.DBStats { - fake.getDBStatusMutex.Lock() - fake.getDBStatusArgsForCall = append(fake.getDBStatusArgsForCall, struct{}{}) - fake.recordInvocation("GetDBStatus", []interface{}{}) - fake.getDBStatusMutex.Unlock() - if fake.GetDBStatusStub != nil { - return fake.GetDBStatusStub() - } - return fake.getDBStatusReturns.result1 -} - -func (fake *FakeInstanceMetricsDB) GetDBStatusCallCount() int { - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - return len(fake.getDBStatusArgsForCall) -} - -func (fake *FakeInstanceMetricsDB) GetDBStatusReturns(result1 sql.DBStats) { - fake.GetDBStatusStub = nil - fake.getDBStatusReturns = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeInstanceMetricsDB) RetrieveInstanceMetrics(appid string, instanceIndex int, name string, start int64, end int64, orderType db.OrderType) ([]*models.AppInstanceMetric, error) { - fake.retrieveInstanceMetricsMutex.Lock() - fake.retrieveInstanceMetricsArgsForCall = append(fake.retrieveInstanceMetricsArgsForCall, struct { - appid string - instanceIndex int - name string - start int64 - end int64 - orderType db.OrderType - }{appid, instanceIndex, name, start, end, orderType}) - fake.recordInvocation("RetrieveInstanceMetrics", []interface{}{appid, instanceIndex, name, start, end, orderType}) - fake.retrieveInstanceMetricsMutex.Unlock() - if fake.RetrieveInstanceMetricsStub != nil { - return fake.RetrieveInstanceMetricsStub(appid, instanceIndex, name, start, end, orderType) - } - return fake.retrieveInstanceMetricsReturns.result1, fake.retrieveInstanceMetricsReturns.result2 -} - -func (fake *FakeInstanceMetricsDB) RetrieveInstanceMetricsCallCount() int { - fake.retrieveInstanceMetricsMutex.RLock() - defer fake.retrieveInstanceMetricsMutex.RUnlock() - return len(fake.retrieveInstanceMetricsArgsForCall) -} - -func (fake *FakeInstanceMetricsDB) RetrieveInstanceMetricsArgsForCall(i int) (string, int, string, int64, int64, db.OrderType) { - fake.retrieveInstanceMetricsMutex.RLock() - defer fake.retrieveInstanceMetricsMutex.RUnlock() - return fake.retrieveInstanceMetricsArgsForCall[i].appid, fake.retrieveInstanceMetricsArgsForCall[i].instanceIndex, fake.retrieveInstanceMetricsArgsForCall[i].name, fake.retrieveInstanceMetricsArgsForCall[i].start, fake.retrieveInstanceMetricsArgsForCall[i].end, fake.retrieveInstanceMetricsArgsForCall[i].orderType -} - -func (fake *FakeInstanceMetricsDB) RetrieveInstanceMetricsReturns(result1 []*models.AppInstanceMetric, result2 error) { - fake.RetrieveInstanceMetricsStub = nil - fake.retrieveInstanceMetricsReturns = struct { - result1 []*models.AppInstanceMetric - result2 error - }{result1, result2} -} - -func (fake *FakeInstanceMetricsDB) SaveMetric(metric *models.AppInstanceMetric) error { - fake.saveMetricMutex.Lock() - fake.saveMetricArgsForCall = append(fake.saveMetricArgsForCall, struct { - metric *models.AppInstanceMetric - }{metric}) - fake.recordInvocation("SaveMetric", []interface{}{metric}) - fake.saveMetricMutex.Unlock() - if fake.SaveMetricStub != nil { - return fake.SaveMetricStub(metric) - } - return fake.saveMetricReturns.result1 -} - -func (fake *FakeInstanceMetricsDB) SaveMetricCallCount() int { - fake.saveMetricMutex.RLock() - defer fake.saveMetricMutex.RUnlock() - return len(fake.saveMetricArgsForCall) -} - -func (fake *FakeInstanceMetricsDB) SaveMetricArgsForCall(i int) *models.AppInstanceMetric { - fake.saveMetricMutex.RLock() - defer fake.saveMetricMutex.RUnlock() - return fake.saveMetricArgsForCall[i].metric -} - -func (fake *FakeInstanceMetricsDB) SaveMetricReturns(result1 error) { - fake.SaveMetricStub = nil - fake.saveMetricReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeInstanceMetricsDB) SaveMetricsInBulk(metrics []*models.AppInstanceMetric) error { - var metricsCopy []*models.AppInstanceMetric - if metrics != nil { - metricsCopy = make([]*models.AppInstanceMetric, len(metrics)) - copy(metricsCopy, metrics) - } - fake.saveMetricsInBulkMutex.Lock() - fake.saveMetricsInBulkArgsForCall = append(fake.saveMetricsInBulkArgsForCall, struct { - metrics []*models.AppInstanceMetric - }{metricsCopy}) - fake.recordInvocation("SaveMetricsInBulk", []interface{}{metricsCopy}) - fake.saveMetricsInBulkMutex.Unlock() - if fake.SaveMetricsInBulkStub != nil { - return fake.SaveMetricsInBulkStub(metrics) - } - return fake.saveMetricsInBulkReturns.result1 -} - -func (fake *FakeInstanceMetricsDB) SaveMetricsInBulkCallCount() int { - fake.saveMetricsInBulkMutex.RLock() - defer fake.saveMetricsInBulkMutex.RUnlock() - return len(fake.saveMetricsInBulkArgsForCall) -} - -func (fake *FakeInstanceMetricsDB) SaveMetricsInBulkArgsForCall(i int) []*models.AppInstanceMetric { - fake.saveMetricsInBulkMutex.RLock() - defer fake.saveMetricsInBulkMutex.RUnlock() - return fake.saveMetricsInBulkArgsForCall[i].metrics -} - -func (fake *FakeInstanceMetricsDB) SaveMetricsInBulkReturns(result1 error) { - fake.SaveMetricsInBulkStub = nil - fake.saveMetricsInBulkReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeInstanceMetricsDB) PruneInstanceMetrics(before int64) error { - fake.pruneInstanceMetricsMutex.Lock() - fake.pruneInstanceMetricsArgsForCall = append(fake.pruneInstanceMetricsArgsForCall, struct { - before int64 - }{before}) - fake.recordInvocation("PruneInstanceMetrics", []interface{}{before}) - fake.pruneInstanceMetricsMutex.Unlock() - if fake.PruneInstanceMetricsStub != nil { - return fake.PruneInstanceMetricsStub(before) - } - return fake.pruneInstanceMetricsReturns.result1 -} - -func (fake *FakeInstanceMetricsDB) PruneInstanceMetricsCallCount() int { - fake.pruneInstanceMetricsMutex.RLock() - defer fake.pruneInstanceMetricsMutex.RUnlock() - return len(fake.pruneInstanceMetricsArgsForCall) -} - -func (fake *FakeInstanceMetricsDB) PruneInstanceMetricsArgsForCall(i int) int64 { - fake.pruneInstanceMetricsMutex.RLock() - defer fake.pruneInstanceMetricsMutex.RUnlock() - return fake.pruneInstanceMetricsArgsForCall[i].before -} - -func (fake *FakeInstanceMetricsDB) PruneInstanceMetricsReturns(result1 error) { - fake.PruneInstanceMetricsStub = nil - fake.pruneInstanceMetricsReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeInstanceMetricsDB) Close() error { - fake.closeMutex.Lock() - fake.closeArgsForCall = append(fake.closeArgsForCall, struct{}{}) - fake.recordInvocation("Close", []interface{}{}) - fake.closeMutex.Unlock() - if fake.CloseStub != nil { - return fake.CloseStub() - } - return fake.closeReturns.result1 -} - -func (fake *FakeInstanceMetricsDB) CloseCallCount() int { - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return len(fake.closeArgsForCall) -} - -func (fake *FakeInstanceMetricsDB) CloseReturns(result1 error) { - fake.CloseStub = nil - fake.closeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeInstanceMetricsDB) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - fake.retrieveInstanceMetricsMutex.RLock() - defer fake.retrieveInstanceMetricsMutex.RUnlock() - fake.saveMetricMutex.RLock() - defer fake.saveMetricMutex.RUnlock() - fake.saveMetricsInBulkMutex.RLock() - defer fake.saveMetricsInBulkMutex.RUnlock() - fake.pruneInstanceMetricsMutex.RLock() - defer fake.pruneInstanceMetricsMutex.RUnlock() - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return fake.invocations -} - -func (fake *FakeInstanceMetricsDB) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ db.InstanceMetricsDB = new(FakeInstanceMetricsDB) diff --git a/src/autoscaler/fakes/fake_log_cache_client.go b/src/autoscaler/fakes/fake_log_cache_client.go deleted file mode 100644 index 9dcfbf366e..0000000000 --- a/src/autoscaler/fakes/fake_log_cache_client.go +++ /dev/null @@ -1,126 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "context" - "sync" - "time" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/eventgenerator/client" - clienta "code.cloudfoundry.org/go-log-cache" - "code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2" -) - -type FakeLogCacheClientReader struct { - ReadStub func(context.Context, string, time.Time, ...clienta.ReadOption) ([]*loggregator_v2.Envelope, error) - readMutex sync.RWMutex - readArgsForCall []struct { - arg1 context.Context - arg2 string - arg3 time.Time - arg4 []clienta.ReadOption - } - readReturns struct { - result1 []*loggregator_v2.Envelope - result2 error - } - readReturnsOnCall map[int]struct { - result1 []*loggregator_v2.Envelope - result2 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeLogCacheClientReader) Read(arg1 context.Context, arg2 string, arg3 time.Time, arg4 ...clienta.ReadOption) ([]*loggregator_v2.Envelope, error) { - fake.readMutex.Lock() - ret, specificReturn := fake.readReturnsOnCall[len(fake.readArgsForCall)] - fake.readArgsForCall = append(fake.readArgsForCall, struct { - arg1 context.Context - arg2 string - arg3 time.Time - arg4 []clienta.ReadOption - }{arg1, arg2, arg3, arg4}) - stub := fake.ReadStub - fakeReturns := fake.readReturns - fake.recordInvocation("Read", []interface{}{arg1, arg2, arg3, arg4}) - fake.readMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4...) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeLogCacheClientReader) ReadCallCount() int { - fake.readMutex.RLock() - defer fake.readMutex.RUnlock() - return len(fake.readArgsForCall) -} - -func (fake *FakeLogCacheClientReader) ReadCalls(stub func(context.Context, string, time.Time, ...clienta.ReadOption) ([]*loggregator_v2.Envelope, error)) { - fake.readMutex.Lock() - defer fake.readMutex.Unlock() - fake.ReadStub = stub -} - -func (fake *FakeLogCacheClientReader) ReadArgsForCall(i int) (context.Context, string, time.Time, []clienta.ReadOption) { - fake.readMutex.RLock() - defer fake.readMutex.RUnlock() - argsForCall := fake.readArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 -} - -func (fake *FakeLogCacheClientReader) ReadReturns(result1 []*loggregator_v2.Envelope, result2 error) { - fake.readMutex.Lock() - defer fake.readMutex.Unlock() - fake.ReadStub = nil - fake.readReturns = struct { - result1 []*loggregator_v2.Envelope - result2 error - }{result1, result2} -} - -func (fake *FakeLogCacheClientReader) ReadReturnsOnCall(i int, result1 []*loggregator_v2.Envelope, result2 error) { - fake.readMutex.Lock() - defer fake.readMutex.Unlock() - fake.ReadStub = nil - if fake.readReturnsOnCall == nil { - fake.readReturnsOnCall = make(map[int]struct { - result1 []*loggregator_v2.Envelope - result2 error - }) - } - fake.readReturnsOnCall[i] = struct { - result1 []*loggregator_v2.Envelope - result2 error - }{result1, result2} -} - -func (fake *FakeLogCacheClientReader) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.readMutex.RLock() - defer fake.readMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeLogCacheClientReader) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ client.LogCacheClientReader = new(FakeLogCacheClientReader) diff --git a/src/autoscaler/fakes/fake_log_cache_creator.go b/src/autoscaler/fakes/fake_log_cache_creator.go deleted file mode 100644 index ab48eb60a4..0000000000 --- a/src/autoscaler/fakes/fake_log_cache_creator.go +++ /dev/null @@ -1,120 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - "time" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/envelopeprocessor" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/eventgenerator/client" - lager "code.cloudfoundry.org/lager/v3" -) - -type FakeLogCacheClientCreator struct { - NewLogCacheClientStub func(lager.Logger, func() time.Time, envelopeprocessor.EnvelopeProcessor, string) client.MetricClient - newLogCacheClientMutex sync.RWMutex - newLogCacheClientArgsForCall []struct { - arg1 lager.Logger - arg2 func() time.Time - arg3 envelopeprocessor.EnvelopeProcessor - arg4 string - } - newLogCacheClientReturns struct { - result1 client.MetricClient - } - newLogCacheClientReturnsOnCall map[int]struct { - result1 client.MetricClient - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeLogCacheClientCreator) NewLogCacheClient(arg1 lager.Logger, arg2 func() time.Time, arg3 envelopeprocessor.EnvelopeProcessor, arg4 string) client.MetricClient { - fake.newLogCacheClientMutex.Lock() - ret, specificReturn := fake.newLogCacheClientReturnsOnCall[len(fake.newLogCacheClientArgsForCall)] - fake.newLogCacheClientArgsForCall = append(fake.newLogCacheClientArgsForCall, struct { - arg1 lager.Logger - arg2 func() time.Time - arg3 envelopeprocessor.EnvelopeProcessor - arg4 string - }{arg1, arg2, arg3, arg4}) - stub := fake.NewLogCacheClientStub - fakeReturns := fake.newLogCacheClientReturns - fake.recordInvocation("NewLogCacheClient", []interface{}{arg1, arg2, arg3, arg4}) - fake.newLogCacheClientMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeLogCacheClientCreator) NewLogCacheClientCallCount() int { - fake.newLogCacheClientMutex.RLock() - defer fake.newLogCacheClientMutex.RUnlock() - return len(fake.newLogCacheClientArgsForCall) -} - -func (fake *FakeLogCacheClientCreator) NewLogCacheClientCalls(stub func(lager.Logger, func() time.Time, envelopeprocessor.EnvelopeProcessor, string) client.MetricClient) { - fake.newLogCacheClientMutex.Lock() - defer fake.newLogCacheClientMutex.Unlock() - fake.NewLogCacheClientStub = stub -} - -func (fake *FakeLogCacheClientCreator) NewLogCacheClientArgsForCall(i int) (lager.Logger, func() time.Time, envelopeprocessor.EnvelopeProcessor, string) { - fake.newLogCacheClientMutex.RLock() - defer fake.newLogCacheClientMutex.RUnlock() - argsForCall := fake.newLogCacheClientArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 -} - -func (fake *FakeLogCacheClientCreator) NewLogCacheClientReturns(result1 client.MetricClient) { - fake.newLogCacheClientMutex.Lock() - defer fake.newLogCacheClientMutex.Unlock() - fake.NewLogCacheClientStub = nil - fake.newLogCacheClientReturns = struct { - result1 client.MetricClient - }{result1} -} - -func (fake *FakeLogCacheClientCreator) NewLogCacheClientReturnsOnCall(i int, result1 client.MetricClient) { - fake.newLogCacheClientMutex.Lock() - defer fake.newLogCacheClientMutex.Unlock() - fake.NewLogCacheClientStub = nil - if fake.newLogCacheClientReturnsOnCall == nil { - fake.newLogCacheClientReturnsOnCall = make(map[int]struct { - result1 client.MetricClient - }) - } - fake.newLogCacheClientReturnsOnCall[i] = struct { - result1 client.MetricClient - }{result1} -} - -func (fake *FakeLogCacheClientCreator) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.newLogCacheClientMutex.RLock() - defer fake.newLogCacheClientMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeLogCacheClientCreator) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ client.LogCacheClientCreator = new(FakeLogCacheClientCreator) diff --git a/src/autoscaler/fakes/fake_metric_forwarder.go b/src/autoscaler/fakes/fake_metric_forwarder.go deleted file mode 100644 index 5354c4ef9a..0000000000 --- a/src/autoscaler/fakes/fake_metric_forwarder.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/metricsforwarder/forwarder" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakeMetricForwarder struct { - EmitMetricStub func(*models.CustomMetric) - emitMetricMutex sync.RWMutex - emitMetricArgsForCall []struct { - arg1 *models.CustomMetric - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeMetricForwarder) EmitMetric(arg1 *models.CustomMetric) { - fake.emitMetricMutex.Lock() - fake.emitMetricArgsForCall = append(fake.emitMetricArgsForCall, struct { - arg1 *models.CustomMetric - }{arg1}) - stub := fake.EmitMetricStub - fake.recordInvocation("EmitMetric", []interface{}{arg1}) - fake.emitMetricMutex.Unlock() - if stub != nil { - fake.EmitMetricStub(arg1) - } -} - -func (fake *FakeMetricForwarder) EmitMetricCallCount() int { - fake.emitMetricMutex.RLock() - defer fake.emitMetricMutex.RUnlock() - return len(fake.emitMetricArgsForCall) -} - -func (fake *FakeMetricForwarder) EmitMetricCalls(stub func(*models.CustomMetric)) { - fake.emitMetricMutex.Lock() - defer fake.emitMetricMutex.Unlock() - fake.EmitMetricStub = stub -} - -func (fake *FakeMetricForwarder) EmitMetricArgsForCall(i int) *models.CustomMetric { - fake.emitMetricMutex.RLock() - defer fake.emitMetricMutex.RUnlock() - argsForCall := fake.emitMetricArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeMetricForwarder) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.emitMetricMutex.RLock() - defer fake.emitMetricMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeMetricForwarder) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ forwarder.MetricForwarder = new(FakeMetricForwarder) diff --git a/src/autoscaler/fakes/fake_metric_server_creator_creator.go b/src/autoscaler/fakes/fake_metric_server_creator_creator.go deleted file mode 100644 index fa7e696361..0000000000 --- a/src/autoscaler/fakes/fake_metric_server_creator_creator.go +++ /dev/null @@ -1,117 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "net/http" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/eventgenerator/client" - lager "code.cloudfoundry.org/lager/v3" -) - -type FakeMetricServerClientCreator struct { - NewMetricServerClientStub func(lager.Logger, string, *http.Client) client.MetricClient - newMetricServerClientMutex sync.RWMutex - newMetricServerClientArgsForCall []struct { - arg1 lager.Logger - arg2 string - arg3 *http.Client - } - newMetricServerClientReturns struct { - result1 client.MetricClient - } - newMetricServerClientReturnsOnCall map[int]struct { - result1 client.MetricClient - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeMetricServerClientCreator) NewMetricServerClient(arg1 lager.Logger, arg2 string, arg3 *http.Client) client.MetricClient { - fake.newMetricServerClientMutex.Lock() - ret, specificReturn := fake.newMetricServerClientReturnsOnCall[len(fake.newMetricServerClientArgsForCall)] - fake.newMetricServerClientArgsForCall = append(fake.newMetricServerClientArgsForCall, struct { - arg1 lager.Logger - arg2 string - arg3 *http.Client - }{arg1, arg2, arg3}) - stub := fake.NewMetricServerClientStub - fakeReturns := fake.newMetricServerClientReturns - fake.recordInvocation("NewMetricServerClient", []interface{}{arg1, arg2, arg3}) - fake.newMetricServerClientMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeMetricServerClientCreator) NewMetricServerClientCallCount() int { - fake.newMetricServerClientMutex.RLock() - defer fake.newMetricServerClientMutex.RUnlock() - return len(fake.newMetricServerClientArgsForCall) -} - -func (fake *FakeMetricServerClientCreator) NewMetricServerClientCalls(stub func(lager.Logger, string, *http.Client) client.MetricClient) { - fake.newMetricServerClientMutex.Lock() - defer fake.newMetricServerClientMutex.Unlock() - fake.NewMetricServerClientStub = stub -} - -func (fake *FakeMetricServerClientCreator) NewMetricServerClientArgsForCall(i int) (lager.Logger, string, *http.Client) { - fake.newMetricServerClientMutex.RLock() - defer fake.newMetricServerClientMutex.RUnlock() - argsForCall := fake.newMetricServerClientArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 -} - -func (fake *FakeMetricServerClientCreator) NewMetricServerClientReturns(result1 client.MetricClient) { - fake.newMetricServerClientMutex.Lock() - defer fake.newMetricServerClientMutex.Unlock() - fake.NewMetricServerClientStub = nil - fake.newMetricServerClientReturns = struct { - result1 client.MetricClient - }{result1} -} - -func (fake *FakeMetricServerClientCreator) NewMetricServerClientReturnsOnCall(i int, result1 client.MetricClient) { - fake.newMetricServerClientMutex.Lock() - defer fake.newMetricServerClientMutex.Unlock() - fake.NewMetricServerClientStub = nil - if fake.newMetricServerClientReturnsOnCall == nil { - fake.newMetricServerClientReturnsOnCall = make(map[int]struct { - result1 client.MetricClient - }) - } - fake.newMetricServerClientReturnsOnCall[i] = struct { - result1 client.MetricClient - }{result1} -} - -func (fake *FakeMetricServerClientCreator) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.newMetricServerClientMutex.RLock() - defer fake.newMetricServerClientMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeMetricServerClientCreator) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ client.MetricServerClientCreator = new(FakeMetricServerClientCreator) diff --git a/src/autoscaler/fakes/fake_operator.go b/src/autoscaler/fakes/fake_operator.go deleted file mode 100644 index 4ea8f3c722..0000000000 --- a/src/autoscaler/fakes/fake_operator.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/operator" - "sync" -) - -type FakeOperator struct { - OperateStub func() - operateMutex sync.RWMutex - operateArgsForCall []struct{} - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeOperator) Operate() { - fake.operateMutex.Lock() - fake.operateArgsForCall = append(fake.operateArgsForCall, struct{}{}) - fake.recordInvocation("Operate", []interface{}{}) - fake.operateMutex.Unlock() - if fake.OperateStub != nil { - fake.OperateStub() - } -} - -func (fake *FakeOperator) OperateCallCount() int { - fake.operateMutex.RLock() - defer fake.operateMutex.RUnlock() - return len(fake.operateArgsForCall) -} - -func (fake *FakeOperator) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.operateMutex.RLock() - defer fake.operateMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeOperator) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ operator.Operator = new(FakeOperator) diff --git a/src/autoscaler/fakes/fake_plan_checker.go b/src/autoscaler/fakes/fake_plan_checker.go deleted file mode 100644 index 700493ca5f..0000000000 --- a/src/autoscaler/fakes/fake_plan_checker.go +++ /dev/null @@ -1,203 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/api/plancheck" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakePlanChecker struct { - CheckPlanStub func(*models.ScalingPolicy, string) (bool, string, error) - checkPlanMutex sync.RWMutex - checkPlanArgsForCall []struct { - arg1 *models.ScalingPolicy - arg2 string - } - checkPlanReturns struct { - result1 bool - result2 string - result3 error - } - checkPlanReturnsOnCall map[int]struct { - result1 bool - result2 string - result3 error - } - IsPlanUpdatableStub func(string) (bool, error) - isPlanUpdatableMutex sync.RWMutex - isPlanUpdatableArgsForCall []struct { - arg1 string - } - isPlanUpdatableReturns struct { - result1 bool - result2 error - } - isPlanUpdatableReturnsOnCall map[int]struct { - result1 bool - result2 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakePlanChecker) CheckPlan(arg1 *models.ScalingPolicy, arg2 string) (bool, string, error) { - fake.checkPlanMutex.Lock() - ret, specificReturn := fake.checkPlanReturnsOnCall[len(fake.checkPlanArgsForCall)] - fake.checkPlanArgsForCall = append(fake.checkPlanArgsForCall, struct { - arg1 *models.ScalingPolicy - arg2 string - }{arg1, arg2}) - stub := fake.CheckPlanStub - fakeReturns := fake.checkPlanReturns - fake.recordInvocation("CheckPlan", []interface{}{arg1, arg2}) - fake.checkPlanMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2, ret.result3 - } - return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 -} - -func (fake *FakePlanChecker) CheckPlanCallCount() int { - fake.checkPlanMutex.RLock() - defer fake.checkPlanMutex.RUnlock() - return len(fake.checkPlanArgsForCall) -} - -func (fake *FakePlanChecker) CheckPlanCalls(stub func(*models.ScalingPolicy, string) (bool, string, error)) { - fake.checkPlanMutex.Lock() - defer fake.checkPlanMutex.Unlock() - fake.CheckPlanStub = stub -} - -func (fake *FakePlanChecker) CheckPlanArgsForCall(i int) (*models.ScalingPolicy, string) { - fake.checkPlanMutex.RLock() - defer fake.checkPlanMutex.RUnlock() - argsForCall := fake.checkPlanArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakePlanChecker) CheckPlanReturns(result1 bool, result2 string, result3 error) { - fake.checkPlanMutex.Lock() - defer fake.checkPlanMutex.Unlock() - fake.CheckPlanStub = nil - fake.checkPlanReturns = struct { - result1 bool - result2 string - result3 error - }{result1, result2, result3} -} - -func (fake *FakePlanChecker) CheckPlanReturnsOnCall(i int, result1 bool, result2 string, result3 error) { - fake.checkPlanMutex.Lock() - defer fake.checkPlanMutex.Unlock() - fake.CheckPlanStub = nil - if fake.checkPlanReturnsOnCall == nil { - fake.checkPlanReturnsOnCall = make(map[int]struct { - result1 bool - result2 string - result3 error - }) - } - fake.checkPlanReturnsOnCall[i] = struct { - result1 bool - result2 string - result3 error - }{result1, result2, result3} -} - -func (fake *FakePlanChecker) IsPlanUpdatable(arg1 string) (bool, error) { - fake.isPlanUpdatableMutex.Lock() - ret, specificReturn := fake.isPlanUpdatableReturnsOnCall[len(fake.isPlanUpdatableArgsForCall)] - fake.isPlanUpdatableArgsForCall = append(fake.isPlanUpdatableArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.IsPlanUpdatableStub - fakeReturns := fake.isPlanUpdatableReturns - fake.recordInvocation("IsPlanUpdatable", []interface{}{arg1}) - fake.isPlanUpdatableMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakePlanChecker) IsPlanUpdatableCallCount() int { - fake.isPlanUpdatableMutex.RLock() - defer fake.isPlanUpdatableMutex.RUnlock() - return len(fake.isPlanUpdatableArgsForCall) -} - -func (fake *FakePlanChecker) IsPlanUpdatableCalls(stub func(string) (bool, error)) { - fake.isPlanUpdatableMutex.Lock() - defer fake.isPlanUpdatableMutex.Unlock() - fake.IsPlanUpdatableStub = stub -} - -func (fake *FakePlanChecker) IsPlanUpdatableArgsForCall(i int) string { - fake.isPlanUpdatableMutex.RLock() - defer fake.isPlanUpdatableMutex.RUnlock() - argsForCall := fake.isPlanUpdatableArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakePlanChecker) IsPlanUpdatableReturns(result1 bool, result2 error) { - fake.isPlanUpdatableMutex.Lock() - defer fake.isPlanUpdatableMutex.Unlock() - fake.IsPlanUpdatableStub = nil - fake.isPlanUpdatableReturns = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakePlanChecker) IsPlanUpdatableReturnsOnCall(i int, result1 bool, result2 error) { - fake.isPlanUpdatableMutex.Lock() - defer fake.isPlanUpdatableMutex.Unlock() - fake.IsPlanUpdatableStub = nil - if fake.isPlanUpdatableReturnsOnCall == nil { - fake.isPlanUpdatableReturnsOnCall = make(map[int]struct { - result1 bool - result2 error - }) - } - fake.isPlanUpdatableReturnsOnCall[i] = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakePlanChecker) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.checkPlanMutex.RLock() - defer fake.checkPlanMutex.RUnlock() - fake.isPlanUpdatableMutex.RLock() - defer fake.isPlanUpdatableMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakePlanChecker) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ plancheck.PlanChecker = new(FakePlanChecker) diff --git a/src/autoscaler/fakes/fake_policy_db.go b/src/autoscaler/fakes/fake_policy_db.go deleted file mode 100644 index bb17d7b499..0000000000 --- a/src/autoscaler/fakes/fake_policy_db.go +++ /dev/null @@ -1,1018 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "context" - "database/sql" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/db" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakePolicyDB struct { - CloseStub func() error - closeMutex sync.RWMutex - closeArgsForCall []struct { - } - closeReturns struct { - result1 error - } - closeReturnsOnCall map[int]struct { - result1 error - } - DeleteCredentialStub func(context.Context, string) error - deleteCredentialMutex sync.RWMutex - deleteCredentialArgsForCall []struct { - arg1 context.Context - arg2 string - } - deleteCredentialReturns struct { - result1 error - } - deleteCredentialReturnsOnCall map[int]struct { - result1 error - } - DeletePoliciesByPolicyGuidStub func(context.Context, string) ([]string, error) - deletePoliciesByPolicyGuidMutex sync.RWMutex - deletePoliciesByPolicyGuidArgsForCall []struct { - arg1 context.Context - arg2 string - } - deletePoliciesByPolicyGuidReturns struct { - result1 []string - result2 error - } - deletePoliciesByPolicyGuidReturnsOnCall map[int]struct { - result1 []string - result2 error - } - DeletePolicyStub func(context.Context, string) error - deletePolicyMutex sync.RWMutex - deletePolicyArgsForCall []struct { - arg1 context.Context - arg2 string - } - deletePolicyReturns struct { - result1 error - } - deletePolicyReturnsOnCall map[int]struct { - result1 error - } - GetAppIdsStub func() (map[string]bool, error) - getAppIdsMutex sync.RWMutex - getAppIdsArgsForCall []struct { - } - getAppIdsReturns struct { - result1 map[string]bool - result2 error - } - getAppIdsReturnsOnCall map[int]struct { - result1 map[string]bool - result2 error - } - GetAppPolicyStub func(context.Context, string) (*models.ScalingPolicy, error) - getAppPolicyMutex sync.RWMutex - getAppPolicyArgsForCall []struct { - arg1 context.Context - arg2 string - } - getAppPolicyReturns struct { - result1 *models.ScalingPolicy - result2 error - } - getAppPolicyReturnsOnCall map[int]struct { - result1 *models.ScalingPolicy - result2 error - } - GetCredentialStub func(string) (*models.Credential, error) - getCredentialMutex sync.RWMutex - getCredentialArgsForCall []struct { - arg1 string - } - getCredentialReturns struct { - result1 *models.Credential - result2 error - } - getCredentialReturnsOnCall map[int]struct { - result1 *models.Credential - result2 error - } - GetDBStatusStub func() sql.DBStats - getDBStatusMutex sync.RWMutex - getDBStatusArgsForCall []struct { - } - getDBStatusReturns struct { - result1 sql.DBStats - } - getDBStatusReturnsOnCall map[int]struct { - result1 sql.DBStats - } - PingStub func() error - pingMutex sync.RWMutex - pingArgsForCall []struct { - } - pingReturns struct { - result1 error - } - pingReturnsOnCall map[int]struct { - result1 error - } - RetrievePoliciesStub func() ([]*models.PolicyJson, error) - retrievePoliciesMutex sync.RWMutex - retrievePoliciesArgsForCall []struct { - } - retrievePoliciesReturns struct { - result1 []*models.PolicyJson - result2 error - } - retrievePoliciesReturnsOnCall map[int]struct { - result1 []*models.PolicyJson - result2 error - } - SaveAppPolicyStub func(context.Context, string, *models.ScalingPolicy, string) error - saveAppPolicyMutex sync.RWMutex - saveAppPolicyArgsForCall []struct { - arg1 context.Context - arg2 string - arg3 *models.ScalingPolicy - arg4 string - } - saveAppPolicyReturns struct { - result1 error - } - saveAppPolicyReturnsOnCall map[int]struct { - result1 error - } - SaveCredentialStub func(context.Context, string, models.Credential) error - saveCredentialMutex sync.RWMutex - saveCredentialArgsForCall []struct { - arg1 context.Context - arg2 string - arg3 models.Credential - } - saveCredentialReturns struct { - result1 error - } - saveCredentialReturnsOnCall map[int]struct { - result1 error - } - SetOrUpdateDefaultAppPolicyStub func(context.Context, []string, string, *models.ScalingPolicy, string) ([]string, error) - setOrUpdateDefaultAppPolicyMutex sync.RWMutex - setOrUpdateDefaultAppPolicyArgsForCall []struct { - arg1 context.Context - arg2 []string - arg3 string - arg4 *models.ScalingPolicy - arg5 string - } - setOrUpdateDefaultAppPolicyReturns struct { - result1 []string - result2 error - } - setOrUpdateDefaultAppPolicyReturnsOnCall map[int]struct { - result1 []string - result2 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakePolicyDB) Close() error { - fake.closeMutex.Lock() - ret, specificReturn := fake.closeReturnsOnCall[len(fake.closeArgsForCall)] - fake.closeArgsForCall = append(fake.closeArgsForCall, struct { - }{}) - stub := fake.CloseStub - fakeReturns := fake.closeReturns - fake.recordInvocation("Close", []interface{}{}) - fake.closeMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakePolicyDB) CloseCallCount() int { - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return len(fake.closeArgsForCall) -} - -func (fake *FakePolicyDB) CloseCalls(stub func() error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = stub -} - -func (fake *FakePolicyDB) CloseReturns(result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - fake.closeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) CloseReturnsOnCall(i int, result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - if fake.closeReturnsOnCall == nil { - fake.closeReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.closeReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) DeleteCredential(arg1 context.Context, arg2 string) error { - fake.deleteCredentialMutex.Lock() - ret, specificReturn := fake.deleteCredentialReturnsOnCall[len(fake.deleteCredentialArgsForCall)] - fake.deleteCredentialArgsForCall = append(fake.deleteCredentialArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.DeleteCredentialStub - fakeReturns := fake.deleteCredentialReturns - fake.recordInvocation("DeleteCredential", []interface{}{arg1, arg2}) - fake.deleteCredentialMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakePolicyDB) DeleteCredentialCallCount() int { - fake.deleteCredentialMutex.RLock() - defer fake.deleteCredentialMutex.RUnlock() - return len(fake.deleteCredentialArgsForCall) -} - -func (fake *FakePolicyDB) DeleteCredentialCalls(stub func(context.Context, string) error) { - fake.deleteCredentialMutex.Lock() - defer fake.deleteCredentialMutex.Unlock() - fake.DeleteCredentialStub = stub -} - -func (fake *FakePolicyDB) DeleteCredentialArgsForCall(i int) (context.Context, string) { - fake.deleteCredentialMutex.RLock() - defer fake.deleteCredentialMutex.RUnlock() - argsForCall := fake.deleteCredentialArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakePolicyDB) DeleteCredentialReturns(result1 error) { - fake.deleteCredentialMutex.Lock() - defer fake.deleteCredentialMutex.Unlock() - fake.DeleteCredentialStub = nil - fake.deleteCredentialReturns = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) DeleteCredentialReturnsOnCall(i int, result1 error) { - fake.deleteCredentialMutex.Lock() - defer fake.deleteCredentialMutex.Unlock() - fake.DeleteCredentialStub = nil - if fake.deleteCredentialReturnsOnCall == nil { - fake.deleteCredentialReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.deleteCredentialReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) DeletePoliciesByPolicyGuid(arg1 context.Context, arg2 string) ([]string, error) { - fake.deletePoliciesByPolicyGuidMutex.Lock() - ret, specificReturn := fake.deletePoliciesByPolicyGuidReturnsOnCall[len(fake.deletePoliciesByPolicyGuidArgsForCall)] - fake.deletePoliciesByPolicyGuidArgsForCall = append(fake.deletePoliciesByPolicyGuidArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.DeletePoliciesByPolicyGuidStub - fakeReturns := fake.deletePoliciesByPolicyGuidReturns - fake.recordInvocation("DeletePoliciesByPolicyGuid", []interface{}{arg1, arg2}) - fake.deletePoliciesByPolicyGuidMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakePolicyDB) DeletePoliciesByPolicyGuidCallCount() int { - fake.deletePoliciesByPolicyGuidMutex.RLock() - defer fake.deletePoliciesByPolicyGuidMutex.RUnlock() - return len(fake.deletePoliciesByPolicyGuidArgsForCall) -} - -func (fake *FakePolicyDB) DeletePoliciesByPolicyGuidCalls(stub func(context.Context, string) ([]string, error)) { - fake.deletePoliciesByPolicyGuidMutex.Lock() - defer fake.deletePoliciesByPolicyGuidMutex.Unlock() - fake.DeletePoliciesByPolicyGuidStub = stub -} - -func (fake *FakePolicyDB) DeletePoliciesByPolicyGuidArgsForCall(i int) (context.Context, string) { - fake.deletePoliciesByPolicyGuidMutex.RLock() - defer fake.deletePoliciesByPolicyGuidMutex.RUnlock() - argsForCall := fake.deletePoliciesByPolicyGuidArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakePolicyDB) DeletePoliciesByPolicyGuidReturns(result1 []string, result2 error) { - fake.deletePoliciesByPolicyGuidMutex.Lock() - defer fake.deletePoliciesByPolicyGuidMutex.Unlock() - fake.DeletePoliciesByPolicyGuidStub = nil - fake.deletePoliciesByPolicyGuidReturns = struct { - result1 []string - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) DeletePoliciesByPolicyGuidReturnsOnCall(i int, result1 []string, result2 error) { - fake.deletePoliciesByPolicyGuidMutex.Lock() - defer fake.deletePoliciesByPolicyGuidMutex.Unlock() - fake.DeletePoliciesByPolicyGuidStub = nil - if fake.deletePoliciesByPolicyGuidReturnsOnCall == nil { - fake.deletePoliciesByPolicyGuidReturnsOnCall = make(map[int]struct { - result1 []string - result2 error - }) - } - fake.deletePoliciesByPolicyGuidReturnsOnCall[i] = struct { - result1 []string - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) DeletePolicy(arg1 context.Context, arg2 string) error { - fake.deletePolicyMutex.Lock() - ret, specificReturn := fake.deletePolicyReturnsOnCall[len(fake.deletePolicyArgsForCall)] - fake.deletePolicyArgsForCall = append(fake.deletePolicyArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.DeletePolicyStub - fakeReturns := fake.deletePolicyReturns - fake.recordInvocation("DeletePolicy", []interface{}{arg1, arg2}) - fake.deletePolicyMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakePolicyDB) DeletePolicyCallCount() int { - fake.deletePolicyMutex.RLock() - defer fake.deletePolicyMutex.RUnlock() - return len(fake.deletePolicyArgsForCall) -} - -func (fake *FakePolicyDB) DeletePolicyCalls(stub func(context.Context, string) error) { - fake.deletePolicyMutex.Lock() - defer fake.deletePolicyMutex.Unlock() - fake.DeletePolicyStub = stub -} - -func (fake *FakePolicyDB) DeletePolicyArgsForCall(i int) (context.Context, string) { - fake.deletePolicyMutex.RLock() - defer fake.deletePolicyMutex.RUnlock() - argsForCall := fake.deletePolicyArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakePolicyDB) DeletePolicyReturns(result1 error) { - fake.deletePolicyMutex.Lock() - defer fake.deletePolicyMutex.Unlock() - fake.DeletePolicyStub = nil - fake.deletePolicyReturns = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) DeletePolicyReturnsOnCall(i int, result1 error) { - fake.deletePolicyMutex.Lock() - defer fake.deletePolicyMutex.Unlock() - fake.DeletePolicyStub = nil - if fake.deletePolicyReturnsOnCall == nil { - fake.deletePolicyReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.deletePolicyReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) GetAppIds() (map[string]bool, error) { - fake.getAppIdsMutex.Lock() - ret, specificReturn := fake.getAppIdsReturnsOnCall[len(fake.getAppIdsArgsForCall)] - fake.getAppIdsArgsForCall = append(fake.getAppIdsArgsForCall, struct { - }{}) - stub := fake.GetAppIdsStub - fakeReturns := fake.getAppIdsReturns - fake.recordInvocation("GetAppIds", []interface{}{}) - fake.getAppIdsMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakePolicyDB) GetAppIdsCallCount() int { - fake.getAppIdsMutex.RLock() - defer fake.getAppIdsMutex.RUnlock() - return len(fake.getAppIdsArgsForCall) -} - -func (fake *FakePolicyDB) GetAppIdsCalls(stub func() (map[string]bool, error)) { - fake.getAppIdsMutex.Lock() - defer fake.getAppIdsMutex.Unlock() - fake.GetAppIdsStub = stub -} - -func (fake *FakePolicyDB) GetAppIdsReturns(result1 map[string]bool, result2 error) { - fake.getAppIdsMutex.Lock() - defer fake.getAppIdsMutex.Unlock() - fake.GetAppIdsStub = nil - fake.getAppIdsReturns = struct { - result1 map[string]bool - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) GetAppIdsReturnsOnCall(i int, result1 map[string]bool, result2 error) { - fake.getAppIdsMutex.Lock() - defer fake.getAppIdsMutex.Unlock() - fake.GetAppIdsStub = nil - if fake.getAppIdsReturnsOnCall == nil { - fake.getAppIdsReturnsOnCall = make(map[int]struct { - result1 map[string]bool - result2 error - }) - } - fake.getAppIdsReturnsOnCall[i] = struct { - result1 map[string]bool - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) GetAppPolicy(arg1 context.Context, arg2 string) (*models.ScalingPolicy, error) { - fake.getAppPolicyMutex.Lock() - ret, specificReturn := fake.getAppPolicyReturnsOnCall[len(fake.getAppPolicyArgsForCall)] - fake.getAppPolicyArgsForCall = append(fake.getAppPolicyArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.GetAppPolicyStub - fakeReturns := fake.getAppPolicyReturns - fake.recordInvocation("GetAppPolicy", []interface{}{arg1, arg2}) - fake.getAppPolicyMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakePolicyDB) GetAppPolicyCallCount() int { - fake.getAppPolicyMutex.RLock() - defer fake.getAppPolicyMutex.RUnlock() - return len(fake.getAppPolicyArgsForCall) -} - -func (fake *FakePolicyDB) GetAppPolicyCalls(stub func(context.Context, string) (*models.ScalingPolicy, error)) { - fake.getAppPolicyMutex.Lock() - defer fake.getAppPolicyMutex.Unlock() - fake.GetAppPolicyStub = stub -} - -func (fake *FakePolicyDB) GetAppPolicyArgsForCall(i int) (context.Context, string) { - fake.getAppPolicyMutex.RLock() - defer fake.getAppPolicyMutex.RUnlock() - argsForCall := fake.getAppPolicyArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakePolicyDB) GetAppPolicyReturns(result1 *models.ScalingPolicy, result2 error) { - fake.getAppPolicyMutex.Lock() - defer fake.getAppPolicyMutex.Unlock() - fake.GetAppPolicyStub = nil - fake.getAppPolicyReturns = struct { - result1 *models.ScalingPolicy - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) GetAppPolicyReturnsOnCall(i int, result1 *models.ScalingPolicy, result2 error) { - fake.getAppPolicyMutex.Lock() - defer fake.getAppPolicyMutex.Unlock() - fake.GetAppPolicyStub = nil - if fake.getAppPolicyReturnsOnCall == nil { - fake.getAppPolicyReturnsOnCall = make(map[int]struct { - result1 *models.ScalingPolicy - result2 error - }) - } - fake.getAppPolicyReturnsOnCall[i] = struct { - result1 *models.ScalingPolicy - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) GetCredential(arg1 string) (*models.Credential, error) { - fake.getCredentialMutex.Lock() - ret, specificReturn := fake.getCredentialReturnsOnCall[len(fake.getCredentialArgsForCall)] - fake.getCredentialArgsForCall = append(fake.getCredentialArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.GetCredentialStub - fakeReturns := fake.getCredentialReturns - fake.recordInvocation("GetCredential", []interface{}{arg1}) - fake.getCredentialMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakePolicyDB) GetCredentialCallCount() int { - fake.getCredentialMutex.RLock() - defer fake.getCredentialMutex.RUnlock() - return len(fake.getCredentialArgsForCall) -} - -func (fake *FakePolicyDB) GetCredentialCalls(stub func(string) (*models.Credential, error)) { - fake.getCredentialMutex.Lock() - defer fake.getCredentialMutex.Unlock() - fake.GetCredentialStub = stub -} - -func (fake *FakePolicyDB) GetCredentialArgsForCall(i int) string { - fake.getCredentialMutex.RLock() - defer fake.getCredentialMutex.RUnlock() - argsForCall := fake.getCredentialArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakePolicyDB) GetCredentialReturns(result1 *models.Credential, result2 error) { - fake.getCredentialMutex.Lock() - defer fake.getCredentialMutex.Unlock() - fake.GetCredentialStub = nil - fake.getCredentialReturns = struct { - result1 *models.Credential - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) GetCredentialReturnsOnCall(i int, result1 *models.Credential, result2 error) { - fake.getCredentialMutex.Lock() - defer fake.getCredentialMutex.Unlock() - fake.GetCredentialStub = nil - if fake.getCredentialReturnsOnCall == nil { - fake.getCredentialReturnsOnCall = make(map[int]struct { - result1 *models.Credential - result2 error - }) - } - fake.getCredentialReturnsOnCall[i] = struct { - result1 *models.Credential - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) GetDBStatus() sql.DBStats { - fake.getDBStatusMutex.Lock() - ret, specificReturn := fake.getDBStatusReturnsOnCall[len(fake.getDBStatusArgsForCall)] - fake.getDBStatusArgsForCall = append(fake.getDBStatusArgsForCall, struct { - }{}) - stub := fake.GetDBStatusStub - fakeReturns := fake.getDBStatusReturns - fake.recordInvocation("GetDBStatus", []interface{}{}) - fake.getDBStatusMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakePolicyDB) GetDBStatusCallCount() int { - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - return len(fake.getDBStatusArgsForCall) -} - -func (fake *FakePolicyDB) GetDBStatusCalls(stub func() sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = stub -} - -func (fake *FakePolicyDB) GetDBStatusReturns(result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - fake.getDBStatusReturns = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakePolicyDB) GetDBStatusReturnsOnCall(i int, result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - if fake.getDBStatusReturnsOnCall == nil { - fake.getDBStatusReturnsOnCall = make(map[int]struct { - result1 sql.DBStats - }) - } - fake.getDBStatusReturnsOnCall[i] = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakePolicyDB) Ping() error { - fake.pingMutex.Lock() - ret, specificReturn := fake.pingReturnsOnCall[len(fake.pingArgsForCall)] - fake.pingArgsForCall = append(fake.pingArgsForCall, struct { - }{}) - stub := fake.PingStub - fakeReturns := fake.pingReturns - fake.recordInvocation("Ping", []interface{}{}) - fake.pingMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakePolicyDB) PingCallCount() int { - fake.pingMutex.RLock() - defer fake.pingMutex.RUnlock() - return len(fake.pingArgsForCall) -} - -func (fake *FakePolicyDB) PingCalls(stub func() error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = stub -} - -func (fake *FakePolicyDB) PingReturns(result1 error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = nil - fake.pingReturns = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) PingReturnsOnCall(i int, result1 error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = nil - if fake.pingReturnsOnCall == nil { - fake.pingReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.pingReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) RetrievePolicies() ([]*models.PolicyJson, error) { - fake.retrievePoliciesMutex.Lock() - ret, specificReturn := fake.retrievePoliciesReturnsOnCall[len(fake.retrievePoliciesArgsForCall)] - fake.retrievePoliciesArgsForCall = append(fake.retrievePoliciesArgsForCall, struct { - }{}) - stub := fake.RetrievePoliciesStub - fakeReturns := fake.retrievePoliciesReturns - fake.recordInvocation("RetrievePolicies", []interface{}{}) - fake.retrievePoliciesMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakePolicyDB) RetrievePoliciesCallCount() int { - fake.retrievePoliciesMutex.RLock() - defer fake.retrievePoliciesMutex.RUnlock() - return len(fake.retrievePoliciesArgsForCall) -} - -func (fake *FakePolicyDB) RetrievePoliciesCalls(stub func() ([]*models.PolicyJson, error)) { - fake.retrievePoliciesMutex.Lock() - defer fake.retrievePoliciesMutex.Unlock() - fake.RetrievePoliciesStub = stub -} - -func (fake *FakePolicyDB) RetrievePoliciesReturns(result1 []*models.PolicyJson, result2 error) { - fake.retrievePoliciesMutex.Lock() - defer fake.retrievePoliciesMutex.Unlock() - fake.RetrievePoliciesStub = nil - fake.retrievePoliciesReturns = struct { - result1 []*models.PolicyJson - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) RetrievePoliciesReturnsOnCall(i int, result1 []*models.PolicyJson, result2 error) { - fake.retrievePoliciesMutex.Lock() - defer fake.retrievePoliciesMutex.Unlock() - fake.RetrievePoliciesStub = nil - if fake.retrievePoliciesReturnsOnCall == nil { - fake.retrievePoliciesReturnsOnCall = make(map[int]struct { - result1 []*models.PolicyJson - result2 error - }) - } - fake.retrievePoliciesReturnsOnCall[i] = struct { - result1 []*models.PolicyJson - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) SaveAppPolicy(arg1 context.Context, arg2 string, arg3 *models.ScalingPolicy, arg4 string) error { - fake.saveAppPolicyMutex.Lock() - ret, specificReturn := fake.saveAppPolicyReturnsOnCall[len(fake.saveAppPolicyArgsForCall)] - fake.saveAppPolicyArgsForCall = append(fake.saveAppPolicyArgsForCall, struct { - arg1 context.Context - arg2 string - arg3 *models.ScalingPolicy - arg4 string - }{arg1, arg2, arg3, arg4}) - stub := fake.SaveAppPolicyStub - fakeReturns := fake.saveAppPolicyReturns - fake.recordInvocation("SaveAppPolicy", []interface{}{arg1, arg2, arg3, arg4}) - fake.saveAppPolicyMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakePolicyDB) SaveAppPolicyCallCount() int { - fake.saveAppPolicyMutex.RLock() - defer fake.saveAppPolicyMutex.RUnlock() - return len(fake.saveAppPolicyArgsForCall) -} - -func (fake *FakePolicyDB) SaveAppPolicyCalls(stub func(context.Context, string, *models.ScalingPolicy, string) error) { - fake.saveAppPolicyMutex.Lock() - defer fake.saveAppPolicyMutex.Unlock() - fake.SaveAppPolicyStub = stub -} - -func (fake *FakePolicyDB) SaveAppPolicyArgsForCall(i int) (context.Context, string, *models.ScalingPolicy, string) { - fake.saveAppPolicyMutex.RLock() - defer fake.saveAppPolicyMutex.RUnlock() - argsForCall := fake.saveAppPolicyArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 -} - -func (fake *FakePolicyDB) SaveAppPolicyReturns(result1 error) { - fake.saveAppPolicyMutex.Lock() - defer fake.saveAppPolicyMutex.Unlock() - fake.SaveAppPolicyStub = nil - fake.saveAppPolicyReturns = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) SaveAppPolicyReturnsOnCall(i int, result1 error) { - fake.saveAppPolicyMutex.Lock() - defer fake.saveAppPolicyMutex.Unlock() - fake.SaveAppPolicyStub = nil - if fake.saveAppPolicyReturnsOnCall == nil { - fake.saveAppPolicyReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.saveAppPolicyReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) SaveCredential(arg1 context.Context, arg2 string, arg3 models.Credential) error { - fake.saveCredentialMutex.Lock() - ret, specificReturn := fake.saveCredentialReturnsOnCall[len(fake.saveCredentialArgsForCall)] - fake.saveCredentialArgsForCall = append(fake.saveCredentialArgsForCall, struct { - arg1 context.Context - arg2 string - arg3 models.Credential - }{arg1, arg2, arg3}) - stub := fake.SaveCredentialStub - fakeReturns := fake.saveCredentialReturns - fake.recordInvocation("SaveCredential", []interface{}{arg1, arg2, arg3}) - fake.saveCredentialMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakePolicyDB) SaveCredentialCallCount() int { - fake.saveCredentialMutex.RLock() - defer fake.saveCredentialMutex.RUnlock() - return len(fake.saveCredentialArgsForCall) -} - -func (fake *FakePolicyDB) SaveCredentialCalls(stub func(context.Context, string, models.Credential) error) { - fake.saveCredentialMutex.Lock() - defer fake.saveCredentialMutex.Unlock() - fake.SaveCredentialStub = stub -} - -func (fake *FakePolicyDB) SaveCredentialArgsForCall(i int) (context.Context, string, models.Credential) { - fake.saveCredentialMutex.RLock() - defer fake.saveCredentialMutex.RUnlock() - argsForCall := fake.saveCredentialArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 -} - -func (fake *FakePolicyDB) SaveCredentialReturns(result1 error) { - fake.saveCredentialMutex.Lock() - defer fake.saveCredentialMutex.Unlock() - fake.SaveCredentialStub = nil - fake.saveCredentialReturns = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) SaveCredentialReturnsOnCall(i int, result1 error) { - fake.saveCredentialMutex.Lock() - defer fake.saveCredentialMutex.Unlock() - fake.SaveCredentialStub = nil - if fake.saveCredentialReturnsOnCall == nil { - fake.saveCredentialReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.saveCredentialReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) SetOrUpdateDefaultAppPolicy(arg1 context.Context, arg2 []string, arg3 string, arg4 *models.ScalingPolicy, arg5 string) ([]string, error) { - var arg2Copy []string - if arg2 != nil { - arg2Copy = make([]string, len(arg2)) - copy(arg2Copy, arg2) - } - fake.setOrUpdateDefaultAppPolicyMutex.Lock() - ret, specificReturn := fake.setOrUpdateDefaultAppPolicyReturnsOnCall[len(fake.setOrUpdateDefaultAppPolicyArgsForCall)] - fake.setOrUpdateDefaultAppPolicyArgsForCall = append(fake.setOrUpdateDefaultAppPolicyArgsForCall, struct { - arg1 context.Context - arg2 []string - arg3 string - arg4 *models.ScalingPolicy - arg5 string - }{arg1, arg2Copy, arg3, arg4, arg5}) - stub := fake.SetOrUpdateDefaultAppPolicyStub - fakeReturns := fake.setOrUpdateDefaultAppPolicyReturns - fake.recordInvocation("SetOrUpdateDefaultAppPolicy", []interface{}{arg1, arg2Copy, arg3, arg4, arg5}) - fake.setOrUpdateDefaultAppPolicyMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4, arg5) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakePolicyDB) SetOrUpdateDefaultAppPolicyCallCount() int { - fake.setOrUpdateDefaultAppPolicyMutex.RLock() - defer fake.setOrUpdateDefaultAppPolicyMutex.RUnlock() - return len(fake.setOrUpdateDefaultAppPolicyArgsForCall) -} - -func (fake *FakePolicyDB) SetOrUpdateDefaultAppPolicyCalls(stub func(context.Context, []string, string, *models.ScalingPolicy, string) ([]string, error)) { - fake.setOrUpdateDefaultAppPolicyMutex.Lock() - defer fake.setOrUpdateDefaultAppPolicyMutex.Unlock() - fake.SetOrUpdateDefaultAppPolicyStub = stub -} - -func (fake *FakePolicyDB) SetOrUpdateDefaultAppPolicyArgsForCall(i int) (context.Context, []string, string, *models.ScalingPolicy, string) { - fake.setOrUpdateDefaultAppPolicyMutex.RLock() - defer fake.setOrUpdateDefaultAppPolicyMutex.RUnlock() - argsForCall := fake.setOrUpdateDefaultAppPolicyArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5 -} - -func (fake *FakePolicyDB) SetOrUpdateDefaultAppPolicyReturns(result1 []string, result2 error) { - fake.setOrUpdateDefaultAppPolicyMutex.Lock() - defer fake.setOrUpdateDefaultAppPolicyMutex.Unlock() - fake.SetOrUpdateDefaultAppPolicyStub = nil - fake.setOrUpdateDefaultAppPolicyReturns = struct { - result1 []string - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) SetOrUpdateDefaultAppPolicyReturnsOnCall(i int, result1 []string, result2 error) { - fake.setOrUpdateDefaultAppPolicyMutex.Lock() - defer fake.setOrUpdateDefaultAppPolicyMutex.Unlock() - fake.SetOrUpdateDefaultAppPolicyStub = nil - if fake.setOrUpdateDefaultAppPolicyReturnsOnCall == nil { - fake.setOrUpdateDefaultAppPolicyReturnsOnCall = make(map[int]struct { - result1 []string - result2 error - }) - } - fake.setOrUpdateDefaultAppPolicyReturnsOnCall[i] = struct { - result1 []string - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - fake.deleteCredentialMutex.RLock() - defer fake.deleteCredentialMutex.RUnlock() - fake.deletePoliciesByPolicyGuidMutex.RLock() - defer fake.deletePoliciesByPolicyGuidMutex.RUnlock() - fake.deletePolicyMutex.RLock() - defer fake.deletePolicyMutex.RUnlock() - fake.getAppIdsMutex.RLock() - defer fake.getAppIdsMutex.RUnlock() - fake.getAppPolicyMutex.RLock() - defer fake.getAppPolicyMutex.RUnlock() - fake.getCredentialMutex.RLock() - defer fake.getCredentialMutex.RUnlock() - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - fake.pingMutex.RLock() - defer fake.pingMutex.RUnlock() - fake.retrievePoliciesMutex.RLock() - defer fake.retrievePoliciesMutex.RUnlock() - fake.saveAppPolicyMutex.RLock() - defer fake.saveAppPolicyMutex.RUnlock() - fake.saveCredentialMutex.RLock() - defer fake.saveCredentialMutex.RUnlock() - fake.setOrUpdateDefaultAppPolicyMutex.RLock() - defer fake.setOrUpdateDefaultAppPolicyMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakePolicyDB) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ db.PolicyDB = new(FakePolicyDB) diff --git a/src/autoscaler/fakes/fake_ratelimiter.go b/src/autoscaler/fakes/fake_ratelimiter.go deleted file mode 100644 index 81567648c2..0000000000 --- a/src/autoscaler/fakes/fake_ratelimiter.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/ratelimiter" - "sync" -) - -type FakeLimiter struct { - ExceedsLimitStub func(string) bool - exceedsLimitMutex sync.RWMutex - exceedsLimitArgsForCall []struct { - arg1 string - } - exceedsLimitReturns struct { - result1 bool - } - exceedsLimitReturnsOnCall map[int]struct { - result1 bool - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeLimiter) ExceedsLimit(arg1 string) bool { - fake.exceedsLimitMutex.Lock() - ret, specificReturn := fake.exceedsLimitReturnsOnCall[len(fake.exceedsLimitArgsForCall)] - fake.exceedsLimitArgsForCall = append(fake.exceedsLimitArgsForCall, struct { - arg1 string - }{arg1}) - fake.recordInvocation("ExceedsLimit", []interface{}{arg1}) - fake.exceedsLimitMutex.Unlock() - if fake.ExceedsLimitStub != nil { - return fake.ExceedsLimitStub(arg1) - } - if specificReturn { - return ret.result1 - } - return fake.exceedsLimitReturns.result1 -} - -func (fake *FakeLimiter) ExceedsLimitCallCount() int { - fake.exceedsLimitMutex.RLock() - defer fake.exceedsLimitMutex.RUnlock() - return len(fake.exceedsLimitArgsForCall) -} - -func (fake *FakeLimiter) ExceedsLimitArgsForCall(i int) string { - fake.exceedsLimitMutex.RLock() - defer fake.exceedsLimitMutex.RUnlock() - return fake.exceedsLimitArgsForCall[i].arg1 -} - -func (fake *FakeLimiter) ExceedsLimitReturns(result1 bool) { - fake.ExceedsLimitStub = nil - fake.exceedsLimitReturns = struct { - result1 bool - }{result1} -} - -func (fake *FakeLimiter) ExceedsLimitReturnsOnCall(i int, result1 bool) { - fake.ExceedsLimitStub = nil - if fake.exceedsLimitReturnsOnCall == nil { - fake.exceedsLimitReturnsOnCall = make(map[int]struct { - result1 bool - }) - } - fake.exceedsLimitReturnsOnCall[i] = struct { - result1 bool - }{result1} -} - -func (fake *FakeLimiter) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.exceedsLimitMutex.RLock() - defer fake.exceedsLimitMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeLimiter) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ ratelimiter.Limiter = new(FakeLimiter) diff --git a/src/autoscaler/fakes/fake_scalingengine.go b/src/autoscaler/fakes/fake_scalingengine.go deleted file mode 100644 index 0606a264ca..0000000000 --- a/src/autoscaler/fakes/fake_scalingengine.go +++ /dev/null @@ -1,352 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/scalingengine" -) - -type FakeScalingEngine struct { - ComputeNewInstancesStub func(int, string) (int, error) - computeNewInstancesMutex sync.RWMutex - computeNewInstancesArgsForCall []struct { - arg1 int - arg2 string - } - computeNewInstancesReturns struct { - result1 int - result2 error - } - computeNewInstancesReturnsOnCall map[int]struct { - result1 int - result2 error - } - RemoveActiveScheduleStub func(string, string) error - removeActiveScheduleMutex sync.RWMutex - removeActiveScheduleArgsForCall []struct { - arg1 string - arg2 string - } - removeActiveScheduleReturns struct { - result1 error - } - removeActiveScheduleReturnsOnCall map[int]struct { - result1 error - } - ScaleStub func(string, *models.Trigger) (*models.AppScalingResult, error) - scaleMutex sync.RWMutex - scaleArgsForCall []struct { - arg1 string - arg2 *models.Trigger - } - scaleReturns struct { - result1 *models.AppScalingResult - result2 error - } - scaleReturnsOnCall map[int]struct { - result1 *models.AppScalingResult - result2 error - } - SetActiveScheduleStub func(string, *models.ActiveSchedule) error - setActiveScheduleMutex sync.RWMutex - setActiveScheduleArgsForCall []struct { - arg1 string - arg2 *models.ActiveSchedule - } - setActiveScheduleReturns struct { - result1 error - } - setActiveScheduleReturnsOnCall map[int]struct { - result1 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeScalingEngine) ComputeNewInstances(arg1 int, arg2 string) (int, error) { - fake.computeNewInstancesMutex.Lock() - ret, specificReturn := fake.computeNewInstancesReturnsOnCall[len(fake.computeNewInstancesArgsForCall)] - fake.computeNewInstancesArgsForCall = append(fake.computeNewInstancesArgsForCall, struct { - arg1 int - arg2 string - }{arg1, arg2}) - stub := fake.ComputeNewInstancesStub - fakeReturns := fake.computeNewInstancesReturns - fake.recordInvocation("ComputeNewInstances", []interface{}{arg1, arg2}) - fake.computeNewInstancesMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeScalingEngine) ComputeNewInstancesCallCount() int { - fake.computeNewInstancesMutex.RLock() - defer fake.computeNewInstancesMutex.RUnlock() - return len(fake.computeNewInstancesArgsForCall) -} - -func (fake *FakeScalingEngine) ComputeNewInstancesCalls(stub func(int, string) (int, error)) { - fake.computeNewInstancesMutex.Lock() - defer fake.computeNewInstancesMutex.Unlock() - fake.ComputeNewInstancesStub = stub -} - -func (fake *FakeScalingEngine) ComputeNewInstancesArgsForCall(i int) (int, string) { - fake.computeNewInstancesMutex.RLock() - defer fake.computeNewInstancesMutex.RUnlock() - argsForCall := fake.computeNewInstancesArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeScalingEngine) ComputeNewInstancesReturns(result1 int, result2 error) { - fake.computeNewInstancesMutex.Lock() - defer fake.computeNewInstancesMutex.Unlock() - fake.ComputeNewInstancesStub = nil - fake.computeNewInstancesReturns = struct { - result1 int - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngine) ComputeNewInstancesReturnsOnCall(i int, result1 int, result2 error) { - fake.computeNewInstancesMutex.Lock() - defer fake.computeNewInstancesMutex.Unlock() - fake.ComputeNewInstancesStub = nil - if fake.computeNewInstancesReturnsOnCall == nil { - fake.computeNewInstancesReturnsOnCall = make(map[int]struct { - result1 int - result2 error - }) - } - fake.computeNewInstancesReturnsOnCall[i] = struct { - result1 int - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngine) RemoveActiveSchedule(arg1 string, arg2 string) error { - fake.removeActiveScheduleMutex.Lock() - ret, specificReturn := fake.removeActiveScheduleReturnsOnCall[len(fake.removeActiveScheduleArgsForCall)] - fake.removeActiveScheduleArgsForCall = append(fake.removeActiveScheduleArgsForCall, struct { - arg1 string - arg2 string - }{arg1, arg2}) - stub := fake.RemoveActiveScheduleStub - fakeReturns := fake.removeActiveScheduleReturns - fake.recordInvocation("RemoveActiveSchedule", []interface{}{arg1, arg2}) - fake.removeActiveScheduleMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeScalingEngine) RemoveActiveScheduleCallCount() int { - fake.removeActiveScheduleMutex.RLock() - defer fake.removeActiveScheduleMutex.RUnlock() - return len(fake.removeActiveScheduleArgsForCall) -} - -func (fake *FakeScalingEngine) RemoveActiveScheduleCalls(stub func(string, string) error) { - fake.removeActiveScheduleMutex.Lock() - defer fake.removeActiveScheduleMutex.Unlock() - fake.RemoveActiveScheduleStub = stub -} - -func (fake *FakeScalingEngine) RemoveActiveScheduleArgsForCall(i int) (string, string) { - fake.removeActiveScheduleMutex.RLock() - defer fake.removeActiveScheduleMutex.RUnlock() - argsForCall := fake.removeActiveScheduleArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeScalingEngine) RemoveActiveScheduleReturns(result1 error) { - fake.removeActiveScheduleMutex.Lock() - defer fake.removeActiveScheduleMutex.Unlock() - fake.RemoveActiveScheduleStub = nil - fake.removeActiveScheduleReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngine) RemoveActiveScheduleReturnsOnCall(i int, result1 error) { - fake.removeActiveScheduleMutex.Lock() - defer fake.removeActiveScheduleMutex.Unlock() - fake.RemoveActiveScheduleStub = nil - if fake.removeActiveScheduleReturnsOnCall == nil { - fake.removeActiveScheduleReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.removeActiveScheduleReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngine) Scale(arg1 string, arg2 *models.Trigger) (*models.AppScalingResult, error) { - fake.scaleMutex.Lock() - ret, specificReturn := fake.scaleReturnsOnCall[len(fake.scaleArgsForCall)] - fake.scaleArgsForCall = append(fake.scaleArgsForCall, struct { - arg1 string - arg2 *models.Trigger - }{arg1, arg2}) - stub := fake.ScaleStub - fakeReturns := fake.scaleReturns - fake.recordInvocation("Scale", []interface{}{arg1, arg2}) - fake.scaleMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeScalingEngine) ScaleCallCount() int { - fake.scaleMutex.RLock() - defer fake.scaleMutex.RUnlock() - return len(fake.scaleArgsForCall) -} - -func (fake *FakeScalingEngine) ScaleCalls(stub func(string, *models.Trigger) (*models.AppScalingResult, error)) { - fake.scaleMutex.Lock() - defer fake.scaleMutex.Unlock() - fake.ScaleStub = stub -} - -func (fake *FakeScalingEngine) ScaleArgsForCall(i int) (string, *models.Trigger) { - fake.scaleMutex.RLock() - defer fake.scaleMutex.RUnlock() - argsForCall := fake.scaleArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeScalingEngine) ScaleReturns(result1 *models.AppScalingResult, result2 error) { - fake.scaleMutex.Lock() - defer fake.scaleMutex.Unlock() - fake.ScaleStub = nil - fake.scaleReturns = struct { - result1 *models.AppScalingResult - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngine) ScaleReturnsOnCall(i int, result1 *models.AppScalingResult, result2 error) { - fake.scaleMutex.Lock() - defer fake.scaleMutex.Unlock() - fake.ScaleStub = nil - if fake.scaleReturnsOnCall == nil { - fake.scaleReturnsOnCall = make(map[int]struct { - result1 *models.AppScalingResult - result2 error - }) - } - fake.scaleReturnsOnCall[i] = struct { - result1 *models.AppScalingResult - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngine) SetActiveSchedule(arg1 string, arg2 *models.ActiveSchedule) error { - fake.setActiveScheduleMutex.Lock() - ret, specificReturn := fake.setActiveScheduleReturnsOnCall[len(fake.setActiveScheduleArgsForCall)] - fake.setActiveScheduleArgsForCall = append(fake.setActiveScheduleArgsForCall, struct { - arg1 string - arg2 *models.ActiveSchedule - }{arg1, arg2}) - stub := fake.SetActiveScheduleStub - fakeReturns := fake.setActiveScheduleReturns - fake.recordInvocation("SetActiveSchedule", []interface{}{arg1, arg2}) - fake.setActiveScheduleMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeScalingEngine) SetActiveScheduleCallCount() int { - fake.setActiveScheduleMutex.RLock() - defer fake.setActiveScheduleMutex.RUnlock() - return len(fake.setActiveScheduleArgsForCall) -} - -func (fake *FakeScalingEngine) SetActiveScheduleCalls(stub func(string, *models.ActiveSchedule) error) { - fake.setActiveScheduleMutex.Lock() - defer fake.setActiveScheduleMutex.Unlock() - fake.SetActiveScheduleStub = stub -} - -func (fake *FakeScalingEngine) SetActiveScheduleArgsForCall(i int) (string, *models.ActiveSchedule) { - fake.setActiveScheduleMutex.RLock() - defer fake.setActiveScheduleMutex.RUnlock() - argsForCall := fake.setActiveScheduleArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeScalingEngine) SetActiveScheduleReturns(result1 error) { - fake.setActiveScheduleMutex.Lock() - defer fake.setActiveScheduleMutex.Unlock() - fake.SetActiveScheduleStub = nil - fake.setActiveScheduleReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngine) SetActiveScheduleReturnsOnCall(i int, result1 error) { - fake.setActiveScheduleMutex.Lock() - defer fake.setActiveScheduleMutex.Unlock() - fake.SetActiveScheduleStub = nil - if fake.setActiveScheduleReturnsOnCall == nil { - fake.setActiveScheduleReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.setActiveScheduleReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngine) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.computeNewInstancesMutex.RLock() - defer fake.computeNewInstancesMutex.RUnlock() - fake.removeActiveScheduleMutex.RLock() - defer fake.removeActiveScheduleMutex.RUnlock() - fake.scaleMutex.RLock() - defer fake.scaleMutex.RUnlock() - fake.setActiveScheduleMutex.RLock() - defer fake.setActiveScheduleMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeScalingEngine) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ scalingengine.ScalingEngine = new(FakeScalingEngine) diff --git a/src/autoscaler/fakes/fake_scalingengine_db.go b/src/autoscaler/fakes/fake_scalingengine_db.go deleted file mode 100644 index ea57c5964f..0000000000 --- a/src/autoscaler/fakes/fake_scalingengine_db.go +++ /dev/null @@ -1,863 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "database/sql" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/db" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakeScalingEngineDB struct { - CanScaleAppStub func(string) (bool, int64, error) - canScaleAppMutex sync.RWMutex - canScaleAppArgsForCall []struct { - arg1 string - } - canScaleAppReturns struct { - result1 bool - result2 int64 - result3 error - } - canScaleAppReturnsOnCall map[int]struct { - result1 bool - result2 int64 - result3 error - } - CloseStub func() error - closeMutex sync.RWMutex - closeArgsForCall []struct { - } - closeReturns struct { - result1 error - } - closeReturnsOnCall map[int]struct { - result1 error - } - GetActiveScheduleStub func(string) (*models.ActiveSchedule, error) - getActiveScheduleMutex sync.RWMutex - getActiveScheduleArgsForCall []struct { - arg1 string - } - getActiveScheduleReturns struct { - result1 *models.ActiveSchedule - result2 error - } - getActiveScheduleReturnsOnCall map[int]struct { - result1 *models.ActiveSchedule - result2 error - } - GetActiveSchedulesStub func() (map[string]string, error) - getActiveSchedulesMutex sync.RWMutex - getActiveSchedulesArgsForCall []struct { - } - getActiveSchedulesReturns struct { - result1 map[string]string - result2 error - } - getActiveSchedulesReturnsOnCall map[int]struct { - result1 map[string]string - result2 error - } - GetDBStatusStub func() sql.DBStats - getDBStatusMutex sync.RWMutex - getDBStatusArgsForCall []struct { - } - getDBStatusReturns struct { - result1 sql.DBStats - } - getDBStatusReturnsOnCall map[int]struct { - result1 sql.DBStats - } - PruneScalingHistoriesStub func(int64) error - pruneScalingHistoriesMutex sync.RWMutex - pruneScalingHistoriesArgsForCall []struct { - arg1 int64 - } - pruneScalingHistoriesReturns struct { - result1 error - } - pruneScalingHistoriesReturnsOnCall map[int]struct { - result1 error - } - RemoveActiveScheduleStub func(string) error - removeActiveScheduleMutex sync.RWMutex - removeActiveScheduleArgsForCall []struct { - arg1 string - } - removeActiveScheduleReturns struct { - result1 error - } - removeActiveScheduleReturnsOnCall map[int]struct { - result1 error - } - RetrieveScalingHistoriesStub func(string, int64, int64, db.OrderType, bool) ([]*models.AppScalingHistory, error) - retrieveScalingHistoriesMutex sync.RWMutex - retrieveScalingHistoriesArgsForCall []struct { - arg1 string - arg2 int64 - arg3 int64 - arg4 db.OrderType - arg5 bool - } - retrieveScalingHistoriesReturns struct { - result1 []*models.AppScalingHistory - result2 error - } - retrieveScalingHistoriesReturnsOnCall map[int]struct { - result1 []*models.AppScalingHistory - result2 error - } - SaveScalingHistoryStub func(*models.AppScalingHistory) error - saveScalingHistoryMutex sync.RWMutex - saveScalingHistoryArgsForCall []struct { - arg1 *models.AppScalingHistory - } - saveScalingHistoryReturns struct { - result1 error - } - saveScalingHistoryReturnsOnCall map[int]struct { - result1 error - } - SetActiveScheduleStub func(string, *models.ActiveSchedule) error - setActiveScheduleMutex sync.RWMutex - setActiveScheduleArgsForCall []struct { - arg1 string - arg2 *models.ActiveSchedule - } - setActiveScheduleReturns struct { - result1 error - } - setActiveScheduleReturnsOnCall map[int]struct { - result1 error - } - UpdateScalingCooldownExpireTimeStub func(string, int64) error - updateScalingCooldownExpireTimeMutex sync.RWMutex - updateScalingCooldownExpireTimeArgsForCall []struct { - arg1 string - arg2 int64 - } - updateScalingCooldownExpireTimeReturns struct { - result1 error - } - updateScalingCooldownExpireTimeReturnsOnCall map[int]struct { - result1 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeScalingEngineDB) CanScaleApp(arg1 string) (bool, int64, error) { - fake.canScaleAppMutex.Lock() - ret, specificReturn := fake.canScaleAppReturnsOnCall[len(fake.canScaleAppArgsForCall)] - fake.canScaleAppArgsForCall = append(fake.canScaleAppArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.CanScaleAppStub - fakeReturns := fake.canScaleAppReturns - fake.recordInvocation("CanScaleApp", []interface{}{arg1}) - fake.canScaleAppMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2, ret.result3 - } - return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 -} - -func (fake *FakeScalingEngineDB) CanScaleAppCallCount() int { - fake.canScaleAppMutex.RLock() - defer fake.canScaleAppMutex.RUnlock() - return len(fake.canScaleAppArgsForCall) -} - -func (fake *FakeScalingEngineDB) CanScaleAppCalls(stub func(string) (bool, int64, error)) { - fake.canScaleAppMutex.Lock() - defer fake.canScaleAppMutex.Unlock() - fake.CanScaleAppStub = stub -} - -func (fake *FakeScalingEngineDB) CanScaleAppArgsForCall(i int) string { - fake.canScaleAppMutex.RLock() - defer fake.canScaleAppMutex.RUnlock() - argsForCall := fake.canScaleAppArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeScalingEngineDB) CanScaleAppReturns(result1 bool, result2 int64, result3 error) { - fake.canScaleAppMutex.Lock() - defer fake.canScaleAppMutex.Unlock() - fake.CanScaleAppStub = nil - fake.canScaleAppReturns = struct { - result1 bool - result2 int64 - result3 error - }{result1, result2, result3} -} - -func (fake *FakeScalingEngineDB) CanScaleAppReturnsOnCall(i int, result1 bool, result2 int64, result3 error) { - fake.canScaleAppMutex.Lock() - defer fake.canScaleAppMutex.Unlock() - fake.CanScaleAppStub = nil - if fake.canScaleAppReturnsOnCall == nil { - fake.canScaleAppReturnsOnCall = make(map[int]struct { - result1 bool - result2 int64 - result3 error - }) - } - fake.canScaleAppReturnsOnCall[i] = struct { - result1 bool - result2 int64 - result3 error - }{result1, result2, result3} -} - -func (fake *FakeScalingEngineDB) Close() error { - fake.closeMutex.Lock() - ret, specificReturn := fake.closeReturnsOnCall[len(fake.closeArgsForCall)] - fake.closeArgsForCall = append(fake.closeArgsForCall, struct { - }{}) - stub := fake.CloseStub - fakeReturns := fake.closeReturns - fake.recordInvocation("Close", []interface{}{}) - fake.closeMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeScalingEngineDB) CloseCallCount() int { - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return len(fake.closeArgsForCall) -} - -func (fake *FakeScalingEngineDB) CloseCalls(stub func() error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = stub -} - -func (fake *FakeScalingEngineDB) CloseReturns(result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - fake.closeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) CloseReturnsOnCall(i int, result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - if fake.closeReturnsOnCall == nil { - fake.closeReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.closeReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) GetActiveSchedule(arg1 string) (*models.ActiveSchedule, error) { - fake.getActiveScheduleMutex.Lock() - ret, specificReturn := fake.getActiveScheduleReturnsOnCall[len(fake.getActiveScheduleArgsForCall)] - fake.getActiveScheduleArgsForCall = append(fake.getActiveScheduleArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.GetActiveScheduleStub - fakeReturns := fake.getActiveScheduleReturns - fake.recordInvocation("GetActiveSchedule", []interface{}{arg1}) - fake.getActiveScheduleMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeScalingEngineDB) GetActiveScheduleCallCount() int { - fake.getActiveScheduleMutex.RLock() - defer fake.getActiveScheduleMutex.RUnlock() - return len(fake.getActiveScheduleArgsForCall) -} - -func (fake *FakeScalingEngineDB) GetActiveScheduleCalls(stub func(string) (*models.ActiveSchedule, error)) { - fake.getActiveScheduleMutex.Lock() - defer fake.getActiveScheduleMutex.Unlock() - fake.GetActiveScheduleStub = stub -} - -func (fake *FakeScalingEngineDB) GetActiveScheduleArgsForCall(i int) string { - fake.getActiveScheduleMutex.RLock() - defer fake.getActiveScheduleMutex.RUnlock() - argsForCall := fake.getActiveScheduleArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeScalingEngineDB) GetActiveScheduleReturns(result1 *models.ActiveSchedule, result2 error) { - fake.getActiveScheduleMutex.Lock() - defer fake.getActiveScheduleMutex.Unlock() - fake.GetActiveScheduleStub = nil - fake.getActiveScheduleReturns = struct { - result1 *models.ActiveSchedule - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngineDB) GetActiveScheduleReturnsOnCall(i int, result1 *models.ActiveSchedule, result2 error) { - fake.getActiveScheduleMutex.Lock() - defer fake.getActiveScheduleMutex.Unlock() - fake.GetActiveScheduleStub = nil - if fake.getActiveScheduleReturnsOnCall == nil { - fake.getActiveScheduleReturnsOnCall = make(map[int]struct { - result1 *models.ActiveSchedule - result2 error - }) - } - fake.getActiveScheduleReturnsOnCall[i] = struct { - result1 *models.ActiveSchedule - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngineDB) GetActiveSchedules() (map[string]string, error) { - fake.getActiveSchedulesMutex.Lock() - ret, specificReturn := fake.getActiveSchedulesReturnsOnCall[len(fake.getActiveSchedulesArgsForCall)] - fake.getActiveSchedulesArgsForCall = append(fake.getActiveSchedulesArgsForCall, struct { - }{}) - stub := fake.GetActiveSchedulesStub - fakeReturns := fake.getActiveSchedulesReturns - fake.recordInvocation("GetActiveSchedules", []interface{}{}) - fake.getActiveSchedulesMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeScalingEngineDB) GetActiveSchedulesCallCount() int { - fake.getActiveSchedulesMutex.RLock() - defer fake.getActiveSchedulesMutex.RUnlock() - return len(fake.getActiveSchedulesArgsForCall) -} - -func (fake *FakeScalingEngineDB) GetActiveSchedulesCalls(stub func() (map[string]string, error)) { - fake.getActiveSchedulesMutex.Lock() - defer fake.getActiveSchedulesMutex.Unlock() - fake.GetActiveSchedulesStub = stub -} - -func (fake *FakeScalingEngineDB) GetActiveSchedulesReturns(result1 map[string]string, result2 error) { - fake.getActiveSchedulesMutex.Lock() - defer fake.getActiveSchedulesMutex.Unlock() - fake.GetActiveSchedulesStub = nil - fake.getActiveSchedulesReturns = struct { - result1 map[string]string - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngineDB) GetActiveSchedulesReturnsOnCall(i int, result1 map[string]string, result2 error) { - fake.getActiveSchedulesMutex.Lock() - defer fake.getActiveSchedulesMutex.Unlock() - fake.GetActiveSchedulesStub = nil - if fake.getActiveSchedulesReturnsOnCall == nil { - fake.getActiveSchedulesReturnsOnCall = make(map[int]struct { - result1 map[string]string - result2 error - }) - } - fake.getActiveSchedulesReturnsOnCall[i] = struct { - result1 map[string]string - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngineDB) GetDBStatus() sql.DBStats { - fake.getDBStatusMutex.Lock() - ret, specificReturn := fake.getDBStatusReturnsOnCall[len(fake.getDBStatusArgsForCall)] - fake.getDBStatusArgsForCall = append(fake.getDBStatusArgsForCall, struct { - }{}) - stub := fake.GetDBStatusStub - fakeReturns := fake.getDBStatusReturns - fake.recordInvocation("GetDBStatus", []interface{}{}) - fake.getDBStatusMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeScalingEngineDB) GetDBStatusCallCount() int { - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - return len(fake.getDBStatusArgsForCall) -} - -func (fake *FakeScalingEngineDB) GetDBStatusCalls(stub func() sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = stub -} - -func (fake *FakeScalingEngineDB) GetDBStatusReturns(result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - fake.getDBStatusReturns = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeScalingEngineDB) GetDBStatusReturnsOnCall(i int, result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - if fake.getDBStatusReturnsOnCall == nil { - fake.getDBStatusReturnsOnCall = make(map[int]struct { - result1 sql.DBStats - }) - } - fake.getDBStatusReturnsOnCall[i] = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeScalingEngineDB) PruneScalingHistories(arg1 int64) error { - fake.pruneScalingHistoriesMutex.Lock() - ret, specificReturn := fake.pruneScalingHistoriesReturnsOnCall[len(fake.pruneScalingHistoriesArgsForCall)] - fake.pruneScalingHistoriesArgsForCall = append(fake.pruneScalingHistoriesArgsForCall, struct { - arg1 int64 - }{arg1}) - stub := fake.PruneScalingHistoriesStub - fakeReturns := fake.pruneScalingHistoriesReturns - fake.recordInvocation("PruneScalingHistories", []interface{}{arg1}) - fake.pruneScalingHistoriesMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeScalingEngineDB) PruneScalingHistoriesCallCount() int { - fake.pruneScalingHistoriesMutex.RLock() - defer fake.pruneScalingHistoriesMutex.RUnlock() - return len(fake.pruneScalingHistoriesArgsForCall) -} - -func (fake *FakeScalingEngineDB) PruneScalingHistoriesCalls(stub func(int64) error) { - fake.pruneScalingHistoriesMutex.Lock() - defer fake.pruneScalingHistoriesMutex.Unlock() - fake.PruneScalingHistoriesStub = stub -} - -func (fake *FakeScalingEngineDB) PruneScalingHistoriesArgsForCall(i int) int64 { - fake.pruneScalingHistoriesMutex.RLock() - defer fake.pruneScalingHistoriesMutex.RUnlock() - argsForCall := fake.pruneScalingHistoriesArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeScalingEngineDB) PruneScalingHistoriesReturns(result1 error) { - fake.pruneScalingHistoriesMutex.Lock() - defer fake.pruneScalingHistoriesMutex.Unlock() - fake.PruneScalingHistoriesStub = nil - fake.pruneScalingHistoriesReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) PruneScalingHistoriesReturnsOnCall(i int, result1 error) { - fake.pruneScalingHistoriesMutex.Lock() - defer fake.pruneScalingHistoriesMutex.Unlock() - fake.PruneScalingHistoriesStub = nil - if fake.pruneScalingHistoriesReturnsOnCall == nil { - fake.pruneScalingHistoriesReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.pruneScalingHistoriesReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) RemoveActiveSchedule(arg1 string) error { - fake.removeActiveScheduleMutex.Lock() - ret, specificReturn := fake.removeActiveScheduleReturnsOnCall[len(fake.removeActiveScheduleArgsForCall)] - fake.removeActiveScheduleArgsForCall = append(fake.removeActiveScheduleArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.RemoveActiveScheduleStub - fakeReturns := fake.removeActiveScheduleReturns - fake.recordInvocation("RemoveActiveSchedule", []interface{}{arg1}) - fake.removeActiveScheduleMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeScalingEngineDB) RemoveActiveScheduleCallCount() int { - fake.removeActiveScheduleMutex.RLock() - defer fake.removeActiveScheduleMutex.RUnlock() - return len(fake.removeActiveScheduleArgsForCall) -} - -func (fake *FakeScalingEngineDB) RemoveActiveScheduleCalls(stub func(string) error) { - fake.removeActiveScheduleMutex.Lock() - defer fake.removeActiveScheduleMutex.Unlock() - fake.RemoveActiveScheduleStub = stub -} - -func (fake *FakeScalingEngineDB) RemoveActiveScheduleArgsForCall(i int) string { - fake.removeActiveScheduleMutex.RLock() - defer fake.removeActiveScheduleMutex.RUnlock() - argsForCall := fake.removeActiveScheduleArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeScalingEngineDB) RemoveActiveScheduleReturns(result1 error) { - fake.removeActiveScheduleMutex.Lock() - defer fake.removeActiveScheduleMutex.Unlock() - fake.RemoveActiveScheduleStub = nil - fake.removeActiveScheduleReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) RemoveActiveScheduleReturnsOnCall(i int, result1 error) { - fake.removeActiveScheduleMutex.Lock() - defer fake.removeActiveScheduleMutex.Unlock() - fake.RemoveActiveScheduleStub = nil - if fake.removeActiveScheduleReturnsOnCall == nil { - fake.removeActiveScheduleReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.removeActiveScheduleReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) RetrieveScalingHistories(arg1 string, arg2 int64, arg3 int64, arg4 db.OrderType, arg5 bool) ([]*models.AppScalingHistory, error) { - fake.retrieveScalingHistoriesMutex.Lock() - ret, specificReturn := fake.retrieveScalingHistoriesReturnsOnCall[len(fake.retrieveScalingHistoriesArgsForCall)] - fake.retrieveScalingHistoriesArgsForCall = append(fake.retrieveScalingHistoriesArgsForCall, struct { - arg1 string - arg2 int64 - arg3 int64 - arg4 db.OrderType - arg5 bool - }{arg1, arg2, arg3, arg4, arg5}) - stub := fake.RetrieveScalingHistoriesStub - fakeReturns := fake.retrieveScalingHistoriesReturns - fake.recordInvocation("RetrieveScalingHistories", []interface{}{arg1, arg2, arg3, arg4, arg5}) - fake.retrieveScalingHistoriesMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4, arg5) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeScalingEngineDB) RetrieveScalingHistoriesCallCount() int { - fake.retrieveScalingHistoriesMutex.RLock() - defer fake.retrieveScalingHistoriesMutex.RUnlock() - return len(fake.retrieveScalingHistoriesArgsForCall) -} - -func (fake *FakeScalingEngineDB) RetrieveScalingHistoriesCalls(stub func(string, int64, int64, db.OrderType, bool) ([]*models.AppScalingHistory, error)) { - fake.retrieveScalingHistoriesMutex.Lock() - defer fake.retrieveScalingHistoriesMutex.Unlock() - fake.RetrieveScalingHistoriesStub = stub -} - -func (fake *FakeScalingEngineDB) RetrieveScalingHistoriesArgsForCall(i int) (string, int64, int64, db.OrderType, bool) { - fake.retrieveScalingHistoriesMutex.RLock() - defer fake.retrieveScalingHistoriesMutex.RUnlock() - argsForCall := fake.retrieveScalingHistoriesArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5 -} - -func (fake *FakeScalingEngineDB) RetrieveScalingHistoriesReturns(result1 []*models.AppScalingHistory, result2 error) { - fake.retrieveScalingHistoriesMutex.Lock() - defer fake.retrieveScalingHistoriesMutex.Unlock() - fake.RetrieveScalingHistoriesStub = nil - fake.retrieveScalingHistoriesReturns = struct { - result1 []*models.AppScalingHistory - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngineDB) RetrieveScalingHistoriesReturnsOnCall(i int, result1 []*models.AppScalingHistory, result2 error) { - fake.retrieveScalingHistoriesMutex.Lock() - defer fake.retrieveScalingHistoriesMutex.Unlock() - fake.RetrieveScalingHistoriesStub = nil - if fake.retrieveScalingHistoriesReturnsOnCall == nil { - fake.retrieveScalingHistoriesReturnsOnCall = make(map[int]struct { - result1 []*models.AppScalingHistory - result2 error - }) - } - fake.retrieveScalingHistoriesReturnsOnCall[i] = struct { - result1 []*models.AppScalingHistory - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngineDB) SaveScalingHistory(arg1 *models.AppScalingHistory) error { - fake.saveScalingHistoryMutex.Lock() - ret, specificReturn := fake.saveScalingHistoryReturnsOnCall[len(fake.saveScalingHistoryArgsForCall)] - fake.saveScalingHistoryArgsForCall = append(fake.saveScalingHistoryArgsForCall, struct { - arg1 *models.AppScalingHistory - }{arg1}) - stub := fake.SaveScalingHistoryStub - fakeReturns := fake.saveScalingHistoryReturns - fake.recordInvocation("SaveScalingHistory", []interface{}{arg1}) - fake.saveScalingHistoryMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeScalingEngineDB) SaveScalingHistoryCallCount() int { - fake.saveScalingHistoryMutex.RLock() - defer fake.saveScalingHistoryMutex.RUnlock() - return len(fake.saveScalingHistoryArgsForCall) -} - -func (fake *FakeScalingEngineDB) SaveScalingHistoryCalls(stub func(*models.AppScalingHistory) error) { - fake.saveScalingHistoryMutex.Lock() - defer fake.saveScalingHistoryMutex.Unlock() - fake.SaveScalingHistoryStub = stub -} - -func (fake *FakeScalingEngineDB) SaveScalingHistoryArgsForCall(i int) *models.AppScalingHistory { - fake.saveScalingHistoryMutex.RLock() - defer fake.saveScalingHistoryMutex.RUnlock() - argsForCall := fake.saveScalingHistoryArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeScalingEngineDB) SaveScalingHistoryReturns(result1 error) { - fake.saveScalingHistoryMutex.Lock() - defer fake.saveScalingHistoryMutex.Unlock() - fake.SaveScalingHistoryStub = nil - fake.saveScalingHistoryReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) SaveScalingHistoryReturnsOnCall(i int, result1 error) { - fake.saveScalingHistoryMutex.Lock() - defer fake.saveScalingHistoryMutex.Unlock() - fake.SaveScalingHistoryStub = nil - if fake.saveScalingHistoryReturnsOnCall == nil { - fake.saveScalingHistoryReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.saveScalingHistoryReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) SetActiveSchedule(arg1 string, arg2 *models.ActiveSchedule) error { - fake.setActiveScheduleMutex.Lock() - ret, specificReturn := fake.setActiveScheduleReturnsOnCall[len(fake.setActiveScheduleArgsForCall)] - fake.setActiveScheduleArgsForCall = append(fake.setActiveScheduleArgsForCall, struct { - arg1 string - arg2 *models.ActiveSchedule - }{arg1, arg2}) - stub := fake.SetActiveScheduleStub - fakeReturns := fake.setActiveScheduleReturns - fake.recordInvocation("SetActiveSchedule", []interface{}{arg1, arg2}) - fake.setActiveScheduleMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeScalingEngineDB) SetActiveScheduleCallCount() int { - fake.setActiveScheduleMutex.RLock() - defer fake.setActiveScheduleMutex.RUnlock() - return len(fake.setActiveScheduleArgsForCall) -} - -func (fake *FakeScalingEngineDB) SetActiveScheduleCalls(stub func(string, *models.ActiveSchedule) error) { - fake.setActiveScheduleMutex.Lock() - defer fake.setActiveScheduleMutex.Unlock() - fake.SetActiveScheduleStub = stub -} - -func (fake *FakeScalingEngineDB) SetActiveScheduleArgsForCall(i int) (string, *models.ActiveSchedule) { - fake.setActiveScheduleMutex.RLock() - defer fake.setActiveScheduleMutex.RUnlock() - argsForCall := fake.setActiveScheduleArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeScalingEngineDB) SetActiveScheduleReturns(result1 error) { - fake.setActiveScheduleMutex.Lock() - defer fake.setActiveScheduleMutex.Unlock() - fake.SetActiveScheduleStub = nil - fake.setActiveScheduleReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) SetActiveScheduleReturnsOnCall(i int, result1 error) { - fake.setActiveScheduleMutex.Lock() - defer fake.setActiveScheduleMutex.Unlock() - fake.SetActiveScheduleStub = nil - if fake.setActiveScheduleReturnsOnCall == nil { - fake.setActiveScheduleReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.setActiveScheduleReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) UpdateScalingCooldownExpireTime(arg1 string, arg2 int64) error { - fake.updateScalingCooldownExpireTimeMutex.Lock() - ret, specificReturn := fake.updateScalingCooldownExpireTimeReturnsOnCall[len(fake.updateScalingCooldownExpireTimeArgsForCall)] - fake.updateScalingCooldownExpireTimeArgsForCall = append(fake.updateScalingCooldownExpireTimeArgsForCall, struct { - arg1 string - arg2 int64 - }{arg1, arg2}) - stub := fake.UpdateScalingCooldownExpireTimeStub - fakeReturns := fake.updateScalingCooldownExpireTimeReturns - fake.recordInvocation("UpdateScalingCooldownExpireTime", []interface{}{arg1, arg2}) - fake.updateScalingCooldownExpireTimeMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeScalingEngineDB) UpdateScalingCooldownExpireTimeCallCount() int { - fake.updateScalingCooldownExpireTimeMutex.RLock() - defer fake.updateScalingCooldownExpireTimeMutex.RUnlock() - return len(fake.updateScalingCooldownExpireTimeArgsForCall) -} - -func (fake *FakeScalingEngineDB) UpdateScalingCooldownExpireTimeCalls(stub func(string, int64) error) { - fake.updateScalingCooldownExpireTimeMutex.Lock() - defer fake.updateScalingCooldownExpireTimeMutex.Unlock() - fake.UpdateScalingCooldownExpireTimeStub = stub -} - -func (fake *FakeScalingEngineDB) UpdateScalingCooldownExpireTimeArgsForCall(i int) (string, int64) { - fake.updateScalingCooldownExpireTimeMutex.RLock() - defer fake.updateScalingCooldownExpireTimeMutex.RUnlock() - argsForCall := fake.updateScalingCooldownExpireTimeArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeScalingEngineDB) UpdateScalingCooldownExpireTimeReturns(result1 error) { - fake.updateScalingCooldownExpireTimeMutex.Lock() - defer fake.updateScalingCooldownExpireTimeMutex.Unlock() - fake.UpdateScalingCooldownExpireTimeStub = nil - fake.updateScalingCooldownExpireTimeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) UpdateScalingCooldownExpireTimeReturnsOnCall(i int, result1 error) { - fake.updateScalingCooldownExpireTimeMutex.Lock() - defer fake.updateScalingCooldownExpireTimeMutex.Unlock() - fake.UpdateScalingCooldownExpireTimeStub = nil - if fake.updateScalingCooldownExpireTimeReturnsOnCall == nil { - fake.updateScalingCooldownExpireTimeReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.updateScalingCooldownExpireTimeReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.canScaleAppMutex.RLock() - defer fake.canScaleAppMutex.RUnlock() - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - fake.getActiveScheduleMutex.RLock() - defer fake.getActiveScheduleMutex.RUnlock() - fake.getActiveSchedulesMutex.RLock() - defer fake.getActiveSchedulesMutex.RUnlock() - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - fake.pruneScalingHistoriesMutex.RLock() - defer fake.pruneScalingHistoriesMutex.RUnlock() - fake.removeActiveScheduleMutex.RLock() - defer fake.removeActiveScheduleMutex.RUnlock() - fake.retrieveScalingHistoriesMutex.RLock() - defer fake.retrieveScalingHistoriesMutex.RUnlock() - fake.saveScalingHistoryMutex.RLock() - defer fake.saveScalingHistoryMutex.RUnlock() - fake.setActiveScheduleMutex.RLock() - defer fake.setActiveScheduleMutex.RUnlock() - fake.updateScalingCooldownExpireTimeMutex.RLock() - defer fake.updateScalingCooldownExpireTimeMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeScalingEngineDB) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ db.ScalingEngineDB = new(FakeScalingEngineDB) diff --git a/src/autoscaler/fakes/fake_scheduler_db.go b/src/autoscaler/fakes/fake_scheduler_db.go deleted file mode 100644 index cf3ace7723..0000000000 --- a/src/autoscaler/fakes/fake_scheduler_db.go +++ /dev/null @@ -1,239 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "database/sql" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/db" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakeSchedulerDB struct { - CloseStub func() error - closeMutex sync.RWMutex - closeArgsForCall []struct { - } - closeReturns struct { - result1 error - } - closeReturnsOnCall map[int]struct { - result1 error - } - GetActiveSchedulesStub func() (map[string]*models.ActiveSchedule, error) - getActiveSchedulesMutex sync.RWMutex - getActiveSchedulesArgsForCall []struct { - } - getActiveSchedulesReturns struct { - result1 map[string]*models.ActiveSchedule - result2 error - } - getActiveSchedulesReturnsOnCall map[int]struct { - result1 map[string]*models.ActiveSchedule - result2 error - } - GetDBStatusStub func() sql.DBStats - getDBStatusMutex sync.RWMutex - getDBStatusArgsForCall []struct { - } - getDBStatusReturns struct { - result1 sql.DBStats - } - getDBStatusReturnsOnCall map[int]struct { - result1 sql.DBStats - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeSchedulerDB) Close() error { - fake.closeMutex.Lock() - ret, specificReturn := fake.closeReturnsOnCall[len(fake.closeArgsForCall)] - fake.closeArgsForCall = append(fake.closeArgsForCall, struct { - }{}) - stub := fake.CloseStub - fakeReturns := fake.closeReturns - fake.recordInvocation("Close", []interface{}{}) - fake.closeMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeSchedulerDB) CloseCallCount() int { - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return len(fake.closeArgsForCall) -} - -func (fake *FakeSchedulerDB) CloseCalls(stub func() error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = stub -} - -func (fake *FakeSchedulerDB) CloseReturns(result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - fake.closeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeSchedulerDB) CloseReturnsOnCall(i int, result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - if fake.closeReturnsOnCall == nil { - fake.closeReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.closeReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeSchedulerDB) GetActiveSchedules() (map[string]*models.ActiveSchedule, error) { - fake.getActiveSchedulesMutex.Lock() - ret, specificReturn := fake.getActiveSchedulesReturnsOnCall[len(fake.getActiveSchedulesArgsForCall)] - fake.getActiveSchedulesArgsForCall = append(fake.getActiveSchedulesArgsForCall, struct { - }{}) - stub := fake.GetActiveSchedulesStub - fakeReturns := fake.getActiveSchedulesReturns - fake.recordInvocation("GetActiveSchedules", []interface{}{}) - fake.getActiveSchedulesMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeSchedulerDB) GetActiveSchedulesCallCount() int { - fake.getActiveSchedulesMutex.RLock() - defer fake.getActiveSchedulesMutex.RUnlock() - return len(fake.getActiveSchedulesArgsForCall) -} - -func (fake *FakeSchedulerDB) GetActiveSchedulesCalls(stub func() (map[string]*models.ActiveSchedule, error)) { - fake.getActiveSchedulesMutex.Lock() - defer fake.getActiveSchedulesMutex.Unlock() - fake.GetActiveSchedulesStub = stub -} - -func (fake *FakeSchedulerDB) GetActiveSchedulesReturns(result1 map[string]*models.ActiveSchedule, result2 error) { - fake.getActiveSchedulesMutex.Lock() - defer fake.getActiveSchedulesMutex.Unlock() - fake.GetActiveSchedulesStub = nil - fake.getActiveSchedulesReturns = struct { - result1 map[string]*models.ActiveSchedule - result2 error - }{result1, result2} -} - -func (fake *FakeSchedulerDB) GetActiveSchedulesReturnsOnCall(i int, result1 map[string]*models.ActiveSchedule, result2 error) { - fake.getActiveSchedulesMutex.Lock() - defer fake.getActiveSchedulesMutex.Unlock() - fake.GetActiveSchedulesStub = nil - if fake.getActiveSchedulesReturnsOnCall == nil { - fake.getActiveSchedulesReturnsOnCall = make(map[int]struct { - result1 map[string]*models.ActiveSchedule - result2 error - }) - } - fake.getActiveSchedulesReturnsOnCall[i] = struct { - result1 map[string]*models.ActiveSchedule - result2 error - }{result1, result2} -} - -func (fake *FakeSchedulerDB) GetDBStatus() sql.DBStats { - fake.getDBStatusMutex.Lock() - ret, specificReturn := fake.getDBStatusReturnsOnCall[len(fake.getDBStatusArgsForCall)] - fake.getDBStatusArgsForCall = append(fake.getDBStatusArgsForCall, struct { - }{}) - stub := fake.GetDBStatusStub - fakeReturns := fake.getDBStatusReturns - fake.recordInvocation("GetDBStatus", []interface{}{}) - fake.getDBStatusMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeSchedulerDB) GetDBStatusCallCount() int { - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - return len(fake.getDBStatusArgsForCall) -} - -func (fake *FakeSchedulerDB) GetDBStatusCalls(stub func() sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = stub -} - -func (fake *FakeSchedulerDB) GetDBStatusReturns(result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - fake.getDBStatusReturns = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeSchedulerDB) GetDBStatusReturnsOnCall(i int, result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - if fake.getDBStatusReturnsOnCall == nil { - fake.getDBStatusReturnsOnCall = make(map[int]struct { - result1 sql.DBStats - }) - } - fake.getDBStatusReturnsOnCall[i] = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeSchedulerDB) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - fake.getActiveSchedulesMutex.RLock() - defer fake.getActiveSchedulesMutex.RUnlock() - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeSchedulerDB) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ db.SchedulerDB = new(FakeSchedulerDB) diff --git a/src/autoscaler/fakes/fake_storedprocedure_db.go b/src/autoscaler/fakes/fake_storedprocedure_db.go deleted file mode 100644 index 465378d995..0000000000 --- a/src/autoscaler/fakes/fake_storedprocedure_db.go +++ /dev/null @@ -1,483 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "context" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/db" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakeStoredProcedureDB struct { - CloseStub func() error - closeMutex sync.RWMutex - closeArgsForCall []struct { - } - closeReturns struct { - result1 error - } - closeReturnsOnCall map[int]struct { - result1 error - } - CreateCredentialsStub func(context.Context, models.CredentialsOptions) (*models.Credential, error) - createCredentialsMutex sync.RWMutex - createCredentialsArgsForCall []struct { - arg1 context.Context - arg2 models.CredentialsOptions - } - createCredentialsReturns struct { - result1 *models.Credential - result2 error - } - createCredentialsReturnsOnCall map[int]struct { - result1 *models.Credential - result2 error - } - DeleteAllInstanceCredentialsStub func(context.Context, string) error - deleteAllInstanceCredentialsMutex sync.RWMutex - deleteAllInstanceCredentialsArgsForCall []struct { - arg1 context.Context - arg2 string - } - deleteAllInstanceCredentialsReturns struct { - result1 error - } - deleteAllInstanceCredentialsReturnsOnCall map[int]struct { - result1 error - } - DeleteCredentialsStub func(context.Context, models.CredentialsOptions) error - deleteCredentialsMutex sync.RWMutex - deleteCredentialsArgsForCall []struct { - arg1 context.Context - arg2 models.CredentialsOptions - } - deleteCredentialsReturns struct { - result1 error - } - deleteCredentialsReturnsOnCall map[int]struct { - result1 error - } - PingStub func() error - pingMutex sync.RWMutex - pingArgsForCall []struct { - } - pingReturns struct { - result1 error - } - pingReturnsOnCall map[int]struct { - result1 error - } - ValidateCredentialsStub func(context.Context, models.Credential) (*models.CredentialsOptions, error) - validateCredentialsMutex sync.RWMutex - validateCredentialsArgsForCall []struct { - arg1 context.Context - arg2 models.Credential - } - validateCredentialsReturns struct { - result1 *models.CredentialsOptions - result2 error - } - validateCredentialsReturnsOnCall map[int]struct { - result1 *models.CredentialsOptions - result2 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeStoredProcedureDB) Close() error { - fake.closeMutex.Lock() - ret, specificReturn := fake.closeReturnsOnCall[len(fake.closeArgsForCall)] - fake.closeArgsForCall = append(fake.closeArgsForCall, struct { - }{}) - stub := fake.CloseStub - fakeReturns := fake.closeReturns - fake.recordInvocation("Close", []interface{}{}) - fake.closeMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeStoredProcedureDB) CloseCallCount() int { - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return len(fake.closeArgsForCall) -} - -func (fake *FakeStoredProcedureDB) CloseCalls(stub func() error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = stub -} - -func (fake *FakeStoredProcedureDB) CloseReturns(result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - fake.closeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeStoredProcedureDB) CloseReturnsOnCall(i int, result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - if fake.closeReturnsOnCall == nil { - fake.closeReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.closeReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeStoredProcedureDB) CreateCredentials(arg1 context.Context, arg2 models.CredentialsOptions) (*models.Credential, error) { - fake.createCredentialsMutex.Lock() - ret, specificReturn := fake.createCredentialsReturnsOnCall[len(fake.createCredentialsArgsForCall)] - fake.createCredentialsArgsForCall = append(fake.createCredentialsArgsForCall, struct { - arg1 context.Context - arg2 models.CredentialsOptions - }{arg1, arg2}) - stub := fake.CreateCredentialsStub - fakeReturns := fake.createCredentialsReturns - fake.recordInvocation("CreateCredentials", []interface{}{arg1, arg2}) - fake.createCredentialsMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeStoredProcedureDB) CreateCredentialsCallCount() int { - fake.createCredentialsMutex.RLock() - defer fake.createCredentialsMutex.RUnlock() - return len(fake.createCredentialsArgsForCall) -} - -func (fake *FakeStoredProcedureDB) CreateCredentialsCalls(stub func(context.Context, models.CredentialsOptions) (*models.Credential, error)) { - fake.createCredentialsMutex.Lock() - defer fake.createCredentialsMutex.Unlock() - fake.CreateCredentialsStub = stub -} - -func (fake *FakeStoredProcedureDB) CreateCredentialsArgsForCall(i int) (context.Context, models.CredentialsOptions) { - fake.createCredentialsMutex.RLock() - defer fake.createCredentialsMutex.RUnlock() - argsForCall := fake.createCredentialsArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeStoredProcedureDB) CreateCredentialsReturns(result1 *models.Credential, result2 error) { - fake.createCredentialsMutex.Lock() - defer fake.createCredentialsMutex.Unlock() - fake.CreateCredentialsStub = nil - fake.createCredentialsReturns = struct { - result1 *models.Credential - result2 error - }{result1, result2} -} - -func (fake *FakeStoredProcedureDB) CreateCredentialsReturnsOnCall(i int, result1 *models.Credential, result2 error) { - fake.createCredentialsMutex.Lock() - defer fake.createCredentialsMutex.Unlock() - fake.CreateCredentialsStub = nil - if fake.createCredentialsReturnsOnCall == nil { - fake.createCredentialsReturnsOnCall = make(map[int]struct { - result1 *models.Credential - result2 error - }) - } - fake.createCredentialsReturnsOnCall[i] = struct { - result1 *models.Credential - result2 error - }{result1, result2} -} - -func (fake *FakeStoredProcedureDB) DeleteAllInstanceCredentials(arg1 context.Context, arg2 string) error { - fake.deleteAllInstanceCredentialsMutex.Lock() - ret, specificReturn := fake.deleteAllInstanceCredentialsReturnsOnCall[len(fake.deleteAllInstanceCredentialsArgsForCall)] - fake.deleteAllInstanceCredentialsArgsForCall = append(fake.deleteAllInstanceCredentialsArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.DeleteAllInstanceCredentialsStub - fakeReturns := fake.deleteAllInstanceCredentialsReturns - fake.recordInvocation("DeleteAllInstanceCredentials", []interface{}{arg1, arg2}) - fake.deleteAllInstanceCredentialsMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeStoredProcedureDB) DeleteAllInstanceCredentialsCallCount() int { - fake.deleteAllInstanceCredentialsMutex.RLock() - defer fake.deleteAllInstanceCredentialsMutex.RUnlock() - return len(fake.deleteAllInstanceCredentialsArgsForCall) -} - -func (fake *FakeStoredProcedureDB) DeleteAllInstanceCredentialsCalls(stub func(context.Context, string) error) { - fake.deleteAllInstanceCredentialsMutex.Lock() - defer fake.deleteAllInstanceCredentialsMutex.Unlock() - fake.DeleteAllInstanceCredentialsStub = stub -} - -func (fake *FakeStoredProcedureDB) DeleteAllInstanceCredentialsArgsForCall(i int) (context.Context, string) { - fake.deleteAllInstanceCredentialsMutex.RLock() - defer fake.deleteAllInstanceCredentialsMutex.RUnlock() - argsForCall := fake.deleteAllInstanceCredentialsArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeStoredProcedureDB) DeleteAllInstanceCredentialsReturns(result1 error) { - fake.deleteAllInstanceCredentialsMutex.Lock() - defer fake.deleteAllInstanceCredentialsMutex.Unlock() - fake.DeleteAllInstanceCredentialsStub = nil - fake.deleteAllInstanceCredentialsReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeStoredProcedureDB) DeleteAllInstanceCredentialsReturnsOnCall(i int, result1 error) { - fake.deleteAllInstanceCredentialsMutex.Lock() - defer fake.deleteAllInstanceCredentialsMutex.Unlock() - fake.DeleteAllInstanceCredentialsStub = nil - if fake.deleteAllInstanceCredentialsReturnsOnCall == nil { - fake.deleteAllInstanceCredentialsReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.deleteAllInstanceCredentialsReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeStoredProcedureDB) DeleteCredentials(arg1 context.Context, arg2 models.CredentialsOptions) error { - fake.deleteCredentialsMutex.Lock() - ret, specificReturn := fake.deleteCredentialsReturnsOnCall[len(fake.deleteCredentialsArgsForCall)] - fake.deleteCredentialsArgsForCall = append(fake.deleteCredentialsArgsForCall, struct { - arg1 context.Context - arg2 models.CredentialsOptions - }{arg1, arg2}) - stub := fake.DeleteCredentialsStub - fakeReturns := fake.deleteCredentialsReturns - fake.recordInvocation("DeleteCredentials", []interface{}{arg1, arg2}) - fake.deleteCredentialsMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeStoredProcedureDB) DeleteCredentialsCallCount() int { - fake.deleteCredentialsMutex.RLock() - defer fake.deleteCredentialsMutex.RUnlock() - return len(fake.deleteCredentialsArgsForCall) -} - -func (fake *FakeStoredProcedureDB) DeleteCredentialsCalls(stub func(context.Context, models.CredentialsOptions) error) { - fake.deleteCredentialsMutex.Lock() - defer fake.deleteCredentialsMutex.Unlock() - fake.DeleteCredentialsStub = stub -} - -func (fake *FakeStoredProcedureDB) DeleteCredentialsArgsForCall(i int) (context.Context, models.CredentialsOptions) { - fake.deleteCredentialsMutex.RLock() - defer fake.deleteCredentialsMutex.RUnlock() - argsForCall := fake.deleteCredentialsArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeStoredProcedureDB) DeleteCredentialsReturns(result1 error) { - fake.deleteCredentialsMutex.Lock() - defer fake.deleteCredentialsMutex.Unlock() - fake.DeleteCredentialsStub = nil - fake.deleteCredentialsReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeStoredProcedureDB) DeleteCredentialsReturnsOnCall(i int, result1 error) { - fake.deleteCredentialsMutex.Lock() - defer fake.deleteCredentialsMutex.Unlock() - fake.DeleteCredentialsStub = nil - if fake.deleteCredentialsReturnsOnCall == nil { - fake.deleteCredentialsReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.deleteCredentialsReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeStoredProcedureDB) Ping() error { - fake.pingMutex.Lock() - ret, specificReturn := fake.pingReturnsOnCall[len(fake.pingArgsForCall)] - fake.pingArgsForCall = append(fake.pingArgsForCall, struct { - }{}) - stub := fake.PingStub - fakeReturns := fake.pingReturns - fake.recordInvocation("Ping", []interface{}{}) - fake.pingMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeStoredProcedureDB) PingCallCount() int { - fake.pingMutex.RLock() - defer fake.pingMutex.RUnlock() - return len(fake.pingArgsForCall) -} - -func (fake *FakeStoredProcedureDB) PingCalls(stub func() error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = stub -} - -func (fake *FakeStoredProcedureDB) PingReturns(result1 error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = nil - fake.pingReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeStoredProcedureDB) PingReturnsOnCall(i int, result1 error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = nil - if fake.pingReturnsOnCall == nil { - fake.pingReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.pingReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeStoredProcedureDB) ValidateCredentials(arg1 context.Context, arg2 models.Credential) (*models.CredentialsOptions, error) { - fake.validateCredentialsMutex.Lock() - ret, specificReturn := fake.validateCredentialsReturnsOnCall[len(fake.validateCredentialsArgsForCall)] - fake.validateCredentialsArgsForCall = append(fake.validateCredentialsArgsForCall, struct { - arg1 context.Context - arg2 models.Credential - }{arg1, arg2}) - stub := fake.ValidateCredentialsStub - fakeReturns := fake.validateCredentialsReturns - fake.recordInvocation("ValidateCredentials", []interface{}{arg1, arg2}) - fake.validateCredentialsMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeStoredProcedureDB) ValidateCredentialsCallCount() int { - fake.validateCredentialsMutex.RLock() - defer fake.validateCredentialsMutex.RUnlock() - return len(fake.validateCredentialsArgsForCall) -} - -func (fake *FakeStoredProcedureDB) ValidateCredentialsCalls(stub func(context.Context, models.Credential) (*models.CredentialsOptions, error)) { - fake.validateCredentialsMutex.Lock() - defer fake.validateCredentialsMutex.Unlock() - fake.ValidateCredentialsStub = stub -} - -func (fake *FakeStoredProcedureDB) ValidateCredentialsArgsForCall(i int) (context.Context, models.Credential) { - fake.validateCredentialsMutex.RLock() - defer fake.validateCredentialsMutex.RUnlock() - argsForCall := fake.validateCredentialsArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeStoredProcedureDB) ValidateCredentialsReturns(result1 *models.CredentialsOptions, result2 error) { - fake.validateCredentialsMutex.Lock() - defer fake.validateCredentialsMutex.Unlock() - fake.ValidateCredentialsStub = nil - fake.validateCredentialsReturns = struct { - result1 *models.CredentialsOptions - result2 error - }{result1, result2} -} - -func (fake *FakeStoredProcedureDB) ValidateCredentialsReturnsOnCall(i int, result1 *models.CredentialsOptions, result2 error) { - fake.validateCredentialsMutex.Lock() - defer fake.validateCredentialsMutex.Unlock() - fake.ValidateCredentialsStub = nil - if fake.validateCredentialsReturnsOnCall == nil { - fake.validateCredentialsReturnsOnCall = make(map[int]struct { - result1 *models.CredentialsOptions - result2 error - }) - } - fake.validateCredentialsReturnsOnCall[i] = struct { - result1 *models.CredentialsOptions - result2 error - }{result1, result2} -} - -func (fake *FakeStoredProcedureDB) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - fake.createCredentialsMutex.RLock() - defer fake.createCredentialsMutex.RUnlock() - fake.deleteAllInstanceCredentialsMutex.RLock() - defer fake.deleteAllInstanceCredentialsMutex.RUnlock() - fake.deleteCredentialsMutex.RLock() - defer fake.deleteCredentialsMutex.RUnlock() - fake.pingMutex.RLock() - defer fake.pingMutex.RUnlock() - fake.validateCredentialsMutex.RLock() - defer fake.validateCredentialsMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeStoredProcedureDB) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ db.StoredProcedureDB = new(FakeStoredProcedureDB) diff --git a/src/autoscaler/fakes/fake_sychronizer.go b/src/autoscaler/fakes/fake_sychronizer.go deleted file mode 100644 index d5aca85cc8..0000000000 --- a/src/autoscaler/fakes/fake_sychronizer.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/scalingengine/schedule" - "sync" -) - -type FakeActiveScheduleSychronizer struct { - SyncStub func() - syncMutex sync.RWMutex - syncArgsForCall []struct{} - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeActiveScheduleSychronizer) Sync() { - fake.syncMutex.Lock() - fake.syncArgsForCall = append(fake.syncArgsForCall, struct{}{}) - fake.recordInvocation("Sync", []interface{}{}) - fake.syncMutex.Unlock() - if fake.SyncStub != nil { - fake.SyncStub() - } -} - -func (fake *FakeActiveScheduleSychronizer) SyncCallCount() int { - fake.syncMutex.RLock() - defer fake.syncMutex.RUnlock() - return len(fake.syncArgsForCall) -} - -func (fake *FakeActiveScheduleSychronizer) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.syncMutex.RLock() - defer fake.syncMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeActiveScheduleSychronizer) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ schedule.ActiveScheduleSychronizer = new(FakeActiveScheduleSychronizer) diff --git a/src/autoscaler/fakes/fake_wshelper.go b/src/autoscaler/fakes/fake_wshelper.go deleted file mode 100644 index c0a1f2eb49..0000000000 --- a/src/autoscaler/fakes/fake_wshelper.go +++ /dev/null @@ -1,437 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/metricsgateway/helpers" - "code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2" -) - -type FakeWSHelper struct { - CloseConnStub func() error - closeConnMutex sync.RWMutex - closeConnArgsForCall []struct { - } - closeConnReturns struct { - result1 error - } - closeConnReturnsOnCall map[int]struct { - result1 error - } - IsClosedStub func() bool - isClosedMutex sync.RWMutex - isClosedArgsForCall []struct { - } - isClosedReturns struct { - result1 bool - } - isClosedReturnsOnCall map[int]struct { - result1 bool - } - PingStub func() error - pingMutex sync.RWMutex - pingArgsForCall []struct { - } - pingReturns struct { - result1 error - } - pingReturnsOnCall map[int]struct { - result1 error - } - ReadStub func() error - readMutex sync.RWMutex - readArgsForCall []struct { - } - readReturns struct { - result1 error - } - readReturnsOnCall map[int]struct { - result1 error - } - SetupConnStub func() error - setupConnMutex sync.RWMutex - setupConnArgsForCall []struct { - } - setupConnReturns struct { - result1 error - } - setupConnReturnsOnCall map[int]struct { - result1 error - } - WriteStub func(*loggregator_v2.Envelope) error - writeMutex sync.RWMutex - writeArgsForCall []struct { - arg1 *loggregator_v2.Envelope - } - writeReturns struct { - result1 error - } - writeReturnsOnCall map[int]struct { - result1 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeWSHelper) CloseConn() error { - fake.closeConnMutex.Lock() - ret, specificReturn := fake.closeConnReturnsOnCall[len(fake.closeConnArgsForCall)] - fake.closeConnArgsForCall = append(fake.closeConnArgsForCall, struct { - }{}) - stub := fake.CloseConnStub - fakeReturns := fake.closeConnReturns - fake.recordInvocation("CloseConn", []interface{}{}) - fake.closeConnMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeWSHelper) CloseConnCallCount() int { - fake.closeConnMutex.RLock() - defer fake.closeConnMutex.RUnlock() - return len(fake.closeConnArgsForCall) -} - -func (fake *FakeWSHelper) CloseConnCalls(stub func() error) { - fake.closeConnMutex.Lock() - defer fake.closeConnMutex.Unlock() - fake.CloseConnStub = stub -} - -func (fake *FakeWSHelper) CloseConnReturns(result1 error) { - fake.closeConnMutex.Lock() - defer fake.closeConnMutex.Unlock() - fake.CloseConnStub = nil - fake.closeConnReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) CloseConnReturnsOnCall(i int, result1 error) { - fake.closeConnMutex.Lock() - defer fake.closeConnMutex.Unlock() - fake.CloseConnStub = nil - if fake.closeConnReturnsOnCall == nil { - fake.closeConnReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.closeConnReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) IsClosed() bool { - fake.isClosedMutex.Lock() - ret, specificReturn := fake.isClosedReturnsOnCall[len(fake.isClosedArgsForCall)] - fake.isClosedArgsForCall = append(fake.isClosedArgsForCall, struct { - }{}) - stub := fake.IsClosedStub - fakeReturns := fake.isClosedReturns - fake.recordInvocation("IsClosed", []interface{}{}) - fake.isClosedMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeWSHelper) IsClosedCallCount() int { - fake.isClosedMutex.RLock() - defer fake.isClosedMutex.RUnlock() - return len(fake.isClosedArgsForCall) -} - -func (fake *FakeWSHelper) IsClosedCalls(stub func() bool) { - fake.isClosedMutex.Lock() - defer fake.isClosedMutex.Unlock() - fake.IsClosedStub = stub -} - -func (fake *FakeWSHelper) IsClosedReturns(result1 bool) { - fake.isClosedMutex.Lock() - defer fake.isClosedMutex.Unlock() - fake.IsClosedStub = nil - fake.isClosedReturns = struct { - result1 bool - }{result1} -} - -func (fake *FakeWSHelper) IsClosedReturnsOnCall(i int, result1 bool) { - fake.isClosedMutex.Lock() - defer fake.isClosedMutex.Unlock() - fake.IsClosedStub = nil - if fake.isClosedReturnsOnCall == nil { - fake.isClosedReturnsOnCall = make(map[int]struct { - result1 bool - }) - } - fake.isClosedReturnsOnCall[i] = struct { - result1 bool - }{result1} -} - -func (fake *FakeWSHelper) Ping() error { - fake.pingMutex.Lock() - ret, specificReturn := fake.pingReturnsOnCall[len(fake.pingArgsForCall)] - fake.pingArgsForCall = append(fake.pingArgsForCall, struct { - }{}) - stub := fake.PingStub - fakeReturns := fake.pingReturns - fake.recordInvocation("Ping", []interface{}{}) - fake.pingMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeWSHelper) PingCallCount() int { - fake.pingMutex.RLock() - defer fake.pingMutex.RUnlock() - return len(fake.pingArgsForCall) -} - -func (fake *FakeWSHelper) PingCalls(stub func() error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = stub -} - -func (fake *FakeWSHelper) PingReturns(result1 error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = nil - fake.pingReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) PingReturnsOnCall(i int, result1 error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = nil - if fake.pingReturnsOnCall == nil { - fake.pingReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.pingReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) Read() error { - fake.readMutex.Lock() - ret, specificReturn := fake.readReturnsOnCall[len(fake.readArgsForCall)] - fake.readArgsForCall = append(fake.readArgsForCall, struct { - }{}) - stub := fake.ReadStub - fakeReturns := fake.readReturns - fake.recordInvocation("Read", []interface{}{}) - fake.readMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeWSHelper) ReadCallCount() int { - fake.readMutex.RLock() - defer fake.readMutex.RUnlock() - return len(fake.readArgsForCall) -} - -func (fake *FakeWSHelper) ReadCalls(stub func() error) { - fake.readMutex.Lock() - defer fake.readMutex.Unlock() - fake.ReadStub = stub -} - -func (fake *FakeWSHelper) ReadReturns(result1 error) { - fake.readMutex.Lock() - defer fake.readMutex.Unlock() - fake.ReadStub = nil - fake.readReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) ReadReturnsOnCall(i int, result1 error) { - fake.readMutex.Lock() - defer fake.readMutex.Unlock() - fake.ReadStub = nil - if fake.readReturnsOnCall == nil { - fake.readReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.readReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) SetupConn() error { - fake.setupConnMutex.Lock() - ret, specificReturn := fake.setupConnReturnsOnCall[len(fake.setupConnArgsForCall)] - fake.setupConnArgsForCall = append(fake.setupConnArgsForCall, struct { - }{}) - stub := fake.SetupConnStub - fakeReturns := fake.setupConnReturns - fake.recordInvocation("SetupConn", []interface{}{}) - fake.setupConnMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeWSHelper) SetupConnCallCount() int { - fake.setupConnMutex.RLock() - defer fake.setupConnMutex.RUnlock() - return len(fake.setupConnArgsForCall) -} - -func (fake *FakeWSHelper) SetupConnCalls(stub func() error) { - fake.setupConnMutex.Lock() - defer fake.setupConnMutex.Unlock() - fake.SetupConnStub = stub -} - -func (fake *FakeWSHelper) SetupConnReturns(result1 error) { - fake.setupConnMutex.Lock() - defer fake.setupConnMutex.Unlock() - fake.SetupConnStub = nil - fake.setupConnReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) SetupConnReturnsOnCall(i int, result1 error) { - fake.setupConnMutex.Lock() - defer fake.setupConnMutex.Unlock() - fake.SetupConnStub = nil - if fake.setupConnReturnsOnCall == nil { - fake.setupConnReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.setupConnReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) Write(arg1 *loggregator_v2.Envelope) error { - fake.writeMutex.Lock() - ret, specificReturn := fake.writeReturnsOnCall[len(fake.writeArgsForCall)] - fake.writeArgsForCall = append(fake.writeArgsForCall, struct { - arg1 *loggregator_v2.Envelope - }{arg1}) - stub := fake.WriteStub - fakeReturns := fake.writeReturns - fake.recordInvocation("Write", []interface{}{arg1}) - fake.writeMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeWSHelper) WriteCallCount() int { - fake.writeMutex.RLock() - defer fake.writeMutex.RUnlock() - return len(fake.writeArgsForCall) -} - -func (fake *FakeWSHelper) WriteCalls(stub func(*loggregator_v2.Envelope) error) { - fake.writeMutex.Lock() - defer fake.writeMutex.Unlock() - fake.WriteStub = stub -} - -func (fake *FakeWSHelper) WriteArgsForCall(i int) *loggregator_v2.Envelope { - fake.writeMutex.RLock() - defer fake.writeMutex.RUnlock() - argsForCall := fake.writeArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeWSHelper) WriteReturns(result1 error) { - fake.writeMutex.Lock() - defer fake.writeMutex.Unlock() - fake.WriteStub = nil - fake.writeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) WriteReturnsOnCall(i int, result1 error) { - fake.writeMutex.Lock() - defer fake.writeMutex.Unlock() - fake.WriteStub = nil - if fake.writeReturnsOnCall == nil { - fake.writeReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.writeReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.closeConnMutex.RLock() - defer fake.closeConnMutex.RUnlock() - fake.isClosedMutex.RLock() - defer fake.isClosedMutex.RUnlock() - fake.pingMutex.RLock() - defer fake.pingMutex.RUnlock() - fake.readMutex.RLock() - defer fake.readMutex.RUnlock() - fake.setupConnMutex.RLock() - defer fake.setupConnMutex.RUnlock() - fake.writeMutex.RLock() - defer fake.writeMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeWSHelper) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ helpers.WSHelper = new(FakeWSHelper) diff --git a/src/autoscaler/fakes/fakes.go b/src/autoscaler/fakes/fakes.go index b4175329ca..60a8e756ec 100644 --- a/src/autoscaler/fakes/fakes.go +++ b/src/autoscaler/fakes/fakes.go @@ -9,6 +9,8 @@ package fakes //counterfeiter:generate -o ./fake_scheduler_db.go ../db SchedulerDB //counterfeiter:generate -o ./fake_scalingengine.go ../scalingengine ScalingEngine //counterfeiter:generate -o ./fake_binding_db.go ../db BindingDB +//counterfeiter:generate -o ./fake_app_metric_db.go ../db AppMetricDB +//counterfeiter:generate -o ./fake_instancemetrics_db.go ../db InstanceMetricsDB //counterfeiter:generate -o ./fake_credentials.go ../cred_helper Credentials //counterfeiter:generate -o ./fake_storedprocedure_db.go ../db StoredProcedureDB //counterfeiter:generate -o ./fake_metric_forwarder.go ../metricsforwarder/forwarder MetricForwarder @@ -21,3 +23,9 @@ package fakes //counterfeiter:generate -o ./fake_grpc.go ../eventgenerator/client GRPCOptions //counterfeiter:generate -o ./fake_envelope_processor_creator.go ../envelopeprocessor EnvelopeProcessorCreator //counterfeiter:generate -o ./fake_plan_checker.go ../api/plancheck PlanChecker +//counterfeiter:generate -o ./fake_ratelimiter.go ../ratelimiter Limiter +//counterfeiter:generate -o ./fake_httpstatus_collector.go ../healthendpoint HTTPStatusCollector +//counterfeiter:generate -o ./fake_database_status.go ../healthendpoint DatabaseStatus +//counterfeiter:generate -o ./fake_emitter.go ../metricsgateway Emitter +//counterfeiter:generate -o ./fake_operator.go ../operator Operator +//counterfeiter:generate -o ./fake_sychronizer.go ../scalingengine/schedule ActiveScheduleSychronizer From f6b1f606e966348a5d6891745b8ed9d4aa2c5bc2 Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Fri, 18 Aug 2023 16:16:47 +0200 Subject: [PATCH 152/294] Always run the `ginkgo` version defined in `.tool-versions` --- src/acceptance/Makefile | 3 ++- src/acceptance/assets/app/go_app/Makefile | 3 ++- src/autoscaler/Makefile | 20 +++++++------------- src/changelog/Makefile | 3 ++- src/changeloglockcleaner/Makefile | 3 ++- 5 files changed, 15 insertions(+), 17 deletions(-) diff --git a/src/acceptance/Makefile b/src/acceptance/Makefile index b89d3ab1c1..71357933d0 100644 --- a/src/acceptance/Makefile +++ b/src/acceptance/Makefile @@ -11,6 +11,7 @@ CGO_ENABLED = 0 export GOWORK=off BUILDTAGS := +GINKGO_VERSION=v$(shell cat ../../.tool-versions | grep ginkgo | cut -d " " -f 2 ) GOLANGCI_LINT_VERSION=v$(shell cat ../../.tool-versions | grep golangci-lint | cut -d " " -f 2 ) test_dirs=$(shell find . -name "*_test.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq) @@ -30,7 +31,7 @@ build_test-%: check: lint build_tests test-unit: - ginkgo --race run helpers + go run github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} --race run helpers test: bin/test $(filter-out $@,$(MAKECMDGOALS)) diff --git a/src/acceptance/assets/app/go_app/Makefile b/src/acceptance/assets/app/go_app/Makefile index 95a357869f..770ba1e47c 100644 --- a/src/acceptance/assets/app/go_app/Makefile +++ b/src/acceptance/assets/app/go_app/Makefile @@ -13,6 +13,7 @@ test_dirs=$(shell find . -name "*_test.go" -exec dirname {} \; | cut -d/ -f2 GINKGO_OPTS=-r --race --require-suite --randomize-all --cover ${OPTS} export CONFIG?=../../../../acceptance_config.json +GINKGO_VERSION=v$(shell cat ../../../../../.tool-versions | grep ginkgo | cut -d " " -f 2 ) GOLANGCI_LINT_VERSION=v$(shell cat ../../../../../.tool-versions | grep golangci-lint | cut -d " " -f 2 ) .PHONY: build @@ -41,7 +42,7 @@ build_test-%: check: lint build test test: generate @echo "Running tests" - ginkgo run ${GINKGO_OPTS} ./... + go run github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} run ${GINKGO_OPTS} ./... lint: generate @go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run diff --git a/src/autoscaler/Makefile b/src/autoscaler/Makefile index 484c7cfc23..dcebe611d1 100644 --- a/src/autoscaler/Makefile +++ b/src/autoscaler/Makefile @@ -18,6 +18,7 @@ export GO111MODULE=on #GINKGO_OPTS=-r --race --require-suite -p --randomize-all --cover GINKGO_OPTS=-r --race --require-suite --randomize-all --cover ${OPTS} +GINKGO_VERSION=v$(shell cat ../../.tool-versions | grep ginkgo | cut -d " " -f 2 ) build-%: @echo "# building $*" @@ -42,24 +43,17 @@ build_test-%: generate check: fmt lint build test -ginkgo_check: - @ current_version=$(shell ginkgo version | cut -d " " -f 3 | sed -E 's/([0-9]+\.[0-9]+)\..*/\1/');\ - expected_version=$(shell grep "ginkgo" "../../.tool-versions" | cut -d " " -f 2 | sed -E 's/([0-9]+\.[0-9]+)\..*/\1/');\ - if [ "$${current_version}" != "$${expected_version}" ]; then \ - echo "WARNING: Expected to have ginkgo version '$${expected_version}.x' but we have $(shell ginkgo version)";\ - fi - -test: ginkgo_check +test: generate @echo "Running tests" - @APP_AUTOSCALER_TEST_RUN=true ginkgo -p ${GINKGO_OPTS} --skip-package=integration + @APP_AUTOSCALER_TEST_RUN=true go run github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} -p ${GINKGO_OPTS} --skip-package=integration -testsuite: ginkgo_check - APP_AUTOSCALER_TEST_RUN=true ginkgo -p ${GINKGO_OPTS} ${TEST} +testsuite: generate + APP_AUTOSCALER_TEST_RUN=true go run github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} -p ${GINKGO_OPTS} ${TEST} .PHONY: integration -integration: ginkgo_check +integration: generate @echo "# Running integration tests" - APP_AUTOSCALER_TEST_RUN=true ginkgo ${GINKGO_OPTS} integration + APP_AUTOSCALER_TEST_RUN=true go run github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} ${GINKGO_OPTS} integration .PHONY: generate generate: diff --git a/src/changelog/Makefile b/src/changelog/Makefile index d89504c3b8..9456abdcfd 100644 --- a/src/changelog/Makefile +++ b/src/changelog/Makefile @@ -11,6 +11,7 @@ CGO_ENABLED = 0 export GOWORK=off BUILDTAGS := +GINKGO_VERSION=v$(shell cat ../../.tool-versions | grep ginkgo | cut -d " " -f 2 ) GOLANGCI_LINT_VERSION=v$(shell cat ../../.tool-versions | grep golangci-lint | cut -d " " -f 2 ) build: @@ -33,7 +34,7 @@ build_test-%: check: fmt lint build test test: - ginkgo -r --race --randomize-all --keep-going + go run github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} -r --race --randomize-all --keep-going get-fmt-deps: ## Install goimports $(GO_NOMOD) get golang.org/x/tools/cmd/goimports diff --git a/src/changeloglockcleaner/Makefile b/src/changeloglockcleaner/Makefile index d4700a1170..127a46c7ea 100644 --- a/src/changeloglockcleaner/Makefile +++ b/src/changeloglockcleaner/Makefile @@ -11,6 +11,7 @@ CGO_ENABLED = 0 export GOWORK=off BUILDTAGS := +GINKGO_VERSION=v$(shell cat ../../.tool-versions | grep ginkgo | cut -d " " -f 2 ) GOLANGCI_LINT_VERSION=v$(shell cat ../../.tool-versions | grep golangci-lint | cut -d " " -f 2 ) build: @@ -34,7 +35,7 @@ build_test-%: check: fmt lint build test test: - ginkgo -r --race --randomize-all --keep-going + go run github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} -r --race --randomize-all --keep-going get-fmt-deps: ## Install goimports $(GO_NOMOD) get golang.org/x/tools/cmd/goimports From 5297069cedf2b02adc31442bfa7514a3437cb76c Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Fri, 18 Aug 2023 16:53:02 +0200 Subject: [PATCH 153/294] Switch to individual `counterfeiter` invocations Generating all fakes at once seems to compound some memory leak. Memory usage goes from 1GiB to 17GiB, which does not work on GitHub hosted runners. --- src/autoscaler/fakes/fakes.go | 57 +++++++++++++++++------------------ 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/src/autoscaler/fakes/fakes.go b/src/autoscaler/fakes/fakes.go index 60a8e756ec..0b0a1f8f28 100644 --- a/src/autoscaler/fakes/fakes.go +++ b/src/autoscaler/fakes/fakes.go @@ -1,31 +1,30 @@ package fakes -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate - -//counterfeiter:generate -o ./fake_wshelper.go ../metricsgateway/helpers WSHelper -//counterfeiter:generate -o ./fake_cf_client.go ../cf CFClient -//counterfeiter:generate -o ./fake_policy_db.go ../db PolicyDB -//counterfeiter:generate -o ./fake_scalingengine_db.go ../db ScalingEngineDB -//counterfeiter:generate -o ./fake_scheduler_db.go ../db SchedulerDB -//counterfeiter:generate -o ./fake_scalingengine.go ../scalingengine ScalingEngine -//counterfeiter:generate -o ./fake_binding_db.go ../db BindingDB -//counterfeiter:generate -o ./fake_app_metric_db.go ../db AppMetricDB -//counterfeiter:generate -o ./fake_instancemetrics_db.go ../db InstanceMetricsDB -//counterfeiter:generate -o ./fake_credentials.go ../cred_helper Credentials -//counterfeiter:generate -o ./fake_storedprocedure_db.go ../db StoredProcedureDB -//counterfeiter:generate -o ./fake_metric_forwarder.go ../metricsforwarder/forwarder MetricForwarder -//counterfeiter:generate -o ./fake_plan_checker.go ../api/plancheck PlanChecker -//counterfeiter:generate -o ./fake_log_cache_client.go ../eventgenerator/client LogCacheClientReader -//counterfeiter:generate -o ./fake_envelope_processor.go ../envelopeprocessor EnvelopeProcessor -//counterfeiter:generate -o ./fake_log_cache_creator.go ../eventgenerator/client LogCacheClientCreator -//counterfeiter:generate -o ./fake_metric_server_creator_creator.go ../eventgenerator/client MetricServerClientCreator -//counterfeiter:generate -o ./fake_go_log_cache_client.go ../eventgenerator/client GoLogCacheClient -//counterfeiter:generate -o ./fake_grpc.go ../eventgenerator/client GRPCOptions -//counterfeiter:generate -o ./fake_envelope_processor_creator.go ../envelopeprocessor EnvelopeProcessorCreator -//counterfeiter:generate -o ./fake_plan_checker.go ../api/plancheck PlanChecker -//counterfeiter:generate -o ./fake_ratelimiter.go ../ratelimiter Limiter -//counterfeiter:generate -o ./fake_httpstatus_collector.go ../healthendpoint HTTPStatusCollector -//counterfeiter:generate -o ./fake_database_status.go ../healthendpoint DatabaseStatus -//counterfeiter:generate -o ./fake_emitter.go ../metricsgateway Emitter -//counterfeiter:generate -o ./fake_operator.go ../operator Operator -//counterfeiter:generate -o ./fake_sychronizer.go ../scalingengine/schedule ActiveScheduleSychronizer +// Multiple go:generate directives instead of counterfeiter:generate due to https://github.com/maxbrunsfeld/counterfeiter/issues/254 +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_wshelper.go ../metricsgateway/helpers WSHelper +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_cf_client.go ../cf CFClient +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_policy_db.go ../db PolicyDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_scalingengine_db.go ../db ScalingEngineDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_scheduler_db.go ../db SchedulerDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_scalingengine.go ../scalingengine ScalingEngine +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_binding_db.go ../db BindingDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_app_metric_db.go ../db AppMetricDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_instancemetrics_db.go ../db InstanceMetricsDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_credentials.go ../cred_helper Credentials +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_storedprocedure_db.go ../db StoredProcedureDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_metric_forwarder.go ../metricsforwarder/forwarder MetricForwarder +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_plan_checker.go ../api/plancheck PlanChecker +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_log_cache_client.go ../eventgenerator/client LogCacheClientReader +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_envelope_processor.go ../envelopeprocessor EnvelopeProcessor +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_log_cache_creator.go ../eventgenerator/client LogCacheClientCreator +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_metric_server_creator_creator.go ../eventgenerator/client MetricServerClientCreator +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_go_log_cache_client.go ../eventgenerator/client GoLogCacheClient +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_grpc.go ../eventgenerator/client GRPCOptions +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_envelope_processor_creator.go ../envelopeprocessor EnvelopeProcessorCreator +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_plan_checker.go ../api/plancheck PlanChecker +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_ratelimiter.go ../ratelimiter Limiter +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_httpstatus_collector.go ../healthendpoint HTTPStatusCollector +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_database_status.go ../healthendpoint DatabaseStatus +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_emitter.go ../metricsgateway Emitter +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_operator.go ../operator Operator +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_sychronizer.go ../scalingengine/schedule ActiveScheduleSychronizer From 229de9be5fae07b617e7d906341ad119d683a0c2 Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Mon, 21 Aug 2023 09:13:03 +0200 Subject: [PATCH 154/294] Remove left-over `init` dependency --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b5eddf4f5d..c10284b895 100644 --- a/Makefile +++ b/Makefile @@ -126,7 +126,7 @@ test-autoscaler-suite: check-db_type init-db test-certs test-scheduler: check-db_type init-db test-certs @export DB_HOST=${DB_HOST}; \ cd src && mvn test --no-transfer-progress -Dspring.profiles.include=${db_type} && cd .. -test-changelog: init +test-changelog: @make -C src/changelog test test-changeloglockcleaner: init-db test-certs @make -C src/changeloglockcleaner test DBURL="${DBURL}" From c2e04529600e47ea11dd6699093aae34f88694ae Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 21 Aug 2023 08:01:53 +0000 Subject: [PATCH 155/294] chore(deps): lock file maintenance (#2073) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 19 +++-- .../github-arc-team-wg-ci/.terraform.lock.hcl | 78 +++++++++---------- jobs/Gemfile.lock | 19 +++-- spec/Gemfile.lock | 19 +++-- 4 files changed, 72 insertions(+), 63 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3a0f84bb42..58b3eaaf03 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,6 +2,7 @@ GEM remote: https://rubygems.org/ specs: ast (2.4.2) + base64 (0.1.1) bosh-template (2.4.0) semi_semantic (~> 1.2.0) diff-lcs (1.5.0) @@ -34,35 +35,37 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.52.1) + rubocop (1.56.0) + base64 (~> 0.1.1) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.2.2.3) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.0, < 2.0) + rubocop-ast (>= 1.28.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.29.0) parser (>= 3.2.1.0) - rubocop-performance (1.18.0) + rubocop-performance (1.19.0) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) semi_semantic (1.2.0) - standard (1.30.1) + standard (1.31.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.52.0) + rubocop (~> 1.56.0) standard-custom (~> 1.0.0) - standard-performance (~> 1.1.0) + standard-performance (~> 1.2) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.1.2) + standard-performance (1.2.0) lint_roller (~> 1.1) - rubocop-performance (~> 1.18.0) + rubocop-performance (~> 1.19.0) unicode-display_width (2.4.2) PLATFORMS diff --git a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl index 27708659a0..f7b3f08e54 100644 --- a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl +++ b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl @@ -19,55 +19,55 @@ provider "registry.terraform.io/gavinbunney/kubectl" { } provider "registry.terraform.io/hashicorp/google" { - version = "4.76.0" + version = "4.78.0" hashes = [ - "h1:+w+KUxTFiJ3EQiGdDuZYOyDW+YV6/38hIR+D1fUny40=", - "h1:19cFova8/i7y9vCvzyAbkjnIJl8qhQdgjWw86fjiP7k=", - "h1:CJx05M+H8U4bMgN+1T1B8JbPOcct2eItW76mYqy7q3U=", - "h1:DFv74AdJTDS9B5DAgsxHnflsAvJeq69z9+VmSza8GlA=", - "h1:NUHyqKNv/nelGkZpwWmOAPhUnzUEEmkbz+KYVIs1DKc=", - "h1:PFn0c5lKtehKTo7k0HyT5Ga5ZKzSVGiJTPoMISgPgWE=", - "h1:XRuIr6U3qWQ+d8TZlmhgchgxwOcYpwaYh465qKIiA7I=", - "h1:aMCPRtjf1/jjb726PDRgQ5okXdip4QhGfuE09/W36wQ=", - "h1:vLKB2B15q5kQnsKArfH8od8olV+ibkEF8mOjinIeA6Q=", - "h1:vRpscn3cQ5ZfNdkX0Q0vVB3gGZbORA0+2HPUAaLSejw=", - "h1:vVwj/rwzBLLU8NLUPIRP4f+wY7MtP2+6BVqZJqkaD98=", + "h1:57aOHpJEIU3vc++q2bdAQi0Q+MI8zPnJ5Ace9c61r4A=", + "h1:MP5C7ABVyTlyT/8DXrOJg10hXggF0vKYihjjAwehLrg=", + "h1:PRR7/X4msmjgadmKwkgkZJZdIsv3QksQIkk86MeJxrk=", + "h1:SGwfLgQ7zDlGeZKn92QUn5zWVhFqO4LvHPTo3VqVq+0=", + "h1:TCXNY8eRI1kP1EvqIaqZB5xSYcAm7Q+VBNAf0HMOPPc=", + "h1:gP0GkpnqQB9Qrt+yohwnP8XYI2aIaXJ2K5nwT733iO8=", + "h1:jrPNt3Xc4svPJgzJQKrgs3Y1Z+A88MMZLTHeXsX4g0g=", + "h1:rzLGvEDbgxLtHOX+X8+me56x5ehWw6L36nMDcCz8gfc=", + "h1:sBz9KYNhJiyEdOvRrIj+VDNQOmMHLguLmMAQ1Uz4WYo=", + "h1:sVFLz1ziSEI7TeMCubxwEFkLDLmazYCGI3YctrD3RTg=", + "h1:wxYr3Z7xTg+rugpIu/DKOW88nJ7V76lYvq50+auW5cc=", ] } provider "registry.terraform.io/hashicorp/kubernetes" { - version = "2.22.0" + version = "2.23.0" hashes = [ - "h1:DJr88+52tPK4Ft9xltF6YL+sRz8HWLP2ZOfFiKSB5Dc=", - "h1:EBi28mEwbQJXL25oZCMaPrOUvMm6fukV5hUPleKY2w0=", - "h1:EaHpk0hY0urPcZQ4n7LgycQHklUNvoC8u+WTAH35vhg=", - "h1:N2Nta6li+07oT02gcgLzAU4goGIWNXY2zqKUV/9rLLE=", - "h1:PdThbypFQ5Wc0PQFzcef5y0z52EfgbSNW1S7ZgMQWW0=", - "h1:Tt9Ux7AfdVWeRhAkdnhknthwevYPYePnuv0mYKQ0pOY=", - "h1:b6Wj111/wsMNg8FrHFXrf4mCZFtSXKHx4JvbZh3YTCY=", - "h1:jA1dtidWHrxf0D3V7BoVc7wbzKchpIjwINBW3DiOR44=", - "h1:majnb9AYactsjXcDYDa9+wiiNFSVVIfBEMQowzTMo6E=", - "h1:o7d0icd+92XLs1l83GUYFujHl70CZ7VioYuI827hydo=", - "h1:sAHTYTbgC61YwliQTjN30Cybyb/V4Aq1GAWKg30Mx3c=", + "h1:268LPgwqi6+WWDdxkKkE3NnrG5t8e/Po0HP4ocRFeM8=", + "h1:9c/k4NUSb5Oxg/UYkBNxtjizdkUcd5Dg1l5Yn9vVAzM=", + "h1:PTuAVVjCX41j7T2ffWcWZ1/zSY5N/ysHahvdIvw2IKM=", + "h1:S0dS3oy5c6ma2JUzpbtO45wb5iSCJdFFiUDf/t99tws=", + "h1:arTzD0XG/DswGCAx9JEttkSKe9RyyFW9W7UWcXF13dU=", + "h1:cMs2scNCSgQhGamomGT5Ag4i8ms/mql1AR7NJc2hmbA=", + "h1:lDElv6Yi8IIvDskRx0937XBoFNO/GiULFRDFeVF5sTc=", + "h1:sNA/0F6F3RW/Ew54jZatGlE6v2BvSKUEV7MQ6WPJECU=", + "h1:sXCkOxRoMFTJnBMRmQlem2S5euv65k4veJQN5LaJayI=", + "h1:uosKyesMfmeKIcxjMLaHVMW3uW3zVy50Bzvx2jpsNoE=", + "h1:xyFc77aYkPoU4Xt1i5t0B1IaS8TbTtp9aCSuQKDayII=", ] } provider "registry.terraform.io/integrations/github" { - version = "5.32.0" + version = "5.33.0" hashes = [ - "h1:1vPtnvpCxaWPUgUWScL9xka/CA06q69iKaaj6pmpAcg=", - "h1:2+ykRJOPosx0nlqrGPFcBLiP5rNurpP4miwbQMBFPYI=", - "h1:ALjQKDRxUCoNsAHuJkh/tsbgjskWF1cIFbqYIhrSzIw=", - "h1:Gyd+KNK/0/jxKwzHsLZkcd4uACV+bxV4JF5hnMDXM6c=", - "h1:P+NsNNmL7/mOlD5sGegogeQxG9SVotPd0p6biEs3z3o=", - "h1:TFDh3n6L2XSueODpdVVBXcwTIicQeZh4jnPeJeAZLsA=", - "h1:XhTVkbsAH4zoPwDuj23+TWAfzOcOcamlk8Q0AJVPIQE=", - "h1:Z829L+uWh6XVjrspL5kV42g6Eml63SaZh2GdDhQr69c=", - "h1:ZT3PBYcM3m867hYS7Kb4OHDNGLQBFw0ZTSFgC416VFw=", - "h1:enUQQ96z3R8U/Zz7L6CVYs8zIjmfJhv4YgpQK4spuXM=", - "h1:gTNCUGRzAHvJihm72i0W7zebCENiqA28G8Fl+mElQ+o=", - "h1:igCF0XbR3EVR6H7pQg2bjRlNwK+KyW+z8i1DoTi7y7c=", - "h1:jb6b5h/W9RofGfnKIStSJLfuy4nz0rZMc56pNvgeHPE=", - "h1:oyUMDKIIoOl+3EoxworAm9z6dqAAzPIXWyMPCBniPNk=", + "h1:/xl2SqJBki+R92B2EY0LFP6SL1syDbzp7I879p6y8K4=", + "h1:1DbdeunX47eo7gxZ0rQX1CL+VYLwUKnCt1DMWnxb6nc=", + "h1:3MWIdru569EpyoDhtVreKa9QSyJLavWKyQDRVn6SX3g=", + "h1:L5L9zq9xXl/m1uG18qv+phFPeaF3p/XXq+SpcvB1HAA=", + "h1:NbkroiNJ5+x3EWiq6L6hpduTQbmXOfoqw/rNjqoz/f8=", + "h1:WvUb3jF+s7pJnCocdSB6uQmSsz2wwQKc+AV2QFQm3Zs=", + "h1:XobpgwAN1XDbplssJ/Yfgjslauu6XQUZs1bNxd9+JE0=", + "h1:XrlcbUuqah6hTqqNfZX/nCSnEsRpdVZ5QTuGezMnpZ0=", + "h1:ke2CCTIslwDLKihFQJgV+kbr6URmnBuWbnk2vy1ovdw=", + "h1:rTYFmoAKP7OBtjyt0KGHnJELzcImJyQuGJVno7x8KQ8=", + "h1:tV/QITrNQa1YpKhr+P1uS91i5fmW5Tf3tY4fJe7DEwA=", + "h1:typaWGkxfXREHr/rgOc9VPipQ+Xp3n/0DCIL5+gOT1I=", + "h1:uVzK/I7QokJsz5+vl9Vr4P8fCpHTp1ceG2ZkYAmxiho=", + "h1:xA6kmRIVFckn3pm/zCX6Z7Xf2llmnjQZbtcSYVhQQlU=", ] } diff --git a/jobs/Gemfile.lock b/jobs/Gemfile.lock index 3a0f84bb42..58b3eaaf03 100644 --- a/jobs/Gemfile.lock +++ b/jobs/Gemfile.lock @@ -2,6 +2,7 @@ GEM remote: https://rubygems.org/ specs: ast (2.4.2) + base64 (0.1.1) bosh-template (2.4.0) semi_semantic (~> 1.2.0) diff-lcs (1.5.0) @@ -34,35 +35,37 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.52.1) + rubocop (1.56.0) + base64 (~> 0.1.1) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.2.2.3) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.0, < 2.0) + rubocop-ast (>= 1.28.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.29.0) parser (>= 3.2.1.0) - rubocop-performance (1.18.0) + rubocop-performance (1.19.0) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) semi_semantic (1.2.0) - standard (1.30.1) + standard (1.31.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.52.0) + rubocop (~> 1.56.0) standard-custom (~> 1.0.0) - standard-performance (~> 1.1.0) + standard-performance (~> 1.2) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.1.2) + standard-performance (1.2.0) lint_roller (~> 1.1) - rubocop-performance (~> 1.18.0) + rubocop-performance (~> 1.19.0) unicode-display_width (2.4.2) PLATFORMS diff --git a/spec/Gemfile.lock b/spec/Gemfile.lock index 66239495f1..27b24b48e6 100644 --- a/spec/Gemfile.lock +++ b/spec/Gemfile.lock @@ -2,6 +2,7 @@ GEM remote: https://rubygems.org/ specs: ast (2.4.2) + base64 (0.1.1) bosh-template (2.4.0) semi_semantic (~> 1.2.0) diff-lcs (1.5.0) @@ -34,35 +35,37 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.52.1) + rubocop (1.56.0) + base64 (~> 0.1.1) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.2.2.3) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.0, < 2.0) + rubocop-ast (>= 1.28.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.29.0) parser (>= 3.2.1.0) - rubocop-performance (1.18.0) + rubocop-performance (1.19.0) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) semi_semantic (1.2.0) - standard (1.30.1) + standard (1.31.0) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.52.0) + rubocop (~> 1.56.0) standard-custom (~> 1.0.0) - standard-performance (~> 1.1.0) + standard-performance (~> 1.2) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.1.2) + standard-performance (1.2.0) lint_roller (~> 1.1) - rubocop-performance (~> 1.18.0) + rubocop-performance (~> 1.19.0) unicode-display_width (2.4.2) PLATFORMS From 9d2b8a976926895c18705f65cb3e2662df22b302 Mon Sep 17 00:00:00 2001 From: CI Bot Date: Mon, 21 Aug 2023 11:26:26 +0000 Subject: [PATCH 156/294] Updated release version to 11.1.0 in golangapiserver --- jobs/golangapiserver/spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/golangapiserver/spec b/jobs/golangapiserver/spec index 4e577b5046..f8abdc5481 100644 --- a/jobs/golangapiserver/spec +++ b/jobs/golangapiserver/spec @@ -86,7 +86,7 @@ properties: default: "Autoscaler" autoscaler.apiserver.info.build: description: "Autoscaler application build number" - default: "11.0.0" + default: "11.1.0" autoscaler.apiserver.info.support_url: description: "Autoscaler application support page URL" default: "https://github.com/cloudfoundry/app-autoscaler-release" From 75d66681d34aa538d5bdac324870f473c7916b78 Mon Sep 17 00:00:00 2001 From: CI Bot Date: Mon, 21 Aug 2023 11:28:15 +0000 Subject: [PATCH 157/294] created release v11.1.0 --- .final_builds/jobs/golangapiserver/index.yml | 4 + .../packages/changeloglockcleaner/index.yml | 4 + .final_builds/packages/db/index.yml | 4 + .../packages/eventgenerator/index.yml | 4 + .../packages/golangapiserver/index.yml | 4 + .../packages/metricsforwarder/index.yml | 4 + .../packages/metricsgateway/index.yml | 4 + .../packages/metricsserver/index.yml | 4 + .final_builds/packages/operator/index.yml | 4 + .../packages/scalingengine/index.yml | 4 + .final_builds/packages/scheduler/index.yml | 4 + .../app-autoscaler/app-autoscaler-11.1.0.yml | 163 ++++++++++++++++++ releases/app-autoscaler/index.yml | 2 + 13 files changed, 209 insertions(+) create mode 100644 releases/app-autoscaler/app-autoscaler-11.1.0.yml diff --git a/.final_builds/jobs/golangapiserver/index.yml b/.final_builds/jobs/golangapiserver/index.yml index 9423b271c0..0a699c10e0 100644 --- a/.final_builds/jobs/golangapiserver/index.yml +++ b/.final_builds/jobs/golangapiserver/index.yml @@ -15,6 +15,10 @@ builds: version: 0b30d180a2d7c30c6975485965da14db7792c6cc2aa2dbef4e5896619b316c08 blobstore_id: f03adedd-d0cb-4472-4cde-656595570674 sha1: sha256:7e9ffc1533d3caa0354a08c0c291e77237a5539f651488a78ed8ef96cd66a1c6 + 1036b9da383abe282a90545920d75115471f66334e5f012ff9dd3d26730033e3: + version: 1036b9da383abe282a90545920d75115471f66334e5f012ff9dd3d26730033e3 + blobstore_id: 8f379321-291a-43f3-7a2f-c064c5d976b6 + sha1: sha256:fee48db9ed6c3f82cffa022052a48cfe7c10a45ed668b5a50474f35dddcdba6e 143e430b78a525f355eb585c75db666cae1ea108c0b3f5010e409ec3e9c8d30c: version: 143e430b78a525f355eb585c75db666cae1ea108c0b3f5010e409ec3e9c8d30c blobstore_id: 4cc7947c-2296-4d71-4800-33c332d7dc71 diff --git a/.final_builds/packages/changeloglockcleaner/index.yml b/.final_builds/packages/changeloglockcleaner/index.yml index 42647bc67b..2dc410bd65 100644 --- a/.final_builds/packages/changeloglockcleaner/index.yml +++ b/.final_builds/packages/changeloglockcleaner/index.yml @@ -99,6 +99,10 @@ builds: version: bb453cdfc605a0ede1b141b05efd05149e9fe56b892ee851d7805f078061a7f3 blobstore_id: addb9414-c72f-4d61-5597-d81d876f317d sha1: sha256:ff6196f388a4845498cac6ebf128580b71b6c07dd22a11bf109ae2bcf8586945 + bbd6b1bc309c9aee0cb7276885b7465bbf6009bc4c31bfcbf3eb882e6ec96783: + version: bbd6b1bc309c9aee0cb7276885b7465bbf6009bc4c31bfcbf3eb882e6ec96783 + blobstore_id: 52632ede-a58a-4e41-6b18-f8dd06e9e260 + sha1: sha256:ed67f19a318df287ec938ea3d5a18c43f838cad33fe1c23bdfc724c153333bb5 cfbc3e5733735c5c8220f649bca20a79e937edc99178078efb11b6dcd5c1e670: version: cfbc3e5733735c5c8220f649bca20a79e937edc99178078efb11b6dcd5c1e670 blobstore_id: 14d4b82f-81db-420a-7b87-3e8696f85ce4 diff --git a/.final_builds/packages/db/index.yml b/.final_builds/packages/db/index.yml index 8335a48b86..b508dc09b9 100644 --- a/.final_builds/packages/db/index.yml +++ b/.final_builds/packages/db/index.yml @@ -91,6 +91,10 @@ builds: version: 77f74be7718ee64ab4c469bf8b691c8577b98a9556c0c6754c68fd105c198954 blobstore_id: 68f988bd-63f5-463b-4a7b-cc3b01eef39c sha1: sha256:cd21713c5daa2260722850e209f9c19da2a1e020c5a35e77a0eaee4b9b66cc62 + 78dc6ee98aba1e2b7ab50071b132601cbccae7897c44af5d7c9e7b0af37ce112: + version: 78dc6ee98aba1e2b7ab50071b132601cbccae7897c44af5d7c9e7b0af37ce112 + blobstore_id: 13d142df-9577-4fe9-5f51-5ac9445cd5ed + sha1: sha256:8ae98002bdd166a266e282ad93c3a443d5f6518d6ee0d48770c7143fcabf0702 887e8b0609ffb6ce8b34b153acd131792b86683a754aa1a4cf4d17ca1e898300: version: 887e8b0609ffb6ce8b34b153acd131792b86683a754aa1a4cf4d17ca1e898300 blobstore_id: 12bdb02d-eca9-4a1c-6b75-cc20348f31ed diff --git a/.final_builds/packages/eventgenerator/index.yml b/.final_builds/packages/eventgenerator/index.yml index e51b02bb27..7eb7f2dc95 100644 --- a/.final_builds/packages/eventgenerator/index.yml +++ b/.final_builds/packages/eventgenerator/index.yml @@ -171,6 +171,10 @@ builds: version: ee0d49e32400c8d84a5500e483aabb5ebf5d1efa7b83e72aa0b83f843c4c65ef blobstore_id: a460ae9b-06fc-43ac-52d6-2448b3f38b18 sha1: sha256:345d68567195b5d7fb8a0d1b7be79017f9c8ef82d049550783ebc24f7f542c5b + f556306b400b47708e8e9267d1a5282669b911827e8600122d2fc99a36ca4fe2: + version: f556306b400b47708e8e9267d1a5282669b911827e8600122d2fc99a36ca4fe2 + blobstore_id: 14e117ba-5103-4a87-493c-f5251b6ba7b9 + sha1: sha256:a948ba87c7bf003e919c74eefedb5b5b213a0e569612ac8d907ee90e055b22a9 f8d1cd635a7f90f58e594e5b0c704a7b8499c54d07d587d6fa53df635258015d: version: f8d1cd635a7f90f58e594e5b0c704a7b8499c54d07d587d6fa53df635258015d blobstore_id: 9c80ccee-8420-4785-6fde-e45e85d214cb diff --git a/.final_builds/packages/golangapiserver/index.yml b/.final_builds/packages/golangapiserver/index.yml index 767e01abec..f697a7a818 100644 --- a/.final_builds/packages/golangapiserver/index.yml +++ b/.final_builds/packages/golangapiserver/index.yml @@ -15,6 +15,10 @@ builds: version: 21f79e24c45a25726b8a89a55436668a3bc12d914c8df271e345522e7fae83b1 blobstore_id: a123852b-7c36-49e8-7254-4d1d125a62c8 sha1: sha256:408aeb02d5c4adb90a30cf29175dddece9f0d59aa9286a3df5042d1a1433d6b8 + 255c3f6571c88b6f7701478400b9f9ab9efa574d256ff4a4ea38f35a6535ef27: + version: 255c3f6571c88b6f7701478400b9f9ab9efa574d256ff4a4ea38f35a6535ef27 + blobstore_id: add5e5e5-03b9-41f0-7629-dd41e0378b60 + sha1: sha256:fe8343260b81a0323c685f9c8b05fa98145b1ea3d5bd4cda9523819b8b22d9af 2d5cbd6b874010adb5ed983cc8ad084fedea8c6a75c5ae78524e149960c54de0: version: 2d5cbd6b874010adb5ed983cc8ad084fedea8c6a75c5ae78524e149960c54de0 blobstore_id: cd12d871-e8ed-4402-796b-cbfaddcdf7da diff --git a/.final_builds/packages/metricsforwarder/index.yml b/.final_builds/packages/metricsforwarder/index.yml index a2b879f034..36fd1d2128 100644 --- a/.final_builds/packages/metricsforwarder/index.yml +++ b/.final_builds/packages/metricsforwarder/index.yml @@ -3,6 +3,10 @@ builds: version: 0542dc3eba60381c948b11c9febff5f704760d028592e9531b7cea746dd72d8c blobstore_id: 202f1fc2-3dd8-422b-5a3e-34c9fe9529fc sha1: sha256:5c7eb38fc0776ec61705aabafce789fee497d80e5b6308ed5460b65e72dcf7f6 + 0b7ea6c06556a84c5f1fbdc655a3735d1e1b7f22cb9b498d4e1e3cb7d12c07c7: + version: 0b7ea6c06556a84c5f1fbdc655a3735d1e1b7f22cb9b498d4e1e3cb7d12c07c7 + blobstore_id: 96b28ad0-4997-4a3d-569e-d44aa731651f + sha1: sha256:7213361a59b913600e0ed52bd4b3ef61db6a5e36e6d1d16de316e255399bf60b 0ddc7d7ee623fa39871f08bcebeca0ba1e6d49744b5918d49426584f7d24b17a: version: 0ddc7d7ee623fa39871f08bcebeca0ba1e6d49744b5918d49426584f7d24b17a blobstore_id: 4b186876-84b2-4547-4881-9bbee05fd4c6 diff --git a/.final_builds/packages/metricsgateway/index.yml b/.final_builds/packages/metricsgateway/index.yml index 8f83add6a3..2fd54c002e 100644 --- a/.final_builds/packages/metricsgateway/index.yml +++ b/.final_builds/packages/metricsgateway/index.yml @@ -175,6 +175,10 @@ builds: version: e3a0f04cb59606553559099eee46e56d13d1777eb53e64f7f3ea79eb1c55bc9a blobstore_id: 34fad434-e9f3-4694-410f-e4b0c6955a06 sha1: sha256:59ac15964532fd69e4d99490d3f42805d56397448292ec4c3f744ee28106edf7 + e3fa5fc434b93d0073573cf5ee961f99b06738fba6a1db2dd9666f4d14f7f9b7: + version: e3fa5fc434b93d0073573cf5ee961f99b06738fba6a1db2dd9666f4d14f7f9b7 + blobstore_id: a2debf8f-cc8d-44b7-576d-6654493024d0 + sha1: sha256:0476fcc8800c679479622f58d79d28a077f6f3da11d794bc4989843421c90c88 f913b8fa007f95480c339c1789bc4d09efcc02de0fee93234a1db28e5fa87e2d: version: f913b8fa007f95480c339c1789bc4d09efcc02de0fee93234a1db28e5fa87e2d blobstore_id: 3408cad5-7d22-4f84-493d-e809cca5d644 diff --git a/.final_builds/packages/metricsserver/index.yml b/.final_builds/packages/metricsserver/index.yml index 37d229f3e6..89faefcd69 100644 --- a/.final_builds/packages/metricsserver/index.yml +++ b/.final_builds/packages/metricsserver/index.yml @@ -51,6 +51,10 @@ builds: version: 3953aec19748087e8bf1e5177c17346c18f61f704b624222c09789f8513e7af8 blobstore_id: 44e85bbe-2f58-4ac2-490b-c1f6ea00c381 sha1: sha256:58f0ed8579d6371a3e1b24a720f7e72076bfe36b42d732034461edbc65374b53 + 3a51dcf9ad0eb5cc7496f29721d9fa6b13e6e2a718f4e0735b32d422cf4311cc: + version: 3a51dcf9ad0eb5cc7496f29721d9fa6b13e6e2a718f4e0735b32d422cf4311cc + blobstore_id: 3abb5a5f-8c3c-416e-4bbe-a59884beebbc + sha1: sha256:b7f5d23434929585166121cc68127c37bebaa49002237969d3ece47510975e79 3d75143509df6b8b1108da4ecc2f308b37d78991d1f00a3d5873dccdfa24e90a: version: 3d75143509df6b8b1108da4ecc2f308b37d78991d1f00a3d5873dccdfa24e90a blobstore_id: 75f72f6b-274e-4edc-7aa7-5d4c7d4803ea diff --git a/.final_builds/packages/operator/index.yml b/.final_builds/packages/operator/index.yml index 70da2e772c..fa6b28e165 100644 --- a/.final_builds/packages/operator/index.yml +++ b/.final_builds/packages/operator/index.yml @@ -95,6 +95,10 @@ builds: version: 84f1473f55a3b9806847d387dfdc1a3423aaa36f9be09c85ea07e842da9e7528 blobstore_id: 2b150d31-d354-411a-7d9f-e17771426aab sha1: sha256:ae1ab4a028655097c337f9386a1a3a4aa9b27a72d5371cfa9b13c5e8f8c27b4d + 85910a843919e5874c030ec35bf99410934869d47968378235d098ea2671cd17: + version: 85910a843919e5874c030ec35bf99410934869d47968378235d098ea2671cd17 + blobstore_id: fa47866d-9cb3-402b-7f05-0e24fda45015 + sha1: sha256:baeed1093406aef9a9684089d74324b8c10a5c15b947f00d651f57ce02567e57 8734bcd68c0196f7dbaca79bfb5ec5fedd1fab4ad3e4637c95bd3671090e91a8: version: 8734bcd68c0196f7dbaca79bfb5ec5fedd1fab4ad3e4637c95bd3671090e91a8 blobstore_id: c6df52de-9fc0-4621-60da-aba63ffefca9 diff --git a/.final_builds/packages/scalingengine/index.yml b/.final_builds/packages/scalingengine/index.yml index eea458112d..63915ce672 100644 --- a/.final_builds/packages/scalingengine/index.yml +++ b/.final_builds/packages/scalingengine/index.yml @@ -15,6 +15,10 @@ builds: version: 0f3633d67a7947d14d40c70e7807a5625b67cb2e9bc92056aa67b9480b63959c blobstore_id: 625906ba-afa7-41b0-695c-8fab221070a9 sha1: sha256:aad60c4767b7d67a3d4eb5a104dc78617f9462f648551ec958ae6647af48af10 + 11d5c5962c9910e5bf5633d5c2c850d529d09a6ede0971812524f9a0031a944a: + version: 11d5c5962c9910e5bf5633d5c2c850d529d09a6ede0971812524f9a0031a944a + blobstore_id: 8928ae91-f841-42b2-4040-739806f7fd42 + sha1: sha256:b3e118ba8894dfc25eeef072498829df8ef62db34521ebcd77e4ef224dc9eb68 1b2554fc3dad89a314c70df92e68fbf92616ce765ab40e18b9fcf581ee584918: version: 1b2554fc3dad89a314c70df92e68fbf92616ce765ab40e18b9fcf581ee584918 blobstore_id: 795bb092-79ac-4f6b-4f94-959b5627f731 diff --git a/.final_builds/packages/scheduler/index.yml b/.final_builds/packages/scheduler/index.yml index 6624bde46e..71d9e75251 100644 --- a/.final_builds/packages/scheduler/index.yml +++ b/.final_builds/packages/scheduler/index.yml @@ -195,6 +195,10 @@ builds: version: a9d9716f069279b349904f186bf73662fc50ecd5a8811bfec5d605ba5c769715 blobstore_id: 87f06c25-411c-41df-5835-82037089f2e2 sha1: sha256:878c5a530ca5ad8ad70dbb0f6efa8dba8a2b639ab45638f25c61c697210304f1 + b32421fef6ca7258f020038972176f991283d23c9a82a63d382711c518fed005: + version: b32421fef6ca7258f020038972176f991283d23c9a82a63d382711c518fed005 + blobstore_id: b5cd6ba7-3a9d-4647-43d0-1e5cf743c6a0 + sha1: sha256:ac630bac90afac3a86d03bcacf9e960894d6ebf20944b858841050f68bd41c55 b34fb76386febee5580db12369b25105fb980ff01e16f7e29ef39feb1aa5cc19: version: b34fb76386febee5580db12369b25105fb980ff01e16f7e29ef39feb1aa5cc19 blobstore_id: 32b42ad0-5e8f-4241-417a-30f1e952cfee diff --git a/releases/app-autoscaler/app-autoscaler-11.1.0.yml b/releases/app-autoscaler/app-autoscaler-11.1.0.yml new file mode 100644 index 0000000000..91c10adcf9 --- /dev/null +++ b/releases/app-autoscaler/app-autoscaler-11.1.0.yml @@ -0,0 +1,163 @@ +name: app-autoscaler +version: 11.1.0 +commit_hash: 9d2b8a97 +uncommitted_changes: false +jobs: +- name: eventgenerator + version: b2d2b8153753c2db2a166a851c62b51e7cb1a3b6f9c05c48ab3461299a8c4f23 + fingerprint: b2d2b8153753c2db2a166a851c62b51e7cb1a3b6f9c05c48ab3461299a8c4f23 + sha1: sha256:8f2f5bf042a0b3d9e6946538084a0fd0ecfce39fa57961556529d33ca7ed46b2 + packages: + - openjdk-17 + - db + - eventgenerator + - common + - changeloglockcleaner +- name: golangapiserver + version: 1036b9da383abe282a90545920d75115471f66334e5f012ff9dd3d26730033e3 + fingerprint: 1036b9da383abe282a90545920d75115471f66334e5f012ff9dd3d26730033e3 + sha1: sha256:fee48db9ed6c3f82cffa022052a48cfe7c10a45ed668b5a50474f35dddcdba6e + packages: + - golang-1-linux + - golangapiserver + - db + - openjdk-17 + - common + - changeloglockcleaner +- name: metricsforwarder + version: a1f9aff41f3280ba09cf01ff2b94fba006e393aae7250c1e7a24c3f5db8cfc14 + fingerprint: a1f9aff41f3280ba09cf01ff2b94fba006e393aae7250c1e7a24c3f5db8cfc14 + sha1: sha256:8abb357807ce50a10f666c272fcaa8bd830adf8733de878510666ff59cc7f100 + packages: + - db + - metricsforwarder + - common +- name: metricsgateway + version: a32ac8746733a6b38429d9396ffad3e91bcd752bebd70575760da12a7b952116 + fingerprint: a32ac8746733a6b38429d9396ffad3e91bcd752bebd70575760da12a7b952116 + sha1: sha256:c68ffbe7b56539c83c2a1a45e1d95e505c936cdbaadb83c0b18923a59a4d288c + packages: + - openjdk-17 + - db + - metricsgateway + - common +- name: metricsserver + version: 9dd076e50c33a9d28562ec0ce44216530cf027bba605d68a87025ec5af35dac9 + fingerprint: 9dd076e50c33a9d28562ec0ce44216530cf027bba605d68a87025ec5af35dac9 + sha1: sha256:7b206a85eeaa9653145f23ce86d06b56a197fa194c9fb77d7302498fcf4ebc9a + packages: + - openjdk-17 + - db + - metricsserver + - common + - changeloglockcleaner +- name: operator + version: d9d2e4b01775c9cfdeb6d08e51a8359825e7e58dd9287ef8ed7c0e92079f545b + fingerprint: d9d2e4b01775c9cfdeb6d08e51a8359825e7e58dd9287ef8ed7c0e92079f545b + sha1: sha256:2a28db8de40e66c49884669d48f61574e5fcf2150ad6e7d35710b6c663b34b53 + packages: + - operator + - common + - db + - openjdk-17 + - changeloglockcleaner +- name: scalingengine + version: 79452b9f8b4e3f973ffe2cd2c7451a6eafe8d9f305ccb72fc05caf58cb848c50 + fingerprint: 79452b9f8b4e3f973ffe2cd2c7451a6eafe8d9f305ccb72fc05caf58cb848c50 + sha1: sha256:5346cd7f63627aad66253e035fbc7f08679de2941d2fbb2fb55933df6ae32012 + packages: + - openjdk-17 + - db + - scalingengine + - common + - changeloglockcleaner +- name: scheduler + version: 96284fc271b871ecb496fff4a2b7674bddf07e2c62acc3c853954d4259b7ec17 + fingerprint: 96284fc271b871ecb496fff4a2b7674bddf07e2c62acc3c853954d4259b7ec17 + sha1: sha256:13757c46cd45cd96b0848600c3034a6c30afac34a4467b5ce2cd9e532731663e + packages: + - scheduler + - db + - openjdk-17 + - common + - changeloglockcleaner +packages: +- name: changeloglockcleaner + version: bbd6b1bc309c9aee0cb7276885b7465bbf6009bc4c31bfcbf3eb882e6ec96783 + fingerprint: bbd6b1bc309c9aee0cb7276885b7465bbf6009bc4c31bfcbf3eb882e6ec96783 + sha1: sha256:ed67f19a318df287ec938ea3d5a18c43f838cad33fe1c23bdfc724c153333bb5 + dependencies: + - golang-1-linux +- name: common + version: 9d7726aa454227e3087cd4a04425acae72d883a5bb19d314930ab58e83f04d0e + fingerprint: 9d7726aa454227e3087cd4a04425acae72d883a5bb19d314930ab58e83f04d0e + sha1: sha256:979ff40c6e44031bec55344aa4a522cac3d265ab23deaea0f7bc7541aa2b4124 + dependencies: [] +- name: db + version: 78dc6ee98aba1e2b7ab50071b132601cbccae7897c44af5d7c9e7b0af37ce112 + fingerprint: 78dc6ee98aba1e2b7ab50071b132601cbccae7897c44af5d7c9e7b0af37ce112 + sha1: sha256:8ae98002bdd166a266e282ad93c3a443d5f6518d6ee0d48770c7143fcabf0702 + dependencies: + - openjdk-17 +- name: eventgenerator + version: f556306b400b47708e8e9267d1a5282669b911827e8600122d2fc99a36ca4fe2 + fingerprint: f556306b400b47708e8e9267d1a5282669b911827e8600122d2fc99a36ca4fe2 + sha1: sha256:a948ba87c7bf003e919c74eefedb5b5b213a0e569612ac8d907ee90e055b22a9 + dependencies: + - golang-1-linux +- name: golang-1-linux + version: 126fca7399cba5bc8c1b02e392441f1688daf1586d57d1b3614e314b893a6cc4 + fingerprint: 126fca7399cba5bc8c1b02e392441f1688daf1586d57d1b3614e314b893a6cc4 + sha1: sha256:70c3918c28cd74a0a9be561b5eac8b85e8e7de4a72bc66cd321288974937e0be + dependencies: [] +- name: golangapiserver + version: 255c3f6571c88b6f7701478400b9f9ab9efa574d256ff4a4ea38f35a6535ef27 + fingerprint: 255c3f6571c88b6f7701478400b9f9ab9efa574d256ff4a4ea38f35a6535ef27 + sha1: sha256:fe8343260b81a0323c685f9c8b05fa98145b1ea3d5bd4cda9523819b8b22d9af + dependencies: + - golang-1-linux +- name: metricsforwarder + version: 0b7ea6c06556a84c5f1fbdc655a3735d1e1b7f22cb9b498d4e1e3cb7d12c07c7 + fingerprint: 0b7ea6c06556a84c5f1fbdc655a3735d1e1b7f22cb9b498d4e1e3cb7d12c07c7 + sha1: sha256:7213361a59b913600e0ed52bd4b3ef61db6a5e36e6d1d16de316e255399bf60b + dependencies: + - golang-1-linux +- name: metricsgateway + version: e3fa5fc434b93d0073573cf5ee961f99b06738fba6a1db2dd9666f4d14f7f9b7 + fingerprint: e3fa5fc434b93d0073573cf5ee961f99b06738fba6a1db2dd9666f4d14f7f9b7 + sha1: sha256:0476fcc8800c679479622f58d79d28a077f6f3da11d794bc4989843421c90c88 + dependencies: + - golang-1-linux +- name: metricsserver + version: 3a51dcf9ad0eb5cc7496f29721d9fa6b13e6e2a718f4e0735b32d422cf4311cc + fingerprint: 3a51dcf9ad0eb5cc7496f29721d9fa6b13e6e2a718f4e0735b32d422cf4311cc + sha1: sha256:b7f5d23434929585166121cc68127c37bebaa49002237969d3ece47510975e79 + dependencies: + - golang-1-linux +- name: openjdk-17 + version: c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0 + fingerprint: c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0 + sha1: sha256:ad449f24f5a9e6971b8c9e3bb8e9500bbd5115a6872d3b95d8e0d96a60e896ed + dependencies: [] +- name: operator + version: 85910a843919e5874c030ec35bf99410934869d47968378235d098ea2671cd17 + fingerprint: 85910a843919e5874c030ec35bf99410934869d47968378235d098ea2671cd17 + sha1: sha256:baeed1093406aef9a9684089d74324b8c10a5c15b947f00d651f57ce02567e57 + dependencies: + - golang-1-linux +- name: scalingengine + version: 11d5c5962c9910e5bf5633d5c2c850d529d09a6ede0971812524f9a0031a944a + fingerprint: 11d5c5962c9910e5bf5633d5c2c850d529d09a6ede0971812524f9a0031a944a + sha1: sha256:b3e118ba8894dfc25eeef072498829df8ef62db34521ebcd77e4ef224dc9eb68 + dependencies: + - golang-1-linux +- name: scheduler + version: b32421fef6ca7258f020038972176f991283d23c9a82a63d382711c518fed005 + fingerprint: b32421fef6ca7258f020038972176f991283d23c9a82a63d382711c518fed005 + sha1: sha256:ac630bac90afac3a86d03bcacf9e960894d6ebf20944b858841050f68bd41c55 + dependencies: + - openjdk-17 +license: + version: 15eb386a0db48f190d29bd28058f5d0d6605f5acde7c6cfc6f014d57747e41f9 + fingerprint: 15eb386a0db48f190d29bd28058f5d0d6605f5acde7c6cfc6f014d57747e41f9 + sha1: sha256:6c7a834097b96efc340787fbe5876c1e366de0235def5e2b93fa016c8655535c diff --git a/releases/app-autoscaler/index.yml b/releases/app-autoscaler/index.yml index 5fa5b29497..1457ed450c 100644 --- a/releases/app-autoscaler/index.yml +++ b/releases/app-autoscaler/index.yml @@ -75,6 +75,8 @@ builds: version: 3.7.7 b2231836-a048-42b2-4b41-d6a8f712e68b: version: 3.4.1 + b4370281-0b53-4e8b-749b-547d3dedbfbc: + version: 11.1.0 b56915e7-9fec-4e1b-5f22-f5d5f9ee84c6: version: 8.0.0 bae228ab-d77b-4dfc-4f8a-b1389163dec2: From fa3783131d2cffdedf7e93eb94d73008ceee3153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Thu, 3 Aug 2023 16:03:20 +0200 Subject: [PATCH 158/294] Find working scheme to check scheduler-process based on its health; --- deploy-autoscaler.log.txt | 321 ++++++++++++++++++++++++++++++++++++++ jobs/scheduler/monit | 10 +- 2 files changed, 327 insertions(+), 4 deletions(-) create mode 100644 deploy-autoscaler.log.txt diff --git a/deploy-autoscaler.log.txt b/deploy-autoscaler.log.txt new file mode 100644 index 0000000000..b51d9f6dfb --- /dev/null +++ b/deploy-autoscaler.log.txt @@ -0,0 +1,321 @@ + - go mod tidying './src/autoscaler' +go: downloading google.golang.org/grpc v1.57.0 +go: downloading golang.org/x/net v0.13.0 +go: downloading google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 +go: downloading google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 +go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 + - go mod tidying './src/acceptance' + - go mod tidying './src/changeloglockcleaner' + - go mod tidying './src/changelog' + - go mod vendor './src/autoscaler' + - go mod vendor './src/acceptance' + - go mod vendor './src/changeloglockcleaner' + - go mod vendor './src/changelog' +/home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/.direnv/ruby/bin/uaac +# building scheduler +[INFO] Scanning for projects... +[INFO] +[INFO] ---------------< org.cloudfoundry.autoscaler:scheduler >---------------- +[INFO] Building scheduler 1.0-SNAPSHOT +[INFO] from pom.xml +[INFO] --------------------------------[ war ]--------------------------------- +[INFO] +[INFO] --- resources:3.3.1:resources (default-resources) @ scheduler --- +[INFO] Copying 2 resources from src/main/resources to target/classes +[INFO] Copying 4 resources from src/main/resources to target/classes +[INFO] +[INFO] --- compiler:3.11.0:compile (default-compile) @ scheduler --- +[INFO] Nothing to compile - all classes are up to date +[INFO] +[INFO] --- resources:3.3.1:testResources (default-testResources) @ scheduler --- +[INFO] Not copying test resources +[INFO] +[INFO] --- compiler:3.11.0:testCompile (default-testCompile) @ scheduler --- +[INFO] Not compiling test sources +[INFO] +[INFO] --- surefire:3.0.0:test (default-test) @ scheduler --- +[WARNING] Parameter 'disableXmlReport' (user property 'disableXmlReport') is deprecated: No reason given +[INFO] Tests are skipped. +[INFO] +[INFO] --- war:3.3.2:war (default-war) @ scheduler --- +[INFO] Packaging webapp +[INFO] Assembling webapp [scheduler] in [/home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/src/scheduler/target/scheduler-1.0-SNAPSHOT] +[INFO] Processing war project +[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-3.1.1.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-boot-3.1.1.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-boot-autoconfigure-3.1.1.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-logging-3.1.1.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-core-6.0.10.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-jcl-6.0.10.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-web-3.1.1.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-json-3.1.1.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-web-6.0.10.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-webmvc-6.0.10.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-aop-6.0.10.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-expression-6.0.10.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-web-services-3.1.1.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-oxm-6.0.10.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-data-jpa-3.1.1.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-aop-3.1.1.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-jdbc-3.1.1.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-jdbc-6.0.10.jar +[INFO] deleting outdated resource WEB-INF/lib/hibernate-core-6.2.5.Final.jar +[INFO] deleting outdated resource WEB-INF/lib/jboss-logging-3.5.1.Final.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-data-jpa-3.1.1.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-data-commons-3.1.1.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-orm-6.0.10.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-aspects-6.0.10.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-actuator-3.1.1.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-boot-actuator-autoconfigure-3.1.1.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-boot-actuator-3.1.1.jar +[INFO] deleting outdated resource WEB-INF/lib/micrometer-observation-1.11.1.jar +[INFO] deleting outdated resource WEB-INF/lib/micrometer-commons-1.11.1.jar +[INFO] deleting outdated resource WEB-INF/lib/micrometer-core-1.11.1.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-validation-3.1.1.jar +[INFO] deleting outdated resource WEB-INF/lib/tomcat-embed-el-10.1.10.jar +[INFO] deleting outdated resource WEB-INF/lib/hibernate-validator-8.0.0.Final.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-quartz-3.1.1.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-tx-6.0.10.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-context-support-6.0.10.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-beans-6.0.10.jar +[INFO] deleting outdated resource WEB-INF/lib/spring-context-6.0.10.jar +[INFO] deleting outdated resource WEB-INF/lib/mysql-connector-j-8.0.33.jar +[INFO] Building war: /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/src/scheduler/target/scheduler-1.0-SNAPSHOT.war +[INFO] +[INFO] --- spring-boot:3.1.2:repackage (repackage) @ scheduler --- +[INFO] Replacing main artifact /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/src/scheduler/target/scheduler-1.0-SNAPSHOT.war with repackaged archive, adding nested dependencies in BOOT-INF/. +[INFO] The original artifact has been renamed to /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/src/scheduler/target/scheduler-1.0-SNAPSHOT.war.original +[INFO] +[INFO] --- spring-boot:3.1.2:repackage (default) @ scheduler --- +[INFO] Replacing main artifact /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/src/scheduler/target/scheduler-1.0-SNAPSHOT.war with repackaged archive, adding nested dependencies in BOOT-INF/. +[INFO] The original artifact has been renamed to /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/src/scheduler/target/scheduler-1.0-SNAPSHOT.war.original +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESS +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 7.253 s +[INFO] Finished at: 2023-08-03T14:41:41+02:00 +[INFO] ------------------------------------------------------------------------ + - deploying autoscaler + - set up vars: DEPLOYMENT_NAME=jdw-pr-2015 + - Deploying autoscaler 'dc91c7f661d2a76905bb6990c76d8722f875fc8b-jdw-pr-2015' with name 'jdw-pr-2015' +WARNING: Decoding token without verifying it was signed by its authoring UAA +# updating autoscaler uaac client +# Using Ops files: '/home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/add-releases.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/instance-identity-cert-from-cf.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/add-postgres-variables.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/connect_to_postgres_with_certs.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/enable-nats-tls.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/loggregator-certs-from-cf.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/add-extra-plan.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/set-release-version.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/enable-log-cache.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/log-cache-syslog-server.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/remove-metricsserver.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/remove-metricsgateway.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/enable-log-cache-via-uaa.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/enable-scheduler-logging.yml' +Creating Release with bosh version dc91c7f661d2a76905bb6990c76d8722f875fc8b-jdw-pr-2015 +app-autoscaler +dc91c7f661d2a76905bb6990c76d8722f875fc8b-jdw-pr-2015 +dc91c7f66+ + +eventgenerator/b2d2b8153753c2db2a166a851c62b51e7cb1a3b6f9c05c48ab3461299a8c4f23 sha256:8f2f5bf042a0b3d9e6946538084a0fd0ecfce39fa57961556529d33ca7ed46b2 openjdk-17 + db + eventgenerator + common + changeloglockcleaner +golangapiserver/33bf25e3b9e8723a001be08892f4624f484f467d77d3726086487ee25f1135e5 sha256:28f9cc6807efbd8f33edd3218a8ef840b734fbc49c0992fffdbe0861ae503543 golang-1-linux + golangapiserver + db + openjdk-17 + common + changeloglockcleaner +metricsforwarder/a1f9aff41f3280ba09cf01ff2b94fba006e393aae7250c1e7a24c3f5db8cfc14 sha256:8abb357807ce50a10f666c272fcaa8bd830adf8733de878510666ff59cc7f100 db + metricsforwarder + common +metricsgateway/a32ac8746733a6b38429d9396ffad3e91bcd752bebd70575760da12a7b952116 sha256:c68ffbe7b56539c83c2a1a45e1d95e505c936cdbaadb83c0b18923a59a4d288c openjdk-17 + db + metricsgateway + common +metricsserver/9dd076e50c33a9d28562ec0ce44216530cf027bba605d68a87025ec5af35dac9 sha256:7b206a85eeaa9653145f23ce86d06b56a197fa194c9fb77d7302498fcf4ebc9a openjdk-17 + db + metricsserver + common + changeloglockcleaner +operator/d9d2e4b01775c9cfdeb6d08e51a8359825e7e58dd9287ef8ed7c0e92079f545b sha256:2a28db8de40e66c49884669d48f61574e5fcf2150ad6e7d35710b6c663b34b53 operator + common + db + openjdk-17 + changeloglockcleaner +scalingengine/79452b9f8b4e3f973ffe2cd2c7451a6eafe8d9f305ccb72fc05caf58cb848c50 sha256:5346cd7f63627aad66253e035fbc7f08679de2941d2fbb2fb55933df6ae32012 openjdk-17 + db + scalingengine + common + changeloglockcleaner +scheduler/96284fc271b871ecb496fff4a2b7674bddf07e2c62acc3c853954d4259b7ec17 sha256:13757c46cd45cd96b0848600c3034a6c30afac34a4467b5ce2cd9e532731663e scheduler + db + openjdk-17 + common + changeloglockcleaner + +changeloglockcleaner/7d068b8b75ea68b3d6e84f3037e7324ccf6965011aade841173c7c9ef9f5a3a6 sha256:4142ad7de5f24282d35957d758cbf083d3d99ae498a596b54a598dcae47c1046 golang-1-linux +common/9d7726aa454227e3087cd4a04425acae72d883a5bb19d314930ab58e83f04d0e sha256:979ff40c6e44031bec55344aa4a522cac3d265ab23deaea0f7bc7541aa2b4124 - +db/bb650c3f8219589e96311b0f7671688761a55cd41b6ae7cfecb3bad990f48955 sha256:503ff50be659ae5030ada1ebdab49dd6213945b39be53d9af3f6c32aadd0109b openjdk-17 +eventgenerator/d2e9cf7d996646622a76c0a7b2ea6dd62175abc3f57b1169d90d7e00470fcc8e sha256:89df5e569cb4810641bd5936c0b5e39812583e0aae7848032676ba0fbf85bb25 golang-1-linux +golang-1-linux/8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60 sha256:efdf65bca81264d9110ec764be7edea1de341781a1ffe59c219db064d71d9fc3 - +golangapiserver/875bfaa70da351dc990b12fe80793495f6f03537db6f5300b04da51152cf5d0c sha256:47acd4d155e8ad73fde3d29a12e8f38236a90f28ed08441cedc394a3d5ce5212 golang-1-linux +metricsforwarder/e43d327c6b406378f1dce18af862c7984532400cb2fd6f09a05807e287454a5d sha256:df1f5d8b8a08615934938c5adb170ae48e28ca7e3da9eb16c3b567e3e989f29f golang-1-linux +metricsgateway/32719b424e2ba0455347271efb3e4feaa8239bd56ff8d9f59cb3286ec15d9c4b sha256:9dad586da95680eedb07cfd95348a50edea3e697f31fb06e494ed69df85f18b3 golang-1-linux +metricsserver/aecc4e5a2f84f55d818b4fb2d99947a308e44523b52418f58901579f3b793b4a sha256:354aa958ce155dd92e6b33bf0734be374d5861b5ba8f7a4041691b8133755711 golang-1-linux +openjdk-17/c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0 sha256:ad449f24f5a9e6971b8c9e3bb8e9500bbd5115a6872d3b95d8e0d96a60e896ed - +operator/bc3c29aa74325ee0c31625a6ff87f7c8439168202d49e621cea58d24e40e1af6 sha256:f0f54e568b63dec8a69d4f85dd0868d10af69761248d70a728c4f26eabfcd0bb golang-1-linux +scalingengine/5cdfb09d75ae26eac1be049e64f5f5645a5dbd2032c36699f98bf698e510dce6 sha256:e7df7c95ef02f5cd083df6354355c6ed6a80888c7b425201e46f851fa01cb570 golang-1-linux +scheduler/3d1ceb584206f40586931eb5428322cc28e33e0665e835a31a6b2da211bbac04 sha256:d085ab5e7957f312b516cd803dda571dc525fbff56ae36dae7472135bae1ad51 openjdk-17 +Uploading Release + +Task 766844 | 12:49:34 | Extracting release: Extracting release (00:00:04) +Task 766844 | 12:49:38 | Verifying manifest: Verifying manifest (00:00:00) +Task 766844 | 12:49:38 | Resolving package dependencies: Resolving package dependencies (00:00:00) +Task 766844 | 12:49:38 | Creating new packages: changeloglockcleaner/7d068b8b75ea68b3d6e84f3037e7324ccf6965011aade841173c7c9ef9f5a3a6 (00:00:00) +Task 766844 | 12:49:38 | Creating new packages: db/bb650c3f8219589e96311b0f7671688761a55cd41b6ae7cfecb3bad990f48955 (00:00:00) +Task 766844 | 12:49:38 | Creating new packages: eventgenerator/d2e9cf7d996646622a76c0a7b2ea6dd62175abc3f57b1169d90d7e00470fcc8e (00:00:01) +Task 766844 | 12:49:39 | Creating new packages: golang-1-linux/8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60 (00:00:05) +Task 766844 | 12:49:44 | Creating new packages: golangapiserver/875bfaa70da351dc990b12fe80793495f6f03537db6f5300b04da51152cf5d0c (00:00:00) +Task 766844 | 12:49:44 | Creating new packages: metricsforwarder/e43d327c6b406378f1dce18af862c7984532400cb2fd6f09a05807e287454a5d (00:00:00) +Task 766844 | 12:49:44 | Creating new packages: metricsgateway/32719b424e2ba0455347271efb3e4feaa8239bd56ff8d9f59cb3286ec15d9c4b (00:00:01) +Task 766844 | 12:49:45 | Creating new packages: metricsserver/aecc4e5a2f84f55d818b4fb2d99947a308e44523b52418f58901579f3b793b4a (00:00:00) +Task 766844 | 12:49:45 | Creating new packages: openjdk-17/c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0 (00:00:03) +Task 766844 | 12:49:48 | Creating new packages: operator/bc3c29aa74325ee0c31625a6ff87f7c8439168202d49e621cea58d24e40e1af6 (00:00:01) +Task 766844 | 12:49:49 | Creating new packages: scalingengine/5cdfb09d75ae26eac1be049e64f5f5645a5dbd2032c36699f98bf698e510dce6 (00:00:00) +Task 766844 | 12:49:49 | Creating new packages: scheduler/3d1ceb584206f40586931eb5428322cc28e33e0665e835a31a6b2da211bbac04 (00:00:03) +Task 766844 | 12:49:52 | Processing 1 existing package: Processing 1 existing package (00:00:00) +Task 766844 | 12:49:52 | Creating new jobs: golangapiserver/33bf25e3b9e8723a001be08892f4624f484f467d77d3726086487ee25f1135e5 (00:00:00) +Task 766844 | 12:49:52 | Creating new jobs: scheduler/96284fc271b871ecb496fff4a2b7674bddf07e2c62acc3c853954d4259b7ec17 (00:00:01) +Task 766844 | 12:49:53 | Processing 6 existing jobs: Processing 6 existing jobs (00:00:00) +Task 766844 | 12:49:53 | Release has been created: app-autoscaler/dc91c7f661d2a76905bb6990c76d8722f875fc8b-jdw-pr-2015 (00:00:00) - set up vars: DEPLOYMENT_NAME=jdw-pr-2015 +# silencing alert 'BOSHJobEphemeralDiskPredictWillFill' on deployment 'jdw-pr-2015' for 45 mins (2023-08-03T12:49:55+00:00 -> 2023-08-03T13:34:55+00:00) + - set up vars: DEPLOYMENT_NAME=jdw-pr-2015 +# silencing alert 'BOSHJobProcessUnhealthy' on deployment 'jdw-pr-2015' for 45 mins (2023-08-03T12:49:56+00:00 -> 2023-08-03T13:34:56+00:00) + - set up vars: DEPLOYMENT_NAME=jdw-pr-2015 +# silencing alert 'BOSHJobUnhealthy' on deployment 'jdw-pr-2015' for 45 mins (2023-08-03T12:49:56+00:00 -> 2023-08-03T13:34:56+00:00) + - creating Bosh deployment 'jdw-pr-2015' with version 'dc91c7f661d2a76905bb6990c76d8722f875fc8b-jdw-pr-2015' in system domain 'autoscaler.app-runtime-interfaces.ci.cloudfoundry.org' +# Using Ops files: ' -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/add-releases.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/instance-identity-cert-from-cf.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/add-postgres-variables.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/connect_to_postgres_with_certs.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/enable-nats-tls.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/loggregator-certs-from-cf.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/add-extra-plan.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/set-release-version.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/enable-log-cache.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/log-cache-syslog-server.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/remove-metricsserver.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/remove-metricsgateway.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/enable-log-cache-via-uaa.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/enable-scheduler-logging.yml' +# Deploy options: '' + +Task 766845 | 12:50:04 | Preparing deployment: Preparing deployment (00:00:23) +Task 766845 | 12:50:27 | Preparing deployment: Rendering templates (00:00:03) +Task 766845 | 12:50:31 | Preparing package compilation: Finding packages to compile (00:00:00) +Task 766845 | 12:50:31 | Compiling packages: golang-1-linux/8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60 +Task 766845 | 12:50:31 | Compiling packages: openjdk-17/c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0 +Task 766845 | 12:51:43 | Compiling packages: golang-1-linux/8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60 (00:01:12) +Task 766845 | 12:51:43 | Compiling packages: metricsforwarder/e43d327c6b406378f1dce18af862c7984532400cb2fd6f09a05807e287454a5d +Task 766845 | 12:51:43 | Compiling packages: eventgenerator/d2e9cf7d996646622a76c0a7b2ea6dd62175abc3f57b1169d90d7e00470fcc8e +Task 766845 | 12:51:43 | Compiling packages: golangapiserver/875bfaa70da351dc990b12fe80793495f6f03537db6f5300b04da51152cf5d0c +Task 766845 | 12:51:43 | Compiling packages: operator/bc3c29aa74325ee0c31625a6ff87f7c8439168202d49e621cea58d24e40e1af6 +Task 766845 | 12:51:43 | Compiling packages: changeloglockcleaner/7d068b8b75ea68b3d6e84f3037e7324ccf6965011aade841173c7c9ef9f5a3a6 +Task 766845 | 12:51:49 | Compiling packages: openjdk-17/c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0 (00:01:18) +Task 766845 | 12:51:49 | Compiling packages: scalingengine/5cdfb09d75ae26eac1be049e64f5f5645a5dbd2032c36699f98bf698e510dce6 (00:00:41) +Task 766845 | 12:52:30 | Compiling packages: scheduler/3d1ceb584206f40586931eb5428322cc28e33e0665e835a31a6b2da211bbac04 +Task 766845 | 12:52:31 | Compiling packages: eventgenerator/d2e9cf7d996646622a76c0a7b2ea6dd62175abc3f57b1169d90d7e00470fcc8e (00:00:48) +Task 766845 | 12:52:31 | Compiling packages: db/bb650c3f8219589e96311b0f7671688761a55cd41b6ae7cfecb3bad990f48955 (00:00:12) +Task 766845 | 12:52:52 | Compiling packages: scheduler/3d1ceb584206f40586931eb5428322cc28e33e0665e835a31a6b2da211bbac04 (00:00:22) +Task 766845 | 12:53:02 | Compiling packages: changeloglockcleaner/7d068b8b75ea68b3d6e84f3037e7324ccf6965011aade841173c7c9ef9f5a3a6 (00:01:19) +Task 766845 | 12:53:14 | Compiling packages: operator/bc3c29aa74325ee0c31625a6ff87f7c8439168202d49e621cea58d24e40e1af6 (00:01:31) +Task 766845 | 12:53:15 | Compiling packages: golangapiserver/875bfaa70da351dc990b12fe80793495f6f03537db6f5300b04da51152cf5d0c (00:01:32) +Task 766845 | 12:53:18 | Compiling packages: metricsforwarder/e43d327c6b406378f1dce18af862c7984532400cb2fd6f09a05807e287454a5d (00:01:35) +Task 766845 | 12:53:43 | Creating missing vms: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) +Task 766845 | 12:53:43 | Creating missing vms: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) +Task 766845 | 12:53:43 | Creating missing vms: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) +Task 766845 | 12:53:43 | Creating missing vms: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) +Task 766845 | 12:53:43 | Creating missing vms: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) +Task 766845 | 12:53:43 | Creating missing vms: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) +Task 766845 | 12:53:43 | Creating missing vms: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) +Task 766845 | 12:54:30 | Creating missing vms: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (00:00:47) +Task 766845 | 12:54:32 | Creating missing vms: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (00:00:49) +Task 766845 | 12:54:33 | Creating missing vms: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (00:00:50) +Task 766845 | 12:54:33 | Creating missing vms: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (00:00:50) +Task 766845 | 12:54:33 | Creating missing vms: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (00:00:50) +Task 766845 | 12:54:34 | Creating missing vms: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (00:00:51) +Task 766845 | 12:54:35 | Creating missing vms: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (00:00:52) +Task 766845 | 12:54:35 | Updating instance postgres: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) +Task 766845 | 12:54:37 | L executing pre-stop: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) +Task 766845 | 12:54:37 | L executing drain: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) +Task 766845 | 12:54:37 | L stopping jobs: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) +Task 766845 | 12:54:38 | L executing post-stop: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) +Task 766845 | 12:54:40 | L installing packages: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) +Task 766845 | 12:54:42 | L configuring jobs: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) +Task 766845 | 12:54:42 | L executing pre-start: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) +Task 766845 | 12:54:44 | L starting jobs: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) +Task 766845 | 12:55:00 | L executing post-start: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) (00:00:26) +Task 766845 | 12:55:01 | Updating instance scalingengine: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) +Task 766845 | 12:55:09 | L executing pre-stop: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) +Task 766845 | 12:55:09 | L executing drain: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) +Task 766845 | 12:55:10 | L stopping jobs: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) +Task 766845 | 12:55:11 | L executing post-stop: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) +Task 766845 | 12:55:14 | L installing packages: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) +Task 766845 | 12:55:15 | L configuring jobs: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) +Task 766845 | 12:55:15 | L executing pre-start: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) +Task 766845 | 12:55:16 | L starting jobs: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) +Task 766845 | 12:55:33 | L executing post-start: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) (00:00:33) +Task 766845 | 12:55:34 | Updating instance apiserver: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) +Task 766845 | 12:55:44 | L executing pre-stop: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) +Task 766845 | 12:55:44 | L executing drain: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) +Task 766845 | 12:55:45 | L stopping jobs: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) +Task 766845 | 12:55:46 | L executing post-stop: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) +Task 766845 | 12:55:48 | L installing packages: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) +Task 766845 | 12:55:49 | L configuring jobs: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) +Task 766845 | 12:55:49 | L executing pre-start: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) +Task 766845 | 12:55:50 | L starting jobs: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) +Task 766845 | 12:56:07 | L executing post-start: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) (00:00:34) +Task 766845 | 12:56:08 | Updating instance scheduler: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) +Task 766845 | 12:56:17 | L executing pre-stop: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) +Task 766845 | 12:56:17 | L executing drain: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) +Task 766845 | 12:56:18 | L stopping jobs: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) +Task 766845 | 12:56:19 | L executing post-stop: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) +Task 766845 | 12:56:21 | L installing packages: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) +Task 766845 | 12:56:23 | L configuring jobs: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) +Task 766845 | 12:56:23 | L executing pre-start: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) +Task 766845 | 12:56:24 | L starting jobs: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) +Task 766845 | 12:56:40 | L executing post-start: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) (00:00:33) +Task 766845 | 12:56:41 | Updating instance operator: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) +Task 766845 | 12:56:50 | L executing pre-stop: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) +Task 766845 | 12:56:50 | L executing drain: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) +Task 766845 | 12:56:50 | L stopping jobs: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) +Task 766845 | 12:56:51 | L executing post-stop: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) +Task 766845 | 12:56:53 | L installing packages: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) +Task 766845 | 12:56:54 | L configuring jobs: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) +Task 766845 | 12:56:54 | L executing pre-start: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) +Task 766845 | 12:56:55 | L starting jobs: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) +Task 766845 | 12:57:12 | L executing post-start: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) (00:00:32) +Task 766845 | 12:57:13 | Updating instance eventgenerator: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) +Task 766845 | 12:57:21 | L executing pre-stop: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) +Task 766845 | 12:57:21 | L executing drain: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) +Task 766845 | 12:57:22 | L stopping jobs: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) +Task 766845 | 12:57:23 | L executing post-stop: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) +Task 766845 | 12:57:25 | L installing packages: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) +Task 766845 | 12:57:27 | L configuring jobs: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) +Task 766845 | 12:57:27 | L executing pre-start: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) +Task 766845 | 12:57:28 | L starting jobs: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) +Task 766845 | 12:57:45 | L executing post-start: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) (00:00:33) +Task 766845 | 12:57:47 | Updating instance metricsforwarder: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) +Task 766845 | 12:57:49 | L executing pre-stop: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) +Task 766845 | 12:57:49 | L executing drain: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) +Task 766845 | 12:57:50 | L stopping jobs: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) +Task 766845 | 12:57:51 | L executing post-stop: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) +Task 766845 | 12:57:53 | L installing packages: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) +Task 766845 | 12:57:54 | L configuring jobs: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) +Task 766845 | 12:57:54 | L executing pre-start: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) +Task 766845 | 12:57:55 | L starting jobs: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) +Task 766845 | 12:58:42 | L executing post-start: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) (00:00:56) - registering broker with cf + - set up vars: DEPLOYMENT_NAME=jdw-pr-2015 +~/SAPDevelop/Produktiv/app-autoscaler-env-bbl-state/bbl-state ~/SAPDevelop/Produktiv/app-autoscaler-release +~/SAPDevelop/Produktiv/app-autoscaler-release +Setting API endpoint to https://api.autoscaler.app-runtime-interfaces.ci.cloudfoundry.org... +OK + +API endpoint: https://api.autoscaler.app-runtime-interfaces.ci.cloudfoundry.org +API version: 3.139.0 + +Not logged in. Use 'cf login' or 'cf login --sso' to log in. +API endpoint: https://api.autoscaler.app-runtime-interfaces.ci.cloudfoundry.org + +Authenticating... +OK + +Use 'cf target' to view or set your target org and space. +Error failed execution of "existing_service_broker="$(cf service-brokers | grep "${service_broker_name}.${system_domain}" | cut -d' ' -f1)"" at line 17 +17 main /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/ci/autoscaler/scripts/register-broker.sh +Creating service broker jdw-pr-2015 at 'https://jdw-pr-2015servicebroker.autoscaler.app-runtime-interfaces.ci.cloudfoundry.org' +Creating service broker jdw-pr-2015 as admin... +OK + +Logging out admin... +OK + diff --git a/jobs/scheduler/monit b/jobs/scheduler/monit index f52917201e..6521f96d01 100644 --- a/jobs/scheduler/monit +++ b/jobs/scheduler/monit @@ -1,6 +1,8 @@ -check process scheduler - with pidfile /var/vcap/sys/run/bpm/scheduler/scheduler.pid +check host scheduler with address localhost + if failed url http://:@localhost: + timeout 30 seconds + then alert + start program "/var/vcap/jobs/bpm/bin/bpm start scheduler" stop program "/var/vcap/jobs/bpm/bin/bpm stop scheduler" - group vcap - + group vcap \ No newline at end of file From a4e1d6551ad688f68b32b3a8f0148d243b88f41b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Thu, 3 Aug 2023 16:25:12 +0200 Subject: [PATCH 159/294] Use bosh-spec to generate monit-file for scheduler; --- deploy-autoscaler.log.txt | 321 ------------------ jobs/scheduler/spec | 16 +- jobs/scheduler/{monit => templates/monit.erb} | 6 +- 3 files changed, 14 insertions(+), 329 deletions(-) delete mode 100644 deploy-autoscaler.log.txt rename jobs/scheduler/{monit => templates/monit.erb} (51%) diff --git a/deploy-autoscaler.log.txt b/deploy-autoscaler.log.txt deleted file mode 100644 index b51d9f6dfb..0000000000 --- a/deploy-autoscaler.log.txt +++ /dev/null @@ -1,321 +0,0 @@ - - go mod tidying './src/autoscaler' -go: downloading google.golang.org/grpc v1.57.0 -go: downloading golang.org/x/net v0.13.0 -go: downloading google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 -go: downloading google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 -go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 - - go mod tidying './src/acceptance' - - go mod tidying './src/changeloglockcleaner' - - go mod tidying './src/changelog' - - go mod vendor './src/autoscaler' - - go mod vendor './src/acceptance' - - go mod vendor './src/changeloglockcleaner' - - go mod vendor './src/changelog' -/home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/.direnv/ruby/bin/uaac -# building scheduler -[INFO] Scanning for projects... -[INFO] -[INFO] ---------------< org.cloudfoundry.autoscaler:scheduler >---------------- -[INFO] Building scheduler 1.0-SNAPSHOT -[INFO] from pom.xml -[INFO] --------------------------------[ war ]--------------------------------- -[INFO] -[INFO] --- resources:3.3.1:resources (default-resources) @ scheduler --- -[INFO] Copying 2 resources from src/main/resources to target/classes -[INFO] Copying 4 resources from src/main/resources to target/classes -[INFO] -[INFO] --- compiler:3.11.0:compile (default-compile) @ scheduler --- -[INFO] Nothing to compile - all classes are up to date -[INFO] -[INFO] --- resources:3.3.1:testResources (default-testResources) @ scheduler --- -[INFO] Not copying test resources -[INFO] -[INFO] --- compiler:3.11.0:testCompile (default-testCompile) @ scheduler --- -[INFO] Not compiling test sources -[INFO] -[INFO] --- surefire:3.0.0:test (default-test) @ scheduler --- -[WARNING] Parameter 'disableXmlReport' (user property 'disableXmlReport') is deprecated: No reason given -[INFO] Tests are skipped. -[INFO] -[INFO] --- war:3.3.2:war (default-war) @ scheduler --- -[INFO] Packaging webapp -[INFO] Assembling webapp [scheduler] in [/home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/src/scheduler/target/scheduler-1.0-SNAPSHOT] -[INFO] Processing war project -[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-3.1.1.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-boot-3.1.1.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-boot-autoconfigure-3.1.1.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-logging-3.1.1.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-core-6.0.10.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-jcl-6.0.10.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-web-3.1.1.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-json-3.1.1.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-web-6.0.10.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-webmvc-6.0.10.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-aop-6.0.10.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-expression-6.0.10.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-web-services-3.1.1.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-oxm-6.0.10.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-data-jpa-3.1.1.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-aop-3.1.1.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-jdbc-3.1.1.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-jdbc-6.0.10.jar -[INFO] deleting outdated resource WEB-INF/lib/hibernate-core-6.2.5.Final.jar -[INFO] deleting outdated resource WEB-INF/lib/jboss-logging-3.5.1.Final.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-data-jpa-3.1.1.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-data-commons-3.1.1.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-orm-6.0.10.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-aspects-6.0.10.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-actuator-3.1.1.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-boot-actuator-autoconfigure-3.1.1.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-boot-actuator-3.1.1.jar -[INFO] deleting outdated resource WEB-INF/lib/micrometer-observation-1.11.1.jar -[INFO] deleting outdated resource WEB-INF/lib/micrometer-commons-1.11.1.jar -[INFO] deleting outdated resource WEB-INF/lib/micrometer-core-1.11.1.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-validation-3.1.1.jar -[INFO] deleting outdated resource WEB-INF/lib/tomcat-embed-el-10.1.10.jar -[INFO] deleting outdated resource WEB-INF/lib/hibernate-validator-8.0.0.Final.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-boot-starter-quartz-3.1.1.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-tx-6.0.10.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-context-support-6.0.10.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-beans-6.0.10.jar -[INFO] deleting outdated resource WEB-INF/lib/spring-context-6.0.10.jar -[INFO] deleting outdated resource WEB-INF/lib/mysql-connector-j-8.0.33.jar -[INFO] Building war: /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/src/scheduler/target/scheduler-1.0-SNAPSHOT.war -[INFO] -[INFO] --- spring-boot:3.1.2:repackage (repackage) @ scheduler --- -[INFO] Replacing main artifact /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/src/scheduler/target/scheduler-1.0-SNAPSHOT.war with repackaged archive, adding nested dependencies in BOOT-INF/. -[INFO] The original artifact has been renamed to /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/src/scheduler/target/scheduler-1.0-SNAPSHOT.war.original -[INFO] -[INFO] --- spring-boot:3.1.2:repackage (default) @ scheduler --- -[INFO] Replacing main artifact /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/src/scheduler/target/scheduler-1.0-SNAPSHOT.war with repackaged archive, adding nested dependencies in BOOT-INF/. -[INFO] The original artifact has been renamed to /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/src/scheduler/target/scheduler-1.0-SNAPSHOT.war.original -[INFO] ------------------------------------------------------------------------ -[INFO] BUILD SUCCESS -[INFO] ------------------------------------------------------------------------ -[INFO] Total time: 7.253 s -[INFO] Finished at: 2023-08-03T14:41:41+02:00 -[INFO] ------------------------------------------------------------------------ - - deploying autoscaler - - set up vars: DEPLOYMENT_NAME=jdw-pr-2015 - - Deploying autoscaler 'dc91c7f661d2a76905bb6990c76d8722f875fc8b-jdw-pr-2015' with name 'jdw-pr-2015' -WARNING: Decoding token without verifying it was signed by its authoring UAA -# updating autoscaler uaac client -# Using Ops files: '/home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/add-releases.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/instance-identity-cert-from-cf.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/add-postgres-variables.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/connect_to_postgres_with_certs.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/enable-nats-tls.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/loggregator-certs-from-cf.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/add-extra-plan.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/set-release-version.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/enable-log-cache.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/log-cache-syslog-server.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/remove-metricsserver.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/remove-metricsgateway.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/enable-log-cache-via-uaa.yml /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/enable-scheduler-logging.yml' -Creating Release with bosh version dc91c7f661d2a76905bb6990c76d8722f875fc8b-jdw-pr-2015 -app-autoscaler -dc91c7f661d2a76905bb6990c76d8722f875fc8b-jdw-pr-2015 -dc91c7f66+ - -eventgenerator/b2d2b8153753c2db2a166a851c62b51e7cb1a3b6f9c05c48ab3461299a8c4f23 sha256:8f2f5bf042a0b3d9e6946538084a0fd0ecfce39fa57961556529d33ca7ed46b2 openjdk-17 - db - eventgenerator - common - changeloglockcleaner -golangapiserver/33bf25e3b9e8723a001be08892f4624f484f467d77d3726086487ee25f1135e5 sha256:28f9cc6807efbd8f33edd3218a8ef840b734fbc49c0992fffdbe0861ae503543 golang-1-linux - golangapiserver - db - openjdk-17 - common - changeloglockcleaner -metricsforwarder/a1f9aff41f3280ba09cf01ff2b94fba006e393aae7250c1e7a24c3f5db8cfc14 sha256:8abb357807ce50a10f666c272fcaa8bd830adf8733de878510666ff59cc7f100 db - metricsforwarder - common -metricsgateway/a32ac8746733a6b38429d9396ffad3e91bcd752bebd70575760da12a7b952116 sha256:c68ffbe7b56539c83c2a1a45e1d95e505c936cdbaadb83c0b18923a59a4d288c openjdk-17 - db - metricsgateway - common -metricsserver/9dd076e50c33a9d28562ec0ce44216530cf027bba605d68a87025ec5af35dac9 sha256:7b206a85eeaa9653145f23ce86d06b56a197fa194c9fb77d7302498fcf4ebc9a openjdk-17 - db - metricsserver - common - changeloglockcleaner -operator/d9d2e4b01775c9cfdeb6d08e51a8359825e7e58dd9287ef8ed7c0e92079f545b sha256:2a28db8de40e66c49884669d48f61574e5fcf2150ad6e7d35710b6c663b34b53 operator - common - db - openjdk-17 - changeloglockcleaner -scalingengine/79452b9f8b4e3f973ffe2cd2c7451a6eafe8d9f305ccb72fc05caf58cb848c50 sha256:5346cd7f63627aad66253e035fbc7f08679de2941d2fbb2fb55933df6ae32012 openjdk-17 - db - scalingengine - common - changeloglockcleaner -scheduler/96284fc271b871ecb496fff4a2b7674bddf07e2c62acc3c853954d4259b7ec17 sha256:13757c46cd45cd96b0848600c3034a6c30afac34a4467b5ce2cd9e532731663e scheduler - db - openjdk-17 - common - changeloglockcleaner - -changeloglockcleaner/7d068b8b75ea68b3d6e84f3037e7324ccf6965011aade841173c7c9ef9f5a3a6 sha256:4142ad7de5f24282d35957d758cbf083d3d99ae498a596b54a598dcae47c1046 golang-1-linux -common/9d7726aa454227e3087cd4a04425acae72d883a5bb19d314930ab58e83f04d0e sha256:979ff40c6e44031bec55344aa4a522cac3d265ab23deaea0f7bc7541aa2b4124 - -db/bb650c3f8219589e96311b0f7671688761a55cd41b6ae7cfecb3bad990f48955 sha256:503ff50be659ae5030ada1ebdab49dd6213945b39be53d9af3f6c32aadd0109b openjdk-17 -eventgenerator/d2e9cf7d996646622a76c0a7b2ea6dd62175abc3f57b1169d90d7e00470fcc8e sha256:89df5e569cb4810641bd5936c0b5e39812583e0aae7848032676ba0fbf85bb25 golang-1-linux -golang-1-linux/8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60 sha256:efdf65bca81264d9110ec764be7edea1de341781a1ffe59c219db064d71d9fc3 - -golangapiserver/875bfaa70da351dc990b12fe80793495f6f03537db6f5300b04da51152cf5d0c sha256:47acd4d155e8ad73fde3d29a12e8f38236a90f28ed08441cedc394a3d5ce5212 golang-1-linux -metricsforwarder/e43d327c6b406378f1dce18af862c7984532400cb2fd6f09a05807e287454a5d sha256:df1f5d8b8a08615934938c5adb170ae48e28ca7e3da9eb16c3b567e3e989f29f golang-1-linux -metricsgateway/32719b424e2ba0455347271efb3e4feaa8239bd56ff8d9f59cb3286ec15d9c4b sha256:9dad586da95680eedb07cfd95348a50edea3e697f31fb06e494ed69df85f18b3 golang-1-linux -metricsserver/aecc4e5a2f84f55d818b4fb2d99947a308e44523b52418f58901579f3b793b4a sha256:354aa958ce155dd92e6b33bf0734be374d5861b5ba8f7a4041691b8133755711 golang-1-linux -openjdk-17/c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0 sha256:ad449f24f5a9e6971b8c9e3bb8e9500bbd5115a6872d3b95d8e0d96a60e896ed - -operator/bc3c29aa74325ee0c31625a6ff87f7c8439168202d49e621cea58d24e40e1af6 sha256:f0f54e568b63dec8a69d4f85dd0868d10af69761248d70a728c4f26eabfcd0bb golang-1-linux -scalingengine/5cdfb09d75ae26eac1be049e64f5f5645a5dbd2032c36699f98bf698e510dce6 sha256:e7df7c95ef02f5cd083df6354355c6ed6a80888c7b425201e46f851fa01cb570 golang-1-linux -scheduler/3d1ceb584206f40586931eb5428322cc28e33e0665e835a31a6b2da211bbac04 sha256:d085ab5e7957f312b516cd803dda571dc525fbff56ae36dae7472135bae1ad51 openjdk-17 -Uploading Release - -Task 766844 | 12:49:34 | Extracting release: Extracting release (00:00:04) -Task 766844 | 12:49:38 | Verifying manifest: Verifying manifest (00:00:00) -Task 766844 | 12:49:38 | Resolving package dependencies: Resolving package dependencies (00:00:00) -Task 766844 | 12:49:38 | Creating new packages: changeloglockcleaner/7d068b8b75ea68b3d6e84f3037e7324ccf6965011aade841173c7c9ef9f5a3a6 (00:00:00) -Task 766844 | 12:49:38 | Creating new packages: db/bb650c3f8219589e96311b0f7671688761a55cd41b6ae7cfecb3bad990f48955 (00:00:00) -Task 766844 | 12:49:38 | Creating new packages: eventgenerator/d2e9cf7d996646622a76c0a7b2ea6dd62175abc3f57b1169d90d7e00470fcc8e (00:00:01) -Task 766844 | 12:49:39 | Creating new packages: golang-1-linux/8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60 (00:00:05) -Task 766844 | 12:49:44 | Creating new packages: golangapiserver/875bfaa70da351dc990b12fe80793495f6f03537db6f5300b04da51152cf5d0c (00:00:00) -Task 766844 | 12:49:44 | Creating new packages: metricsforwarder/e43d327c6b406378f1dce18af862c7984532400cb2fd6f09a05807e287454a5d (00:00:00) -Task 766844 | 12:49:44 | Creating new packages: metricsgateway/32719b424e2ba0455347271efb3e4feaa8239bd56ff8d9f59cb3286ec15d9c4b (00:00:01) -Task 766844 | 12:49:45 | Creating new packages: metricsserver/aecc4e5a2f84f55d818b4fb2d99947a308e44523b52418f58901579f3b793b4a (00:00:00) -Task 766844 | 12:49:45 | Creating new packages: openjdk-17/c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0 (00:00:03) -Task 766844 | 12:49:48 | Creating new packages: operator/bc3c29aa74325ee0c31625a6ff87f7c8439168202d49e621cea58d24e40e1af6 (00:00:01) -Task 766844 | 12:49:49 | Creating new packages: scalingengine/5cdfb09d75ae26eac1be049e64f5f5645a5dbd2032c36699f98bf698e510dce6 (00:00:00) -Task 766844 | 12:49:49 | Creating new packages: scheduler/3d1ceb584206f40586931eb5428322cc28e33e0665e835a31a6b2da211bbac04 (00:00:03) -Task 766844 | 12:49:52 | Processing 1 existing package: Processing 1 existing package (00:00:00) -Task 766844 | 12:49:52 | Creating new jobs: golangapiserver/33bf25e3b9e8723a001be08892f4624f484f467d77d3726086487ee25f1135e5 (00:00:00) -Task 766844 | 12:49:52 | Creating new jobs: scheduler/96284fc271b871ecb496fff4a2b7674bddf07e2c62acc3c853954d4259b7ec17 (00:00:01) -Task 766844 | 12:49:53 | Processing 6 existing jobs: Processing 6 existing jobs (00:00:00) -Task 766844 | 12:49:53 | Release has been created: app-autoscaler/dc91c7f661d2a76905bb6990c76d8722f875fc8b-jdw-pr-2015 (00:00:00) - set up vars: DEPLOYMENT_NAME=jdw-pr-2015 -# silencing alert 'BOSHJobEphemeralDiskPredictWillFill' on deployment 'jdw-pr-2015' for 45 mins (2023-08-03T12:49:55+00:00 -> 2023-08-03T13:34:55+00:00) - - set up vars: DEPLOYMENT_NAME=jdw-pr-2015 -# silencing alert 'BOSHJobProcessUnhealthy' on deployment 'jdw-pr-2015' for 45 mins (2023-08-03T12:49:56+00:00 -> 2023-08-03T13:34:56+00:00) - - set up vars: DEPLOYMENT_NAME=jdw-pr-2015 -# silencing alert 'BOSHJobUnhealthy' on deployment 'jdw-pr-2015' for 45 mins (2023-08-03T12:49:56+00:00 -> 2023-08-03T13:34:56+00:00) - - creating Bosh deployment 'jdw-pr-2015' with version 'dc91c7f661d2a76905bb6990c76d8722f875fc8b-jdw-pr-2015' in system domain 'autoscaler.app-runtime-interfaces.ci.cloudfoundry.org' -# Using Ops files: ' -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/add-releases.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/instance-identity-cert-from-cf.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/add-postgres-variables.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/connect_to_postgres_with_certs.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/enable-nats-tls.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/loggregator-certs-from-cf.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/add-extra-plan.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/set-release-version.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/enable-log-cache.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/log-cache-syslog-server.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/remove-metricsserver.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/remove-metricsgateway.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/enable-log-cache-via-uaa.yml -o /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/operations/enable-scheduler-logging.yml' -# Deploy options: '' - -Task 766845 | 12:50:04 | Preparing deployment: Preparing deployment (00:00:23) -Task 766845 | 12:50:27 | Preparing deployment: Rendering templates (00:00:03) -Task 766845 | 12:50:31 | Preparing package compilation: Finding packages to compile (00:00:00) -Task 766845 | 12:50:31 | Compiling packages: golang-1-linux/8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60 -Task 766845 | 12:50:31 | Compiling packages: openjdk-17/c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0 -Task 766845 | 12:51:43 | Compiling packages: golang-1-linux/8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60 (00:01:12) -Task 766845 | 12:51:43 | Compiling packages: metricsforwarder/e43d327c6b406378f1dce18af862c7984532400cb2fd6f09a05807e287454a5d -Task 766845 | 12:51:43 | Compiling packages: eventgenerator/d2e9cf7d996646622a76c0a7b2ea6dd62175abc3f57b1169d90d7e00470fcc8e -Task 766845 | 12:51:43 | Compiling packages: golangapiserver/875bfaa70da351dc990b12fe80793495f6f03537db6f5300b04da51152cf5d0c -Task 766845 | 12:51:43 | Compiling packages: operator/bc3c29aa74325ee0c31625a6ff87f7c8439168202d49e621cea58d24e40e1af6 -Task 766845 | 12:51:43 | Compiling packages: changeloglockcleaner/7d068b8b75ea68b3d6e84f3037e7324ccf6965011aade841173c7c9ef9f5a3a6 -Task 766845 | 12:51:49 | Compiling packages: openjdk-17/c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0 (00:01:18) -Task 766845 | 12:51:49 | Compiling packages: scalingengine/5cdfb09d75ae26eac1be049e64f5f5645a5dbd2032c36699f98bf698e510dce6 (00:00:41) -Task 766845 | 12:52:30 | Compiling packages: scheduler/3d1ceb584206f40586931eb5428322cc28e33e0665e835a31a6b2da211bbac04 -Task 766845 | 12:52:31 | Compiling packages: eventgenerator/d2e9cf7d996646622a76c0a7b2ea6dd62175abc3f57b1169d90d7e00470fcc8e (00:00:48) -Task 766845 | 12:52:31 | Compiling packages: db/bb650c3f8219589e96311b0f7671688761a55cd41b6ae7cfecb3bad990f48955 (00:00:12) -Task 766845 | 12:52:52 | Compiling packages: scheduler/3d1ceb584206f40586931eb5428322cc28e33e0665e835a31a6b2da211bbac04 (00:00:22) -Task 766845 | 12:53:02 | Compiling packages: changeloglockcleaner/7d068b8b75ea68b3d6e84f3037e7324ccf6965011aade841173c7c9ef9f5a3a6 (00:01:19) -Task 766845 | 12:53:14 | Compiling packages: operator/bc3c29aa74325ee0c31625a6ff87f7c8439168202d49e621cea58d24e40e1af6 (00:01:31) -Task 766845 | 12:53:15 | Compiling packages: golangapiserver/875bfaa70da351dc990b12fe80793495f6f03537db6f5300b04da51152cf5d0c (00:01:32) -Task 766845 | 12:53:18 | Compiling packages: metricsforwarder/e43d327c6b406378f1dce18af862c7984532400cb2fd6f09a05807e287454a5d (00:01:35) -Task 766845 | 12:53:43 | Creating missing vms: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) -Task 766845 | 12:53:43 | Creating missing vms: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) -Task 766845 | 12:53:43 | Creating missing vms: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) -Task 766845 | 12:53:43 | Creating missing vms: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) -Task 766845 | 12:53:43 | Creating missing vms: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) -Task 766845 | 12:53:43 | Creating missing vms: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) -Task 766845 | 12:53:43 | Creating missing vms: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) -Task 766845 | 12:54:30 | Creating missing vms: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (00:00:47) -Task 766845 | 12:54:32 | Creating missing vms: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (00:00:49) -Task 766845 | 12:54:33 | Creating missing vms: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (00:00:50) -Task 766845 | 12:54:33 | Creating missing vms: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (00:00:50) -Task 766845 | 12:54:33 | Creating missing vms: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (00:00:50) -Task 766845 | 12:54:34 | Creating missing vms: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (00:00:51) -Task 766845 | 12:54:35 | Creating missing vms: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (00:00:52) -Task 766845 | 12:54:35 | Updating instance postgres: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) -Task 766845 | 12:54:37 | L executing pre-stop: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) -Task 766845 | 12:54:37 | L executing drain: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) -Task 766845 | 12:54:37 | L stopping jobs: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) -Task 766845 | 12:54:38 | L executing post-stop: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) -Task 766845 | 12:54:40 | L installing packages: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) -Task 766845 | 12:54:42 | L configuring jobs: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) -Task 766845 | 12:54:42 | L executing pre-start: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) -Task 766845 | 12:54:44 | L starting jobs: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) -Task 766845 | 12:55:00 | L executing post-start: postgres/7eb4033b-cb20-4eae-a7e4-b50f49ded6a9 (0) (canary) (00:00:26) -Task 766845 | 12:55:01 | Updating instance scalingengine: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) -Task 766845 | 12:55:09 | L executing pre-stop: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) -Task 766845 | 12:55:09 | L executing drain: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) -Task 766845 | 12:55:10 | L stopping jobs: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) -Task 766845 | 12:55:11 | L executing post-stop: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) -Task 766845 | 12:55:14 | L installing packages: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) -Task 766845 | 12:55:15 | L configuring jobs: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) -Task 766845 | 12:55:15 | L executing pre-start: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) -Task 766845 | 12:55:16 | L starting jobs: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) -Task 766845 | 12:55:33 | L executing post-start: scalingengine/4bee661c-9e3b-465e-8d35-7e39f5e0ce13 (0) (canary) (00:00:33) -Task 766845 | 12:55:34 | Updating instance apiserver: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) -Task 766845 | 12:55:44 | L executing pre-stop: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) -Task 766845 | 12:55:44 | L executing drain: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) -Task 766845 | 12:55:45 | L stopping jobs: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) -Task 766845 | 12:55:46 | L executing post-stop: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) -Task 766845 | 12:55:48 | L installing packages: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) -Task 766845 | 12:55:49 | L configuring jobs: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) -Task 766845 | 12:55:49 | L executing pre-start: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) -Task 766845 | 12:55:50 | L starting jobs: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) -Task 766845 | 12:56:07 | L executing post-start: apiserver/c230966b-80df-4265-8ff0-83aaac8f3f8f (0) (canary) (00:00:34) -Task 766845 | 12:56:08 | Updating instance scheduler: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) -Task 766845 | 12:56:17 | L executing pre-stop: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) -Task 766845 | 12:56:17 | L executing drain: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) -Task 766845 | 12:56:18 | L stopping jobs: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) -Task 766845 | 12:56:19 | L executing post-stop: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) -Task 766845 | 12:56:21 | L installing packages: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) -Task 766845 | 12:56:23 | L configuring jobs: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) -Task 766845 | 12:56:23 | L executing pre-start: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) -Task 766845 | 12:56:24 | L starting jobs: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) -Task 766845 | 12:56:40 | L executing post-start: scheduler/f5767486-cb59-49be-ab82-0018b883918f (0) (canary) (00:00:33) -Task 766845 | 12:56:41 | Updating instance operator: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) -Task 766845 | 12:56:50 | L executing pre-stop: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) -Task 766845 | 12:56:50 | L executing drain: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) -Task 766845 | 12:56:50 | L stopping jobs: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) -Task 766845 | 12:56:51 | L executing post-stop: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) -Task 766845 | 12:56:53 | L installing packages: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) -Task 766845 | 12:56:54 | L configuring jobs: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) -Task 766845 | 12:56:54 | L executing pre-start: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) -Task 766845 | 12:56:55 | L starting jobs: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) -Task 766845 | 12:57:12 | L executing post-start: operator/ffcf3746-a900-49f4-9f1e-73f00265597c (0) (canary) (00:00:32) -Task 766845 | 12:57:13 | Updating instance eventgenerator: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) -Task 766845 | 12:57:21 | L executing pre-stop: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) -Task 766845 | 12:57:21 | L executing drain: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) -Task 766845 | 12:57:22 | L stopping jobs: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) -Task 766845 | 12:57:23 | L executing post-stop: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) -Task 766845 | 12:57:25 | L installing packages: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) -Task 766845 | 12:57:27 | L configuring jobs: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) -Task 766845 | 12:57:27 | L executing pre-start: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) -Task 766845 | 12:57:28 | L starting jobs: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) -Task 766845 | 12:57:45 | L executing post-start: eventgenerator/4d5a6b2c-cd01-4745-a60d-c7feb77fb6a5 (0) (canary) (00:00:33) -Task 766845 | 12:57:47 | Updating instance metricsforwarder: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) -Task 766845 | 12:57:49 | L executing pre-stop: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) -Task 766845 | 12:57:49 | L executing drain: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) -Task 766845 | 12:57:50 | L stopping jobs: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) -Task 766845 | 12:57:51 | L executing post-stop: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) -Task 766845 | 12:57:53 | L installing packages: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) -Task 766845 | 12:57:54 | L configuring jobs: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) -Task 766845 | 12:57:54 | L executing pre-start: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) -Task 766845 | 12:57:55 | L starting jobs: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) -Task 766845 | 12:58:42 | L executing post-start: metricsforwarder/92c7a64d-29d6-4a87-bf47-aecfeed428a2 (0) (canary) (00:00:56) - registering broker with cf - - set up vars: DEPLOYMENT_NAME=jdw-pr-2015 -~/SAPDevelop/Produktiv/app-autoscaler-env-bbl-state/bbl-state ~/SAPDevelop/Produktiv/app-autoscaler-release -~/SAPDevelop/Produktiv/app-autoscaler-release -Setting API endpoint to https://api.autoscaler.app-runtime-interfaces.ci.cloudfoundry.org... -OK - -API endpoint: https://api.autoscaler.app-runtime-interfaces.ci.cloudfoundry.org -API version: 3.139.0 - -Not logged in. Use 'cf login' or 'cf login --sso' to log in. -API endpoint: https://api.autoscaler.app-runtime-interfaces.ci.cloudfoundry.org - -Authenticating... -OK - -Use 'cf target' to view or set your target org and space. -Error failed execution of "existing_service_broker="$(cf service-brokers | grep "${service_broker_name}.${system_domain}" | cut -d' ' -f1)"" at line 17 -17 main /home/i539286/SAPDevelop/Produktiv/app-autoscaler-release/ci/autoscaler/scripts/register-broker.sh -Creating service broker jdw-pr-2015 at 'https://jdw-pr-2015servicebroker.autoscaler.app-runtime-interfaces.ci.cloudfoundry.org' -Creating service broker jdw-pr-2015 as admin... -OK - -Logging out admin... -OK - diff --git a/jobs/scheduler/spec b/jobs/scheduler/spec index 01cf63ccf4..fc3b58f6c8 100644 --- a/jobs/scheduler/spec +++ b/jobs/scheduler/spec @@ -3,23 +3,27 @@ name: scheduler templates: bpm-pre-start.erb: bin/bpm-pre-start bpm.yml.erb: config/bpm.yml - liquibase.properties: bin/liquibase.properties - scheduler.yml.erb: config/scheduler.yml + install_crt_keystore.sh: bin/install_crt_keystore install_crt_truststore.sh: bin/install_crt_truststore + liquibase.properties: bin/liquibase.properties + + monit.erb: /var/vcap/jobs/scheduler/monit + + policy_db_ca.crt.erb: config/certs/policy_db/ca.crt + policy_db.crt.erb: config/certs/policy_db/crt + policy_db.key.erb: config/certs/policy_db/key + scheduler_ca.crt.erb: config/certs/ca.crt scheduler_server.crt.erb: config/certs/server.crt scheduler_server.key.erb: config/certs/server.key + scheduler.yml.erb: config/scheduler.yml scalingengine_ca.crt.erb: config/certs/scalingengine/ca.crt scalingengine_client.crt.erb: config/certs/scalingengine/client.crt scalingengine_client.key.erb: config/certs/scalingengine/client.key - policy_db_ca.crt.erb: config/certs/policy_db/ca.crt - policy_db.crt.erb: config/certs/policy_db/crt - policy_db.key.erb: config/certs/policy_db/key - scheduler_db_ca.crt.erb: config/certs/scheduler_db/ca.crt scheduler_db.crt.erb: config/certs/scheduler_db/crt scheduler_db.key.erb: config/certs/scheduler_db/key diff --git a/jobs/scheduler/monit b/jobs/scheduler/templates/monit.erb similarity index 51% rename from jobs/scheduler/monit rename to jobs/scheduler/templates/monit.erb index 6521f96d01..e4a460f5b8 100644 --- a/jobs/scheduler/monit +++ b/jobs/scheduler/templates/monit.erb @@ -1,8 +1,10 @@ +<% check host scheduler with address localhost - if failed url http://:@localhost: + if failed url "http://<%=p('autoscaler.scheduler.health.username') %>:<%=p('autoscaler.scheduler.health.password') %>@localhost:<%=p('autoscaler.scheduler.health.port') %>" timeout 30 seconds then alert start program "/var/vcap/jobs/bpm/bin/bpm start scheduler" stop program "/var/vcap/jobs/bpm/bin/bpm stop scheduler" - group vcap \ No newline at end of file + group vcap +%> \ No newline at end of file From 9a0f53597202ce88175ddcc8e950136ac6348413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Thu, 3 Aug 2023 16:45:50 +0200 Subject: [PATCH 160/294] Render monit-file outside the templating-mechanism; --- jobs/scheduler/{templates/monit.erb => monit} | 4 +--- jobs/scheduler/spec | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) rename jobs/scheduler/{templates/monit.erb => monit} (95%) diff --git a/jobs/scheduler/templates/monit.erb b/jobs/scheduler/monit similarity index 95% rename from jobs/scheduler/templates/monit.erb rename to jobs/scheduler/monit index e4a460f5b8..5b668ac8de 100644 --- a/jobs/scheduler/templates/monit.erb +++ b/jobs/scheduler/monit @@ -1,4 +1,3 @@ -<% check host scheduler with address localhost if failed url "http://<%=p('autoscaler.scheduler.health.username') %>:<%=p('autoscaler.scheduler.health.password') %>@localhost:<%=p('autoscaler.scheduler.health.port') %>" timeout 30 seconds @@ -6,5 +5,4 @@ check host scheduler with address localhost start program "/var/vcap/jobs/bpm/bin/bpm start scheduler" stop program "/var/vcap/jobs/bpm/bin/bpm stop scheduler" - group vcap -%> \ No newline at end of file + group vcap \ No newline at end of file diff --git a/jobs/scheduler/spec b/jobs/scheduler/spec index fc3b58f6c8..d63bd474cd 100644 --- a/jobs/scheduler/spec +++ b/jobs/scheduler/spec @@ -9,8 +9,6 @@ templates: liquibase.properties: bin/liquibase.properties - monit.erb: /var/vcap/jobs/scheduler/monit - policy_db_ca.crt.erb: config/certs/policy_db/ca.crt policy_db.crt.erb: config/certs/policy_db/crt policy_db.key.erb: config/certs/policy_db/key From c6dc1053aba17823467f08861cff75f0c889ee3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Thu, 3 Aug 2023 17:11:38 +0200 Subject: [PATCH 161/294] Restart on failed health-check; --- jobs/scheduler/monit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/scheduler/monit b/jobs/scheduler/monit index 5b668ac8de..59abbe16f8 100644 --- a/jobs/scheduler/monit +++ b/jobs/scheduler/monit @@ -1,7 +1,7 @@ check host scheduler with address localhost if failed url "http://<%=p('autoscaler.scheduler.health.username') %>:<%=p('autoscaler.scheduler.health.password') %>@localhost:<%=p('autoscaler.scheduler.health.port') %>" timeout 30 seconds - then alert + then restart scheduler start program "/var/vcap/jobs/bpm/bin/bpm start scheduler" stop program "/var/vcap/jobs/bpm/bin/bpm stop scheduler" From 02424b935d5a05c92cf0bb5c0ac3bcbfcbbdb166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 4 Aug 2023 10:53:30 +0200 Subject: [PATCH 162/294] =?UTF-8?q?Experiment=20with=20monit-file=20?= =?UTF-8?q?=E2=80=93=20WIP;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jobs/scheduler/monit | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/jobs/scheduler/monit b/jobs/scheduler/monit index 59abbe16f8..f6fa378840 100644 --- a/jobs/scheduler/monit +++ b/jobs/scheduler/monit @@ -1,7 +1,13 @@ check host scheduler with address localhost - if failed url "http://<%=p('autoscaler.scheduler.health.username') %>:<%=p('autoscaler.scheduler.health.password') %>@localhost:<%=p('autoscaler.scheduler.health.port') %>" - timeout 30 seconds - then restart scheduler + if failed url <%= + require "erb" + include ERB::Util + + url = "http://#{p('autoscaler.scheduler.health.username')}:#{p('autoscaler.scheduler.health.password')}@localhost:#{p('autoscaler.scheduler.health.port')})" + "#{url_encode(url)}" + %> + with timeout 30 seconds + then restart scheduler start program "/var/vcap/jobs/bpm/bin/bpm start scheduler" stop program "/var/vcap/jobs/bpm/bin/bpm stop scheduler" From e162ba2e8186059776f0c0c7b837a2bff6e22302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 4 Aug 2023 11:35:51 +0200 Subject: [PATCH 163/294] Revert "Restart on failed health-check;" This reverts commit 21fcc9208ba7f5310db8d8867de9f26bf34fd001. --- jobs/scheduler/monit | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/jobs/scheduler/monit b/jobs/scheduler/monit index f6fa378840..5b668ac8de 100644 --- a/jobs/scheduler/monit +++ b/jobs/scheduler/monit @@ -1,13 +1,7 @@ check host scheduler with address localhost - if failed url <%= - require "erb" - include ERB::Util - - url = "http://#{p('autoscaler.scheduler.health.username')}:#{p('autoscaler.scheduler.health.password')}@localhost:#{p('autoscaler.scheduler.health.port')})" - "#{url_encode(url)}" - %> - with timeout 30 seconds - then restart scheduler + if failed url "http://<%=p('autoscaler.scheduler.health.username') %>:<%=p('autoscaler.scheduler.health.password') %>@localhost:<%=p('autoscaler.scheduler.health.port') %>" + timeout 30 seconds + then alert start program "/var/vcap/jobs/bpm/bin/bpm start scheduler" stop program "/var/vcap/jobs/bpm/bin/bpm stop scheduler" From c19b81987d88243924b3c461374db28a916318c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 4 Aug 2023 11:35:56 +0200 Subject: [PATCH 164/294] Revert "Render monit-file outside the templating-mechanism;" This reverts commit 6556e5d6e28220aa8350a84232f9fef53e704df9. --- jobs/scheduler/spec | 2 ++ jobs/scheduler/{monit => templates/monit.erb} | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) rename jobs/scheduler/{monit => templates/monit.erb} (95%) diff --git a/jobs/scheduler/spec b/jobs/scheduler/spec index d63bd474cd..fc3b58f6c8 100644 --- a/jobs/scheduler/spec +++ b/jobs/scheduler/spec @@ -9,6 +9,8 @@ templates: liquibase.properties: bin/liquibase.properties + monit.erb: /var/vcap/jobs/scheduler/monit + policy_db_ca.crt.erb: config/certs/policy_db/ca.crt policy_db.crt.erb: config/certs/policy_db/crt policy_db.key.erb: config/certs/policy_db/key diff --git a/jobs/scheduler/monit b/jobs/scheduler/templates/monit.erb similarity index 95% rename from jobs/scheduler/monit rename to jobs/scheduler/templates/monit.erb index 5b668ac8de..e4a460f5b8 100644 --- a/jobs/scheduler/monit +++ b/jobs/scheduler/templates/monit.erb @@ -1,3 +1,4 @@ +<% check host scheduler with address localhost if failed url "http://<%=p('autoscaler.scheduler.health.username') %>:<%=p('autoscaler.scheduler.health.password') %>@localhost:<%=p('autoscaler.scheduler.health.port') %>" timeout 30 seconds @@ -5,4 +6,5 @@ check host scheduler with address localhost start program "/var/vcap/jobs/bpm/bin/bpm start scheduler" stop program "/var/vcap/jobs/bpm/bin/bpm stop scheduler" - group vcap \ No newline at end of file + group vcap +%> \ No newline at end of file From 892d2a0ed74bc593e6d97e30e121ab970b06c2ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 4 Aug 2023 11:37:24 +0200 Subject: [PATCH 165/294] Working version of the monit-file; --- jobs/scheduler/{templates/monit.erb => monit} | 6 ++---- jobs/scheduler/spec | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) rename jobs/scheduler/{templates/monit.erb => monit} (51%) diff --git a/jobs/scheduler/templates/monit.erb b/jobs/scheduler/monit similarity index 51% rename from jobs/scheduler/templates/monit.erb rename to jobs/scheduler/monit index e4a460f5b8..e7b1405fc8 100644 --- a/jobs/scheduler/templates/monit.erb +++ b/jobs/scheduler/monit @@ -1,10 +1,8 @@ -<% check host scheduler with address localhost - if failed url "http://<%=p('autoscaler.scheduler.health.username') %>:<%=p('autoscaler.scheduler.health.password') %>@localhost:<%=p('autoscaler.scheduler.health.port') %>" + if failed url http://<%=p('autoscaler.scheduler.health.username') %>:<%=p('autoscaler.scheduler.health.password') %>@localhost:<%=p('autoscaler.scheduler.health.port') %> timeout 30 seconds then alert start program "/var/vcap/jobs/bpm/bin/bpm start scheduler" stop program "/var/vcap/jobs/bpm/bin/bpm stop scheduler" - group vcap -%> \ No newline at end of file + group vcap \ No newline at end of file diff --git a/jobs/scheduler/spec b/jobs/scheduler/spec index fc3b58f6c8..d63bd474cd 100644 --- a/jobs/scheduler/spec +++ b/jobs/scheduler/spec @@ -9,8 +9,6 @@ templates: liquibase.properties: bin/liquibase.properties - monit.erb: /var/vcap/jobs/scheduler/monit - policy_db_ca.crt.erb: config/certs/policy_db/ca.crt policy_db.crt.erb: config/certs/policy_db/crt policy_db.key.erb: config/certs/policy_db/key From 46d426209ff28b6188cdb0bc251747fe3ffc245e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 4 Aug 2023 11:53:53 +0200 Subject: [PATCH 166/294] Safely encode URL of scheduler-health-enpoint; --- jobs/scheduler/monit | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jobs/scheduler/monit b/jobs/scheduler/monit index e7b1405fc8..bc1ebbad5a 100644 --- a/jobs/scheduler/monit +++ b/jobs/scheduler/monit @@ -1,5 +1,12 @@ +<% + require "erb" + include ERB::Util + + heatlh_url = "http://#{p('autoscaler.scheduler.health.username')}:#{p('autoscaler.scheduler.health.password')}@localhost:#{p('autoscaler.scheduler.health.port')}" +%> + check host scheduler with address localhost - if failed url http://<%=p('autoscaler.scheduler.health.username') %>:<%=p('autoscaler.scheduler.health.password') %>@localhost:<%=p('autoscaler.scheduler.health.port') %> + if failed url <%=url_encode(heatlh_url)%> timeout 30 seconds then alert From 986b3148914cf192f0e96dc93ef7e4a5d4df5d72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 4 Aug 2023 12:33:51 +0200 Subject: [PATCH 167/294] Restart on failed health-check and modify erb-script; --- jobs/scheduler/monit | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jobs/scheduler/monit b/jobs/scheduler/monit index bc1ebbad5a..85b8ad03a1 100644 --- a/jobs/scheduler/monit +++ b/jobs/scheduler/monit @@ -1,14 +1,14 @@ <% - require "erb" - include ERB::Util + require 'erb' - heatlh_url = "http://#{p('autoscaler.scheduler.health.username')}:#{p('autoscaler.scheduler.health.password')}@localhost:#{p('autoscaler.scheduler.health.port')}" + health_url = "http://#{p('autoscaler.scheduler.health.username')}:#{p('autoscaler.scheduler.health.password')}@localhost:#{p('autoscaler.scheduler.health.port')}" + health_url_encoded = url_encode(health_url) %> check host scheduler with address localhost - if failed url <%=url_encode(heatlh_url)%> + if failed url <%=health_url_encoded%> timeout 30 seconds - then alert + then restart start program "/var/vcap/jobs/bpm/bin/bpm start scheduler" stop program "/var/vcap/jobs/bpm/bin/bpm stop scheduler" From 869896ab8397f833ab986890b2552e9567760bc3 Mon Sep 17 00:00:00 2001 From: OliverMautschke Date: Fri, 4 Aug 2023 14:17:58 +0200 Subject: [PATCH 168/294] Make monit work --- jobs/scheduler/monit | 11 ++++++----- spec/fixtures/monit | 8 ++++++++ spec/jobs/scheduler/scheduler_spec.rb | 22 ++++++++++++++++++++++ 3 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 spec/fixtures/monit diff --git a/jobs/scheduler/monit b/jobs/scheduler/monit index 85b8ad03a1..54193457f7 100644 --- a/jobs/scheduler/monit +++ b/jobs/scheduler/monit @@ -1,12 +1,13 @@ <% require 'erb' - health_url = "http://#{p('autoscaler.scheduler.health.username')}:#{p('autoscaler.scheduler.health.password')}@localhost:#{p('autoscaler.scheduler.health.port')}" - health_url_encoded = url_encode(health_url) -%> + user = ERB::Util.url_encode(p('autoscaler.scheduler.health.username')) + password = ERB::Util.url_encode(p('autoscaler.scheduler.health.password')) + port = p('autoscaler.scheduler.health.port') -check host scheduler with address localhost - if failed url <%=health_url_encoded%> + health_url = "http://#{user}:#{password}@localhost:#{port}" +%>check host scheduler with address localhost + if failed url <%=health_url%> timeout 30 seconds then restart diff --git a/spec/fixtures/monit b/spec/fixtures/monit new file mode 100644 index 0000000000..6dce2368e1 --- /dev/null +++ b/spec/fixtures/monit @@ -0,0 +1,8 @@ +check host scheduler with address localhost + if failed url http://user:my%20password@localhost:1234 + timeout 30 seconds + then restart + + start program "/var/vcap/jobs/bpm/bin/bpm start scheduler" + stop program "/var/vcap/jobs/bpm/bin/bpm stop scheduler" + group vcap \ No newline at end of file diff --git a/spec/jobs/scheduler/scheduler_spec.rb b/spec/jobs/scheduler/scheduler_spec.rb index 0290dbd0bc..23693c5260 100644 --- a/spec/jobs/scheduler/scheduler_spec.rb +++ b/spec/jobs/scheduler/scheduler_spec.rb @@ -100,4 +100,26 @@ expect(rendered_template["spring"]["datasource"]["password"]).to eq("default") end end + + context "Scheduler monit" do + def p(v) + case v + when 'autoscaler.scheduler.health.username' + "user" + when 'autoscaler.scheduler.health.password' + "my password" + when 'autoscaler.scheduler.health.port' + 1234 + else + "Error: param not supported (#{v})" + end + end + + it "renders the monit file" do + template = ERB.new File.read("jobs/scheduler/monit"), nil, "%" + expected = File.read('spec/fixtures/monit') + expect(template.result(binding)).to eq(expected) + end + + end end From e63a774b04c3d7610139eb71f2f18187efa47905 Mon Sep 17 00:00:00 2001 From: OliverMautschke Date: Mon, 7 Aug 2023 11:43:49 +0200 Subject: [PATCH 169/294] make rubocop happy --- spec/jobs/scheduler/scheduler_spec.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/spec/jobs/scheduler/scheduler_spec.rb b/spec/jobs/scheduler/scheduler_spec.rb index 23693c5260..be04e99a02 100644 --- a/spec/jobs/scheduler/scheduler_spec.rb +++ b/spec/jobs/scheduler/scheduler_spec.rb @@ -104,11 +104,11 @@ context "Scheduler monit" do def p(v) case v - when 'autoscaler.scheduler.health.username' + when "autoscaler.scheduler.health.username" "user" - when 'autoscaler.scheduler.health.password' + when "autoscaler.scheduler.health.password" "my password" - when 'autoscaler.scheduler.health.port' + when "autoscaler.scheduler.health.port" 1234 else "Error: param not supported (#{v})" @@ -116,10 +116,9 @@ def p(v) end it "renders the monit file" do - template = ERB.new File.read("jobs/scheduler/monit"), nil, "%" - expected = File.read('spec/fixtures/monit') + template = ERB.new(File.read("jobs/scheduler/monit"), trim_mode: "%") + expected = File.read("spec/fixtures/monit") expect(template.result(binding)).to eq(expected) end - end end From 5c40cde0b67b995f5ae983d1412be32e8cc961e9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 21 Aug 2023 21:46:10 +0000 Subject: [PATCH 170/294] chore(deps): update dependency terragrunt to v0.50.6 (#2054) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index f2867750e6..380decf9a7 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.4 terraform 1.5.5 terraform-lsp -terragrunt 0.50.4 +terragrunt 0.50.6 From 6a619d265fb1e74947cb24a1b3fe6ac0463544c8 Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Tue, 22 Aug 2023 10:49:50 +0200 Subject: [PATCH 171/294] Use `reviewdog` to invoke `golangci-lint` and move to same workflow as other reviewdog linters. --- .github/workflows/golangci-lint.yaml | 61 ----------------------- .github/workflows/linters.yaml | 74 +++++++++++++++++++++++++++- Makefile | 2 +- 3 files changed, 74 insertions(+), 63 deletions(-) delete mode 100644 .github/workflows/golangci-lint.yaml diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml deleted file mode 100644 index 3f8b777b59..0000000000 --- a/.github/workflows/golangci-lint.yaml +++ /dev/null @@ -1,61 +0,0 @@ -name: golangci-lint -on: - pull_request: - -concurrency: - group: "${{ github.workflow }}/${{ github.ref }}" - cancel-in-progress: true - -jobs: - golangci: - name: lint - # DO NOT PIN THIS TO A GO VERSION! - # We automatically use the go minor version in the mod file and will miss golang updates and issues relate to new go versions. - # Yes there is one linter rowserrcheck automatically turned off because of generics - # - unless we are doing DB development it does not matter, and it should be fixed soon. - runs-on: ubuntu-latest - container: - image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main - steps: - - name: Trust my checkout - run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" - - uses: actions/checkout@v3 - - - name: get golangci-lint version - id: lint - run: | - version=v$(cat .tool-versions | grep golangci-lint | cut -d " " -f 2 ) - echo "golangci-lint version: '${version}'" - echo "version=${version}" >> $GITHUB_OUTPUT; - - - name: lint acceptance - uses: golangci/golangci-lint-action@v3.7.0 - with: - working-directory: src/acceptance - args: --config='../../.golangci.yaml' -v --timeout='2m' - version: ${{ steps.lint.outputs.version }} - skip-cache: true - - - name: lint autoscaler - uses: golangci/golangci-lint-action@v3.7.0 - with: - working-directory: src/autoscaler - args: --config='../../.golangci.yaml' --timeout='2m' - version: ${{ steps.lint.outputs.version }} - skip-cache: true - - - name: lint changelog - uses: golangci/golangci-lint-action@v3.7.0 - with: - working-directory: src/changelog - args: --config ../../.golangci.yaml - version: ${{ steps.lint.outputs.version }} - skip-cache: true - - - name: lint changeloglockcleaner - uses: golangci/golangci-lint-action@v3.7.0 - with: - working-directory: src/changeloglockcleaner - args: --config ../../.golangci.yaml - version: ${{ steps.lint.outputs.version }} - skip-cache: true diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index 3f9164c8d4..cc750a012c 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -11,6 +11,27 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + + - name: Trust my checkout + run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" + - name: make build-all + run: | + make build-all + + - name: get golangci-lint version + id: get-golangci-lint-version + run: | + version=v$(grep golangci-lint .tool-versions | cut -d " " -f 2 ) + echo "golangci-lint version from .tool-versions: '${version}'" + echo "version=${version}" >> "$GITHUB_OUTPUT"; + + - name: get go version + id: get-golang-version + run: | + version="$(grep "golang " .tool-versions| cut -f 2 -d " ")" + echo "Go version from .tool-versions: '${version}'" + echo "version=${version}" >> "$GITHUB_OUTPUT"; + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -18,7 +39,8 @@ jobs: bundler-cache: true env: # Needed for self-hosted runner - ImageOS: "ubuntu22" + ImageOS: ubuntu22 + - name: shellcheck uses: reviewdog/action-shellcheck@v1 with: @@ -41,3 +63,53 @@ jobs: uses: reviewdog/action-markdownlint@v0 with: reporter: github-pr-review + + - name: lint acceptance + uses: reviewdog/action-golangci-lint@v2 + with: + workdir: src/acceptance + go_version: ${{ steps.get-golang-version.outputs.version }} + golangci_lint_version: ${{ steps.get-golangci-lint-version.outputs.version }} + reporter: github-pr-review + filter_mode: nofilter + fail_on_error: true + + - name: lint go test app + uses: reviewdog/action-golangci-lint@v2 + with: + workdir: src/acceptance/assets/app/go_app + go_version: ${{ steps.get-golang-version.outputs.version }} + golangci_lint_version: ${{ steps.get-golangci-lint-version.outputs.version }} + reporter: github-pr-review + filter_mode: nofilter + fail_on_error: true + + - name: lint autoscaler + uses: reviewdog/action-golangci-lint@v2 + with: + workdir: src/autoscaler + go_version: ${{ steps.get-golang-version.outputs.version }} + golangci_lint_version: ${{ steps.get-golangci-lint-version.outputs.version }} + reporter: github-pr-review + filter_mode: nofilter + fail_on_error: true + + - name: lint changelog + uses: reviewdog/action-golangci-lint@v2 + with: + workdir: src/changelog + go_version: ${{ steps.get-golang-version.outputs.version }} + golangci_lint_version: ${{ steps.get-golangci-lint-version.outputs.version }} + reporter: github-pr-review + filter_mode: nofilter + fail_on_error: true + + - name: lint changeloglockcleaner + uses: reviewdog/action-golangci-lint@v2 + with: + workdir: src/changeloglockcleaner + go_version: ${{ steps.get-golang-version.outputs.version }} + golangci_lint_version: ${{ steps.get-golangci-lint-version.outputs.version }} + reporter: github-pr-review + filter_mode: nofilter + fail_on_error: true diff --git a/Makefile b/Makefile index c10284b895..03cf59068c 100644 --- a/Makefile +++ b/Makefile @@ -85,7 +85,7 @@ clean-acceptance: build: $(all_modules) build-tests: build-test build-test: $(addprefix test_,$(go_modules)) -build-all: build build-test +build-all: build build-test build-test-app db: target/db target/db: @echo "# building $@" From be7b6b448e0785352123cc44474de6c81c75bc80 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 22 Aug 2023 00:44:33 +0000 Subject: [PATCH 172/294] chore(deps): update dependency golangci-lint to v1.54.2 (cherry picked from commit fe62a16eb0885a287a07b07b65b7a032d8b1f3d6) --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index b571d5b846..24b701f7cf 100644 --- a/.tool-versions +++ b/.tool-versions @@ -7,7 +7,7 @@ direnv 2.32.3 gcloud 443.0.0 ginkgo 2.11.0 golang 1.20.6 -golangci-lint 1.54.1 +golangci-lint 1.54.2 java temurin-17.0.8+7 make 4.4 maven 3.8.6 From 46ccf8d10816e761a5fbdb161fa9f5507c520f85 Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Tue, 22 Aug 2023 14:05:28 +0200 Subject: [PATCH 173/294] Fix new `golangci-lint` findings --- .../app/go_app/internal/custommetrics/api_credentials.go | 4 ++-- src/autoscaler/db/sqldb/lock_sqldb.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/api_credentials.go b/src/acceptance/assets/app/go_app/internal/custommetrics/api_credentials.go index 10db719d1a..9bedb337d0 100644 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/api_credentials.go +++ b/src/acceptance/assets/app/go_app/internal/custommetrics/api_credentials.go @@ -10,10 +10,10 @@ type CustomMetricsCredentials struct { } func (c CustomMetricsCredentials) BasicAuthentication(ctx context.Context, operationName string) (BasicAuthentication, error) { - credentials := BasicAuthentication { + credentials := BasicAuthentication{ Username: c.Username, Password: c.Password, } return credentials, nil -} \ No newline at end of file +} diff --git a/src/autoscaler/db/sqldb/lock_sqldb.go b/src/autoscaler/db/sqldb/lock_sqldb.go index 6fcbcf1735..b300a8ab37 100644 --- a/src/autoscaler/db/sqldb/lock_sqldb.go +++ b/src/autoscaler/db/sqldb/lock_sqldb.go @@ -63,6 +63,7 @@ func (ldb *LockSQLDB) Close() error { return nil } +/* #nosec G202 -- string comes from safe source and parametrized table names are not supported. */ func (ldb *LockSQLDB) fetch(tx *sql.Tx) (*models.Lock, error) { ldb.logger.Debug("fetching-lock") var ( From 8c6140908c78e3d42df90fcab7ae6313f1a42f15 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 22 Aug 2023 17:39:21 +0200 Subject: [PATCH 174/294] chore(deps): update dependency golangci/golangci-lint to v1.54.2 (#2076) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index b571d5b846..24b701f7cf 100644 --- a/.tool-versions +++ b/.tool-versions @@ -7,7 +7,7 @@ direnv 2.32.3 gcloud 443.0.0 ginkgo 2.11.0 golang 1.20.6 -golangci-lint 1.54.1 +golangci-lint 1.54.2 java temurin-17.0.8+7 make 4.4 maven 3.8.6 From a604bb2a718897d560bd665224cf0ee169c3a05e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 23 Aug 2023 01:33:15 +0000 Subject: [PATCH 175/294] chore(deps): update google/cloud-sdk docker tag to v444 (#2078) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- ci/terragrunt/.tool-versions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.tool-versions b/.tool-versions index 24b701f7cf..ad321bbcab 100644 --- a/.tool-versions +++ b/.tool-versions @@ -4,7 +4,7 @@ bosh 7.4.0 cf 8.7.1 concourse 7.10.0 direnv 2.32.3 -gcloud 443.0.0 +gcloud 444.0.0 ginkgo 2.11.0 golang 1.20.6 golangci-lint 1.54.2 diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 380decf9a7..d63c47ab90 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,4 +1,4 @@ -gcloud 443.0.0 +gcloud 444.0.0 helm 3.12.3 python 3.11.4 terraform 1.5.5 From 6e4ae7f19e11f4c8e83741c55dce1134ef37d977 Mon Sep 17 00:00:00 2001 From: Oliver Mautschke <40239127+OliverMautschke@users.noreply.github.com> Date: Wed, 23 Aug 2023 10:45:29 +0200 Subject: [PATCH 176/294] Revert "Scheduler use health endpoint monit" --- jobs/scheduler/monit | 18 ++++-------------- jobs/scheduler/spec | 14 ++++++-------- spec/fixtures/monit | 8 -------- spec/jobs/scheduler/scheduler_spec.rb | 21 --------------------- 4 files changed, 10 insertions(+), 51 deletions(-) delete mode 100644 spec/fixtures/monit diff --git a/jobs/scheduler/monit b/jobs/scheduler/monit index 54193457f7..f52917201e 100644 --- a/jobs/scheduler/monit +++ b/jobs/scheduler/monit @@ -1,16 +1,6 @@ -<% - require 'erb' - - user = ERB::Util.url_encode(p('autoscaler.scheduler.health.username')) - password = ERB::Util.url_encode(p('autoscaler.scheduler.health.password')) - port = p('autoscaler.scheduler.health.port') - - health_url = "http://#{user}:#{password}@localhost:#{port}" -%>check host scheduler with address localhost - if failed url <%=health_url%> - timeout 30 seconds - then restart - +check process scheduler + with pidfile /var/vcap/sys/run/bpm/scheduler/scheduler.pid start program "/var/vcap/jobs/bpm/bin/bpm start scheduler" stop program "/var/vcap/jobs/bpm/bin/bpm stop scheduler" - group vcap \ No newline at end of file + group vcap + diff --git a/jobs/scheduler/spec b/jobs/scheduler/spec index d63bd474cd..01cf63ccf4 100644 --- a/jobs/scheduler/spec +++ b/jobs/scheduler/spec @@ -3,25 +3,23 @@ name: scheduler templates: bpm-pre-start.erb: bin/bpm-pre-start bpm.yml.erb: config/bpm.yml - + liquibase.properties: bin/liquibase.properties + scheduler.yml.erb: config/scheduler.yml install_crt_keystore.sh: bin/install_crt_keystore install_crt_truststore.sh: bin/install_crt_truststore - liquibase.properties: bin/liquibase.properties - - policy_db_ca.crt.erb: config/certs/policy_db/ca.crt - policy_db.crt.erb: config/certs/policy_db/crt - policy_db.key.erb: config/certs/policy_db/key - scheduler_ca.crt.erb: config/certs/ca.crt scheduler_server.crt.erb: config/certs/server.crt scheduler_server.key.erb: config/certs/server.key - scheduler.yml.erb: config/scheduler.yml scalingengine_ca.crt.erb: config/certs/scalingengine/ca.crt scalingengine_client.crt.erb: config/certs/scalingengine/client.crt scalingengine_client.key.erb: config/certs/scalingengine/client.key + policy_db_ca.crt.erb: config/certs/policy_db/ca.crt + policy_db.crt.erb: config/certs/policy_db/crt + policy_db.key.erb: config/certs/policy_db/key + scheduler_db_ca.crt.erb: config/certs/scheduler_db/ca.crt scheduler_db.crt.erb: config/certs/scheduler_db/crt scheduler_db.key.erb: config/certs/scheduler_db/key diff --git a/spec/fixtures/monit b/spec/fixtures/monit deleted file mode 100644 index 6dce2368e1..0000000000 --- a/spec/fixtures/monit +++ /dev/null @@ -1,8 +0,0 @@ -check host scheduler with address localhost - if failed url http://user:my%20password@localhost:1234 - timeout 30 seconds - then restart - - start program "/var/vcap/jobs/bpm/bin/bpm start scheduler" - stop program "/var/vcap/jobs/bpm/bin/bpm stop scheduler" - group vcap \ No newline at end of file diff --git a/spec/jobs/scheduler/scheduler_spec.rb b/spec/jobs/scheduler/scheduler_spec.rb index be04e99a02..0290dbd0bc 100644 --- a/spec/jobs/scheduler/scheduler_spec.rb +++ b/spec/jobs/scheduler/scheduler_spec.rb @@ -100,25 +100,4 @@ expect(rendered_template["spring"]["datasource"]["password"]).to eq("default") end end - - context "Scheduler monit" do - def p(v) - case v - when "autoscaler.scheduler.health.username" - "user" - when "autoscaler.scheduler.health.password" - "my password" - when "autoscaler.scheduler.health.port" - 1234 - else - "Error: param not supported (#{v})" - end - end - - it "renders the monit file" do - template = ERB.new(File.read("jobs/scheduler/monit"), trim_mode: "%") - expected = File.read("spec/fixtures/monit") - expect(template.result(binding)).to eq(expected) - end - end end From 51e662f9e5360467d3ef59437616844efa2910b9 Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Wed, 23 Aug 2023 14:28:19 +0100 Subject: [PATCH 177/294] APPAUTOSCALER-572 Refactoring API Files --- api/application-metric-api.openapi.yaml | 2 -- api/policy-api.openapi.yaml | 6 ++++++ api/scaling-history-api.openapi.yaml | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/api/application-metric-api.openapi.yaml b/api/application-metric-api.openapi.yaml index d194a9c131..14d1e395fa 100644 --- a/api/application-metric-api.openapi.yaml +++ b/api/application-metric-api.openapi.yaml @@ -125,7 +125,6 @@ components: type: object properties: app_guid: - $ref: "./shared_definitions.yaml#/schemas/GUID" instanceIndex: type: integer @@ -142,7 +141,6 @@ components: The time at which the metrics were collected in the number of nanoseconds example: 1494989539138350000 metric_type: - $ref: "./shared_definitions.yaml#/schemas/metric_type" value: type: integer diff --git a/api/policy-api.openapi.yaml b/api/policy-api.openapi.yaml index f68e03fd26..52ad543d5c 100644 --- a/api/policy-api.openapi.yaml +++ b/api/policy-api.openapi.yaml @@ -92,6 +92,7 @@ components: items: $ref: '#/components/schemas/ScalingRule' ScalingRule: + type: object required: - threshold - operator @@ -137,6 +138,7 @@ components: items: $ref: '#/components/schemas/Schedules' Schedules: + type: object required: - timezone properties: @@ -151,6 +153,7 @@ components: items: $ref: "#/components/schemas/RecurringSchedule" RecurringSchedule: + type: object required: - start_time - end_time @@ -181,6 +184,8 @@ components: description: | recurring days of a week or month. Use [1,2,..,7] or [1,2,...,31] to define it type: array + items: + type: integer example: [5, 15, 25] instance_min_count: description: minimal number of instance count for this schedule @@ -202,6 +207,7 @@ components: items: $ref: '#/components/schemas/SpecificDate' SpecificDate: + type: object required: - start_date_time - end_date_time diff --git a/api/scaling-history-api.openapi.yaml b/api/scaling-history-api.openapi.yaml index eac49d6cf7..803d471ed3 100644 --- a/api/scaling-history-api.openapi.yaml +++ b/api/scaling-history-api.openapi.yaml @@ -79,7 +79,6 @@ paths: security: - bearerAuth: [] x-codegen-request-body-name: body - components: schemas: History: From 3dd9e77055c04d8be9be4edf940613a862f30474 Mon Sep 17 00:00:00 2001 From: Anubhav Gupta Date: Wed, 23 Aug 2023 15:01:50 +0100 Subject: [PATCH 178/294] Fixing Scaling History API --- api/scaling-history-api.openapi.yaml | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/api/scaling-history-api.openapi.yaml b/api/scaling-history-api.openapi.yaml index 803d471ed3..0a4537818b 100644 --- a/api/scaling-history-api.openapi.yaml +++ b/api/scaling-history-api.openapi.yaml @@ -6,7 +6,6 @@ info: tags: - name: Scaling History API V1 description: List the scaling history of an Application - paths: /v1/apps/{guid}/scaling_histories: parameters: @@ -111,21 +110,18 @@ components: items: $ref: '#/components/schemas/HistoryEntry' HistoryEntry: - allOf: - - $ref: "#/components/schemas/HistoryEntryCommon" - - oneOf: - - $ref: "#/components/schemas/HistoryErrorEntry" - - $ref: "#/components/schemas/HistoryIgnoreEntry" - - $ref: "#/components/schemas/HistorySuccessEntry" - discriminator: - propertyName: status - mapping: - 0: "#/components/schemas/HistorySuccessEntry" - 1: "#/components/schemas/HistoryErrorEntry" - 2: "#/components/schemas/HistoryIgnoreEntry" - HistoryEntryCommon: description: "Properties common for each entry in the scaling history." type: object + oneOf: + - $ref: "#/components/schemas/HistoryErrorEntry" + - $ref: "#/components/schemas/HistoryIgnoreEntry" + - $ref: "#/components/schemas/HistorySuccessEntry" + discriminator: + propertyName: status + mapping: + 0: "#/components/schemas/HistorySuccessEntry" + 1: "#/components/schemas/HistoryErrorEntry" + 2: "#/components/schemas/HistoryIgnoreEntry" properties: status: type: integer @@ -136,7 +132,6 @@ components: + 0: The scaling was done successfully. + 1: The scaling failed explicitly. + 2: The scaling was ignored. - This field is as well a selector of which of the other ones are used and which not. example: 0 app_guid: From d6b198204bbb8a70f9959760f4790004060644b3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 24 Aug 2023 02:59:35 +0000 Subject: [PATCH 179/294] chore(deps): update dependency ginkgo to v2.12.0 (#2083) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/dockerfiles/autoscaler-deploy/Dockerfile | 2 +- ci/dockerfiles/autoscaler-tools/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/dockerfiles/autoscaler-deploy/Dockerfile b/ci/dockerfiles/autoscaler-deploy/Dockerfile index 05124fdcb0..93d8046cea 100644 --- a/ci/dockerfiles/autoscaler-deploy/Dockerfile +++ b/ci/dockerfiles/autoscaler-deploy/Dockerfile @@ -91,7 +91,7 @@ RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.c gcloud version # renovate: datasource=github-releases depName=ginkgo lookupName=onsi/ginkgo -ARG GINKGO_VERSION=v2.11.0 +ARG GINKGO_VERSION=v2.12.0 RUN go install github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} &&\ ginkgo version diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index f4b073509c..26931117e4 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -129,7 +129,7 @@ RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.c gcloud version # renovate: datasource=github-releases depName=ginkgo lookupName=onsi/ginkgo -ARG GINKGO_VERSION=v2.11.0 +ARG GINKGO_VERSION=v2.12.0 RUN go install github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} && \ ginkgo version From 305629f6d4633486832e55792064c88ef8910cbf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Aug 2023 03:58:41 +0000 Subject: [PATCH 180/294] Bump github.com/onsi/ginkgo/v2 from 2.11.0 to 2.12.0 in /src/autoscaler (#2084) Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.11.0 to 2.12.0. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.11.0...v2.12.0) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index e07bad01d2..6252f3d339 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -21,7 +21,7 @@ require ( github.com/jmoiron/sqlx v1.3.5 github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0 github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d - github.com/onsi/ginkgo/v2 v2.11.0 + github.com/onsi/ginkgo/v2 v2.12.0 github.com/onsi/gomega v1.27.10 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pivotal-cf/brokerapi/v10 v10.0.0 diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index c91a57c419..e59f08ee77 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -917,8 +917,8 @@ github.com/onsi/ginkgo/v2 v2.9.0/go.mod h1:4xkjoL/tZv4SMWeww56BU5kAt19mVB47gTWxm github.com/onsi/ginkgo/v2 v2.9.1/go.mod h1:FEcmzVcCHl+4o9bQZVab+4dC9+j+91t2FHSzmGAPfuo= github.com/onsi/ginkgo/v2 v2.9.2/go.mod h1:WHcJJG2dIlcCqVfBAwUCrJxSPFb6v4azBwgxeMeDuts= github.com/onsi/ginkgo/v2 v2.9.4/go.mod h1:gCQYp2Q+kSoIj7ykSVb9nskRSsR6PUj4AiLywzIhbKM= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= -github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= +github.com/onsi/ginkgo/v2 v2.12.0 h1:UIVDowFPwpg6yMUpPjGkYvf06K3RAiJXUhCxEwQVHRI= +github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= From ae941880fcb8721ce937b0237f4143c90fb2176c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 24 Aug 2023 05:01:10 +0000 Subject: [PATCH 181/294] chore(deps): update dependency onsi/ginkgo to v2.12.0 (#2085) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index ad321bbcab..bf2dd7691d 100644 --- a/.tool-versions +++ b/.tool-versions @@ -5,7 +5,7 @@ cf 8.7.1 concourse 7.10.0 direnv 2.32.3 gcloud 444.0.0 -ginkgo 2.11.0 +ginkgo 2.12.0 golang 1.20.6 golangci-lint 1.54.2 java temurin-17.0.8+7 From 5aee86ec7cdd53324e08cc5ea9aec86e048a41ce Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 24 Aug 2023 06:10:27 +0000 Subject: [PATCH 182/294] chore(deps): update dependency terraform to v1.5.6 (#2082) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index d63c47ab90..5c17711a1d 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,6 +1,6 @@ gcloud 444.0.0 helm 3.12.3 python 3.11.4 -terraform 1.5.5 +terraform 1.5.6 terraform-lsp terragrunt 0.50.6 From c3a69e71cdac7a929cf432268af39c3053f21fd5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 24 Aug 2023 10:44:53 +0200 Subject: [PATCH 183/294] fix(deps): update module github.com/onsi/ginkgo/v2 to v2.12.0 (#2086) * fix(deps): update module github.com/onsi/ginkgo/v2 to v2.12.0 * Manual `go mod tidy` due to https://github.com/renovatebot/renovate/discussions/23471 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Silvestre Zabala --- src/acceptance/assets/app/go_app/go.mod | 2 +- src/acceptance/assets/app/go_app/go.sum | 4 ++-- src/acceptance/go.mod | 10 +++++----- src/acceptance/go.sum | 22 ++++++++++----------- src/changeloglockcleaner/go.mod | 12 ++++++------ src/changeloglockcleaner/go.sum | 26 ++++++++++++------------- 6 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index 8f213630b2..4157782d10 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -15,7 +15,7 @@ require ( github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0 github.com/mitchellh/mapstructure v1.5.0 github.com/ogen-go/ogen v0.73.0 - github.com/onsi/ginkgo/v2 v2.11.0 + github.com/onsi/ginkgo/v2 v2.12.0 github.com/onsi/gomega v1.27.10 github.com/prometheus/procfs v0.11.1 github.com/steinfletcher/apitest v1.5.15 diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index a9a8897cc3..f80c698d79 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -114,8 +114,8 @@ github.com/ogen-go/ogen v0.73.0/go.mod h1:CS1RfTfLLcxw968GF2pEw8r6P6YTlU+mCOTGJv github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= -github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= +github.com/onsi/ginkgo/v2 v2.12.0 h1:UIVDowFPwpg6yMUpPjGkYvf06K3RAiJXUhCxEwQVHRI= +github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= diff --git a/src/acceptance/go.mod b/src/acceptance/go.mod index fd80f52e40..9b89f62757 100644 --- a/src/acceptance/go.mod +++ b/src/acceptance/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/cloudfoundry/cf-test-helpers/v2 v2.7.0 - github.com/onsi/ginkgo/v2 v2.11.0 + github.com/onsi/ginkgo/v2 v2.12.0 github.com/onsi/gomega v1.27.10 github.com/stretchr/testify v1.8.4 ) @@ -18,10 +18,10 @@ require ( github.com/kr/pretty v0.3.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.0 // indirect - golang.org/x/net v0.12.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect - golang.org/x/tools v0.9.3 // indirect + golang.org/x/net v0.14.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect + golang.org/x/tools v0.12.0 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/src/acceptance/go.sum b/src/acceptance/go.sum index 2bbcc4ee51..705b55dd75 100644 --- a/src/acceptance/go.sum +++ b/src/acceptance/go.sum @@ -23,8 +23,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= -github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= +github.com/onsi/ginkgo/v2 v2.12.0 h1:UIVDowFPwpg6yMUpPjGkYvf06K3RAiJXUhCxEwQVHRI= +github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -37,15 +37,15 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= +golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= diff --git a/src/changeloglockcleaner/go.mod b/src/changeloglockcleaner/go.mod index 8e0905643d..bfd9d9f3c1 100644 --- a/src/changeloglockcleaner/go.mod +++ b/src/changeloglockcleaner/go.mod @@ -6,7 +6,7 @@ require ( github.com/go-sql-driver/mysql v1.7.1 github.com/jackc/pgx/v5 v5.4.3 github.com/jmoiron/sqlx v1.3.5 - github.com/onsi/ginkgo/v2 v2.11.0 + github.com/onsi/ginkgo/v2 v2.12.0 github.com/onsi/gomega v1.27.10 ) @@ -19,10 +19,10 @@ require ( github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect github.com/kr/text v0.2.0 // indirect github.com/rogpeppe/go-internal v1.9.0 // indirect - golang.org/x/crypto v0.11.0 // indirect - golang.org/x/net v0.12.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect - golang.org/x/tools v0.9.3 // indirect + golang.org/x/crypto v0.12.0 // indirect + golang.org/x/net v0.14.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect + golang.org/x/tools v0.12.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/src/changeloglockcleaner/go.sum b/src/changeloglockcleaner/go.sum index eeb56d5672..112d4e8471 100644 --- a/src/changeloglockcleaner/go.sum +++ b/src/changeloglockcleaner/go.sum @@ -33,8 +33,8 @@ github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRUbg= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= -github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= +github.com/onsi/ginkgo/v2 v2.12.0 h1:UIVDowFPwpg6yMUpPjGkYvf06K3RAiJXUhCxEwQVHRI= +github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -46,18 +46,18 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= +golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= From 31e8ce5c2605a882194bd82fa1ae8acf5fbe1dd5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 02:03:55 +0000 Subject: [PATCH 184/294] Bump org.springframework.boot:spring-boot-starter-parent in /src (#2089) Bumps [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) from 3.1.2 to 3.1.3. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](https://github.com/spring-projects/spring-boot/compare/v3.1.2...v3.1.3) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter-parent dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/scheduler/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scheduler/pom.xml b/src/scheduler/pom.xml index 58877c92ed..76103d5360 100644 --- a/src/scheduler/pom.xml +++ b/src/scheduler/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 3.1.2 + 3.1.3 From 0b3fe2564bdc72d391ca885e3ded9939bc0f6944 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 03:24:51 +0000 Subject: [PATCH 185/294] chore(deps): update dependency gruntwork-io/terragrunt to v0.50.7 (#2090) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 5c17711a1d..5099b2d6f3 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.4 terraform 1.5.6 terraform-lsp -terragrunt 0.50.6 +terragrunt 0.50.7 From c7a31eec3c3c3c5d7b33a3913cb04d9a8f006244 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 03:24:58 +0000 Subject: [PATCH 186/294] chore(deps): update dependency python to v3.11.5 (#2087) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 5099b2d6f3..baa351aa22 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,6 +1,6 @@ gcloud 444.0.0 helm 3.12.3 -python 3.11.4 +python 3.11.5 terraform 1.5.6 terraform-lsp terragrunt 0.50.7 From 272dbd11524a960d34af12458a2534f5bfd879d9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 21:01:44 +0000 Subject: [PATCH 187/294] chore(deps): update dependency terragrunt to v0.50.8 (#2091) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index baa351aa22..4e0d4fd025 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.5 terraform 1.5.6 terraform-lsp -terragrunt 0.50.7 +terragrunt 0.50.8 From cf346fb898364f31e9c0265c179ed160eca09d82 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 27 Aug 2023 23:32:38 +0000 Subject: [PATCH 188/294] chore(deps): lock file maintenance (#2092) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- .../github-arc-team-wg-ci/.terraform.lock.hcl | 54 +++++++++---------- jobs/Gemfile.lock | 2 +- spec/Gemfile.lock | 2 +- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 58b3eaaf03..55529c0abc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -35,7 +35,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.56.0) + rubocop (1.56.1) base64 (~> 0.1.1) json (~> 2.3) language_server-protocol (>= 3.17.0) diff --git a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl index f7b3f08e54..96c038d242 100644 --- a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl +++ b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl @@ -19,19 +19,19 @@ provider "registry.terraform.io/gavinbunney/kubectl" { } provider "registry.terraform.io/hashicorp/google" { - version = "4.78.0" + version = "4.79.0" hashes = [ - "h1:57aOHpJEIU3vc++q2bdAQi0Q+MI8zPnJ5Ace9c61r4A=", - "h1:MP5C7ABVyTlyT/8DXrOJg10hXggF0vKYihjjAwehLrg=", - "h1:PRR7/X4msmjgadmKwkgkZJZdIsv3QksQIkk86MeJxrk=", - "h1:SGwfLgQ7zDlGeZKn92QUn5zWVhFqO4LvHPTo3VqVq+0=", - "h1:TCXNY8eRI1kP1EvqIaqZB5xSYcAm7Q+VBNAf0HMOPPc=", - "h1:gP0GkpnqQB9Qrt+yohwnP8XYI2aIaXJ2K5nwT733iO8=", - "h1:jrPNt3Xc4svPJgzJQKrgs3Y1Z+A88MMZLTHeXsX4g0g=", - "h1:rzLGvEDbgxLtHOX+X8+me56x5ehWw6L36nMDcCz8gfc=", - "h1:sBz9KYNhJiyEdOvRrIj+VDNQOmMHLguLmMAQ1Uz4WYo=", - "h1:sVFLz1ziSEI7TeMCubxwEFkLDLmazYCGI3YctrD3RTg=", - "h1:wxYr3Z7xTg+rugpIu/DKOW88nJ7V76lYvq50+auW5cc=", + "h1:0P/wyCd5dh1zG5cXaWPiO36c59fCnBGcggw7UWy2myc=", + "h1:6ybJILr8uFF4j9q4sCPGbmP3LSfb0ocyjcKTD3NUiHU=", + "h1:Li/wjCxais5NQTFyxfca1ot58EKadeOgQIRKO1INFwU=", + "h1:NFh7yr4ZzOEZUoL6PbXyMzuZ2om/PG5gkF6OhYH7sAc=", + "h1:WwOcCD1bX08jjcUTsfWA+8tJlv7vVV2hGlXPz2ZAZME=", + "h1:aLb9b7sENSRhXkgWb6L08pS9e2MGiA3TvMONVucf/yg=", + "h1:ja8L+cpokSBX6k7XuorPYLxn6RMRur/K5pdR1Hpi3sw=", + "h1:ogFyLeIXnNf1L8YGjWqsbHbodercUXCoSrRFj7kGF4o=", + "h1:qOYZ0O2hYTSEU7uquabV97GNa1WhJ1l+Uxr3gctmWRA=", + "h1:wM0D6HcMu7OWI/7LGVtkfbvbWGyGy7rUEMRMUQYuHhs=", + "h1:zk1cuvVrxTBz0jK6j2Ffl2yEPsTJsTrVatngkh2H5Tg=", ] } @@ -53,21 +53,21 @@ provider "registry.terraform.io/hashicorp/kubernetes" { } provider "registry.terraform.io/integrations/github" { - version = "5.33.0" + version = "5.34.0" hashes = [ - "h1:/xl2SqJBki+R92B2EY0LFP6SL1syDbzp7I879p6y8K4=", - "h1:1DbdeunX47eo7gxZ0rQX1CL+VYLwUKnCt1DMWnxb6nc=", - "h1:3MWIdru569EpyoDhtVreKa9QSyJLavWKyQDRVn6SX3g=", - "h1:L5L9zq9xXl/m1uG18qv+phFPeaF3p/XXq+SpcvB1HAA=", - "h1:NbkroiNJ5+x3EWiq6L6hpduTQbmXOfoqw/rNjqoz/f8=", - "h1:WvUb3jF+s7pJnCocdSB6uQmSsz2wwQKc+AV2QFQm3Zs=", - "h1:XobpgwAN1XDbplssJ/Yfgjslauu6XQUZs1bNxd9+JE0=", - "h1:XrlcbUuqah6hTqqNfZX/nCSnEsRpdVZ5QTuGezMnpZ0=", - "h1:ke2CCTIslwDLKihFQJgV+kbr6URmnBuWbnk2vy1ovdw=", - "h1:rTYFmoAKP7OBtjyt0KGHnJELzcImJyQuGJVno7x8KQ8=", - "h1:tV/QITrNQa1YpKhr+P1uS91i5fmW5Tf3tY4fJe7DEwA=", - "h1:typaWGkxfXREHr/rgOc9VPipQ+Xp3n/0DCIL5+gOT1I=", - "h1:uVzK/I7QokJsz5+vl9Vr4P8fCpHTp1ceG2ZkYAmxiho=", - "h1:xA6kmRIVFckn3pm/zCX6Z7Xf2llmnjQZbtcSYVhQQlU=", + "h1:/+uGYcvQUy7P/5GXmykSywpy9YYbQGBnFvn7MhxLJeA=", + "h1:1y8nNk4hOytbVsYd+N+A6SnrOPjMlZ7h7xsX4eXq3qw=", + "h1:CxHa/rcZA7224PHpU5DO1iRXrAZcVh0UD8YF5JW+jeI=", + "h1:F61R6DH8VT9C3OYVcZypLo3Yl6tiwiEcmd3HIh2krOM=", + "h1:GbWrAHQhDQcicT/gJw76e/iHLK4rFZT3aT178u7UONA=", + "h1:IPCKYAE7AJFtTrU+GhvlfDdswAqOgvOvcmQWAvcaLfs=", + "h1:LKTGS+IqtKKiwPbTeIBUpDYmyZRq8Gj60ano936o3rM=", + "h1:PTfk+dE6NpOCfDpUmzWSFoUaMFvW1nnklgu0zwPzhMM=", + "h1:VFmbY7/p8dDzLDJHHqWV8f8g5eY2onQl52KQkheXekk=", + "h1:XuhF0Y9UJrEWq14TdFbfDBq0LbI9ernk/WUtCMf/T6c=", + "h1:cqONWwrmsDhf8bqHcSXeN08DOrSxU6yoGYiKTVXh9SA=", + "h1:fdJmzc5pMnjIKNGU6A80J6keM8Lf0P9WFqfnIuokfrk=", + "h1:q8bSYA3VtDI7R9LAF3Y7LkWxEdxjN+XTfJz/xb+fja4=", + "h1:zvW9QAh2kkJ2bLkMDLbs22ogEOosznd4XKcAhY8OgIA=", ] } diff --git a/jobs/Gemfile.lock b/jobs/Gemfile.lock index 58b3eaaf03..55529c0abc 100644 --- a/jobs/Gemfile.lock +++ b/jobs/Gemfile.lock @@ -35,7 +35,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.56.0) + rubocop (1.56.1) base64 (~> 0.1.1) json (~> 2.3) language_server-protocol (>= 3.17.0) diff --git a/spec/Gemfile.lock b/spec/Gemfile.lock index 27b24b48e6..80ec693c08 100644 --- a/spec/Gemfile.lock +++ b/spec/Gemfile.lock @@ -35,7 +35,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.56.0) + rubocop (1.56.1) base64 (~> 0.1.1) json (~> 2.3) language_server-protocol (>= 3.17.0) From fa217a361b5de7e0ff80cced74647130806b75a5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Aug 2023 02:31:54 +0000 Subject: [PATCH 189/294] Bump org.yaml:snakeyaml from 2.1 to 2.2 in /src (#2094) Bumps [org.yaml:snakeyaml](https://bitbucket.org/snakeyaml/snakeyaml) from 2.1 to 2.2. - [Commits](https://bitbucket.org/snakeyaml/snakeyaml/branches/compare/snakeyaml-2.2..snakeyaml-2.1) --- updated-dependencies: - dependency-name: org.yaml:snakeyaml dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/db/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/pom.xml b/src/db/pom.xml index 5f7a3edf69..c2655c80ff 100644 --- a/src/db/pom.xml +++ b/src/db/pom.xml @@ -25,7 +25,7 @@ org.yaml snakeyaml - 2.1 + 2.2 org.postgresql From 958d2109f4ca800a7949699d6f911f0ede3118e2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 29 Aug 2023 02:04:15 +0000 Subject: [PATCH 190/294] chore(deps): update dependency gruntwork-io/terragrunt to v0.50.9 (#2096) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 4e0d4fd025..fbfe36fecc 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.5 terraform 1.5.6 terraform-lsp -terragrunt 0.50.8 +terragrunt 0.50.9 From aabf616c09d5d82ed88c47190d655bea29d1a487 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Aug 2023 02:50:03 +0000 Subject: [PATCH 191/294] Bump com.puppycrawl.tools:checkstyle from 10.12.2 to 10.12.3 in /src (#2097) Bumps [com.puppycrawl.tools:checkstyle](https://github.com/checkstyle/checkstyle) from 10.12.2 to 10.12.3. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-10.12.2...checkstyle-10.12.3) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/scheduler/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scheduler/pom.xml b/src/scheduler/pom.xml index 76103d5360..9ebb1858a5 100644 --- a/src/scheduler/pom.xml +++ b/src/scheduler/pom.xml @@ -189,7 +189,7 @@ com.puppycrawl.tools checkstyle - 10.12.2 + 10.12.3 From dc6511817585bb9470b8970e85ba4bd847f6e10b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 30 Aug 2023 01:04:47 +0000 Subject: [PATCH 192/294] chore(deps): update dependency java to v17.0.8+101 (#2101) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index bf2dd7691d..2b1fb0eec4 100644 --- a/.tool-versions +++ b/.tool-versions @@ -8,7 +8,7 @@ gcloud 444.0.0 ginkgo 2.12.0 golang 1.20.6 golangci-lint 1.54.2 -java temurin-17.0.8+7 +java temurin-17.0.8+101 make 4.4 maven 3.8.6 ruby 3.2.1 From 5c447be49ffa3fa713ea66fbb54c2af241f97c4c Mon Sep 17 00:00:00 2001 From: app-autoscaler-ci-bot Date: Wed, 30 Aug 2023 11:06:12 +0000 Subject: [PATCH 193/294] Update java version to 17.0.8.1_1 --- .final_builds/packages/openjdk-17/index.yml | 4 ++++ packages/openjdk-17/spec.lock | 2 +- packages/openjdk-17/vendored-commit | 2 +- packages/openjdk-17/version | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.final_builds/packages/openjdk-17/index.yml b/.final_builds/packages/openjdk-17/index.yml index 9dd34e208f..d8ebe83239 100644 --- a/.final_builds/packages/openjdk-17/index.yml +++ b/.final_builds/packages/openjdk-17/index.yml @@ -15,6 +15,10 @@ builds: version: a1170a67f8927cb1861ceafbd406c8bd3ec2494f97fa9248c07e818ef7a016f2 blobstore_id: d7cc5f49-b426-4874-5eb6-654d9ef52f9b sha1: sha256:79c73943cffbcaf0ec06678ea4ec0d6301954a895cbe9579b15810942b79ac4f + be13f95495365f8879a75d9237320cd587774f6cbc087020bd6508fb8a82184a: + version: be13f95495365f8879a75d9237320cd587774f6cbc087020bd6508fb8a82184a + blobstore_id: 3313a7d9-e0ad-4370-638b-734956ddeb98 + sha1: sha256:99e2ef396973d7bbbfddffad6968b419627c20bb426117f8c3115cad5b206227 c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0: version: c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0 blobstore_id: 68d1befc-806d-486a-4bc6-1d046ee71a30 diff --git a/packages/openjdk-17/spec.lock b/packages/openjdk-17/spec.lock index 108af39991..1acd277429 100644 --- a/packages/openjdk-17/spec.lock +++ b/packages/openjdk-17/spec.lock @@ -1,2 +1,2 @@ name: openjdk-17 -fingerprint: c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0 +fingerprint: be13f95495365f8879a75d9237320cd587774f6cbc087020bd6508fb8a82184a diff --git a/packages/openjdk-17/vendored-commit b/packages/openjdk-17/vendored-commit index 6946a66275..bb82993790 100644 --- a/packages/openjdk-17/vendored-commit +++ b/packages/openjdk-17/vendored-commit @@ -1 +1 @@ -b543b521837b3363065fcc2565f500e9cafef0b0 +0de1db7e1336d5414845c81b5a3084968454ec98 diff --git a/packages/openjdk-17/version b/packages/openjdk-17/version index 70302b9400..fbd5a1a6d8 100644 --- a/packages/openjdk-17/version +++ b/packages/openjdk-17/version @@ -1 +1 @@ -17.0.8_7 \ No newline at end of file +17.0.8.1_1 \ No newline at end of file From 5ac99ba7a0e00dc70c8d69007f22c67aeeb18cd3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 30 Aug 2023 14:21:51 +0200 Subject: [PATCH 194/294] fix(deps): update module go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin to v0.43.0 (#2098) * fix(deps): update module go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin to v0.43.0 * `go mod tidy` --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Silvestre Zabala --- src/acceptance/assets/app/go_app/go.mod | 12 ++++++------ src/acceptance/assets/app/go_app/go.sum | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index 4157782d10..489dab84d7 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -19,11 +19,11 @@ require ( github.com/onsi/gomega v1.27.10 github.com/prometheus/procfs v0.11.1 github.com/steinfletcher/apitest v1.5.15 - go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.42.0 - go.opentelemetry.io/contrib/propagators/b3 v1.17.0 - go.opentelemetry.io/otel v1.16.0 - go.opentelemetry.io/otel/metric v1.16.0 - go.opentelemetry.io/otel/trace v1.16.0 + go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.43.0 + go.opentelemetry.io/contrib/propagators/b3 v1.18.0 + go.opentelemetry.io/otel v1.17.0 + go.opentelemetry.io/otel/metric v1.17.0 + go.opentelemetry.io/otel/trace v1.17.0 go.uber.org/zap v1.25.0 golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 ) @@ -67,7 +67,7 @@ require ( golang.org/x/sys v0.11.0 // indirect golang.org/x/text v0.12.0 // indirect golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index f80c698d79..6f85e1e5e7 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -157,18 +157,18 @@ github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95 github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.42.0 h1:l7AmwSVqozWKKXeZHycpdmpycQECRpoGwJ1FW2sWfTo= -go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.42.0/go.mod h1:Ep4uoO2ijR0f49Pr7jAqyTjSCyS1SRL18wwttKfwqXA= -go.opentelemetry.io/contrib/propagators/b3 v1.17.0 h1:ImOVvHnku8jijXqkwCSyYKRDt2YrnGXD4BbhcpfbfJo= -go.opentelemetry.io/contrib/propagators/b3 v1.17.0/go.mod h1:IkfUfMpKWmynvvE0264trz0sf32NRTZL4nuAN9AbWRc= +go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.43.0 h1:B8JzkALYp9VVR85AE7geXia+D4shAoUjaCEaBxn8NO8= +go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.43.0/go.mod h1:b4/TD3x8cVgX8ZCRioLqE0jAw1918mq95Q6tSYyc+g4= +go.opentelemetry.io/contrib/propagators/b3 v1.18.0 h1:hhSlPVi9AQwOmbMmptPNLfRZOLgENdRM2kb7z9LFe1A= +go.opentelemetry.io/contrib/propagators/b3 v1.18.0/go.mod h1:qtt+pEu23D7UVP+j33G4i7LopmVu8/6/IwGu3hEm100= go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= -go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= -go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= -go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= -go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= +go.opentelemetry.io/otel v1.17.0 h1:MW+phZ6WZ5/uk2nd93ANk/6yJ+dVrvNWUjGhnnFU5jM= +go.opentelemetry.io/otel v1.17.0/go.mod h1:I2vmBGtFaODIVMBSTPVDlJSzBDNf93k60E6Ft0nyjo0= +go.opentelemetry.io/otel/metric v1.17.0 h1:iG6LGVz5Gh+IuO0jmgvpTB6YVrCGngi8QGm+pMd8Pdc= +go.opentelemetry.io/otel/metric v1.17.0/go.mod h1:h4skoxdZI17AxwITdmdZjjYJQH5nzijUUjm+wtPph5o= go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM= -go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= -go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= +go.opentelemetry.io/otel/trace v1.17.0 h1:/SWhSRHmDPOImIAetP1QAeMnZYiQXrTy4fMMYOdSKWQ= +go.opentelemetry.io/otel/trace v1.17.0/go.mod h1:I/4vKTgFclIsXRVucpH25X0mpFSczM7aHeaz0ZBLWjY= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= @@ -239,8 +239,8 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= From 8c614d2212b71206cd83658f1b4ff6a04a13d9f9 Mon Sep 17 00:00:00 2001 From: Silvestre Zabala Date: Wed, 30 Aug 2023 17:33:58 +0200 Subject: [PATCH 195/294] Set `DT_APPLICATIONID` environment variables --- jobs/eventgenerator/templates/bpm.yml.erb | 1 + jobs/golangapiserver/templates/bpm.yml.erb | 1 + jobs/metricsforwarder/templates/bpm.yml.erb | 1 + jobs/metricsgateway/templates/bpm.yml.erb | 1 + jobs/metricsserver/templates/bpm.yml.erb | 1 + jobs/operator/templates/bpm.yml.erb | 1 + jobs/scalingengine/templates/bpm.yml.erb | 1 + jobs/scheduler/templates/bpm.yml.erb | 1 + 8 files changed, 8 insertions(+) diff --git a/jobs/eventgenerator/templates/bpm.yml.erb b/jobs/eventgenerator/templates/bpm.yml.erb index 5ef140a500..9df151045c 100644 --- a/jobs/eventgenerator/templates/bpm.yml.erb +++ b/jobs/eventgenerator/templates/bpm.yml.erb @@ -6,5 +6,6 @@ processes: - /var/vcap/jobs/eventgenerator/config/eventgenerator.yml env: DT_MONITOR: true + DT_APPLICATIONID: eventgenerator hooks: pre_start: /var/vcap/jobs/eventgenerator/bin/bpm-pre-start diff --git a/jobs/golangapiserver/templates/bpm.yml.erb b/jobs/golangapiserver/templates/bpm.yml.erb index a6a73cdf5a..e12380d2de 100644 --- a/jobs/golangapiserver/templates/bpm.yml.erb +++ b/jobs/golangapiserver/templates/bpm.yml.erb @@ -6,5 +6,6 @@ processes: - /var/vcap/jobs/golangapiserver/config/apiserver.yml env: DT_MONITOR: true + DT_APPLICATIONID: apiserver hooks: pre_start: /var/vcap/jobs/golangapiserver/bin/bpm-pre-start diff --git a/jobs/metricsforwarder/templates/bpm.yml.erb b/jobs/metricsforwarder/templates/bpm.yml.erb index cc637c42a1..8ce33004fc 100644 --- a/jobs/metricsforwarder/templates/bpm.yml.erb +++ b/jobs/metricsforwarder/templates/bpm.yml.erb @@ -6,3 +6,4 @@ processes: - /var/vcap/jobs/metricsforwarder/config/metricsforwarder.yml env: DT_MONITOR: true + DT_APPLICATIONID: metricsforwarder diff --git a/jobs/metricsgateway/templates/bpm.yml.erb b/jobs/metricsgateway/templates/bpm.yml.erb index e6479ada8f..1cd16104ce 100644 --- a/jobs/metricsgateway/templates/bpm.yml.erb +++ b/jobs/metricsgateway/templates/bpm.yml.erb @@ -6,5 +6,6 @@ processes: - /var/vcap/jobs/metricsgateway/config/metricsgateway.yml env: DT_MONITOR: true + DT_APPLICATIONID: metricsgateway hooks: pre_start: /var/vcap/jobs/metricsgateway/bin/bpm-pre-start diff --git a/jobs/metricsserver/templates/bpm.yml.erb b/jobs/metricsserver/templates/bpm.yml.erb index da062bd8c5..09bd35b6bf 100644 --- a/jobs/metricsserver/templates/bpm.yml.erb +++ b/jobs/metricsserver/templates/bpm.yml.erb @@ -6,5 +6,6 @@ processes: - /var/vcap/jobs/metricsserver/config/metricsserver.yml env: DT_MONITOR: true + DT_APPLICATIONID: metricsserver hooks: pre_start: /var/vcap/jobs/metricsserver/bin/bpm-pre-start diff --git a/jobs/operator/templates/bpm.yml.erb b/jobs/operator/templates/bpm.yml.erb index 97990b74b3..efba5b1955 100644 --- a/jobs/operator/templates/bpm.yml.erb +++ b/jobs/operator/templates/bpm.yml.erb @@ -6,5 +6,6 @@ processes: - /var/vcap/jobs/operator/config/operator.yml env: DT_MONITOR: true + DT_APPLICATIONID: operator hooks: pre_start: /var/vcap/jobs/operator/bin/bpm-pre-start diff --git a/jobs/scalingengine/templates/bpm.yml.erb b/jobs/scalingengine/templates/bpm.yml.erb index 20c4966708..034e4d8459 100644 --- a/jobs/scalingengine/templates/bpm.yml.erb +++ b/jobs/scalingengine/templates/bpm.yml.erb @@ -6,5 +6,6 @@ processes: - /var/vcap/jobs/scalingengine/config/scalingengine.yml env: DT_MONITOR: true + DT_APPLICATIONID: scalingengine hooks: pre_start: /var/vcap/jobs/scalingengine/bin/bpm-pre-start diff --git a/jobs/scheduler/templates/bpm.yml.erb b/jobs/scheduler/templates/bpm.yml.erb index 19c0dfde4d..0a88849e21 100644 --- a/jobs/scheduler/templates/bpm.yml.erb +++ b/jobs/scheduler/templates/bpm.yml.erb @@ -7,5 +7,6 @@ processes: - /var/vcap/packages/scheduler/scheduler-1.0-SNAPSHOT.war env: DT_MONITOR: true + DT_APPLICATIONID: scheduler hooks: pre_start: /var/vcap/jobs/scheduler/bin/bpm-pre-start From 9ccbf3a1d5b043d57fe6891e5bdecaea58545c38 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 31 Aug 2023 15:21:23 +0000 Subject: [PATCH 196/294] chore(deps): update dependency cloudfoundry/cli to v8.7.2 (#2106) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index 2b1fb0eec4..ca483e3d2d 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,7 +1,7 @@ act 0.2.49 actionlint 1.6.25 bosh 7.4.0 -cf 8.7.1 +cf 8.7.2 concourse 7.10.0 direnv 2.32.3 gcloud 444.0.0 From c2ae55a1100f3ed5024f398f7697e4a81ad85f4b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 04:24:57 +0000 Subject: [PATCH 197/294] chore(deps): update dependency nektos/act to v0.2.50 (#2107) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index ca483e3d2d..405f57bacd 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,4 +1,4 @@ -act 0.2.49 +act 0.2.50 actionlint 1.6.25 bosh 7.4.0 cf 8.7.2 From 8f734882982da825ccc80d9c58a0aca4cc377fef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 02:26:01 +0000 Subject: [PATCH 198/294] Bump org.apache.commons:commons-dbcp2 from 2.9.0 to 2.10.0 in /src (#2110) Bumps org.apache.commons:commons-dbcp2 from 2.9.0 to 2.10.0. --- updated-dependencies: - dependency-name: org.apache.commons:commons-dbcp2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/scheduler/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scheduler/pom.xml b/src/scheduler/pom.xml index 9ebb1858a5..917fef59b1 100644 --- a/src/scheduler/pom.xml +++ b/src/scheduler/pom.xml @@ -88,7 +88,7 @@ org.apache.commons commons-dbcp2 - 2.9.0 + 2.10.0 org.apache.httpcomponents.client5 From f81769d3027b60e5142a6824c49122b446fee88a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 03:36:34 +0000 Subject: [PATCH 199/294] chore(deps): update dependency terragrunt to v0.50.12 (#2109) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index fbfe36fecc..cf80e68e58 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.5 terraform 1.5.6 terraform-lsp -terragrunt 0.50.9 +terragrunt 0.50.12 From 696f53642367b29de06211b3d0d247845621a2b9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 03:37:05 +0000 Subject: [PATCH 200/294] chore(deps): update dependency gruntwork-io/terragrunt to v0.50.12 (#2108) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> From 107c8548eecaa5165d1f550609b4ab131cb95445 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 04:26:39 +0000 Subject: [PATCH 201/294] chore(deps): lock file maintenance (#2112) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- .../github-arc-team-wg-ci/.terraform.lock.hcl | 24 +++++++++---------- jobs/Gemfile.lock | 2 +- spec/Gemfile.lock | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 55529c0abc..5756f60c50 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -35,7 +35,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.56.1) + rubocop (1.56.2) base64 (~> 0.1.1) json (~> 2.3) language_server-protocol (>= 3.17.0) diff --git a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl index 96c038d242..1352ae0fe2 100644 --- a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl +++ b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl @@ -19,19 +19,19 @@ provider "registry.terraform.io/gavinbunney/kubectl" { } provider "registry.terraform.io/hashicorp/google" { - version = "4.79.0" + version = "4.80.0" hashes = [ - "h1:0P/wyCd5dh1zG5cXaWPiO36c59fCnBGcggw7UWy2myc=", - "h1:6ybJILr8uFF4j9q4sCPGbmP3LSfb0ocyjcKTD3NUiHU=", - "h1:Li/wjCxais5NQTFyxfca1ot58EKadeOgQIRKO1INFwU=", - "h1:NFh7yr4ZzOEZUoL6PbXyMzuZ2om/PG5gkF6OhYH7sAc=", - "h1:WwOcCD1bX08jjcUTsfWA+8tJlv7vVV2hGlXPz2ZAZME=", - "h1:aLb9b7sENSRhXkgWb6L08pS9e2MGiA3TvMONVucf/yg=", - "h1:ja8L+cpokSBX6k7XuorPYLxn6RMRur/K5pdR1Hpi3sw=", - "h1:ogFyLeIXnNf1L8YGjWqsbHbodercUXCoSrRFj7kGF4o=", - "h1:qOYZ0O2hYTSEU7uquabV97GNa1WhJ1l+Uxr3gctmWRA=", - "h1:wM0D6HcMu7OWI/7LGVtkfbvbWGyGy7rUEMRMUQYuHhs=", - "h1:zk1cuvVrxTBz0jK6j2Ffl2yEPsTJsTrVatngkh2H5Tg=", + "h1:2GKhnCFsq7PI7NstLEbSLO0cIG+ueuZM4PdVuKKvtXA=", + "h1:2k00/l0+sHXTEki03kZeNlsyUREa22WbA5S/Y3j+ar8=", + "h1:A79d3yjnaGCbKU6m9mWmlQcRc34UsXiKUyix00tC46k=", + "h1:Qo3ZiqnumrQcA1jVCsF9ewvMjkf7M9QGVJ11wIhU4y4=", + "h1:SviyRPKEtISguVTlBr5LcoygMq7ubupDoRygeHYZjHk=", + "h1:aNrX87IEvpZdvWmCxKxU/b/OKgC2RgMXcXT9qCBF16Q=", + "h1:eybpnZBGAw6+RHPduszy9yuedC70sj1QTj6nJ7TbUVI=", + "h1:g0ypb/BK/CuGLR6TMuBm2QlqtdhooVQIZA/9N1dgx4Y=", + "h1:lOoeHZBO3vvkjA9cLUl3Qp/u4XtEaqa5sZQ37QTcaIs=", + "h1:t4qxRlTvZ3ZTfaYYAAGqqZlxHD55b9uFlnheBV2wUg0=", + "h1:wg2tU9Txa+uU9eXl1Tm1xQnOVLQXe3umflRa5QlFY3k=", ] } diff --git a/jobs/Gemfile.lock b/jobs/Gemfile.lock index 55529c0abc..5756f60c50 100644 --- a/jobs/Gemfile.lock +++ b/jobs/Gemfile.lock @@ -35,7 +35,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.56.1) + rubocop (1.56.2) base64 (~> 0.1.1) json (~> 2.3) language_server-protocol (>= 3.17.0) diff --git a/spec/Gemfile.lock b/spec/Gemfile.lock index 80ec693c08..7d54d06494 100644 --- a/spec/Gemfile.lock +++ b/spec/Gemfile.lock @@ -35,7 +35,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.56.1) + rubocop (1.56.2) base64 (~> 0.1.1) json (~> 2.3) language_server-protocol (>= 3.17.0) From f7264b8d6a2838f9b2def424f35a9e77cdfd09f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Mon, 4 Sep 2023 14:53:59 +0200 Subject: [PATCH 202/294] Fix path to file in prometheus-release; --- ci/infrastructure/scripts/deploy-prometheus.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/infrastructure/scripts/deploy-prometheus.sh b/ci/infrastructure/scripts/deploy-prometheus.sh index fa7472c6e1..a28d32550c 100755 --- a/ci/infrastructure/scripts/deploy-prometheus.sh +++ b/ci/infrastructure/scripts/deploy-prometheus.sh @@ -23,7 +23,7 @@ ops_files=${OPS_FILES:-"${prometheus_ops}/monitor-bosh.yml\ ${prometheus_ops}/monitor-cf.yml\ ${prometheus_ops}/enable-cf-route-registrar.yml\ ${prometheus_ops}/enable-grafana-uaa.yml\ - ${prometheus_ops}/enable-cf-loggregator-v2.yml\ + ${prometheus_ops}/deprecated/enable-cf-loggregator-v2.yml\ ${prometheus_ops}/monitor-bosh-director.yml\ ${prometheus_ops}/alertmanager-slack-receiver.yml\ ${ci_dir}/operations/prometheus-customize-alerts.yml\ From 9e5e8ff1bbcb002252ac30f72fba462a093fdf9b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 02:35:59 +0000 Subject: [PATCH 203/294] chore(deps): update actions/checkout action to v4 (#2115) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/actions/setup-environment/action.yaml | 2 +- .github/workflows/acceptance_tests_broker_close.yaml | 2 +- .github/workflows/acceptance_tests_buildin_close.yaml | 2 +- .github/workflows/acceptance_tests_reusable.yaml | 10 +++++----- .github/workflows/bosh-release-checks.yaml | 4 ++-- .github/workflows/bosh-templates.yaml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/dependency-spec-updates.yaml | 2 +- .github/workflows/image.yaml | 2 +- .github/workflows/java-ci-lint.yaml | 2 +- .github/workflows/linters.yaml | 2 +- .github/workflows/manifest.yaml | 2 +- .github/workflows/mysql.yaml | 2 +- .github/workflows/openapi-specs-check.yaml | 2 +- .github/workflows/postgres.yaml | 2 +- .github/workflows/tidy-go-mod.yaml | 2 +- 16 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/actions/setup-environment/action.yaml b/.github/actions/setup-environment/action.yaml index 7c63b99dcb..d9da3100da 100644 --- a/.github/actions/setup-environment/action.yaml +++ b/.github/actions/setup-environment/action.yaml @@ -8,7 +8,7 @@ runs: using: "composite" steps: - name: clone BBL repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: cloudfoundry/app-autoscaler-env-bbl-state ssh-key: ${{ inputs.ssh-key }} diff --git a/.github/workflows/acceptance_tests_broker_close.yaml b/.github/workflows/acceptance_tests_broker_close.yaml index b2e8c18607..f86fc51c28 100644 --- a/.github/workflows/acceptance_tests_broker_close.yaml +++ b/.github/workflows/acceptance_tests_broker_close.yaml @@ -16,7 +16,7 @@ jobs: container: image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: path: app-autoscaler-release ref: main diff --git a/.github/workflows/acceptance_tests_buildin_close.yaml b/.github/workflows/acceptance_tests_buildin_close.yaml index 2cc7f8760e..67c08bd952 100644 --- a/.github/workflows/acceptance_tests_buildin_close.yaml +++ b/.github/workflows/acceptance_tests_buildin_close.yaml @@ -21,7 +21,7 @@ jobs: container: image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: path: app-autoscaler-release ref: main diff --git a/.github/workflows/acceptance_tests_reusable.yaml b/.github/workflows/acceptance_tests_reusable.yaml index 43111a9cb0..5be07d7086 100644 --- a/.github/workflows/acceptance_tests_reusable.yaml +++ b/.github/workflows/acceptance_tests_reusable.yaml @@ -62,7 +62,7 @@ jobs: checks: write steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: app-autoscaler-release - name: Create pending check @@ -79,7 +79,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: app-autoscaler-release - name: Setup environment for deployment @@ -103,7 +103,7 @@ jobs: name: "[ ${{ matrix.suite }} ] ${{ github.workflow }}" steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: app-autoscaler-release - name: Setup environment for acceptance tests @@ -130,7 +130,7 @@ jobs: checks: write steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: app-autoscaler-release - name: Verify jobs execution @@ -148,7 +148,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: app-autoscaler-release - name: Setup environment for deployment cleanup diff --git a/.github/workflows/bosh-release-checks.yaml b/.github/workflows/bosh-release-checks.yaml index c7332c9871..bb6a139e58 100644 --- a/.github/workflows/bosh-release-checks.yaml +++ b/.github/workflows/bosh-release-checks.yaml @@ -18,7 +18,7 @@ jobs: - name: Trust my checkout run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: sync-package-specs run: make package-specs @@ -41,7 +41,7 @@ jobs: - name: Trust my checkout run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run Update run: | set -e diff --git a/.github/workflows/bosh-templates.yaml b/.github/workflows/bosh-templates.yaml index a507baf787..811e1ec5d4 100644 --- a/.github/workflows/bosh-templates.yaml +++ b/.github/workflows/bosh-templates.yaml @@ -15,7 +15,7 @@ jobs: image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 918474a53f..59c1fc7388 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -44,7 +44,7 @@ jobs: # Learn more about CodeQL language support at https://git.io/codeql-language-support steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/dependency-spec-updates.yaml b/.github/workflows/dependency-spec-updates.yaml index d867510745..c84f2861cd 100644 --- a/.github/workflows/dependency-spec-updates.yaml +++ b/.github/workflows/dependency-spec-updates.yaml @@ -8,7 +8,7 @@ jobs: image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main if: contains(fromJson('["dependabot[bot]", "renovate[bot]"]'), github.event.pull_request.user.login) && contains(github.event.pull_request.labels.*.name, 'dependencies') steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: package-specs run: | diff --git a/.github/workflows/image.yaml b/.github/workflows/image.yaml index 1ccddb20f2..3ea7caf003 100644 --- a/.github/workflows/image.yaml +++ b/.github/workflows/image.yaml @@ -32,7 +32,7 @@ jobs: name: Build and Push app-autoscaler-ci-${{ matrix.image_suffix }} steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Log in to the Container registry uses: docker/login-action@v2 diff --git a/.github/workflows/java-ci-lint.yaml b/.github/workflows/java-ci-lint.yaml index b3a49f2197..53ddb0cc7e 100644 --- a/.github/workflows/java-ci-lint.yaml +++ b/.github/workflows/java-ci-lint.yaml @@ -19,7 +19,7 @@ jobs: container: image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check Code Formatting run: | diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index cc750a012c..1996c0edff 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -10,7 +10,7 @@ jobs: image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Trust my checkout run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" diff --git a/.github/workflows/manifest.yaml b/.github/workflows/manifest.yaml index cb9173a456..7a5e325683 100644 --- a/.github/workflows/manifest.yaml +++ b/.github/workflows/manifest.yaml @@ -22,7 +22,7 @@ jobs: image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run Tests - Manifest run: | diff --git a/.github/workflows/mysql.yaml b/.github/workflows/mysql.yaml index 1168937c0b..f19bb7766e 100644 --- a/.github/workflows/mysql.yaml +++ b/.github/workflows/mysql.yaml @@ -39,7 +39,7 @@ jobs: - name: Trust my checkout run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: make build run: | make build db_type=mysql diff --git a/.github/workflows/openapi-specs-check.yaml b/.github/workflows/openapi-specs-check.yaml index 4ac4999475..8a8044176d 100644 --- a/.github/workflows/openapi-specs-check.yaml +++ b/.github/workflows/openapi-specs-check.yaml @@ -8,7 +8,7 @@ jobs: image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main steps: - name: Get Repository content - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Validating OpenAPI Specifications shell: bash run: | diff --git a/.github/workflows/postgres.yaml b/.github/workflows/postgres.yaml index f2227b2650..bc8947fe87 100644 --- a/.github/workflows/postgres.yaml +++ b/.github/workflows/postgres.yaml @@ -42,7 +42,7 @@ jobs: - name: Trust my checkout run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: make build env: POSTGRES_HOST: postgres diff --git a/.github/workflows/tidy-go-mod.yaml b/.github/workflows/tidy-go-mod.yaml index 45b865adbd..6bf8f7b984 100644 --- a/.github/workflows/tidy-go-mod.yaml +++ b/.github/workflows/tidy-go-mod.yaml @@ -13,7 +13,7 @@ jobs: container: image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Trust my checkout run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" From 5f407c4ab239576f99fe815239a352538d2e9e58 Mon Sep 17 00:00:00 2001 From: CI Bot Date: Tue, 5 Sep 2023 12:57:55 +0000 Subject: [PATCH 204/294] Updated release version to 11.1.1 in golangapiserver --- jobs/golangapiserver/spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/golangapiserver/spec b/jobs/golangapiserver/spec index f8abdc5481..4d74505d5b 100644 --- a/jobs/golangapiserver/spec +++ b/jobs/golangapiserver/spec @@ -86,7 +86,7 @@ properties: default: "Autoscaler" autoscaler.apiserver.info.build: description: "Autoscaler application build number" - default: "11.1.0" + default: "11.1.1" autoscaler.apiserver.info.support_url: description: "Autoscaler application support page URL" default: "https://github.com/cloudfoundry/app-autoscaler-release" From 37c30b0b864356a5350c4719f300c049ac4d093d Mon Sep 17 00:00:00 2001 From: CI Bot Date: Tue, 5 Sep 2023 12:59:42 +0000 Subject: [PATCH 205/294] created release v11.1.1 --- .final_builds/jobs/eventgenerator/index.yml | 4 + .final_builds/jobs/golangapiserver/index.yml | 4 + .final_builds/jobs/metricsforwarder/index.yml | 4 + .final_builds/jobs/metricsgateway/index.yml | 4 + .final_builds/jobs/metricsserver/index.yml | 4 + .final_builds/jobs/operator/index.yml | 4 + .final_builds/jobs/scalingengine/index.yml | 4 + .final_builds/jobs/scheduler/index.yml | 4 + .../packages/changeloglockcleaner/index.yml | 4 + .final_builds/packages/db/index.yml | 4 + .../packages/eventgenerator/index.yml | 4 + .../packages/golangapiserver/index.yml | 4 + .../packages/metricsforwarder/index.yml | 4 + .../packages/metricsgateway/index.yml | 4 + .../packages/metricsserver/index.yml | 4 + .final_builds/packages/operator/index.yml | 4 + .../packages/scalingengine/index.yml | 4 + .final_builds/packages/scheduler/index.yml | 4 + .../app-autoscaler/app-autoscaler-11.1.1.yml | 163 ++++++++++++++++++ releases/app-autoscaler/index.yml | 2 + 20 files changed, 237 insertions(+) create mode 100644 releases/app-autoscaler/app-autoscaler-11.1.1.yml diff --git a/.final_builds/jobs/eventgenerator/index.yml b/.final_builds/jobs/eventgenerator/index.yml index 8e7bab7378..18598cfdae 100644 --- a/.final_builds/jobs/eventgenerator/index.yml +++ b/.final_builds/jobs/eventgenerator/index.yml @@ -51,6 +51,10 @@ builds: version: e3ae55e29b673dac69700ef4d34595230ff67b020ba0a117ad39dc008318de68 blobstore_id: a421ef5f-5e2d-4482-4c0b-c8bef2428236 sha1: sha256:75c478917be942e8374a6ff7df8335f62ac6ea48ba3be80bd8efa46ad7c81eec + e951e5c78ceaf71f740bf125c92cb36c0954dc6e0088fc30587912fb362b0eb8: + version: e951e5c78ceaf71f740bf125c92cb36c0954dc6e0088fc30587912fb362b0eb8 + blobstore_id: 6831a6fc-4dfe-4f0a-6027-6e00c49c58d2 + sha1: sha256:c58fe1baccfa047d186289f63835cf1343ae64eaa6d4bbc0aa86f22edcfdd09b e9d1ddcd5dea3426a399bea07f63ca697b58e7afbbfac9ed3855de80ec38b8f3: version: e9d1ddcd5dea3426a399bea07f63ca697b58e7afbbfac9ed3855de80ec38b8f3 blobstore_id: 8601dd92-ec95-49f7-5efc-4bfdf75d64ed diff --git a/.final_builds/jobs/golangapiserver/index.yml b/.final_builds/jobs/golangapiserver/index.yml index 0a699c10e0..f4ecaae8ed 100644 --- a/.final_builds/jobs/golangapiserver/index.yml +++ b/.final_builds/jobs/golangapiserver/index.yml @@ -11,6 +11,10 @@ builds: version: 0a32007a77e3af37b7b3458de11e197b5952eb3ff44d479bcba31462ecf8f2e4 blobstore_id: af973020-b2c0-4383-4f31-2da472fefdfe sha1: sha256:1559751186577281ddfea816d1bc32c28901032ec04b2135fb86eb8ad6a18d38 + 0a63a1ff0f4c1d40e2a832bb49e87cb2b3670ebb30b3efc3b5f30869ba7a2842: + version: 0a63a1ff0f4c1d40e2a832bb49e87cb2b3670ebb30b3efc3b5f30869ba7a2842 + blobstore_id: fac9f059-b1d8-4da2-73a9-0bcd016606ac + sha1: sha256:8f33781e309a47eebb768a53b8c4ccf0fda8ff1b2c604787a2c43c3046dfb2b2 0b30d180a2d7c30c6975485965da14db7792c6cc2aa2dbef4e5896619b316c08: version: 0b30d180a2d7c30c6975485965da14db7792c6cc2aa2dbef4e5896619b316c08 blobstore_id: f03adedd-d0cb-4472-4cde-656595570674 diff --git a/.final_builds/jobs/metricsforwarder/index.yml b/.final_builds/jobs/metricsforwarder/index.yml index 73d6d01f17..190d891177 100644 --- a/.final_builds/jobs/metricsforwarder/index.yml +++ b/.final_builds/jobs/metricsforwarder/index.yml @@ -3,6 +3,10 @@ builds: version: 0cd1da87f0f2fb95415efaa2d38eb02a4603c7d3722ff764efec7d1dfb95f136 blobstore_id: 55549d92-2b05-4b83-7d46-7479de1dee4d sha1: sha256:5b09dbe523a3f9dacefcf191c8334b9d636d010491df972f9959bf64c86d7a72 + 87d5d26c6370313877c2f14a4e08b769da16629c221a42fdda5b1a6f309f19c8: + version: 87d5d26c6370313877c2f14a4e08b769da16629c221a42fdda5b1a6f309f19c8 + blobstore_id: 98836409-6296-4984-61df-af3e47fa9c3a + sha1: sha256:18a5a9827c8d8c2aa0c51879e62b98f3ab86775f71b95b124b3140df072e685e 8ec2a304ce88d6b18d65cb68ebfae935f7e07a32d3c99bc396bada47ac278e3d: version: 8ec2a304ce88d6b18d65cb68ebfae935f7e07a32d3c99bc396bada47ac278e3d blobstore_id: afa32046-18f4-4783-4b63-6fd305cfabf8 diff --git a/.final_builds/jobs/metricsgateway/index.yml b/.final_builds/jobs/metricsgateway/index.yml index e697b0a958..00932a7623 100644 --- a/.final_builds/jobs/metricsgateway/index.yml +++ b/.final_builds/jobs/metricsgateway/index.yml @@ -23,6 +23,10 @@ builds: version: 7f1dc084e224a0dbcfac879938fff581cebcd35b96bed77f3914c60ff7064a42 blobstore_id: cfeb9b79-6bfc-4e25-6053-4ed3e4aa7523 sha1: sha256:88a6a6561688163ef657b8d48009949f5a48a8aaf88424eebbf9ff2d5fb13a2b + 91ed05735d79d7c7b3c520e25f06006b0ce435d36c8ab1135c0515b147f5c5fb: + version: 91ed05735d79d7c7b3c520e25f06006b0ce435d36c8ab1135c0515b147f5c5fb + blobstore_id: a3d3686c-61bd-4541-56e0-2872829fe9c3 + sha1: sha256:7cb21f4bf99c743cab9285c4526300d0f29f4363acb890ea737a8cd0ddb99d6e a059d38b6598b9ccddeb32dfd17501c0c3662d89c2bd613269a02cc91a440a01: version: a059d38b6598b9ccddeb32dfd17501c0c3662d89c2bd613269a02cc91a440a01 blobstore_id: ffff7371-806a-4910-4131-09112846cd0d diff --git a/.final_builds/jobs/metricsserver/index.yml b/.final_builds/jobs/metricsserver/index.yml index 78e4ccf84c..215d81a16f 100644 --- a/.final_builds/jobs/metricsserver/index.yml +++ b/.final_builds/jobs/metricsserver/index.yml @@ -1,4 +1,8 @@ builds: + 015b4c35cbada507e1755bc7d47357e13a080e76c210eef076f498c6fd8e104a: + version: 015b4c35cbada507e1755bc7d47357e13a080e76c210eef076f498c6fd8e104a + blobstore_id: 819c2155-da2b-4682-5f44-3bf9045e783a + sha1: sha256:a509c937cb61c9b5e3c4721c37cb27269e044d5eabc8c4c1baf4cebdbb1d713e 1d34832df8d6c96227fb2d3471351d01671020b0c734c32f66df1c6f355bd21c: version: 1d34832df8d6c96227fb2d3471351d01671020b0c734c32f66df1c6f355bd21c blobstore_id: ce411aa6-2613-42a6-4771-3b403cd3d38d diff --git a/.final_builds/jobs/operator/index.yml b/.final_builds/jobs/operator/index.yml index 0c7d4b9333..9a199978f2 100644 --- a/.final_builds/jobs/operator/index.yml +++ b/.final_builds/jobs/operator/index.yml @@ -31,6 +31,10 @@ builds: version: ae82e233077ab71abe3f9c17d5885505607695d4870606269466a2c941365d0c blobstore_id: 6cb01518-064c-476e-4a08-13d713a53e81 sha1: sha256:ba4f4581946ee7edb05b687e159dee7a23cf8d7b165a70a651e13dbca716a7e6 + bf11ee9215842fc7de55d6bc1e29dc23d1d947cad25a1af219c58299d2e2500a: + version: bf11ee9215842fc7de55d6bc1e29dc23d1d947cad25a1af219c58299d2e2500a + blobstore_id: f306d7d0-eaec-4e2b-4fd6-523d0c6b66cc + sha1: sha256:22fcaef786d2e68539318f44a5c2a0c37ed6057b6fc1dcffb8c219f152fbcee0 bf31d90bd3c67bb08d775ad4e9fd558a558e4895ffcca1c330b742d0a884ca14: version: bf31d90bd3c67bb08d775ad4e9fd558a558e4895ffcca1c330b742d0a884ca14 blobstore_id: 63775e42-e76b-4a59-6d4c-a3a82e6decd5 diff --git a/.final_builds/jobs/scalingengine/index.yml b/.final_builds/jobs/scalingengine/index.yml index e53538acf1..ddf64f7882 100644 --- a/.final_builds/jobs/scalingengine/index.yml +++ b/.final_builds/jobs/scalingengine/index.yml @@ -7,6 +7,10 @@ builds: version: 19a907d263b75e6f5be8515f2da5c14d2b487b30b305f2ebf75834a408d935d0 blobstore_id: 5d326f8b-34ab-4824-6eb9-e3b6ca1edd50 sha1: sha256:71d4a7094228abde7ffb08bc7ed0ac0fdd462ed3787c22196896abcdf035f0b4 + 3ebad910b309eb7127f9a2fe3f5bfa63d9ab7640274c06ee973b51a9cb21fb8d: + version: 3ebad910b309eb7127f9a2fe3f5bfa63d9ab7640274c06ee973b51a9cb21fb8d + blobstore_id: d2d426a3-d125-4d5a-4a2c-01c0176926d3 + sha1: sha256:f0356489569fcd80e4ee5e7d7d099b88578be12ff2db7c81b28755f99fdd162b 4126849a849819ad6b6e0aa605c0765d1c9241a6d9d2ff9d231008ef010ee462: version: 4126849a849819ad6b6e0aa605c0765d1c9241a6d9d2ff9d231008ef010ee462 blobstore_id: fb53a38c-a8d7-4615-5449-9424f453db5a diff --git a/.final_builds/jobs/scheduler/index.yml b/.final_builds/jobs/scheduler/index.yml index 603b051ce0..0a0c42e4c2 100644 --- a/.final_builds/jobs/scheduler/index.yml +++ b/.final_builds/jobs/scheduler/index.yml @@ -35,6 +35,10 @@ builds: version: 96284fc271b871ecb496fff4a2b7674bddf07e2c62acc3c853954d4259b7ec17 blobstore_id: f1c67149-ee39-4549-71ec-70b6f06cb78c sha1: sha256:13757c46cd45cd96b0848600c3034a6c30afac34a4467b5ce2cd9e532731663e + b83c28b3cdd6ceb40c8774a091862b19778b9211b25f0a0059f701f06f8ca2f6: + version: b83c28b3cdd6ceb40c8774a091862b19778b9211b25f0a0059f701f06f8ca2f6 + blobstore_id: 0a5e4e0a-acd2-406d-67d1-24bbbfd807ef + sha1: sha256:015e68ad82986eedc6ba403ebeb0c598c00b36b146ca3317a0be1e1be684fbb4 bf1de54cec481c311642179f87b5c0bf85c372ada7a72f2fb49e16c44e811aac: version: bf1de54cec481c311642179f87b5c0bf85c372ada7a72f2fb49e16c44e811aac blobstore_id: 8341bab4-bdcc-4fdc-72a7-ee4a9eaab8fe diff --git a/.final_builds/packages/changeloglockcleaner/index.yml b/.final_builds/packages/changeloglockcleaner/index.yml index 2dc410bd65..c13de72c33 100644 --- a/.final_builds/packages/changeloglockcleaner/index.yml +++ b/.final_builds/packages/changeloglockcleaner/index.yml @@ -47,6 +47,10 @@ builds: version: 7f5f761a64b3fee5a56524704277a931bf85656579be207561695377672d6363 blobstore_id: cb5cd2b7-ad67-4886-4352-47e9f99a1e3a sha1: sha256:37fe9a32d956f7b4e29330a7ddc92bde40c48d4786fbe77e16fba41c6a4af932 + 81942e65f02ac92358ee1470cadd74270d931d18353f093c349519f70c0e0daa: + version: 81942e65f02ac92358ee1470cadd74270d931d18353f093c349519f70c0e0daa + blobstore_id: d29b0dea-70e9-4b46-4019-3be0d5b15712 + sha1: sha256:e2bf13079d34afbb230ec0eb88c72b91566c5ab4222b3cceb053941745db4626 83f6987ac5c5cced4a665a5b66dc535e15d3cc69b2564cf29ff69ac39a82704f: version: 83f6987ac5c5cced4a665a5b66dc535e15d3cc69b2564cf29ff69ac39a82704f blobstore_id: b7ad1533-7f7d-49fa-6496-90c6ee4cb8da diff --git a/.final_builds/packages/db/index.yml b/.final_builds/packages/db/index.yml index b508dc09b9..e52ccddcde 100644 --- a/.final_builds/packages/db/index.yml +++ b/.final_builds/packages/db/index.yml @@ -35,6 +35,10 @@ builds: version: 20c234a564b850e5bca0c4047f41151191e420f52f7169903fba4545e496d016 blobstore_id: cf99998b-3e5b-4f2d-702e-ddb7ac7204e1 sha1: sha256:bb53afeef28b4b1f2814b3504ac7cdea9a5809364431b651136cff4f78ccad2f + 215b5a2432adc26c8df0ccbaabdd43d477f157b67a1c183860d2406d4a179f28: + version: 215b5a2432adc26c8df0ccbaabdd43d477f157b67a1c183860d2406d4a179f28 + blobstore_id: b22a503a-9dee-47aa-7557-c10515c9b5cc + sha1: sha256:bc90fec7ba4f497813d4de3d719b365d008b23f15e2384e4d069adcc0d1345d3 26aec38d8aac24e6b83d3ab782975eff0b68fc883f60452dd198668bed77f081: version: 26aec38d8aac24e6b83d3ab782975eff0b68fc883f60452dd198668bed77f081 blobstore_id: 6c709146-39fc-4edf-69f9-8ad64d892490 diff --git a/.final_builds/packages/eventgenerator/index.yml b/.final_builds/packages/eventgenerator/index.yml index 7eb7f2dc95..18710adc6b 100644 --- a/.final_builds/packages/eventgenerator/index.yml +++ b/.final_builds/packages/eventgenerator/index.yml @@ -127,6 +127,10 @@ builds: version: b632e0a65199e3189c255efbd520866153f64d986620eebc3b599c7f1f28f05a blobstore_id: d851ecc2-c624-4378-5680-c24e0617affd sha1: sha256:656f1dd39a3bf2799b15c091dacff4a25ea0df570e1c82b83f5326edf8342c95 + c4fd65c24e956df31a0d8ceabe50632da288c1b0a0ae2e898ca3626e8ee804ad: + version: c4fd65c24e956df31a0d8ceabe50632da288c1b0a0ae2e898ca3626e8ee804ad + blobstore_id: 1f02e813-6fa8-4bcb-74b2-6dae33bd2b91 + sha1: sha256:3409af4a9eeb31b345fef4f3d14a0bc4cdc347cc803d8c7105a12f086a68544f c6800c8b79da99afab00effa688fbf4625fb0be0f906bfaa1a7fc728118ca81b: version: c6800c8b79da99afab00effa688fbf4625fb0be0f906bfaa1a7fc728118ca81b blobstore_id: d82d9cf8-519b-42b0-6405-78963f8138b2 diff --git a/.final_builds/packages/golangapiserver/index.yml b/.final_builds/packages/golangapiserver/index.yml index f697a7a818..bd5e2b4009 100644 --- a/.final_builds/packages/golangapiserver/index.yml +++ b/.final_builds/packages/golangapiserver/index.yml @@ -43,6 +43,10 @@ builds: version: 38ba191fec6c93f427b27ea74ca4997fcf484a8a04e0c43f0b8d56d73294cf48 blobstore_id: abcb78f3-e6ca-4f1b-7be1-30da46ce34a6 sha1: sha256:9447cbeadcaf0025fc1f961056a596dad7680870117b13572ca46f7fa42cad45 + 421cbd1f220ade05a9f1b2c2c87b73ebf1b7a54f027410791cbf20093657556e: + version: 421cbd1f220ade05a9f1b2c2c87b73ebf1b7a54f027410791cbf20093657556e + blobstore_id: fba0fc7f-acfd-4cfb-6da9-a5a0faf03305 + sha1: sha256:13f34ca11cd08d52c551905c93c848e05826f622e9fe5e0d3e90eed872abc41f 42cb38456b771661f24564f8e210c43a0e27b8696aa756e6ba3952b8a2a7201e: version: 42cb38456b771661f24564f8e210c43a0e27b8696aa756e6ba3952b8a2a7201e blobstore_id: d00363eb-b6eb-4610-4605-c701c29ad6b7 diff --git a/.final_builds/packages/metricsforwarder/index.yml b/.final_builds/packages/metricsforwarder/index.yml index 36fd1d2128..e6d4906d2e 100644 --- a/.final_builds/packages/metricsforwarder/index.yml +++ b/.final_builds/packages/metricsforwarder/index.yml @@ -139,6 +139,10 @@ builds: version: ca8b506fcea10dff481b130da2069a0a450608c0a3547ceef91f9d5e7abed0cb blobstore_id: fdd74477-e7ee-40fe-7b5c-19b537c2a32e sha1: sha256:1bbf48d6d4d047b28af31cc5c134359d2c3377cabcfa64b323a14377c36c2e50 + cf9db3934a2e988eacc7e99ba9840e153cc8ba5aa2f40fb1f289b6d80ce98327: + version: cf9db3934a2e988eacc7e99ba9840e153cc8ba5aa2f40fb1f289b6d80ce98327 + blobstore_id: e43bb31d-aed2-450e-5037-bd48c9559d67 + sha1: sha256:f536f8cf7ae9a3d70599ecc3b07ece82d19b36166adf7c8d21736d07ba7ac378 d0c69a01bb952802dfaebc67afde96d1a647cc037e052e50acecbb5a136e497d: version: d0c69a01bb952802dfaebc67afde96d1a647cc037e052e50acecbb5a136e497d blobstore_id: 1a750e8a-819d-4ea3-745c-087175d18330 diff --git a/.final_builds/packages/metricsgateway/index.yml b/.final_builds/packages/metricsgateway/index.yml index 2fd54c002e..53096363bf 100644 --- a/.final_builds/packages/metricsgateway/index.yml +++ b/.final_builds/packages/metricsgateway/index.yml @@ -183,4 +183,8 @@ builds: version: f913b8fa007f95480c339c1789bc4d09efcc02de0fee93234a1db28e5fa87e2d blobstore_id: 3408cad5-7d22-4f84-493d-e809cca5d644 sha1: sha256:89534a69d49b588f6444f962235704947701cb2986e8793bbe51222f75a73986 + fe2fb17ee816b1b15106c38a308e7ebffa4961e9ffceb425de48f226a89c3832: + version: fe2fb17ee816b1b15106c38a308e7ebffa4961e9ffceb425de48f226a89c3832 + blobstore_id: 99a51645-aabb-4479-6672-aa12d273b115 + sha1: sha256:77d934bed7af4e22ff6b29b310a8b6330fd1882c803f6566517d5cb01e2b2964 format-version: "2" diff --git a/.final_builds/packages/metricsserver/index.yml b/.final_builds/packages/metricsserver/index.yml index 89faefcd69..8329476dfb 100644 --- a/.final_builds/packages/metricsserver/index.yml +++ b/.final_builds/packages/metricsserver/index.yml @@ -43,6 +43,10 @@ builds: version: 2f398322f63c81e5c70112aac72c019ae3c3fd49e5925a496fb145d512ec46a8 blobstore_id: 53f1d45d-166c-4a22-581a-4fca75701c7f sha1: sha256:5c64644804e87aa7d05737b4498838aa44c3f1a3a7203965b29edd41206a5350 + 3049b380b5f477830b021d4c6dec064ed24e4d201fb054536a09446e7211c0b1: + version: 3049b380b5f477830b021d4c6dec064ed24e4d201fb054536a09446e7211c0b1 + blobstore_id: f770ef68-8213-4eaa-7224-d3992d7d0fb7 + sha1: sha256:155ffcc0697cae622474d3a4136067b2613db922a98def86d1f3daff795a1c9a 33ea5cfc40af50efd7f141531a7391efa682f0d306583510a5a5a42fade92375: version: 33ea5cfc40af50efd7f141531a7391efa682f0d306583510a5a5a42fade92375 blobstore_id: c253746c-de6c-4bac-6045-5470528d350e diff --git a/.final_builds/packages/operator/index.yml b/.final_builds/packages/operator/index.yml index fa6b28e165..4533d15ba2 100644 --- a/.final_builds/packages/operator/index.yml +++ b/.final_builds/packages/operator/index.yml @@ -11,6 +11,10 @@ builds: version: 1362543cde6f1d898f821bd443ab32bb946ab56e3d2331d99bc313ad5a0cbb46 blobstore_id: 65cc1424-43cc-4b49-7f78-2e5283eddfb3 sha1: sha256:745d536d5486ba3a24452beb62d3f9288d3241299fe556cb1c5096fee3304696 + 13f8ba9aa586b607bca958f263417b2a702082532868787bedfb2d5b4ea54ca3: + version: 13f8ba9aa586b607bca958f263417b2a702082532868787bedfb2d5b4ea54ca3 + blobstore_id: 0a4fb740-59c1-4063-7536-edf9a3d6ba6b + sha1: sha256:80526139696238f0deebf61d8ce902f1523ad19e50fd3eb0a5899c9f637ae969 1723e343cd87855f87a0c117f13adeb0bb0d3a7c89ba461b4aff504f4f8977b9: version: 1723e343cd87855f87a0c117f13adeb0bb0d3a7c89ba461b4aff504f4f8977b9 blobstore_id: b38b9226-6751-4da8-6aae-346ef4f8d323 diff --git a/.final_builds/packages/scalingengine/index.yml b/.final_builds/packages/scalingengine/index.yml index 63915ce672..5b969aa29f 100644 --- a/.final_builds/packages/scalingengine/index.yml +++ b/.final_builds/packages/scalingengine/index.yml @@ -127,6 +127,10 @@ builds: version: 9e35f85bff3548a1c47ec74984ba757ec62bfed507c919152a022b790fbbc121 blobstore_id: 0e691e83-0fe0-4feb-768f-aa2666a345e3 sha1: sha256:46bf1043ba28adce816eed83f10eb63b1cc69eaac2f09f53ac0c28c109526c3a + a636487890b8bd44929dfdd6f8fa22b302b62c8849f0aac26197168594c50a86: + version: a636487890b8bd44929dfdd6f8fa22b302b62c8849f0aac26197168594c50a86 + blobstore_id: 7d19fa44-ed70-4f85-57f2-81b414480a17 + sha1: sha256:20d99c316a934cdd77bb276f41928ca4de76b0820cbce59032f7bba5ae0d44ae b2b648fc4ccde3fb57a369af46711518b0280dff4870280c40eff2846f0aeca6: version: b2b648fc4ccde3fb57a369af46711518b0280dff4870280c40eff2846f0aeca6 blobstore_id: 03047112-a0d7-4530-673b-f077313489b4 diff --git a/.final_builds/packages/scheduler/index.yml b/.final_builds/packages/scheduler/index.yml index 71d9e75251..b75f6644a5 100644 --- a/.final_builds/packages/scheduler/index.yml +++ b/.final_builds/packages/scheduler/index.yml @@ -19,6 +19,10 @@ builds: version: 1a9da3230df85b94280b32030864a7b1e49abb0318d936d172ecd6ac7775d984 blobstore_id: f00bc216-37fe-4a31-78cc-7275a4eb7705 sha1: sha256:6c70b8ae78d1d63bf51f114a6e75ae9336efc287ab02ae2e10d1e6d2700517b5 + 266a91165b8402333d2d4e3eb07fe00ae37f7b2a9c83c1c19502d390e66656db: + version: 266a91165b8402333d2d4e3eb07fe00ae37f7b2a9c83c1c19502d390e66656db + blobstore_id: f981c6a9-7671-4d39-7749-f989c7b3fa31 + sha1: sha256:d7b7e8aa80ac88eb5f151305099088231956e4bd827200aedd09bd79bf0297a5 2822fa6cdea9b724918c4ab953f61831a4428c29449c7f968c678573ddb201ba: version: 2822fa6cdea9b724918c4ab953f61831a4428c29449c7f968c678573ddb201ba blobstore_id: 2dfb40c5-9dcc-43b8-7d8d-902ba779516a diff --git a/releases/app-autoscaler/app-autoscaler-11.1.1.yml b/releases/app-autoscaler/app-autoscaler-11.1.1.yml new file mode 100644 index 0000000000..4ebf7bffc0 --- /dev/null +++ b/releases/app-autoscaler/app-autoscaler-11.1.1.yml @@ -0,0 +1,163 @@ +name: app-autoscaler +version: 11.1.1 +commit_hash: 5f407c4a +uncommitted_changes: false +jobs: +- name: eventgenerator + version: e951e5c78ceaf71f740bf125c92cb36c0954dc6e0088fc30587912fb362b0eb8 + fingerprint: e951e5c78ceaf71f740bf125c92cb36c0954dc6e0088fc30587912fb362b0eb8 + sha1: sha256:c58fe1baccfa047d186289f63835cf1343ae64eaa6d4bbc0aa86f22edcfdd09b + packages: + - openjdk-17 + - db + - eventgenerator + - common + - changeloglockcleaner +- name: golangapiserver + version: 0a63a1ff0f4c1d40e2a832bb49e87cb2b3670ebb30b3efc3b5f30869ba7a2842 + fingerprint: 0a63a1ff0f4c1d40e2a832bb49e87cb2b3670ebb30b3efc3b5f30869ba7a2842 + sha1: sha256:8f33781e309a47eebb768a53b8c4ccf0fda8ff1b2c604787a2c43c3046dfb2b2 + packages: + - golang-1-linux + - golangapiserver + - db + - openjdk-17 + - common + - changeloglockcleaner +- name: metricsforwarder + version: 87d5d26c6370313877c2f14a4e08b769da16629c221a42fdda5b1a6f309f19c8 + fingerprint: 87d5d26c6370313877c2f14a4e08b769da16629c221a42fdda5b1a6f309f19c8 + sha1: sha256:18a5a9827c8d8c2aa0c51879e62b98f3ab86775f71b95b124b3140df072e685e + packages: + - db + - metricsforwarder + - common +- name: metricsgateway + version: 91ed05735d79d7c7b3c520e25f06006b0ce435d36c8ab1135c0515b147f5c5fb + fingerprint: 91ed05735d79d7c7b3c520e25f06006b0ce435d36c8ab1135c0515b147f5c5fb + sha1: sha256:7cb21f4bf99c743cab9285c4526300d0f29f4363acb890ea737a8cd0ddb99d6e + packages: + - openjdk-17 + - db + - metricsgateway + - common +- name: metricsserver + version: 015b4c35cbada507e1755bc7d47357e13a080e76c210eef076f498c6fd8e104a + fingerprint: 015b4c35cbada507e1755bc7d47357e13a080e76c210eef076f498c6fd8e104a + sha1: sha256:a509c937cb61c9b5e3c4721c37cb27269e044d5eabc8c4c1baf4cebdbb1d713e + packages: + - openjdk-17 + - db + - metricsserver + - common + - changeloglockcleaner +- name: operator + version: bf11ee9215842fc7de55d6bc1e29dc23d1d947cad25a1af219c58299d2e2500a + fingerprint: bf11ee9215842fc7de55d6bc1e29dc23d1d947cad25a1af219c58299d2e2500a + sha1: sha256:22fcaef786d2e68539318f44a5c2a0c37ed6057b6fc1dcffb8c219f152fbcee0 + packages: + - operator + - common + - db + - openjdk-17 + - changeloglockcleaner +- name: scalingengine + version: 3ebad910b309eb7127f9a2fe3f5bfa63d9ab7640274c06ee973b51a9cb21fb8d + fingerprint: 3ebad910b309eb7127f9a2fe3f5bfa63d9ab7640274c06ee973b51a9cb21fb8d + sha1: sha256:f0356489569fcd80e4ee5e7d7d099b88578be12ff2db7c81b28755f99fdd162b + packages: + - openjdk-17 + - db + - scalingengine + - common + - changeloglockcleaner +- name: scheduler + version: b83c28b3cdd6ceb40c8774a091862b19778b9211b25f0a0059f701f06f8ca2f6 + fingerprint: b83c28b3cdd6ceb40c8774a091862b19778b9211b25f0a0059f701f06f8ca2f6 + sha1: sha256:015e68ad82986eedc6ba403ebeb0c598c00b36b146ca3317a0be1e1be684fbb4 + packages: + - scheduler + - db + - openjdk-17 + - common + - changeloglockcleaner +packages: +- name: changeloglockcleaner + version: 81942e65f02ac92358ee1470cadd74270d931d18353f093c349519f70c0e0daa + fingerprint: 81942e65f02ac92358ee1470cadd74270d931d18353f093c349519f70c0e0daa + sha1: sha256:e2bf13079d34afbb230ec0eb88c72b91566c5ab4222b3cceb053941745db4626 + dependencies: + - golang-1-linux +- name: common + version: 9d7726aa454227e3087cd4a04425acae72d883a5bb19d314930ab58e83f04d0e + fingerprint: 9d7726aa454227e3087cd4a04425acae72d883a5bb19d314930ab58e83f04d0e + sha1: sha256:979ff40c6e44031bec55344aa4a522cac3d265ab23deaea0f7bc7541aa2b4124 + dependencies: [] +- name: db + version: 215b5a2432adc26c8df0ccbaabdd43d477f157b67a1c183860d2406d4a179f28 + fingerprint: 215b5a2432adc26c8df0ccbaabdd43d477f157b67a1c183860d2406d4a179f28 + sha1: sha256:bc90fec7ba4f497813d4de3d719b365d008b23f15e2384e4d069adcc0d1345d3 + dependencies: + - openjdk-17 +- name: eventgenerator + version: c4fd65c24e956df31a0d8ceabe50632da288c1b0a0ae2e898ca3626e8ee804ad + fingerprint: c4fd65c24e956df31a0d8ceabe50632da288c1b0a0ae2e898ca3626e8ee804ad + sha1: sha256:3409af4a9eeb31b345fef4f3d14a0bc4cdc347cc803d8c7105a12f086a68544f + dependencies: + - golang-1-linux +- name: golang-1-linux + version: 126fca7399cba5bc8c1b02e392441f1688daf1586d57d1b3614e314b893a6cc4 + fingerprint: 126fca7399cba5bc8c1b02e392441f1688daf1586d57d1b3614e314b893a6cc4 + sha1: sha256:70c3918c28cd74a0a9be561b5eac8b85e8e7de4a72bc66cd321288974937e0be + dependencies: [] +- name: golangapiserver + version: 421cbd1f220ade05a9f1b2c2c87b73ebf1b7a54f027410791cbf20093657556e + fingerprint: 421cbd1f220ade05a9f1b2c2c87b73ebf1b7a54f027410791cbf20093657556e + sha1: sha256:13f34ca11cd08d52c551905c93c848e05826f622e9fe5e0d3e90eed872abc41f + dependencies: + - golang-1-linux +- name: metricsforwarder + version: cf9db3934a2e988eacc7e99ba9840e153cc8ba5aa2f40fb1f289b6d80ce98327 + fingerprint: cf9db3934a2e988eacc7e99ba9840e153cc8ba5aa2f40fb1f289b6d80ce98327 + sha1: sha256:f536f8cf7ae9a3d70599ecc3b07ece82d19b36166adf7c8d21736d07ba7ac378 + dependencies: + - golang-1-linux +- name: metricsgateway + version: fe2fb17ee816b1b15106c38a308e7ebffa4961e9ffceb425de48f226a89c3832 + fingerprint: fe2fb17ee816b1b15106c38a308e7ebffa4961e9ffceb425de48f226a89c3832 + sha1: sha256:77d934bed7af4e22ff6b29b310a8b6330fd1882c803f6566517d5cb01e2b2964 + dependencies: + - golang-1-linux +- name: metricsserver + version: 3049b380b5f477830b021d4c6dec064ed24e4d201fb054536a09446e7211c0b1 + fingerprint: 3049b380b5f477830b021d4c6dec064ed24e4d201fb054536a09446e7211c0b1 + sha1: sha256:155ffcc0697cae622474d3a4136067b2613db922a98def86d1f3daff795a1c9a + dependencies: + - golang-1-linux +- name: openjdk-17 + version: be13f95495365f8879a75d9237320cd587774f6cbc087020bd6508fb8a82184a + fingerprint: be13f95495365f8879a75d9237320cd587774f6cbc087020bd6508fb8a82184a + sha1: sha256:99e2ef396973d7bbbfddffad6968b419627c20bb426117f8c3115cad5b206227 + dependencies: [] +- name: operator + version: 13f8ba9aa586b607bca958f263417b2a702082532868787bedfb2d5b4ea54ca3 + fingerprint: 13f8ba9aa586b607bca958f263417b2a702082532868787bedfb2d5b4ea54ca3 + sha1: sha256:80526139696238f0deebf61d8ce902f1523ad19e50fd3eb0a5899c9f637ae969 + dependencies: + - golang-1-linux +- name: scalingengine + version: a636487890b8bd44929dfdd6f8fa22b302b62c8849f0aac26197168594c50a86 + fingerprint: a636487890b8bd44929dfdd6f8fa22b302b62c8849f0aac26197168594c50a86 + sha1: sha256:20d99c316a934cdd77bb276f41928ca4de76b0820cbce59032f7bba5ae0d44ae + dependencies: + - golang-1-linux +- name: scheduler + version: 266a91165b8402333d2d4e3eb07fe00ae37f7b2a9c83c1c19502d390e66656db + fingerprint: 266a91165b8402333d2d4e3eb07fe00ae37f7b2a9c83c1c19502d390e66656db + sha1: sha256:d7b7e8aa80ac88eb5f151305099088231956e4bd827200aedd09bd79bf0297a5 + dependencies: + - openjdk-17 +license: + version: 15eb386a0db48f190d29bd28058f5d0d6605f5acde7c6cfc6f014d57747e41f9 + fingerprint: 15eb386a0db48f190d29bd28058f5d0d6605f5acde7c6cfc6f014d57747e41f9 + sha1: sha256:6c7a834097b96efc340787fbe5876c1e366de0235def5e2b93fa016c8655535c diff --git a/releases/app-autoscaler/index.yml b/releases/app-autoscaler/index.yml index 1457ed450c..0789450902 100644 --- a/releases/app-autoscaler/index.yml +++ b/releases/app-autoscaler/index.yml @@ -65,6 +65,8 @@ builds: version: 5.2.11 997e296d-e0d3-4180-7f08-062e22a25240: version: 8.1.0 + 9a6bd550-f191-440d-7b7a-f84a89d96ca5: + version: 11.1.1 9d1ce139-0559-4ee9-6cc0-d81fe642aefa: version: 5.2.10 9e4309a3-cb70-47da-5382-64033cdfbdfb: From 063d5e6dafa159f88ff884093c0a1ef62ee6f491 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 01:02:55 +0000 Subject: [PATCH 206/294] chore(deps): update dependency gruntwork-io/terragrunt to v0.50.13 (#2117) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index cf80e68e58..2e6c43cf97 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.5 terraform 1.5.6 terraform-lsp -terragrunt 0.50.12 +terragrunt 0.50.13 From 8f404159bc16db29105dc8e67b1c85af4ac2b19e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 02:15:22 +0000 Subject: [PATCH 207/294] fix(deps): update module golang.org/x/crypto to v0.13.0 (#2118) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/autoscaler/go.mod | 6 +++--- src/autoscaler/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 6252f3d339..86df352d77 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -32,7 +32,7 @@ require ( github.com/stretchr/testify v1.8.4 github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26 github.com/xeipuuv/gojsonschema v1.2.0 - golang.org/x/crypto v0.12.0 + golang.org/x/crypto v0.13.0 golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 golang.org/x/net v0.14.0 golang.org/x/time v0.3.0 @@ -77,8 +77,8 @@ require ( github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect golang.org/x/mod v0.12.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.11.0 // indirect - golang.org/x/text v0.12.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index e59f08ee77..d266e08d8f 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1039,8 +1039,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1305,8 +1305,8 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1333,8 +1333,8 @@ golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= From 7cf22ce4758040f1f475e88c2c692905bc404242 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 02:40:56 +0000 Subject: [PATCH 208/294] fix(deps): update module golang.org/x/net to v0.15.0 (#2119) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 86df352d77..646e79665c 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -34,7 +34,7 @@ require ( github.com/xeipuuv/gojsonschema v1.2.0 golang.org/x/crypto v0.13.0 golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 - golang.org/x/net v0.14.0 + golang.org/x/net v0.15.0 golang.org/x/time v0.3.0 google.golang.org/grpc v1.57.0 gopkg.in/yaml.v3 v3.0.1 diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index d266e08d8f..cfcd53493a 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1168,8 +1168,8 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= -golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= From 28521ed50c11f6081cd6d647108f7f54f48541b5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 03:03:48 +0000 Subject: [PATCH 209/294] chore(deps): update dependency gruntwork-io/terragrunt to v0.50.14 (#2123) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 2e6c43cf97..6c20e610e9 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.5 terraform 1.5.6 terraform-lsp -terragrunt 0.50.13 +terragrunt 0.50.14 From 07fe2b8b752a2dec95bcadaa07b664c4b325efd8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 04:31:45 +0000 Subject: [PATCH 210/294] fix(deps): update module golang.org/x/oauth2 to v0.12.0 (#2120) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/changelog/go.mod | 4 ++-- src/changelog/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/changelog/go.mod b/src/changelog/go.mod index a28ecc24e1..9a3cb869fa 100644 --- a/src/changelog/go.mod +++ b/src/changelog/go.mod @@ -6,7 +6,7 @@ require ( github.com/Masterminds/semver/v3 v3.2.1 github.com/shurcooL/githubv4 v0.0.0-20230704064427-599ae7bbf278 github.com/stretchr/testify v1.8.4 - golang.org/x/oauth2 v0.11.0 + golang.org/x/oauth2 v0.12.0 ) require ( @@ -14,7 +14,7 @@ require ( github.com/golang/protobuf v1.5.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/shurcooL/graphql v0.0.0-20200928012149-18c5c3165e3a // indirect - golang.org/x/net v0.14.0 // indirect + golang.org/x/net v0.15.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/src/changelog/go.sum b/src/changelog/go.sum index ecfd48f83f..dfd442c8b8 100644 --- a/src/changelog/go.sum +++ b/src/changelog/go.sum @@ -18,10 +18,10 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= -golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= -golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= -golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= +golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= From 3d2c11eefbb93c37b43a9dc7e0da518a5833537b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 05:46:53 +0000 Subject: [PATCH 211/294] chore(deps): update google/cloud-sdk docker tag to v445 (#2127) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- ci/terragrunt/.tool-versions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.tool-versions b/.tool-versions index 405f57bacd..cd3f110612 100644 --- a/.tool-versions +++ b/.tool-versions @@ -4,7 +4,7 @@ bosh 7.4.0 cf 8.7.2 concourse 7.10.0 direnv 2.32.3 -gcloud 444.0.0 +gcloud 445.0.0 ginkgo 2.12.0 golang 1.20.6 golangci-lint 1.54.2 diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 6c20e610e9..09eeef0721 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,4 +1,4 @@ -gcloud 444.0.0 +gcloud 445.0.0 helm 3.12.3 python 3.11.5 terraform 1.5.6 From b44d1f5d58191f01288562d2b75427325df8f1f3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 10:27:20 +0200 Subject: [PATCH 212/294] fix(deps): update module google.golang.org/grpc to v1.58.0 (#2126) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(deps): update module google.golang.org/grpc to v1.58.0 * Update specifications; --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jörg Weisbarth --- packages/eventgenerator/spec | 1 + packages/metricsforwarder/spec | 1 + packages/metricsgateway/spec | 1 + packages/metricsserver/spec | 1 + src/autoscaler/go.mod | 8 ++++---- src/autoscaler/go.sum | 16 ++++++++-------- 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/packages/eventgenerator/spec b/packages/eventgenerator/spec index c07ec0f71f..03b7c4b16f 100644 --- a/packages/eventgenerator/spec +++ b/packages/eventgenerator/spec @@ -155,6 +155,7 @@ files: - autoscaler/vendor/google.golang.org/grpc/internal/grpcrand/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/grpcsync/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/grpcutil/* # gosub +- autoscaler/vendor/google.golang.org/grpc/internal/idle/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/metadata/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/pretty/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/resolver/* # gosub diff --git a/packages/metricsforwarder/spec b/packages/metricsforwarder/spec index 6e4da745ab..b4cc148848 100644 --- a/packages/metricsforwarder/spec +++ b/packages/metricsforwarder/spec @@ -142,6 +142,7 @@ files: - autoscaler/vendor/google.golang.org/grpc/internal/grpcrand/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/grpcsync/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/grpcutil/* # gosub +- autoscaler/vendor/google.golang.org/grpc/internal/idle/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/metadata/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/pretty/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/resolver/* # gosub diff --git a/packages/metricsgateway/spec b/packages/metricsgateway/spec index 1a104b17ee..55f1af5d8b 100644 --- a/packages/metricsgateway/spec +++ b/packages/metricsgateway/spec @@ -136,6 +136,7 @@ files: - autoscaler/vendor/google.golang.org/grpc/internal/grpcrand/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/grpcsync/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/grpcutil/* # gosub +- autoscaler/vendor/google.golang.org/grpc/internal/idle/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/metadata/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/pretty/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/resolver/* # gosub diff --git a/packages/metricsserver/spec b/packages/metricsserver/spec index fbfab8141e..6b0ca517c4 100644 --- a/packages/metricsserver/spec +++ b/packages/metricsserver/spec @@ -137,6 +137,7 @@ files: - autoscaler/vendor/google.golang.org/grpc/internal/grpcrand/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/grpcsync/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/grpcutil/* # gosub +- autoscaler/vendor/google.golang.org/grpc/internal/idle/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/metadata/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/pretty/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/resolver/* # gosub diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 646e79665c..6713e8d2e8 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -36,7 +36,7 @@ require ( golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 golang.org/x/net v0.15.0 golang.org/x/time v0.3.0 - google.golang.org/grpc v1.57.0 + google.golang.org/grpc v1.58.0 gopkg.in/yaml.v3 v3.0.1 ) @@ -80,8 +80,8 @@ require ( golang.org/x/sys v0.12.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect - google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect + google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect google.golang.org/protobuf v1.31.0 // indirect ) diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index cfcd53493a..8c731decd9 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1622,12 +1622,12 @@ google.golang.org/genproto v0.0.0-20230323212658-478b75c54725/go.mod h1:UUQDJDOl google.golang.org/genproto v0.0.0-20230330154414-c0448cd141ea/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 h1:9NWlQfY2ePejTmfwUH1OWwmznFa+0kKcHGPDvcPza9M= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 h1:m8v1xLLLzMe1m5P+gCTF8nJB9epwZQUBERm20Oy1poQ= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= +google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= +google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= +google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1670,8 +1670,8 @@ google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5v google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= -google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= +google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o= +google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/examples v0.0.0-20230512210959-5dcfb37c0b43/go.mod h1:irORyHPQXotoshbRTZVFvPDcfTfFHL23efQeop+H45M= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= From 0eae4a442a423604af9e25a6d4161dbc982b932c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 08:53:03 +0000 Subject: [PATCH 213/294] Bump google.golang.org/grpc from 1.57.0 to 1.58.0 in /src/autoscaler (#2125) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump google.golang.org/grpc from 1.57.0 to 1.58.0 in /src/autoscaler Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.57.0 to 1.58.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.57.0...v1.58.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Update specifications; --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jörg Weisbarth From a1c6921ae92bf6742766c5b99aaff324910ffaee Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 8 Sep 2023 08:33:59 +0200 Subject: [PATCH 214/294] fix(deps): update golang.org/x/exp digest to 9212866 (#2116) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update golang version to 1.20.5 * fix(deps): update module google.golang.org/grpc to v1.58.0 (#2126) * fix(deps): update module google.golang.org/grpc to v1.58.0 * Update specifications; --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jörg Weisbarth * fix(deps): update golang.org/x/exp digest to 9212866 * Update package-specs; * go mod tidy --------- Co-authored-by: Jörg Weisbarth Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/acceptance/assets/app/go_app/go.mod | 12 ++++++------ src/acceptance/assets/app/go_app/go.sum | 24 ++++++++++++------------ src/autoscaler/go.mod | 4 ++-- src/autoscaler/go.sum | 8 ++++---- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index 489dab84d7..2cd8c600a3 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -25,7 +25,7 @@ require ( go.opentelemetry.io/otel/metric v1.17.0 go.opentelemetry.io/otel/trace v1.17.0 go.uber.org/zap v1.25.0 - golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 ) require ( @@ -60,13 +60,13 @@ require ( github.com/ugorji/go/codec v1.2.11 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.12.0 // indirect + golang.org/x/crypto v0.13.0 // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.14.0 // indirect + golang.org/x/net v0.15.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.11.0 // indirect - golang.org/x/text v0.12.0 // indirect - golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/text v0.13.0 // indirect + golang.org/x/tools v0.13.0 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index 6f85e1e5e7..ab4c46ee48 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -185,10 +185,10 @@ golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= -golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= -golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= @@ -199,8 +199,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= -golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -218,20 +218,20 @@ golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 h1:Vve/L0v7CXXuxUmaMGIEK/dEeq7uiqb5qBgQrZzIE7E= -golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 6713e8d2e8..f202b84ac3 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -33,7 +33,7 @@ require ( github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26 github.com/xeipuuv/gojsonschema v1.2.0 golang.org/x/crypto v0.13.0 - golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 golang.org/x/net v0.15.0 golang.org/x/time v0.3.0 google.golang.org/grpc v1.58.0 @@ -79,7 +79,7 @@ require ( golang.org/x/sync v0.3.0 // indirect golang.org/x/sys v0.12.0 // indirect golang.org/x/text v0.13.0 // indirect - golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect + golang.org/x/tools v0.13.0 // indirect google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index 8c731decd9..6026590e09 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1056,8 +1056,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= -golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1408,8 +1408,8 @@ golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= -golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 h1:Vve/L0v7CXXuxUmaMGIEK/dEeq7uiqb5qBgQrZzIE7E= -golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 4bc79147ca9ae433da8defb350c3ed97e80a42ee Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 8 Sep 2023 07:41:37 +0000 Subject: [PATCH 215/294] chore(deps): update dependency terraform to v1.5.7 (#2130) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 09eeef0721..342c3dfbd7 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,6 +1,6 @@ gcloud 445.0.0 helm 3.12.3 python 3.11.5 -terraform 1.5.6 +terraform 1.5.7 terraform-lsp terragrunt 0.50.14 From 405ec8d06a912debb7718649ef2cae3a2d100b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 8 Sep 2023 14:46:21 +0200 Subject: [PATCH 216/294] Make prometheus locally deployable; --- Makefile | 65 ++++++++++++------- .../scripts/deploy-prometheus.sh | 16 +++-- 2 files changed, 50 insertions(+), 31 deletions(-) diff --git a/Makefile b/Makefile index 03cf59068c..e9a41daf09 100644 --- a/Makefile +++ b/Makefile @@ -1,33 +1,32 @@ SHELL := /bin/bash -.SHELLFLAGS = -euo pipefail -c -MAKEFLAGS = -s -go_modules:= $(shell find . -maxdepth 3 -name "*.mod" -exec dirname {} \; | sed 's|\./src/||' | sort) -all_modules:= $(go_modules) db scheduler .SHELLFLAGS := -eu -o pipefail -c ${SHELLFLAGS} -MVN_OPTS="-Dmaven.test.skip=true" -OS:=$(shell . /etc/lsb-release &>/dev/null && echo $${DISTRIB_ID} || uname ) -db_type:=postgres -DB_HOST:=localhost +MAKEFLAGS = -s +go_modules := $(shell find . -maxdepth 3 -name "*.mod" -exec dirname {} \; | sed 's|\./src/||' | sort) +all_modules := $(go_modules) db scheduler +MVN_OPTS = "-Dmaven.test.skip=true" +OS := $(shell . /etc/lsb-release &>/dev/null && echo $${DISTRIB_ID} || uname) +db_type := postgres +DB_HOST := localhost DBURL := $(shell case "${db_type}" in\ (postgres) printf "postgres://postgres:postgres@${DB_HOST}/autoscaler?sslmode=disable"; ;; \ (mysql) printf "root@tcp(${DB_HOST})/autoscaler?tls=false"; ;; esac) DEBUG := false MYSQL_TAG := 8 POSTGRES_TAG := 12 -SUITES?=broker api app -AUTOSCALER_DIR?=$(shell pwd) -lint_config:=${AUTOSCALER_DIR}/.golangci.yaml -CI_DIR?=${AUTOSCALER_DIR}/ci -CI?=false -VERSION?=0.0.testing -DEST?=build +SUITES ?= broker api app +AUTOSCALER_DIR ?= $(shell pwd) +lint_config := ${AUTOSCALER_DIR}/.golangci.yaml +CI_DIR ?= ${AUTOSCALER_DIR}/ci +CI ?= false +VERSION ?= 0.0.testing +DEST ?= build -GOLANGCI_LINT_VERSION=v$(shell cat .tool-versions | grep golangci-lint | cut -d " " -f 2 ) +GOLANGCI_LINT_VERSION = v$(shell cat .tool-versions | grep golangci-lint | cut -d " " -f 2 ) -export BUILDIN_MODE?=false -export DEBUG?=false -export ACCEPTANCE_TESTS_FILE?=${DEST}/app-autoscaler-acceptance-tests-v${VERSION}.tgz -export GOWORK=off +export BUILDIN_MODE ?= false +export DEBUG ?= false +export ACCEPTANCE_TESTS_FILE ?= ${DEST}/app-autoscaler-acceptance-tests-v${VERSION}.tgz +export GOWORK = off $(shell mkdir -p target) $(shell mkdir -p build) @@ -59,7 +58,7 @@ clean-java: @cd src && mvn clean > /dev/null && cd .. clean-targets: @echo " - cleaning build target files" - @rm target/* &> /dev/null || echo " . Already clean" + @rm --recursive --force target/* &> /dev/null || echo " . Already clean" clean-vendor: @echo " - cleaning vendored go" @find . -depth -name "vendor" -type d -exec rm -rf {} \; @@ -307,12 +306,30 @@ deploy-cleanup: ${CI_DIR}/autoscaler/scripts/cleanup-autoscaler.sh; -deploy-prometheus: - @export DEPLOYMENT_NAME=prometheus;\ - export BBL_STATE_PATH=$${BBL_STATE_PATH:-$(shell realpath "../app-autoscaler-env-bbl-state/bbl-state/")};\ + +bosh-release-path := ./target/bosh-releases +prometheus-bosh-release-path := ${bosh-release-path}/prometheus +$(shell mkdir -p ${prometheus-bosh-release-path}) + +download-prometheus-release: ${prometheus-bosh-release-path}/manifests +${prometheus-bosh-release-path}/manifests &: + pushd '${prometheus-bosh-release-path}' > /dev/null ;\ + git clone --recurse-submodules 'https://github.com/bosh-prometheus/prometheus-boshrelease' . ;\ + popd > /dev/null + + + +deploy-prometheus: ${prometheus-bosh-release-path}/manifests + export DEPLOYMENT_NAME='prometheus' ;\ + export PROMETHEUS_DIR='${prometheus-bosh-release-path}' ;\ + export BBL_GCP_REGION="$$(yq eval '.jobs.[] | select(.name == "deploy-prometheus") | .plan.[] | select(.task == "deploy-prometheus") | .params.BBL_GCP_REGION' './ci/infrastructure/pipeline.yml')" ;\ + export BBL_GCP_ZONE="$$(yq eval '.jobs.[] | select(.name == "deploy-prometheus") | .plan.[] | select(.task == "deploy-prometheus") | .params.BBL_GCP_ZONE' './ci/infrastructure/pipeline.yml')" ;\ + export SLACK_WEBHOOK="$$(credhub get --name='/bosh-autoscaler/prometheus/alertmanager_slack_api_url' --quiet)" ;\ ${CI_DIR}/infrastructure/scripts/deploy-prometheus.sh; + + .PHONY: build-test-app build-test-app: @make -C src/acceptance/assets/app/go_app build diff --git a/ci/infrastructure/scripts/deploy-prometheus.sh b/ci/infrastructure/scripts/deploy-prometheus.sh index a28d32550c..ce9c240fa7 100755 --- a/ci/infrastructure/scripts/deploy-prometheus.sh +++ b/ci/infrastructure/scripts/deploy-prometheus.sh @@ -57,12 +57,12 @@ PROMETHEUS_CLIENT_SECRET=$(yq e '.prometheus_client_password' "${director_store} BOSH_METRICS_SERVER_CLIENT_CA=$(yq e '.metrics_server_client_tls.ca' "${director_store}") BOSH_METRICS_SERVER_CLIENT_CERT=$(yq e '.metrics_server_client_tls.certificate' "${director_store}") BOSH_METRICS_SERVER_CLIENT_KEY=$(yq e '.metrics_server_client_tls.private_key' "${director_store}") -credhub set -n /bosh-autoscaler/prometheus/bosh_metrics_server_client_ca -t certificate -c "$BOSH_METRICS_SERVER_CLIENT_CA" >/dev/null -credhub set -n /bosh-autoscaler/prometheus/bosh_metrics_server_client -t certificate -c "$BOSH_METRICS_SERVER_CLIENT_CERT" -p "$BOSH_METRICS_SERVER_CLIENT_KEY" -m /bosh-autoscaler/prometheus/bosh_metrics_server_client_ca >/dev/null +credhub set -n /bosh-autoscaler/prometheus/bosh_metrics_server_client_ca -t certificate -c "${BOSH_METRICS_SERVER_CLIENT_CA}" >/dev/null +credhub set -n /bosh-autoscaler/prometheus/bosh_metrics_server_client -t certificate -c "${BOSH_METRICS_SERVER_CLIENT_CERT}" -p "${BOSH_METRICS_SERVER_CLIENT_KEY}" -m /bosh-autoscaler/prometheus/bosh_metrics_server_client_ca >/dev/null -credhub get -n /bosh-autoscaler/cf/uaa_ssl -k ca > $uaa_ssl_ca_file -credhub get -n /bosh-autoscaler/cf/uaa_ssl -k certificate > $uaa_ssl_cert_file -credhub get -n /bosh-autoscaler/cf/uaa_ssl -k private_key > $uaa_ssl_key_file +credhub get -n /bosh-autoscaler/cf/uaa_ssl -k ca > ${uaa_ssl_ca_file} +credhub get -n /bosh-autoscaler/cf/uaa_ssl -k certificate > ${uaa_ssl_cert_file} +credhub get -n /bosh-autoscaler/cf/uaa_ssl -k private_key > ${uaa_ssl_key_file} credhub set -n /bosh-autoscaler/prometheus/alertmanager_slack_channel -t value -v "${slack_channel}" credhub set -n /bosh-autoscaler/prometheus/alertmanager_slack_api_url -t value -v "${slack_webhook}" @@ -70,8 +70,8 @@ credhub set -n /bosh-autoscaler/prometheus/alertmanager_slack_api_url -t value - function find_or_upload_stemcell(){ # Determine if we need to upload a stemcell at this point. - stemcell_os=$(yq eval '.stemcells[] | select(.alias == "default").os' $deployment_manifest) - stemcell_version=$(yq eval '.stemcells[] | select(.alias == "default").version' $deployment_manifest) + stemcell_os=$(yq eval '.stemcells[] | select(.alias == "default").os' ${deployment_manifest}) + stemcell_version=$(yq eval '.stemcells[] | select(.alias == "default").version' ${deployment_manifest}) stemcell_name="bosh-google-kvm-${stemcell_os}-go_agent" if ! bosh stemcells | grep "${stemcell_name}" >/dev/null; then @@ -100,6 +100,8 @@ function deploy () { log "using Ops files: '${OPS_FILES_TO_USE}'" log "deploy args: '${bosh_deploy_opts}'" + # TODO: For Debugging: Do a `bosh interpolate` first? + bosh -n -d "${deployment_name}" \ deploy "${deployment_manifest}" \ ${OPS_FILES_TO_USE} \ From 6c4d90685671688626dc67f331a31011112af8f7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 10 Sep 2023 23:31:46 +0000 Subject: [PATCH 217/294] chore(deps): lock file maintenance (#2133) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 4 +- .../github-arc-team-wg-ci/.terraform.lock.hcl | 54 +++++++++---------- jobs/Gemfile.lock | 4 +- spec/Gemfile.lock | 4 +- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5756f60c50..c6de4dca97 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -54,10 +54,10 @@ GEM rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) semi_semantic (1.2.0) - standard (1.31.0) + standard (1.31.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.56.0) + rubocop (~> 1.56.2) standard-custom (~> 1.0.0) standard-performance (~> 1.2) standard-custom (1.0.2) diff --git a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl index 1352ae0fe2..456861db52 100644 --- a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl +++ b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl @@ -19,19 +19,19 @@ provider "registry.terraform.io/gavinbunney/kubectl" { } provider "registry.terraform.io/hashicorp/google" { - version = "4.80.0" + version = "4.81.0" hashes = [ - "h1:2GKhnCFsq7PI7NstLEbSLO0cIG+ueuZM4PdVuKKvtXA=", - "h1:2k00/l0+sHXTEki03kZeNlsyUREa22WbA5S/Y3j+ar8=", - "h1:A79d3yjnaGCbKU6m9mWmlQcRc34UsXiKUyix00tC46k=", - "h1:Qo3ZiqnumrQcA1jVCsF9ewvMjkf7M9QGVJ11wIhU4y4=", - "h1:SviyRPKEtISguVTlBr5LcoygMq7ubupDoRygeHYZjHk=", - "h1:aNrX87IEvpZdvWmCxKxU/b/OKgC2RgMXcXT9qCBF16Q=", - "h1:eybpnZBGAw6+RHPduszy9yuedC70sj1QTj6nJ7TbUVI=", - "h1:g0ypb/BK/CuGLR6TMuBm2QlqtdhooVQIZA/9N1dgx4Y=", - "h1:lOoeHZBO3vvkjA9cLUl3Qp/u4XtEaqa5sZQ37QTcaIs=", - "h1:t4qxRlTvZ3ZTfaYYAAGqqZlxHD55b9uFlnheBV2wUg0=", - "h1:wg2tU9Txa+uU9eXl1Tm1xQnOVLQXe3umflRa5QlFY3k=", + "h1:DI4A02gm/UWqVBjcBRF4hyA+BxFaM9uyQ0ULiaY5q5U=", + "h1:E1zHwlFFs6cFfYor3+aVTvle5r9m6ZGusBn5Q19Et64=", + "h1:GVaAq1vKmccWL0TS5g225hzUkx8W66QKg0W7H83+cUA=", + "h1:HS0XxjsJxYNeyd2COU1Lc3swrKgCv3iIi/ay2Q/xtaI=", + "h1:TKydY88LYRsHJ05icwCU0NNy8ANWinWcs5teuSXVF2k=", + "h1:dADRDQUkYJwwxwrYbZZcOV/SFRrpq3iU2sRSn2ip78k=", + "h1:frqnFqxUCrFzNZhuAbMLo9KqXRNnTJssvR7USuq8/kY=", + "h1:nD0kJSonVXFC1y5blicnLEsGYSkaC7T1zTVig+gI1Dk=", + "h1:nalbTQAn81Spx5arUAAj0N2tbUB7qXywYYm36WA+LQI=", + "h1:t+9t5oXrHA4fniouJ5DNXqfIKKbsttEPh/a6ctW/zWc=", + "h1:xSUmms3luR4lExNyMcYfVZnxdnrJ8wnl++MXxQBf0ck=", ] } @@ -53,21 +53,21 @@ provider "registry.terraform.io/hashicorp/kubernetes" { } provider "registry.terraform.io/integrations/github" { - version = "5.34.0" + version = "5.35.0" hashes = [ - "h1:/+uGYcvQUy7P/5GXmykSywpy9YYbQGBnFvn7MhxLJeA=", - "h1:1y8nNk4hOytbVsYd+N+A6SnrOPjMlZ7h7xsX4eXq3qw=", - "h1:CxHa/rcZA7224PHpU5DO1iRXrAZcVh0UD8YF5JW+jeI=", - "h1:F61R6DH8VT9C3OYVcZypLo3Yl6tiwiEcmd3HIh2krOM=", - "h1:GbWrAHQhDQcicT/gJw76e/iHLK4rFZT3aT178u7UONA=", - "h1:IPCKYAE7AJFtTrU+GhvlfDdswAqOgvOvcmQWAvcaLfs=", - "h1:LKTGS+IqtKKiwPbTeIBUpDYmyZRq8Gj60ano936o3rM=", - "h1:PTfk+dE6NpOCfDpUmzWSFoUaMFvW1nnklgu0zwPzhMM=", - "h1:VFmbY7/p8dDzLDJHHqWV8f8g5eY2onQl52KQkheXekk=", - "h1:XuhF0Y9UJrEWq14TdFbfDBq0LbI9ernk/WUtCMf/T6c=", - "h1:cqONWwrmsDhf8bqHcSXeN08DOrSxU6yoGYiKTVXh9SA=", - "h1:fdJmzc5pMnjIKNGU6A80J6keM8Lf0P9WFqfnIuokfrk=", - "h1:q8bSYA3VtDI7R9LAF3Y7LkWxEdxjN+XTfJz/xb+fja4=", - "h1:zvW9QAh2kkJ2bLkMDLbs22ogEOosznd4XKcAhY8OgIA=", + "h1:3xSiXBeZKNCPfnCWiKWjW7ukmd6EUB3h3LTlyy5aW+0=", + "h1:9lEwI7xut53p35ScAoVcvrSXOW9VdsxeeX3CIeMeX14=", + "h1:DkPJLp+6G0jybjk7FCYSZvSKglXbtp/e4xdFRMrfAYk=", + "h1:FOXgzZ/xgZt6OsQ3m5HAIX4usYLiKW9J51u4mItqqZ4=", + "h1:FQ0P4u/jrhbN+uAdM0IkJ+ocB1wrqTJQIY9PCyd0IgE=", + "h1:HdQx+n1/ybGmcg/3q+TNmgUVeSWiKggTGW44ZB4D7x8=", + "h1:KTwCJbAW8Wp3QT7WW60PzyLM5vRup7MeN4ReP31hmCc=", + "h1:bpuWgrF1jH7Pebm0heVt9jlCL/TuP1g1b6KJmsAaQBE=", + "h1:cb6h49eXpQYHiYVd86sst51qbW3D82dTLpR+OMcdjSE=", + "h1:nhTRKcQRvEu26dfOy+aDpdZD2mrxPbJJxXRJz5jVSa0=", + "h1:qFjAVmx1Taxf2cJGykcbXj1Obt5++vt88wg3RUjJCGE=", + "h1:qLgZRUUwj9DBlwpvBsWskHkYOlVGU/Pv5Z2YxK0rLjE=", + "h1:tH2Ec5vqFYMMWnksd8zKsjq4t+4H648NL04a8XoP6M0=", + "h1:wJERE8kfD/cUhfE5cE3WC4r996ngEcpr5PyQUdW9/tM=", ] } diff --git a/jobs/Gemfile.lock b/jobs/Gemfile.lock index 5756f60c50..c6de4dca97 100644 --- a/jobs/Gemfile.lock +++ b/jobs/Gemfile.lock @@ -54,10 +54,10 @@ GEM rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) semi_semantic (1.2.0) - standard (1.31.0) + standard (1.31.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.56.0) + rubocop (~> 1.56.2) standard-custom (~> 1.0.0) standard-performance (~> 1.2) standard-custom (1.0.2) diff --git a/spec/Gemfile.lock b/spec/Gemfile.lock index 7d54d06494..356e6b76e5 100644 --- a/spec/Gemfile.lock +++ b/spec/Gemfile.lock @@ -54,10 +54,10 @@ GEM rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) semi_semantic (1.2.0) - standard (1.31.0) + standard (1.31.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.56.0) + rubocop (~> 1.56.2) standard-custom (~> 1.0.0) standard-performance (~> 1.2) standard-custom (1.0.2) From 1ebdb4622d2a43bdcf75461d590e7cb5ec87c305 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 04:20:37 +0000 Subject: [PATCH 218/294] chore(deps): update dependency bosh-bootloader to v9.0.12 (#2134) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/dockerfiles/autoscaler-deploy/Dockerfile | 2 +- ci/dockerfiles/autoscaler-tools/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/dockerfiles/autoscaler-deploy/Dockerfile b/ci/dockerfiles/autoscaler-deploy/Dockerfile index 93d8046cea..b0cefca14b 100644 --- a/ci/dockerfiles/autoscaler-deploy/Dockerfile +++ b/ci/dockerfiles/autoscaler-deploy/Dockerfile @@ -53,7 +53,7 @@ RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_V # Install bbl # renovate: datasource=github-releases depName=bosh-bootloader lookupName=cloudfoundry/bosh-bootloader -ENV BBL_VERSION v9.0.11 +ENV BBL_VERSION v9.0.12 RUN wget -q https://github.com/cloudfoundry/bosh-bootloader/releases/download/${BBL_VERSION}/bbl-${BBL_VERSION}_linux_amd64 && \ mv bbl-* /usr/local/bin/bbl && \ chmod +x /usr/local/bin/bbl diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index 26931117e4..565d2a2a32 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -69,7 +69,7 @@ RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_V # Install bbl # renovate: datasource=github-releases depName=bosh-bootloader lookupName=cloudfoundry/bosh-bootloader -ARG BBL_VERSION=v9.0.11 +ARG BBL_VERSION=v9.0.12 RUN wget -q https://github.com/cloudfoundry/bosh-bootloader/releases/download/${BBL_VERSION}/bbl-${BBL_VERSION}_linux_amd64 && \ mv bbl-* /usr/local/bin/bbl &&\ chmod +x /usr/local/bin/bbl &&\ From 09cab84d4293075945a0bcffe447d249548cbe25 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Sep 2023 01:58:56 +0000 Subject: [PATCH 219/294] Bump org.liquibase:liquibase-core from 4.23.1 to 4.23.2 in /src (#2135) Bumps [org.liquibase:liquibase-core](https://github.com/liquibase/liquibase) from 4.23.1 to 4.23.2. - [Release notes](https://github.com/liquibase/liquibase/releases) - [Changelog](https://github.com/liquibase/liquibase/blob/master/changelog.txt) - [Commits](https://github.com/liquibase/liquibase/compare/v4.23.1...v4.23.2) --- updated-dependencies: - dependency-name: org.liquibase:liquibase-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/db/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/pom.xml b/src/db/pom.xml index c2655c80ff..b20cbbb9b5 100644 --- a/src/db/pom.xml +++ b/src/db/pom.xml @@ -20,7 +20,7 @@ org.liquibase liquibase-core - 4.23.1 + 4.23.2 org.yaml From 0eceb1f7a51d9a69c4974a9f5c75474e5af0b5b3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 12 Sep 2023 20:58:28 +0000 Subject: [PATCH 220/294] chore(deps): update dependency terragrunt to v0.50.15 (#2124) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 342c3dfbd7..40f192735d 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.5 terraform 1.5.7 terraform-lsp -terragrunt 0.50.14 +terragrunt 0.50.15 From 67f78828d997ac7ecbe98ddc49cbda2e0e519eb4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 02:30:35 +0000 Subject: [PATCH 221/294] chore(deps): update dependency cloudfoundry/cli to v8.7.3 (#2141) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index 1065010f17..0b2a7e31d0 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,7 +1,7 @@ act 0.2.50 actionlint 1.6.25 bosh 7.4.0 -cf 8.7.2 +cf 8.7.3 concourse 7.10.0 direnv 2.32.3 gcloud 445.0.0 From 24b1560799336a7ada64e2333b283dfdad4d64e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 08:31:24 +0000 Subject: [PATCH 222/294] Bump docker/metadata-action from 4 to 5 (#2140) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4 to 5. - [Release notes](https://github.com/docker/metadata-action/releases) - [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md) - [Commits](https://github.com/docker/metadata-action/compare/v4...v5) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Oliver Mautschke <40239127+OliverMautschke@users.noreply.github.com> --- .github/workflows/image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image.yaml b/.github/workflows/image.yaml index 3ea7caf003..63b716eea5 100644 --- a/.github/workflows/image.yaml +++ b/.github/workflows/image.yaml @@ -43,7 +43,7 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.image_suffix }} From 3da128a279d03c182e3c25f3d4e4767e5588abc8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 08:36:31 +0000 Subject: [PATCH 223/294] Bump docker/build-push-action from 4 to 5 (#2138) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4 to 5. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v4...v5) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Oliver Mautschke <40239127+OliverMautschke@users.noreply.github.com> --- .github/workflows/image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image.yaml b/.github/workflows/image.yaml index 63b716eea5..97d8ea0ef9 100644 --- a/.github/workflows/image.yaml +++ b/.github/workflows/image.yaml @@ -63,7 +63,7 @@ jobs: - name: Build and push id: build-and-push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: ci/dockerfiles/autoscaler-${{ matrix.image_suffix }} push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} From a75d1dff00642314d2afadde5548bafb1a1055a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 08:39:27 +0000 Subject: [PATCH 224/294] Bump docker/login-action from 2 to 3 (#2139) Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v2...v3) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Oliver Mautschke <40239127+OliverMautschke@users.noreply.github.com> --- .github/workflows/image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image.yaml b/.github/workflows/image.yaml index 97d8ea0ef9..fa0e56bf66 100644 --- a/.github/workflows/image.yaml +++ b/.github/workflows/image.yaml @@ -35,7 +35,7 @@ jobs: uses: actions/checkout@v4 - name: Log in to the Container registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} From fe4ae745dbd68800cee247b41a7037a95c5f345d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 02:14:41 +0000 Subject: [PATCH 225/294] chore(deps): update dependency gruntwork-io/terragrunt to v0.50.16 (#2147) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 40f192735d..c0c25b703c 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.5 terraform 1.5.7 terraform-lsp -terragrunt 0.50.15 +terragrunt 0.50.16 From 989969cc2da7fe2914df86fd547dacef724e81bc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 04:15:53 +0000 Subject: [PATCH 226/294] chore(deps): update dependency credhub-cli to v2.9.20 (#2146) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/dockerfiles/autoscaler-deploy/Dockerfile | 2 +- ci/dockerfiles/autoscaler-tools/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/dockerfiles/autoscaler-deploy/Dockerfile b/ci/dockerfiles/autoscaler-deploy/Dockerfile index b0cefca14b..b8de36da4f 100644 --- a/ci/dockerfiles/autoscaler-deploy/Dockerfile +++ b/ci/dockerfiles/autoscaler-deploy/Dockerfile @@ -60,7 +60,7 @@ RUN wget -q https://github.com/cloudfoundry/bosh-bootloader/releases/download/${ # Install credhub # renovate: datasource=github-releases depName=credhub-cli lookupName=cloudfoundry/credhub-cli -ENV CREDHUB_VERSION 2.9.19 +ENV CREDHUB_VERSION 2.9.20 RUN wget -q https://github.com/cloudfoundry-incubator/credhub-cli/releases/download/${CREDHUB_VERSION}/credhub-linux-${CREDHUB_VERSION}.tgz && \ tar xvfz credhub-linux-${CREDHUB_VERSION}.tgz && \ mv credhub /usr/local/bin/credhub diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index 565d2a2a32..aa8de9788e 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -77,7 +77,7 @@ RUN wget -q https://github.com/cloudfoundry/bosh-bootloader/releases/download/${ # Install credhub # renovate: datasource=github-releases depName=credhub-cli lookupName=cloudfoundry/credhub-cli -ARG CREDHUB_VERSION=2.9.19 +ARG CREDHUB_VERSION=2.9.20 RUN wget -q https://github.com/cloudfoundry/credhub-cli/releases/download/${CREDHUB_VERSION}/credhub-linux-${CREDHUB_VERSION}.tgz && \ tar xvfz credhub-linux-${CREDHUB_VERSION}.tgz && \ mv credhub /usr/local/bin/credhub &&\ From 26990caff083c2950948c6cbd0bfa48233704439 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 05:59:26 +0000 Subject: [PATCH 227/294] chore(deps): update google/cloud-sdk docker tag to v446 (#2148) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- ci/terragrunt/.tool-versions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.tool-versions b/.tool-versions index 0b2a7e31d0..bacd8e4950 100644 --- a/.tool-versions +++ b/.tool-versions @@ -4,7 +4,7 @@ bosh 7.4.0 cf 8.7.3 concourse 7.10.0 direnv 2.32.3 -gcloud 445.0.0 +gcloud 446.0.0 ginkgo 2.12.0 golang 1.20.5 golangci-lint 1.54.2 diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index c0c25b703c..0df45876db 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,4 +1,4 @@ -gcloud 445.0.0 +gcloud 446.0.0 helm 3.12.3 python 3.11.5 terraform 1.5.7 From 7d1c4ff6304774437e0159e28cbb0fb7fc883001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Wed, 13 Sep 2023 16:13:17 +0200 Subject: [PATCH 228/294] Adds workflow that helps the bots with intermediate files. --- .../dependency-update-go-mod-tidy.yaml | 230 ++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100644 .github/workflows/dependency-update-go-mod-tidy.yaml diff --git a/.github/workflows/dependency-update-go-mod-tidy.yaml b/.github/workflows/dependency-update-go-mod-tidy.yaml new file mode 100644 index 0000000000..1791b1aeff --- /dev/null +++ b/.github/workflows/dependency-update-go-mod-tidy.yaml @@ -0,0 +1,230 @@ +name: "renovate-/ospo-bot: go mod tidy" +on: + pull_request: + paths: + - ".github/workflows/dependency-update-go-mod-tidy.yaml" + push: + # Execute on all renovate-branches, iff go.mod/-sum of the helper app has been changed. + branches: + - "renovate/**" + paths: + - "./src/acceptance/assets/app/go_app/go.mod" + - "./src/acceptance/assets/app/go_app/go.sum" +jobs: + go-mod-tidy: + runs-on: ubuntu-latest + permissions: + pull-requests: write + contents: write +# if: contains(fromJson('["dependabot[bot]", "renovate[bot]"]'), github.event.pull_request.user.login) && contains(github.event.pull_request.labels.*.name, 'dependencies') + steps: + # We potentially want to add at the end a commit by the author of the most recent + # commit in this branch. However github has some protection which prevents workflows + # to run in case a commit has been pushed with the default job-specific github-token. + # For this case we need to use another one here. + # + # For more information, see: + # + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: true + token: ${{ secrets.APP_AUTOSCALER_CI_TOKEN }} # With push token that can trigger new PR jobs + - name: Configure git + shell: bash + run: | + #! /usr/bin/env bash + set -eu -o pipefail + + git config --global --add safe.directory "${GITHUB_WORKSPACE}" + git config user.name "GitHubActions" + git config user.email "<>" + - name: go-mod-tidy + shell: bash + run: | + #! /usr/bin/env bash + set -eu -o pipefail + + declare -r commit_author_name="${{github.event.head_commit.author.name}}" + if [[ ! "${commit_author_name}" =~ ('dependabot'|'renovate')'[bot]' ]] + then + echo 'This commit was not by a known bot! Exiting …' + echo "Debug: commit_author_name = ${commit_author_name}" + exit 0 + fi + + declare -r current_branch="$(git rev-parse --abbrev-ref 'HEAD')" + git checkout 'HEAD~1' + pushd './src/acceptance/assets/app/go_app' + make generate + git checkout "${current_branch}" + go mod tidy + popd + + declare -i -r changed_files=$(git status --porcelain | wc --lines) + if ((changed_files >= 0)) + then + git add . + git commit --amend --no-edit + git push --force-with-lease + fi + + # - uses: fastify/github-action-merge-dependabot@v3 + # name: Auto-approve + # if: github.event.pull_request.user.login == 'dependabot[bot]' + # with: + # github-token: "${{ secrets.GITHUB_TOKEN }}" + # target: minor + # approve-only: true + # - uses: alexwilson/enable-github-automerge-action@1.0.0 + # name: Enable Auto-merge + # with: + # github-token: "${{ secrets.APP_AUTOSCALER_CI_TOKEN }}" + # merge-method: "SQUASH" + + + +# name: Renovate Postprocessing +# concurrency: +# group: '${{ github.workflow }}-${{ github.head_ref || github.run_id }}' +# cancel-in-progress: true +# on: +# pull_request: +# paths: +# - '.github/workflows/product_renovate_postprocessing.yaml' +# push: +# branches: # But just on PRs with renovate branches +# - 'renovate/**' +# workflow_dispatch: + +# jobs: +# postprocessing: +# name: Postprocessing +# runs-on: [ solinas-medium ] +# container: +# image: public.int.repositories.cloud.sap/python:3.10 +# # Renovate bot has a different name. We just want to run if the last commit is from renovate and not from us. +# # This is to prevent endless loops where our commit at the bottom will trigger this workflow again. +# # Normally this is not an issue since the default job specific GITHUB_TOKEN is used. In that case GitHub has +# # protection in place to not run any action when this token is used. Since we want to start other validation jobs +# # with this commit we use a technical users token to trigger other actions but skip rerunning ours to not end up in an endless loop. +# if: github.actor == 'ospo-renovate[bot]' +# defaults: +# run: +# shell: bash +# steps: +# - uses: hmarr/debug-action@v2 +# - name: Checkout Product Base Ref +# uses: actions/checkout@v3 +# with: +# ref: ${{ github.base_ref || 'master' }} +# fetch-depth: 0 +# submodules: true +# token: ${{ secrets.GH_TOKEN }} # With push token that can trigger new PR jobs +# - name: Checkout Product Head Ref +# uses: actions/checkout@v3 +# with: +# submodules: true +# token: ${{ secrets.GH_TOKEN }} # With push token that can trigger new PR jobs + +# - name: Python Postprocessing +# run: | +# set -euxo pipefail +# git config --global --add safe.directory '*' +# # If we dont have a base branch, we assume we want to merge to master +# [[ -z "$GITHUB_BASE_REF" ]] && GITHUB_BASE_REF=master + +# # If only comments change in a file, remove it from the commit +# discard_if_only_comments(){ +# # We exclude comments in this diff. +# if diff -U 0 -w -B -I '^[:space: :tab:]*#' $2 $1; then +# echo "Discarding $1" +# git restore $1 +# fi +# } + +# # Install the version of pip-compile in dev-requirements.txt +# cat dev-requirements.txt | grep -m1 -o '^pip-tools[^\\#]*' | xargs -n 1 pip install +# python --version +# pip --version +# pip-compile --version + +# # Global Requirements +# global_packages(){ +# tempdir="$(mktemp -d)" +# cp requirements.txt $tempdir/ +# cp dev-requirements.txt $tempdir/ +# pip-compile requirements.in --resolver=backtracking +# pip-compile dev-requirements.in --resolver=backtracking +# discard_if_only_comments requirements.txt $tempdir/requirements.txt +# discard_if_only_comments dev-requirements.txt $tempdir/dev-requirements.txt +# } + +# # Controlplane cf-push-monitoring +# controlplane_monitoring_app(){ +# #Only pip-compile if dev-requirements.in changed +# pushd components/cf/resources/cf-push-monitoring/ +# if ! git diff --name-only --exit-code "origin/$GITHUB_BASE_REF" -- src/requirements.in src/requirements.txt dev-requirements.in dev-requirements.txt; then +# tempdir="$(mktemp -d)" +# cp dev-requirements.txt $tempdir/ +# pip-compile dev-requirements.in +# discard_if_only_comments dev-requirements.txt $tempdir/dev-requirements.txt +# pushd src/ +# cp requirements.txt $tempdir/ +# pip-compile requirements.in +# discard_if_only_comments requirements.txt $tempdir/requirements.txt + +# #Only run vendoring if requirements.txt changed +# if ! git diff --name-only --exit-code "origin/$GITHUB_BASE_REF" -- requirements.txt; then +# rm -rf vendor/* +# pip download -r requirements.txt --no-cache --no-binary=:none: -d vendor +# fi +# popd +# fi +# popd +# } + +# # Controlplane control-plane-test-app +# controlplane_test_app(){ +# #Only pip-compile if dev-requirements.in changed +# pushd components/cf/resources/control-plane-test-app/ +# #Only pip-compile if requirements files changed +# if ! git diff --name-only --exit-code "origin/$GITHUB_BASE_REF" -- requirements.in requirements.txt dev-requirements.in dev-requirements.txt; then +# tempdir="$(mktemp -d)" +# cp requirements.txt $tempdir/ +# pip-compile requirements.in +# discard_if_only_comments requirements.txt $tempdir/requirements.txt +# cp dev-requirements.txt $tempdir/ +# pip-compile dev-requirements.in +# discard_if_only_comments dev-requirements.txt $tempdir/dev-requirements.txt +# fi +# #Only run vendoring if requirements.txt changed +# if ! git diff --name-only --exit-code "origin/$GITHUB_BASE_REF" -- requirements.txt; then +# rm -rf vendor/* +# pip download -r requirements.txt --no-cache --no-binary=:none: -d vendor +# fi +# popd +# } + +# # Run Postprocessing in Parallel +# global_packages +# controlplane_test_app +# controlplane_monitoring_app + +# # Add Changes +# git add . && git status +# - uses: EndBug/add-and-commit@v9 +# name: Commit Changes +# if: github.event_name != 'pull_request' +# with: +# message: Postprocessing - ${{github.event.head_commit.message}} +# # We need to make a commit to trigger PR Validations since they wont run on renovate Commits directly +# # Such actions add this if in their job: `if: github.actor != 'ospo-renovate[bot]'` +# # So if renovate opens/rebases a PR it will execute the tests once and not twice. Following flow is desired: +# # 1. Renovate makes PR. --> 2. No Test validation run, just the postprocessing action +# # 3. The postprocessing action commits their changes --> 4. PR validations run now +# # So we add an empty commit if needed to have a commit made to the PR branch and thus trigger the validations +# commit: --allow-empty +# author_name: github-actions +# author_email: DL_605C461DF2B94B027E394EE7@global.corp.sap@users.noreply.github.com +# push: true From 6f0eba893f81ed8f0e6f77869438796bf0e70718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Wed, 13 Sep 2023 17:17:05 +0200 Subject: [PATCH 229/294] Try out other workflow-triggers; --- .github/workflows/dependency-update-go-mod-tidy.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dependency-update-go-mod-tidy.yaml b/.github/workflows/dependency-update-go-mod-tidy.yaml index 1791b1aeff..5cc32c3f7c 100644 --- a/.github/workflows/dependency-update-go-mod-tidy.yaml +++ b/.github/workflows/dependency-update-go-mod-tidy.yaml @@ -1,15 +1,17 @@ name: "renovate-/ospo-bot: go mod tidy" on: - pull_request: - paths: - - ".github/workflows/dependency-update-go-mod-tidy.yaml" + # pull_request: + # paths: + # - ".github/workflows/dependency-update-go-mod-tidy.yaml" push: # Execute on all renovate-branches, iff go.mod/-sum of the helper app has been changed. branches: - "renovate/**" + - "dependabot/**" paths: - - "./src/acceptance/assets/app/go_app/go.mod" - - "./src/acceptance/assets/app/go_app/go.sum" + - ".github/workflows/dependency-update-go-mod-tidy.yaml" + - "./src/**/go.mod" + - "./src/**/go.sum" jobs: go-mod-tidy: runs-on: ubuntu-latest From 77ab722da0321d22818acc491ec55fa1eea3a94b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Thu, 14 Sep 2023 10:45:24 +0200 Subject: [PATCH 230/294] Push new commit for the tidied up go-mods. --- .../workflows/dependency-update-go-mod-tidy.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dependency-update-go-mod-tidy.yaml b/.github/workflows/dependency-update-go-mod-tidy.yaml index 5cc32c3f7c..45436fb3b5 100644 --- a/.github/workflows/dependency-update-go-mod-tidy.yaml +++ b/.github/workflows/dependency-update-go-mod-tidy.yaml @@ -38,9 +38,12 @@ jobs: #! /usr/bin/env bash set -eu -o pipefail + declare -r commit_author_name="${{github.event.head_commit.author.name}}" + declare -r commit_author_email="${{github.event.head_commit.author.email}}" + git config --global --add safe.directory "${GITHUB_WORKSPACE}" - git config user.name "GitHubActions" - git config user.email "<>" + git config user.name "${commit_author_name}" + git config user.email "${commit_author_email}" - name: go-mod-tidy shell: bash run: | @@ -51,11 +54,11 @@ jobs: if [[ ! "${commit_author_name}" =~ ('dependabot'|'renovate')'[bot]' ]] then echo 'This commit was not by a known bot! Exiting …' - echo "Debug: commit_author_name = ${commit_author_name}" + echo "Debug: commit_author_name = ${commit_author_name}" # TODO: Remove this! exit 0 fi - declare -r current_branch="$(git rev-parse --abbrev-ref 'HEAD')" + declare -r current_branch="$(git branch --show-current)" git checkout 'HEAD~1' pushd './src/acceptance/assets/app/go_app' make generate @@ -67,8 +70,8 @@ jobs: if ((changed_files >= 0)) then git add . - git commit --amend --no-edit - git push --force-with-lease + git commit --message='go mod tidy' + git push fi # - uses: fastify/github-action-merge-dependabot@v3 From 24d6668ea541064d2cfa9f7a14d34eb7742190f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Thu, 14 Sep 2023 11:25:35 +0200 Subject: [PATCH 231/294] Add early exit in case we already have done a go-mod-tidy; --- .../workflows/dependency-update-go-mod-tidy.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependency-update-go-mod-tidy.yaml b/.github/workflows/dependency-update-go-mod-tidy.yaml index 45436fb3b5..e7e376e6d3 100644 --- a/.github/workflows/dependency-update-go-mod-tidy.yaml +++ b/.github/workflows/dependency-update-go-mod-tidy.yaml @@ -50,10 +50,20 @@ jobs: #! /usr/bin/env bash set -eu -o pipefail + # We need the subsequent standard-message to determine if the last commit + # has already cleaned up everything. In this case this workflow should not + # change anything and we exit early. + # An alternative would be to use a tag for this. But this does affect the whole + # PR instead of just the latest commit. + declare -r tidy_message='🤖🦾🛠️ go mod tidy' + declare -r commit_author_name="${{github.event.head_commit.author.name}}" - if [[ ! "${commit_author_name}" =~ ('dependabot'|'renovate')'[bot]' ]] + declare -r commit_message="${{github.event.head_commit.message}}" + + if [[ ! "${commit_author_name}" =~ ('dependabot'|'renovate')'[bot]' ]] \ + || [[ "${commit_message}" == "${tidy_message}" ]] then - echo 'This commit was not by a known bot! Exiting …' + echo 'This commit was not by a known bot or already an automatic `go mod tidy`! Exiting …' echo "Debug: commit_author_name = ${commit_author_name}" # TODO: Remove this! exit 0 fi @@ -70,7 +80,7 @@ jobs: if ((changed_files >= 0)) then git add . - git commit --message='go mod tidy' + git commit --message="${tidy_message}" git push fi From fe29f821b9320b37a2c8fb8fffeba2496f6f927c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Thu, 14 Sep 2023 15:01:51 +0200 Subject: [PATCH 232/294] Tidy up all go-modules instead of just one; --- .../dependency-update-go-mod-tidy.yaml | 5 +-- Makefile | 33 ++++++++++--------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/.github/workflows/dependency-update-go-mod-tidy.yaml b/.github/workflows/dependency-update-go-mod-tidy.yaml index e7e376e6d3..2fca883b72 100644 --- a/.github/workflows/dependency-update-go-mod-tidy.yaml +++ b/.github/workflows/dependency-update-go-mod-tidy.yaml @@ -72,9 +72,10 @@ jobs: git checkout 'HEAD~1' pushd './src/acceptance/assets/app/go_app' make generate - git checkout "${current_branch}" - go mod tidy popd + git checkout "${current_branch}" + + make package-specs declare -i -r changed_files=$(git status --porcelain | wc --lines) if ((changed_files >= 0)) diff --git a/Makefile b/Makefile index e9a41daf09..abfe413f12 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ db_type := postgres DB_HOST := localhost DBURL := $(shell case "${db_type}" in\ (postgres) printf "postgres://postgres:postgres@${DB_HOST}/autoscaler?sslmode=disable"; ;; \ - (mysql) printf "root@tcp(${DB_HOST})/autoscaler?tls=false"; ;; esac) + (mysql) printf "root@tcp(${DB_HOST})/autoscaler?tls=false"; ;; esac) DEBUG := false MYSQL_TAG := 8 POSTGRES_TAG := 12 @@ -162,7 +162,7 @@ target/start-db-postgres_CI_true: waitfor_postgres_CI_false: @echo -n " - waiting for ${db_type} ." @COUNTER=0; until $$(docker exec postgres pg_isready &>/dev/null) || [ $$COUNTER -gt 10 ]; do echo -n "."; sleep 1; let COUNTER+=1; done;\ - if [ $$COUNTER -gt 10 ]; then echo; echo "Error: timed out waiting for postgres. Try \"make clean\" first." >&2 ; exit 1; fi + if [ $$COUNTER -gt 10 ]; then echo; echo "Error: timed out waiting for postgres. Try \"make clean\" first." >&2 ; exit 1; fi waitfor_postgres_CI_true: @echo " - no ci postgres checks" @@ -193,14 +193,14 @@ waitfor_mysql_CI_false: waitfor_mysql_CI_true: @echo -n " - Waiting for table creation" @which mysql >/dev/null &&\ - {\ - T=0;\ - until [[ ! -z "$(shell mysql -u "root" -h "${DB_HOST}" --port=3306 -qfsBe "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME='autoscaler'" 2> /dev/null)" ]]\ - || [[ $${T} -gt 30 ]];\ - do echo -n "."; sleep 1; T=$$((T+1)); done;\ - } + {\ + T=0;\ + until [[ ! -z "$(shell mysql -u "root" -h "${DB_HOST}" --port=3306 -qfsBe "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME='autoscaler'" 2> /dev/null)" ]]\ + || [[ $${T} -gt 30 ]];\ + do echo -n "."; sleep 1; T=$$((T+1)); done;\ + } @[ ! -z "$(shell mysql -u "root" -h "${DB_HOST}" --port=3306 -qfsBe "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME='autoscaler'" 2> /dev/null)" ]\ - || { echo "ERROR: Mysql timed out creating database"; exit 1; } + || { echo "ERROR: Mysql timed out creating database"; exit 1; } .PHONY: stop-db @@ -256,23 +256,26 @@ acceptance-release: clean-acceptance mod-tidy vendor build-test-app @tar --create --auto-compress --directory="src" --file="${ACCEPTANCE_TESTS_FILE}" 'acceptance' .PHONY: mod-tidy mod-tidy: - @for folder in $$(find . -maxdepth 3 -name "go.mod" -exec dirname {} \;);\ - do\ - cd $${folder}; echo " - go mod tidying '$${folder}'"; go mod tidy; cd - >/dev/null;\ + @for folder in $$(find . -maxdepth 6 -name 'go.mod' -exec dirname {} \;) ;\ + do \ + pushd "$${folder}" ;\ + echo " - go mod tidying '$${folder}'" ;\ + go mod tidy ;\ + popd ;\ done .PHONY: mod-download mod-download: @for folder in $$(find . -maxdepth 3 -name "go.mod" -exec dirname {} \;);\ do\ - cd $${folder}; echo " - go mod download '$${folder}'"; go mod download; cd - >/dev/null;\ + cd $${folder}; echo " - go mod download '$${folder}'"; go mod download; cd - >/dev/null;\ done .PHONY: vendor vendor: @for folder in $$(find . -maxdepth 3 -name "go.mod" -exec dirname {} \;);\ do\ - cd $${folder}; echo " - go mod vendor '$${folder}'"; go mod vendor; cd - >/dev/null;\ + cd $${folder}; echo " - go mod vendor '$${folder}'"; go mod vendor; cd - >/dev/null;\ done .PHONY: fakes @@ -396,4 +399,4 @@ docker-image: docker-login validate-openapi-specs: $(wildcard ./api/*.openapi.yaml) for file in $^ ; do \ swagger-cli validate "$${file}" ; \ - done \ No newline at end of file + done From 6ecf41366e054bbd91cd5abdbbe853f4be080331 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 15 Sep 2023 02:20:25 +0000 Subject: [PATCH 233/294] chore(deps): update dependency terragrunt to v0.50.17 (#2150) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 0df45876db..67227de612 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.5 terraform 1.5.7 terraform-lsp -terragrunt 0.50.16 +terragrunt 0.50.17 From 4844ffa6b5f014ba57785b361ae5b4c2af94bddd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 15 Sep 2023 04:29:23 +0000 Subject: [PATCH 234/294] chore(deps): update google/cloud-sdk docker tag to v446.0.1 (#2151) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- ci/terragrunt/.tool-versions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.tool-versions b/.tool-versions index bacd8e4950..46d2b40f3a 100644 --- a/.tool-versions +++ b/.tool-versions @@ -4,7 +4,7 @@ bosh 7.4.0 cf 8.7.3 concourse 7.10.0 direnv 2.32.3 -gcloud 446.0.0 +gcloud 446.0.1 ginkgo 2.12.0 golang 1.20.5 golangci-lint 1.54.2 diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 67227de612..a41aefdb96 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,4 +1,4 @@ -gcloud 446.0.0 +gcloud 446.0.1 helm 3.12.3 python 3.11.5 terraform 1.5.7 From e8bd8ea2b8654cf5ab572b6a41d06d79eb154df8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 15 Sep 2023 06:54:03 +0000 Subject: [PATCH 235/294] fix(deps): update module google.golang.org/grpc to v1.58.1 (#2152) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index f202b84ac3..6f53ff213f 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -36,7 +36,7 @@ require ( golang.org/x/exp v0.0.0-20230905200255-921286631fa9 golang.org/x/net v0.15.0 golang.org/x/time v0.3.0 - google.golang.org/grpc v1.58.0 + google.golang.org/grpc v1.58.1 gopkg.in/yaml.v3 v3.0.1 ) diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index 6026590e09..b1e6d8000a 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1670,8 +1670,8 @@ google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5v google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o= -google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= +google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/examples v0.0.0-20230512210959-5dcfb37c0b43/go.mod h1:irORyHPQXotoshbRTZVFvPDcfTfFHL23efQeop+H45M= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= From 818be00613d317dd201506b4ed88c207eca61823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Thu, 14 Sep 2023 15:03:44 +0200 Subject: [PATCH 236/294] Cleanup; --- .../dependency-update-go-mod-tidy.yaml | 246 ------------------ ...te.go-mod-tidy_and_make-package-specs.yaml | 80 ++++++ 2 files changed, 80 insertions(+), 246 deletions(-) delete mode 100644 .github/workflows/dependency-update-go-mod-tidy.yaml create mode 100644 .github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml diff --git a/.github/workflows/dependency-update-go-mod-tidy.yaml b/.github/workflows/dependency-update-go-mod-tidy.yaml deleted file mode 100644 index 2fca883b72..0000000000 --- a/.github/workflows/dependency-update-go-mod-tidy.yaml +++ /dev/null @@ -1,246 +0,0 @@ -name: "renovate-/ospo-bot: go mod tidy" -on: - # pull_request: - # paths: - # - ".github/workflows/dependency-update-go-mod-tidy.yaml" - push: - # Execute on all renovate-branches, iff go.mod/-sum of the helper app has been changed. - branches: - - "renovate/**" - - "dependabot/**" - paths: - - ".github/workflows/dependency-update-go-mod-tidy.yaml" - - "./src/**/go.mod" - - "./src/**/go.sum" -jobs: - go-mod-tidy: - runs-on: ubuntu-latest - permissions: - pull-requests: write - contents: write -# if: contains(fromJson('["dependabot[bot]", "renovate[bot]"]'), github.event.pull_request.user.login) && contains(github.event.pull_request.labels.*.name, 'dependencies') - steps: - # We potentially want to add at the end a commit by the author of the most recent - # commit in this branch. However github has some protection which prevents workflows - # to run in case a commit has been pushed with the default job-specific github-token. - # For this case we need to use another one here. - # - # For more information, see: - # - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - submodules: true - token: ${{ secrets.APP_AUTOSCALER_CI_TOKEN }} # With push token that can trigger new PR jobs - - name: Configure git - shell: bash - run: | - #! /usr/bin/env bash - set -eu -o pipefail - - declare -r commit_author_name="${{github.event.head_commit.author.name}}" - declare -r commit_author_email="${{github.event.head_commit.author.email}}" - - git config --global --add safe.directory "${GITHUB_WORKSPACE}" - git config user.name "${commit_author_name}" - git config user.email "${commit_author_email}" - - name: go-mod-tidy - shell: bash - run: | - #! /usr/bin/env bash - set -eu -o pipefail - - # We need the subsequent standard-message to determine if the last commit - # has already cleaned up everything. In this case this workflow should not - # change anything and we exit early. - # An alternative would be to use a tag for this. But this does affect the whole - # PR instead of just the latest commit. - declare -r tidy_message='🤖🦾🛠️ go mod tidy' - - declare -r commit_author_name="${{github.event.head_commit.author.name}}" - declare -r commit_message="${{github.event.head_commit.message}}" - - if [[ ! "${commit_author_name}" =~ ('dependabot'|'renovate')'[bot]' ]] \ - || [[ "${commit_message}" == "${tidy_message}" ]] - then - echo 'This commit was not by a known bot or already an automatic `go mod tidy`! Exiting …' - echo "Debug: commit_author_name = ${commit_author_name}" # TODO: Remove this! - exit 0 - fi - - declare -r current_branch="$(git branch --show-current)" - git checkout 'HEAD~1' - pushd './src/acceptance/assets/app/go_app' - make generate - popd - git checkout "${current_branch}" - - make package-specs - - declare -i -r changed_files=$(git status --porcelain | wc --lines) - if ((changed_files >= 0)) - then - git add . - git commit --message="${tidy_message}" - git push - fi - - # - uses: fastify/github-action-merge-dependabot@v3 - # name: Auto-approve - # if: github.event.pull_request.user.login == 'dependabot[bot]' - # with: - # github-token: "${{ secrets.GITHUB_TOKEN }}" - # target: minor - # approve-only: true - # - uses: alexwilson/enable-github-automerge-action@1.0.0 - # name: Enable Auto-merge - # with: - # github-token: "${{ secrets.APP_AUTOSCALER_CI_TOKEN }}" - # merge-method: "SQUASH" - - - -# name: Renovate Postprocessing -# concurrency: -# group: '${{ github.workflow }}-${{ github.head_ref || github.run_id }}' -# cancel-in-progress: true -# on: -# pull_request: -# paths: -# - '.github/workflows/product_renovate_postprocessing.yaml' -# push: -# branches: # But just on PRs with renovate branches -# - 'renovate/**' -# workflow_dispatch: - -# jobs: -# postprocessing: -# name: Postprocessing -# runs-on: [ solinas-medium ] -# container: -# image: public.int.repositories.cloud.sap/python:3.10 -# # Renovate bot has a different name. We just want to run if the last commit is from renovate and not from us. -# # This is to prevent endless loops where our commit at the bottom will trigger this workflow again. -# # Normally this is not an issue since the default job specific GITHUB_TOKEN is used. In that case GitHub has -# # protection in place to not run any action when this token is used. Since we want to start other validation jobs -# # with this commit we use a technical users token to trigger other actions but skip rerunning ours to not end up in an endless loop. -# if: github.actor == 'ospo-renovate[bot]' -# defaults: -# run: -# shell: bash -# steps: -# - uses: hmarr/debug-action@v2 -# - name: Checkout Product Base Ref -# uses: actions/checkout@v3 -# with: -# ref: ${{ github.base_ref || 'master' }} -# fetch-depth: 0 -# submodules: true -# token: ${{ secrets.GH_TOKEN }} # With push token that can trigger new PR jobs -# - name: Checkout Product Head Ref -# uses: actions/checkout@v3 -# with: -# submodules: true -# token: ${{ secrets.GH_TOKEN }} # With push token that can trigger new PR jobs - -# - name: Python Postprocessing -# run: | -# set -euxo pipefail -# git config --global --add safe.directory '*' -# # If we dont have a base branch, we assume we want to merge to master -# [[ -z "$GITHUB_BASE_REF" ]] && GITHUB_BASE_REF=master - -# # If only comments change in a file, remove it from the commit -# discard_if_only_comments(){ -# # We exclude comments in this diff. -# if diff -U 0 -w -B -I '^[:space: :tab:]*#' $2 $1; then -# echo "Discarding $1" -# git restore $1 -# fi -# } - -# # Install the version of pip-compile in dev-requirements.txt -# cat dev-requirements.txt | grep -m1 -o '^pip-tools[^\\#]*' | xargs -n 1 pip install -# python --version -# pip --version -# pip-compile --version - -# # Global Requirements -# global_packages(){ -# tempdir="$(mktemp -d)" -# cp requirements.txt $tempdir/ -# cp dev-requirements.txt $tempdir/ -# pip-compile requirements.in --resolver=backtracking -# pip-compile dev-requirements.in --resolver=backtracking -# discard_if_only_comments requirements.txt $tempdir/requirements.txt -# discard_if_only_comments dev-requirements.txt $tempdir/dev-requirements.txt -# } - -# # Controlplane cf-push-monitoring -# controlplane_monitoring_app(){ -# #Only pip-compile if dev-requirements.in changed -# pushd components/cf/resources/cf-push-monitoring/ -# if ! git diff --name-only --exit-code "origin/$GITHUB_BASE_REF" -- src/requirements.in src/requirements.txt dev-requirements.in dev-requirements.txt; then -# tempdir="$(mktemp -d)" -# cp dev-requirements.txt $tempdir/ -# pip-compile dev-requirements.in -# discard_if_only_comments dev-requirements.txt $tempdir/dev-requirements.txt -# pushd src/ -# cp requirements.txt $tempdir/ -# pip-compile requirements.in -# discard_if_only_comments requirements.txt $tempdir/requirements.txt - -# #Only run vendoring if requirements.txt changed -# if ! git diff --name-only --exit-code "origin/$GITHUB_BASE_REF" -- requirements.txt; then -# rm -rf vendor/* -# pip download -r requirements.txt --no-cache --no-binary=:none: -d vendor -# fi -# popd -# fi -# popd -# } - -# # Controlplane control-plane-test-app -# controlplane_test_app(){ -# #Only pip-compile if dev-requirements.in changed -# pushd components/cf/resources/control-plane-test-app/ -# #Only pip-compile if requirements files changed -# if ! git diff --name-only --exit-code "origin/$GITHUB_BASE_REF" -- requirements.in requirements.txt dev-requirements.in dev-requirements.txt; then -# tempdir="$(mktemp -d)" -# cp requirements.txt $tempdir/ -# pip-compile requirements.in -# discard_if_only_comments requirements.txt $tempdir/requirements.txt -# cp dev-requirements.txt $tempdir/ -# pip-compile dev-requirements.in -# discard_if_only_comments dev-requirements.txt $tempdir/dev-requirements.txt -# fi -# #Only run vendoring if requirements.txt changed -# if ! git diff --name-only --exit-code "origin/$GITHUB_BASE_REF" -- requirements.txt; then -# rm -rf vendor/* -# pip download -r requirements.txt --no-cache --no-binary=:none: -d vendor -# fi -# popd -# } - -# # Run Postprocessing in Parallel -# global_packages -# controlplane_test_app -# controlplane_monitoring_app - -# # Add Changes -# git add . && git status -# - uses: EndBug/add-and-commit@v9 -# name: Commit Changes -# if: github.event_name != 'pull_request' -# with: -# message: Postprocessing - ${{github.event.head_commit.message}} -# # We need to make a commit to trigger PR Validations since they wont run on renovate Commits directly -# # Such actions add this if in their job: `if: github.actor != 'ospo-renovate[bot]'` -# # So if renovate opens/rebases a PR it will execute the tests once and not twice. Following flow is desired: -# # 1. Renovate makes PR. --> 2. No Test validation run, just the postprocessing action -# # 3. The postprocessing action commits their changes --> 4. PR validations run now -# # So we add an empty commit if needed to have a commit made to the PR branch and thus trigger the validations -# commit: --allow-empty -# author_name: github-actions -# author_email: DL_605C461DF2B94B027E394EE7@global.corp.sap@users.noreply.github.com -# push: true diff --git a/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml b/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml new file mode 100644 index 0000000000..3b3b4e54cb --- /dev/null +++ b/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml @@ -0,0 +1,80 @@ +name: "renovate-/ospo-bot: go mod tidy and make package-specs" +on: + push: + branches: + - "renovate/**" + - "dependabot/**" + paths: + - ".github/workflows/dependency-update-go-mod-tidy.yaml" + - "./src/**/go.mod" + - "./src/**/go.sum" +jobs: + go-mod-tidy: + runs-on: ubuntu-latest + permissions: + pull-requests: write + contents: write + steps: + # We potentially want to add at the end a commit by the author of the most recent + # commit in this branch. However github has some protection which prevents workflows + # to run in case a commit has been pushed with the default job-specific github-token. + # For this case we need to use another one here. + # + # For more information, see: + # + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: true + token: ${{ secrets.APP_AUTOSCALER_CI_TOKEN }} # With push token that can trigger new PR jobs + - name: Configure git + shell: bash + run: | + #! /usr/bin/env bash + set -eu -o pipefail + + declare -r commit_author_name="${{github.event.head_commit.author.name}}" + declare -r commit_author_email="${{github.event.head_commit.author.email}}" + + git config --global --add safe.directory "${GITHUB_WORKSPACE}" + git config user.name "${commit_author_name}" + git config user.email "${commit_author_email}" + - name: go-mod-tidy and make package-specs + shell: bash + run: | + #! /usr/bin/env bash + set -eu -o pipefail + + # We need the subsequent standard-message to determine if the last commit + # has already cleaned up everything. In this case this workflow should not + # change anything and we exit early. + # An alternative would be to use a tag for this. But this does affect the whole + # PR instead of just the latest commit. + declare -r tidy_message='🤖🦾🛠️ go mod tidy & make package-specs' + + declare -r commit_author_name="${{github.event.head_commit.author.name}}" + declare -r commit_message="${{github.event.head_commit.message}}" + + if [[ ! "${commit_author_name}" =~ ('dependabot'|'renovate')'[bot]' ]] \ + || [[ "${commit_message}" == "${tidy_message}" ]] + then + echo 'This commit was not by a known bot or already an automatic `go mod tidy`! Exiting …' + exit 0 + fi + + declare -r current_branch="$(git branch --show-current)" + git checkout 'HEAD~1' + pushd './src/acceptance/assets/app/go_app' + make generate + popd + git checkout "${current_branch}" + + make package-specs + + declare -i -r changed_files=$(git status --porcelain | wc --lines) + if ((changed_files >= 0)) + then + git add . + git commit --message="${tidy_message}" + git push + fi From f5c20282dbe37f6e80395aaa346e95787f0f0f0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 15 Sep 2023 14:48:20 +0200 Subject: [PATCH 237/294] Improve structure of the inital shell-message by nix. --- flake.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 71225e69a8..01f0cdf312 100644 --- a/flake.nix +++ b/flake.nix @@ -63,7 +63,11 @@ hardeningDisable = [ "fortify" ]; shellHook = '' - echo -ne '\033[1;33m' '\033[5m' + aes_terminal_font_yellow='\e[38;2;255;255;0m' + aes_terminal_font_blink='\e[5m' + aes_terminal_reset='\e[0m' + + echo -ne "$aes_terminal_font_yellow" "$aes_terminal_font_blink" cat << 'EOF' ⚠️ If `whoami` does not work properly on your computer, `bosh ssh` commands may fail. The solution is, to provide your nix dev-shell the path to the `libnss_sss.so.2` of @@ -72,9 +76,9 @@ Adapt the following line to contain the correct path: export LD_PRELOAD='/lib/x86_64-linux-gnu/libnss_sss.so.2' EOF - echo -ne '\033[0m' + echo -ne "$aes_terminal_reset" ''; }; }); }; -} \ No newline at end of file +} From 6d7d5ddcbdeac054708930efeb6d0c5d870599da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 15 Sep 2023 14:49:11 +0200 Subject: [PATCH 238/294] Improve Makefile for the test-app: Fake-Generation only if fakes are not present. --- src/acceptance/assets/app/go_app/Makefile | 123 ++++++++++++++-------- 1 file changed, 80 insertions(+), 43 deletions(-) diff --git a/src/acceptance/assets/app/go_app/Makefile b/src/acceptance/assets/app/go_app/Makefile index 78ba8a95f4..f9faa56704 100644 --- a/src/acceptance/assets/app/go_app/Makefile +++ b/src/acceptance/assets/app/go_app/Makefile @@ -1,75 +1,112 @@ .ONESHELL: SHELL := /bin/bash .SHELLFLAGS := -eu -o pipefail -c ${SHELLFLAGS} +aes_terminal_font_yellow := \e[38;2;255;255;0m +aes_terminal_reset := \e[0m - +# TODO: Do we need the next line? MAKEFLAGS= -GO_VERSION := $(shell go version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/') -GO_DEPENDENCIES := $(shell find . -type f -name '*.go') -PACKAGE_DIRS := $(shell go list ./... | grep -v /vendor/ | grep -v e2e) -CGO_ENABLED = 0 -export GOWORK=off -binaries=$(shell find . -name "main.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq) -test_dirs=$(shell find . -name "*_test.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq) +GO_VERSION = $(shell go version | sed --expression='s/^[^0-9.]*\([0-9.]*\).*/\1/') +GO_DEPENDENCIES = $(shell find . -type f -name '*.go') +PACKAGE_DIRS = $(shell go list ./... | grep --invert-match /vendor/ | grep --invert-match e2e) +CGO_ENABLED := 0 +export GOWORK := off + +binaries = $(shell find . -name "main.go" -exec dirname {} \; \ + | cut --delimiter='/' --fields='2' | sort | uniq) +test_dirs = $(shell find . -name "*_test.go" -exec dirname {} \; \ + | cut --delimiter='/' --fields='2' | sort | uniq) + +GINKGO_OPTS :=-r --race --require-suite --randomize-all --cover ${OPTS} +export CONFIG ?= ../../../../acceptance_config.json + +GINKGO_VERSION = v$(shell cat ../../../../../.tool-versions | grep --regexp='ginkgo' | cut --delimiter=' ' --fields='2') +GOLANGCI_LINT_VERSION = v$(shell cat ../../../../../.tool-versions | grep --regexp='golangci-lint' | cut --delimiter=' ' --fields='2') + + + +openapi-spec-path := ../../../../../api +openapi-specs-list := $(wildcard ${openapi-spec-path}/*.openapi.yaml) +appfakes-path := ./internal/app/appfakes + +.PHONY: generate-fakes +generate-fakes: ${appfakes-path} $(wildcard ${appfakes-path}/*.go) +${appfakes-path} $(wildcard ${appfakes-path}/*.go) &: ./internal/generate.go ${openapi-specs-list} + @echo -ne '${aes_terminal_font_yellow}' + @echo -e '⚠️ The client-fakes generated from the openapi-specification depend on\n' \ + 'the files ./go.mod and ./go.sum. This has not been reflected in this\n' \ + 'make-target to avoid cyclic dependencies because `go mod tidy`, which\n' \ + 'modifies both files, depends itself on the client-fakes.' + @echo -ne '${aes_terminal_reset}' + go generate ./... + + + +.PHONY: go-mod-tidy +go-mod-tidy: ${appfakes-path} $(wildcard ${appfakes-path}/*.go) + go mod tidy -GINKGO_OPTS=-r --race --require-suite --randomize-all --cover ${OPTS} -export CONFIG?=../../../../acceptance_config.json -GINKGO_VERSION=v$(shell cat ../../../../../.tool-versions | grep ginkgo | cut -d " " -f 2 ) -GOLANGCI_LINT_VERSION=v$(shell cat ../../../../../.tool-versions | grep golangci-lint | cut -d " " -f 2 ) .PHONY: build -build: generate - echo "# building test-app" - rm -rf build/* || true - mkdir -p build/ - CGO_ENABLED='${CGO_ENABLED}' GOOS='linux' GOARCH='amd64' go build -o build/app - cp app_manifest.yml build/manifest.yml +build: ./build/app ./build/manifest.yml +./build/app ./build/manifest.yml: ./go.mod ${appfakes-path} $(wildcard ${appfakes-path}/*.go) + echo '# building test-app' + mkdir -p build + CGO_ENABLED='${CGO_ENABLED}' GOOS='linux' GOARCH='amd64' go build -o './build/app' + cp './app_manifest.yml' './build/manifest.yml' + +.PHONY: build_tests build_tests: $(addprefix build_test-,$(test_dirs)) -build_test-%: +build_test-%: ${appfakes-path} $(wildcard ${appfakes-path}/*.go) @echo " - building '$*' tests" - @export build_folder=${PWD}/build/tests/$* &&\ - mkdir -p $${build_folder} &&\ - cd $* &&\ - for package in $$( go list ./... | sed 's|.*/autoscaler/$*|.|' | awk '{ print length, $$0 }' | sort -n -r | cut -d" " -f2- );\ - do\ - export test_file=$${build_folder}/$${package}.test;\ - echo " - compiling $${package} to $${test_file}";\ - go test -c -o $${test_file} $${package};\ - done; - + @export build_folder='${PWD}/build/tests/$*' + @mkdir -p '$${build_folder}' + cd $* + for package in $$(go list './...' | sed 's|.*/autoscaler/$*|.|' | awk '{ print length, $$0 }' | \ + sort --numeric-sort --reverse | cut --delimiter=' ' --fields='2-') + do + export test_file="$${build_folder}/$${package}.test" + echo " - compiling $${package} to $${test_file}" + go test -c -o "$${test_file}" "$${package}" + done + + +.PHONY: check lint lint-fix test check: lint build test -test: generate - @echo "Running tests" - go run github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} run ${GINKGO_OPTS} ./... -lint: generate - @go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run +test: generate-fakes + @echo 'Running tests' + go run 'github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION}' run ${GINKGO_OPTS} './...' + +lint: generate-fakes + @go run 'github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}' run + +lint-fix: generate-fakes + go run 'github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}' run --fix + -lint-fix: generate - go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run --fix .PHONY: start start: build - docker run -it --name go_app -v $$PWD/build/:/cf/bin -p 8080:8080 --rm cloudfoundry/cflinuxfs4 /cf/bin/app + docker run --interactive --tty --name go_app --volume="$${PWD}/build/:/cf/bin" \ + --publish '8080:8080' --rm 'cloudfoundry/cflinuxfs4' '/cf/bin/app' + + .PHONY: deploy deploy: build ./deploy.sh -openapi-spec-path := ../../../../../api -openapi-specs-list := $(wildcard ${openapi-spec-path}/*.openapi.yaml) -generate: go.mod ${openapi-specs-list} - go generate ./... .PHONY: clean clean: @echo "# cleaning autoscaler" @go clean -cache -testcache - @rm -rf build - @rm -rf internal/app/appfakes \ No newline at end of file + @rm --force --recursive './build' + @rm --force --recursive './internal/app/appfakes' From 541bb4369a22f10f4d07829fb3394f6e4dceff34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 15 Sep 2023 15:02:30 +0200 Subject: [PATCH 239/294] Try to live with dependency on `go.mod` for generated code. --- src/acceptance/assets/app/go_app/Makefile | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/acceptance/assets/app/go_app/Makefile b/src/acceptance/assets/app/go_app/Makefile index f9faa56704..1be9a0d68d 100644 --- a/src/acceptance/assets/app/go_app/Makefile +++ b/src/acceptance/assets/app/go_app/Makefile @@ -1,8 +1,6 @@ .ONESHELL: SHELL := /bin/bash .SHELLFLAGS := -eu -o pipefail -c ${SHELLFLAGS} -aes_terminal_font_yellow := \e[38;2;255;255;0m -aes_terminal_reset := \e[0m # TODO: Do we need the next line? MAKEFLAGS= @@ -32,13 +30,7 @@ appfakes-path := ./internal/app/appfakes .PHONY: generate-fakes generate-fakes: ${appfakes-path} $(wildcard ${appfakes-path}/*.go) -${appfakes-path} $(wildcard ${appfakes-path}/*.go) &: ./internal/generate.go ${openapi-specs-list} - @echo -ne '${aes_terminal_font_yellow}' - @echo -e '⚠️ The client-fakes generated from the openapi-specification depend on\n' \ - 'the files ./go.mod and ./go.sum. This has not been reflected in this\n' \ - 'make-target to avoid cyclic dependencies because `go mod tidy`, which\n' \ - 'modifies both files, depends itself on the client-fakes.' - @echo -ne '${aes_terminal_reset}' +${appfakes-path} $(wildcard ${appfakes-path}/*.go) &: ./go.mod ./internal/generate.go ${openapi-specs-list} go generate ./... From 80544d95545155b00d61e494076b496e4695f853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 15 Sep 2023 17:09:13 +0200 Subject: [PATCH 240/294] Let go-mod-tidy depend on generated code; --- Makefile | 46 ++++++++++++++++------- src/acceptance/Makefile | 40 +++++++++++++------- src/acceptance/assets/app/go_app/Makefile | 18 +++++---- src/autoscaler/.gitignore | 3 +- src/autoscaler/Makefile | 44 ++++++++++++++++------ src/autoscaler/fakes/.gitignore | 1 - src/autoscaler/fakes/fakes.go | 30 --------------- src/autoscaler/generate-fakes.go | 30 +++++++++++++++ src/changelog/Makefile | 36 ++++++++++++------ src/changeloglockcleaner/Makefile | 37 +++++++++++------- 10 files changed, 182 insertions(+), 103 deletions(-) delete mode 100644 src/autoscaler/fakes/.gitignore delete mode 100644 src/autoscaler/fakes/fakes.go create mode 100644 src/autoscaler/generate-fakes.go diff --git a/Makefile b/Makefile index abfe413f12..7b480c7ad9 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,10 @@ SHELL := /bin/bash .SHELLFLAGS := -eu -o pipefail -c ${SHELLFLAGS} MAKEFLAGS = -s + go_modules := $(shell find . -maxdepth 3 -name "*.mod" -exec dirname {} \; | sed 's|\./src/||' | sort) all_modules := $(go_modules) db scheduler + MVN_OPTS = "-Dmaven.test.skip=true" OS := $(shell . /etc/lsb-release &>/dev/null && echo $${DISTRIB_ID} || uname) db_type := postgres @@ -243,26 +245,44 @@ spec-test: bundle exec rspec .PHONY: release -bosh-release: mod-tidy vendor scheduler db build/autoscaler-test.tgz +bosh-release: go-mod-tidy vendor scheduler db build/autoscaler-test.tgz build/autoscaler-test.tgz: @echo " - building bosh release into build/autoscaler-test.tgz" @mkdir -p build @bosh create-release --force --timestamp-version --tarball=build/autoscaler-test.tgz .PHONY: acceptance-release -acceptance-release: clean-acceptance mod-tidy vendor build-test-app +acceptance-release: clean-acceptance go-mod-tidy vendor build-test-app @echo " - building acceptance test release '${VERSION}' to dir: '${DEST}' " @mkdir -p ${DEST} @tar --create --auto-compress --directory="src" --file="${ACCEPTANCE_TESTS_FILE}" 'acceptance' -.PHONY: mod-tidy -mod-tidy: - @for folder in $$(find . -maxdepth 6 -name 'go.mod' -exec dirname {} \;) ;\ - do \ - pushd "$${folder}" ;\ - echo " - go mod tidying '$${folder}'" ;\ - go mod tidy ;\ - popd ;\ - done + + + +.PHONY: go-mod-tidy +go-mod-tidy: acceptance.go-mod-tidy autoscaler.go-mod-tidy changelog.go-mod-tidy \ + changeloglockcleander.go-mod-tidy test-app.go-mod-tidy + +go-acceptance-dir := ./src/acceptance +go-autoscaler-dir := ./src/autoscaler +go-changelog-dir := ./src/changelog +go-changeloglockcleander-dir := ./src/changeloglockcleaner +go-test-app-dir := ./src/acceptance/assets/app/go_app + +.PHONY: acceptance.go-mod-tidy autoscaler.go-mod-tidy changelog.go-mod-tidy \ + changeloglockcleander.go-mod-tidy test-app.go-mod-tidy +acceptance.go-mod-tidy: + make --directory='${go-acceptance-dir}' go-mod-tidy +autoscaler.go-mod-tidy: + make --directory='${go-autoscaler-dir}' go-mod-tidy +changelog.go-mod-tidy: + make --directory='${go-changelog-dir}' go-mod-tidy +changeloglockcleander.go-mod-tidy: + make --directory='${go-changeloglockcleander-dir}' go-mod-tidy +test-app.go-mod-tidy: + make --directory='${go-test-app-dir}' go-mod-tidy + + .PHONY: mod-download mod-download: @@ -298,7 +318,7 @@ markdownlint-cli: .PHONY: deploy deploy-autoscaler deploy-register-cf deploy-autoscaler-bosh deploy-cleanup deploy-autoscaler: deploy -deploy: mod-tidy vendor uaac db scheduler deploy-autoscaler-bosh deploy-register-cf +deploy: go-mod-tidy vendor uaac db scheduler deploy-autoscaler-bosh deploy-register-cf deploy-register-cf: echo " - registering broker with cf" [ "$${BUILDIN_MODE}" == "false" ] && { ${CI_DIR}/autoscaler/scripts/register-broker.sh; } || echo " - Not registering broker due to buildin mode enabled" @@ -370,7 +390,7 @@ run-performance: run-act: ${AUTOSCALER_DIR}/scripts/run_act.sh;\ -package-specs: mod-tidy vendor +package-specs: go-mod-tidy vendor @echo " - Updating the package specs" @./scripts/sync-package-specs diff --git a/src/acceptance/Makefile b/src/acceptance/Makefile index 71357933d0..cf287d533f 100644 --- a/src/acceptance/Makefile +++ b/src/acceptance/Makefile @@ -1,20 +1,32 @@ SHELL := /bin/bash -.SHELLFLAGS = -euo pipefail -c -MAKEFLAGS = -s +.SHELLFLAGS := -eu -o pipefail -c +MAKEFLAGS := -s + GO := GO111MODULE=on GO15VENDOREXPERIMENT=1 go GO_NOMOD := GO111MODULE=off go -GO_VERSION := $(shell $(GO) version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/') -GO_DEPENDENCIES := $(shell find . -type f -name '*.go') -PACKAGE_DIRS := $(shell $(GO) list ./... | grep -v /vendor/ | grep -v e2e) -CGO_ENABLED = 0 -export GOWORK=off -BUILDTAGS := +GO_VERSION = $(shell go version | sed --expression='s/^[^0-9.]*\([0-9.]*\).*/\1/') +GO_DEPENDENCIES = $(shell find . -type f -name '*.go') +PACKAGE_DIRS = $(shell go list './...' | grep --invert-match --regexp='/vendor/' \ + | grep --invert-match --regexp='e2e') + +CGO_ENABLED := 0 +export GOWORK := off + +GINKGO_VERSION = v$(shell cat '../../.tool-versions' | grep --regexp='ginkgo' \ + | cut --delimiter=' ' --fields='2') +GOLANGCI_LINT_VERSION = v$(shell cat '../../.tool-versions' | grep --regexp='golangci-lint' \ + | cut --delimiter=' ' --fields='2' ) + + +.PHONY: go-mod-tidy +go-mod-tidy: + go mod tidy + -GINKGO_VERSION=v$(shell cat ../../.tool-versions | grep ginkgo | cut -d " " -f 2 ) -GOLANGCI_LINT_VERSION=v$(shell cat ../../.tool-versions | grep golangci-lint | cut -d " " -f 2 ) -test_dirs=$(shell find . -name "*_test.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq) +test_dirs = $(shell find . -name "*_test.go" -exec dirname {} \; | cut --delimiter='/' --fields='2' \ + | sort | uniq) build_tests: $(addprefix build_test-,$(test_dirs)) build_test-%: @echo " - building '$*' tests" @@ -23,9 +35,9 @@ build_test-%: cd $* &&\ for package in $$( go list ./... | sed 's|.*/autoscaler/$*|.|' | awk '{ print length, $$0 }' | sort -n -r | cut -d" " -f2- );\ do\ - export test_file=$${build_folder}/$${package}.test;\ - echo " - compiling $${package} to $${test_file}";\ - go test -c -o $${test_file} $${package};\ + export test_file=$${build_folder}/$${package}.test;\ + echo " - compiling $${package} to $${test_file}";\ + go test -c -o $${test_file} $${package};\ done; check: lint build_tests diff --git a/src/acceptance/assets/app/go_app/Makefile b/src/acceptance/assets/app/go_app/Makefile index 1be9a0d68d..676d7c9d14 100644 --- a/src/acceptance/assets/app/go_app/Makefile +++ b/src/acceptance/assets/app/go_app/Makefile @@ -7,7 +7,8 @@ MAKEFLAGS= GO_VERSION = $(shell go version | sed --expression='s/^[^0-9.]*\([0-9.]*\).*/\1/') GO_DEPENDENCIES = $(shell find . -type f -name '*.go') -PACKAGE_DIRS = $(shell go list ./... | grep --invert-match /vendor/ | grep --invert-match e2e) +PACKAGE_DIRS = $(shell go list './...' | grep --invert-match --regexp='/vendor/' \ + | grep --invert-match --regexp='e2e') CGO_ENABLED := 0 export GOWORK := off @@ -26,24 +27,25 @@ GOLANGCI_LINT_VERSION = v$(shell cat ../../../../../.tool-versions | grep --rege openapi-spec-path := ../../../../../api openapi-specs-list := $(wildcard ${openapi-spec-path}/*.openapi.yaml) -appfakes-path := ./internal/app/appfakes +app-fakes-dir := ./internal/app/appfakes +app-fakes-files := $(wildcard ${app-fakes-dir}/*.go) .PHONY: generate-fakes -generate-fakes: ${appfakes-path} $(wildcard ${appfakes-path}/*.go) -${appfakes-path} $(wildcard ${appfakes-path}/*.go) &: ./go.mod ./internal/generate.go ${openapi-specs-list} +generate-fakes: ${app-fakes-dir} ${app-fakes-files} +${app-fakes-dir} ${app-fakes-files} &: ./go.mod ./internal/generate.go ${openapi-specs-list} go generate ./... .PHONY: go-mod-tidy -go-mod-tidy: ${appfakes-path} $(wildcard ${appfakes-path}/*.go) +go-mod-tidy: ${app-fakes-dir} ${app-fakes-files} go mod tidy .PHONY: build build: ./build/app ./build/manifest.yml -./build/app ./build/manifest.yml: ./go.mod ${appfakes-path} $(wildcard ${appfakes-path}/*.go) +./build/app ./build/manifest.yml: ./go.mod ${app-fakes-dir} ${app-fakes-files} echo '# building test-app' mkdir -p build CGO_ENABLED='${CGO_ENABLED}' GOOS='linux' GOARCH='amd64' go build -o './build/app' @@ -54,10 +56,10 @@ build: ./build/app ./build/manifest.yml .PHONY: build_tests build_tests: $(addprefix build_test-,$(test_dirs)) -build_test-%: ${appfakes-path} $(wildcard ${appfakes-path}/*.go) +build_test-%: ${app-fakes-dir} ${app-fakes-files} @echo " - building '$*' tests" @export build_folder='${PWD}/build/tests/$*' - @mkdir -p '$${build_folder}' + @mkdir -p "$${build_folder}" cd $* for package in $$(go list './...' | sed 's|.*/autoscaler/$*|.|' | awk '{ print length, $$0 }' | \ sort --numeric-sort --reverse | cut --delimiter=' ' --fields='2-') diff --git a/src/autoscaler/.gitignore b/src/autoscaler/.gitignore index 378eac25d3..27eecdf61d 100644 --- a/src/autoscaler/.gitignore +++ b/src/autoscaler/.gitignore @@ -1 +1,2 @@ -build +build/ +fakes/ diff --git a/src/autoscaler/Makefile b/src/autoscaler/Makefile index dcebe611d1..61e8a4346d 100644 --- a/src/autoscaler/Makefile +++ b/src/autoscaler/Makefile @@ -1,11 +1,14 @@ SHELL := /bin/bash -.SHELLFLAGS = -euo pipefail -c -MAKEFLAGS = -s -GO_VERSION := $(shell go version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/') -GO_DEPENDENCIES := $(shell find . -type f -name '*.go') -PACKAGE_DIRS := $(shell go list ./... | grep -v /vendor/ | grep -v e2e) +.SHELLFLAGS := -eu -o pipefail -c +MAKEFLAGS := -s -CGO_ENABLED = 1 # This is set to enforce dynamic linking which is a requirement of dynatrace. +GO_VERSION = $(shell go version | sed --expression='s/^[^0-9.]*\([0-9.]*\).*/\1/') +GO_DEPENDENCIES = $(shell find . -type f -name '*.go') +PACKAGE_DIRS = $(shell go list './...' | grep --invert-match --regexp='/vendor/' \ + | grep --invert-match --regexp='e2e') + +# `CGO_ENABLED := 1` is required to enforce dynamic linking which is a requirement of dynatrace. +CGO_ENABLED := 1 BUILDTAGS := export GOWORK=off BUILDFLAGS := -ldflags '-linkmode=external' @@ -20,6 +23,25 @@ export GO111MODULE=on GINKGO_OPTS=-r --race --require-suite --randomize-all --cover ${OPTS} GINKGO_VERSION=v$(shell cat ../../.tool-versions | grep ginkgo | cut -d " " -f 2 ) + +app-fakes-dir := ./fakes +app-fakes-files := $(wildcard ${app-fakes-dir}/*.go) + +.PHONY: generate-fakes +generate-fakes: ${app-fakes-dir} ${app-fakes-files} +${app-fakes-dir} ${app-fakes-files} &: ./go.mod ./generate-fakes.go + @echo "# Generating counterfeits" + mkdir -p '${app-fakes-dir}' + COUNTERFEITER_NO_GENERATE_WARNING='true' go generate ./... + + + +.PHONY: go-mod-tidy +go-mod-tidy: ${app-fakes-dir} ${app-fakes-files} + go mod tidy + + + build-%: @echo "# building $*" @CGO_ENABLED=$(CGO_ENABLED) go build $(BUILDTAGS) $(BUILDFLAGS) -o build/$* $*/cmd/$*/main.go @@ -36,9 +58,9 @@ build_test-%: generate cd $* &&\ for package in $$( go list ./... | sed 's|.*/autoscaler/$*|.|' | awk '{ print length, $$0 }' | sort -n -r | cut -d" " -f2- );\ do\ - export test_file=$${build_folder}/$${package}.test;\ - echo " - compiling $${package} to $${test_file}";\ - go test -c -o $${test_file} $${package};\ + export test_file=$${build_folder}/$${package}.test;\ + echo " - compiling $${package} to $${test_file}";\ + go test -c -o $${test_file} $${package};\ done; check: fmt lint build test @@ -75,5 +97,5 @@ lint: clean: @echo "# cleaning autoscaler" @go clean -cache -testcache - @rm -rf build - @rm -rf fakes/fake_*.go + @rm --force --recursive 'build' + @rm --force --recursive 'fakes' diff --git a/src/autoscaler/fakes/.gitignore b/src/autoscaler/fakes/.gitignore deleted file mode 100644 index e3834a00fe..0000000000 --- a/src/autoscaler/fakes/.gitignore +++ /dev/null @@ -1 +0,0 @@ -fake_*.go \ No newline at end of file diff --git a/src/autoscaler/fakes/fakes.go b/src/autoscaler/fakes/fakes.go deleted file mode 100644 index 0b0a1f8f28..0000000000 --- a/src/autoscaler/fakes/fakes.go +++ /dev/null @@ -1,30 +0,0 @@ -package fakes - -// Multiple go:generate directives instead of counterfeiter:generate due to https://github.com/maxbrunsfeld/counterfeiter/issues/254 -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_wshelper.go ../metricsgateway/helpers WSHelper -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_cf_client.go ../cf CFClient -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_policy_db.go ../db PolicyDB -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_scalingengine_db.go ../db ScalingEngineDB -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_scheduler_db.go ../db SchedulerDB -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_scalingengine.go ../scalingengine ScalingEngine -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_binding_db.go ../db BindingDB -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_app_metric_db.go ../db AppMetricDB -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_instancemetrics_db.go ../db InstanceMetricsDB -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_credentials.go ../cred_helper Credentials -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_storedprocedure_db.go ../db StoredProcedureDB -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_metric_forwarder.go ../metricsforwarder/forwarder MetricForwarder -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_plan_checker.go ../api/plancheck PlanChecker -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_log_cache_client.go ../eventgenerator/client LogCacheClientReader -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_envelope_processor.go ../envelopeprocessor EnvelopeProcessor -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_log_cache_creator.go ../eventgenerator/client LogCacheClientCreator -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_metric_server_creator_creator.go ../eventgenerator/client MetricServerClientCreator -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_go_log_cache_client.go ../eventgenerator/client GoLogCacheClient -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_grpc.go ../eventgenerator/client GRPCOptions -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_envelope_processor_creator.go ../envelopeprocessor EnvelopeProcessorCreator -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_plan_checker.go ../api/plancheck PlanChecker -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_ratelimiter.go ../ratelimiter Limiter -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_httpstatus_collector.go ../healthendpoint HTTPStatusCollector -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_database_status.go ../healthendpoint DatabaseStatus -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_emitter.go ../metricsgateway Emitter -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_operator.go ../operator Operator -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fake_sychronizer.go ../scalingengine/schedule ActiveScheduleSychronizer diff --git a/src/autoscaler/generate-fakes.go b/src/autoscaler/generate-fakes.go new file mode 100644 index 0000000000..536f6d59d9 --- /dev/null +++ b/src/autoscaler/generate-fakes.go @@ -0,0 +1,30 @@ +package fakes + +// Multiple go:generate directives instead of counterfeiter:generate due to https://github.com/maxbrunsfeld/counterfeiter/issues/254 +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_wshelper.go ./metricsgateway/helpers WSHelper +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_cf_client.go ./cf CFClient +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_policy_db.go ./db PolicyDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_scalingengine_db.go ./db ScalingEngineDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_scheduler_db.go ./db SchedulerDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_scalingengine.go ./scalingengine ScalingEngine +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_binding_db.go ./db BindingDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_app_metric_db.go ./db AppMetricDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_instancemetrics_db.go ./db InstanceMetricsDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_credentials.go ./cred_helper Credentials +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_storedprocedure_db.go ./db StoredProcedureDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_metric_forwarder.go ./metricsforwarder/forwarder MetricForwarder +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_plan_checker.go ./api/plancheck PlanChecker +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_log_cache_client.go ./eventgenerator/client LogCacheClientReader +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_envelope_processor.go ./envelopeprocessor EnvelopeProcessor +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_log_cache_creator.go ./eventgenerator/client LogCacheClientCreator +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_metric_server_creator_creator.go ./eventgenerator/client MetricServerClientCreator +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_go_log_cache_client.go ./eventgenerator/client GoLogCacheClient +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_grpc.go ./eventgenerator/client GRPCOptions +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_envelope_processor_creator.go ./envelopeprocessor EnvelopeProcessorCreator +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_plan_checker.go ./api/plancheck PlanChecker +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_ratelimiter.go ./ratelimiter Limiter +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_httpstatus_collector.go ./healthendpoint HTTPStatusCollector +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_database_status.go ./healthendpoint DatabaseStatus +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_emitter.go ./metricsgateway Emitter +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_operator.go ./operator Operator +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_sychronizer.go ./scalingengine/schedule ActiveScheduleSychronizer diff --git a/src/changelog/Makefile b/src/changelog/Makefile index 9456abdcfd..3f6cc342aa 100644 --- a/src/changelog/Makefile +++ b/src/changelog/Makefile @@ -1,18 +1,30 @@ SHELL := /bin/bash -.SHELLFLAGS = -euo pipefail -c -MAKEFLAGS = -s +.SHELLFLAGS := -eu -o pipefail -c +MAKEFLAGS := -s + GO := GO111MODULE=on GO15VENDOREXPERIMENT=1 go GO_NOMOD := GO111MODULE=off go -GO_VERSION := $(shell $(GO) version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/') -GO_DEPENDENCIES := $(shell find . -type f -name '*.go') -PACKAGE_DIRS := $(shell $(GO) list ./... | grep -v /vendor/ | grep -v e2e) -CGO_ENABLED = 0 -export GOWORK=off +GO_VERSION := $(shell ${GO} version | sed --expression='s/^[^0-9.]*\([0-9.]*\).*/\1/') +GO_DEPENDENCIES = $(shell find . -type f -name '*.go') +PACKAGE_DIRS = $(shell ${GO} list './...' | grep --invert-match --regexp='/vendor/' \ + | grep --invert-match --regexp='e2e') + +CGO_ENABLED := 0 +export GOWORK := off BUILDTAGS := -GINKGO_VERSION=v$(shell cat ../../.tool-versions | grep ginkgo | cut -d " " -f 2 ) -GOLANGCI_LINT_VERSION=v$(shell cat ../../.tool-versions | grep golangci-lint | cut -d " " -f 2 ) +GINKGO_VERSION = v$(shell cat '../../.tool-versions' | grep --regexp='ginkgo' \ + | cut --delimiter=' ' --fields='2') +GOLANGCI_LINT_VERSION = v$(shell cat '../../.tool-versions' | grep --regexp='golangci-lint' \ + | cut --delimiter=' ' --fields='2' ) + + +.PHONY: go-mod-tidy +go-mod-tidy: + go mod tidy + + build: @echo "# building changelog" @@ -27,9 +39,9 @@ build_test-%: cd $* &&\ for package in $$( go list ./... | sed 's|.*/autoscaler/$*|.|' | awk '{ print length, $$0 }' | sort -n -r | cut -d" " -f2- );\ do\ - export test_file=$${build_folder}/$${package}.test;\ - echo " - compiling $${package} to $${test_file}";\ - go test -c -o $${test_file} $${package};\ + export test_file=$${build_folder}/$${package}.test;\ + echo " - compiling $${package} to $${test_file}";\ + go test -c -o $${test_file} $${package};\ done; check: fmt lint build test diff --git a/src/changeloglockcleaner/Makefile b/src/changeloglockcleaner/Makefile index 127a46c7ea..1a4a060222 100644 --- a/src/changeloglockcleaner/Makefile +++ b/src/changeloglockcleaner/Makefile @@ -1,18 +1,30 @@ SHELL := /bin/bash -.SHELLFLAGS = -euo pipefail -c -MAKEFLAGS = -s +.SHELLFLAGS := -eu -o pipefail -c +MAKEFLAGS := -s + GO := GO111MODULE=on GO15VENDOREXPERIMENT=1 go GO_NOMOD := GO111MODULE=off go -GO_VERSION := $(shell $(GO) version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/') -GO_DEPENDENCIES := $(shell find . -type f -name '*.go') -PACKAGE_DIRS := $(shell $(GO) list ./... | grep -v /vendor/ | grep -v e2e) -CGO_ENABLED = 0 -export GOWORK=off +GO_VERSION := $(shell ${GO} version | sed --expression='s/^[^0-9.]*\([0-9.]*\).*/\1/') +GO_DEPENDENCIES = $(shell find . -type f -name '*.go') +PACKAGE_DIRS = $(shell ${GO} list './...' | grep --invert-match --regexp='/vendor/' \ + | grep --invert-match --regexp='e2e') + +CGO_ENABLED := 0 +export GOWORK := off BUILDTAGS := -GINKGO_VERSION=v$(shell cat ../../.tool-versions | grep ginkgo | cut -d " " -f 2 ) -GOLANGCI_LINT_VERSION=v$(shell cat ../../.tool-versions | grep golangci-lint | cut -d " " -f 2 ) +GINKGO_VERSION = v$(shell cat '../../.tool-versions' | grep --regexp='ginkgo' \ + | cut --delimiter=' ' --fields='2') +GOLANGCI_LINT_VERSION = v$(shell cat '../../.tool-versions' | grep --regexp='golangci-lint' \ + | cut --delimiter=' ' --fields='2' ) + + +.PHONY: go-mod-tidy +go-mod-tidy: + go mod tidy + + build: @echo "# building changeloglockcleaner" @@ -27,9 +39,9 @@ build_test-%: cd $* &&\ for package in $$( go list ./... | sed 's|.*/autoscaler/$*|.|' | awk '{ print length, $$0 }' | sort -n -r | cut -d" " -f2- );\ do\ - export test_file=$${build_folder}/$${package}.test;\ - echo " - compiling $${package} to $${test_file}";\ - go test -c -o $${test_file} $${package};\ + export test_file=$${build_folder}/$${package}.test;\ + echo " - compiling $${package} to $${test_file}";\ + go test -c -o $${test_file} $${package};\ done; check: fmt lint build test @@ -53,4 +65,3 @@ lint: lint-fix: go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run --fix - From 81ad9f49f7638a85e48dd072010ac6e62fccfd04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 15 Sep 2023 17:23:59 +0200 Subject: [PATCH 241/294] Adapt workflows; --- .github/workflows/bosh-release-checks.yaml | 2 +- ...ncy-update.go-mod-tidy_and_make-package-specs.yaml | 11 ++++++++--- .github/workflows/tidy-go-mod.yaml | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bosh-release-checks.yaml b/.github/workflows/bosh-release-checks.yaml index bb6a139e58..1048639cc8 100644 --- a/.github/workflows/bosh-release-checks.yaml +++ b/.github/workflows/bosh-release-checks.yaml @@ -46,7 +46,7 @@ jobs: run: | set -e export PATH=$PATH:/usr/local/maven/bin - make mod-tidy vendor db scheduler + make go-mod-tidy vendor db scheduler - name: Build Dev Release id: build diff --git a/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml b/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml index 3b3b4e54cb..62e46359a0 100644 --- a/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml +++ b/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml @@ -62,13 +62,18 @@ jobs: exit 0 fi + # Generated files are needed for `go mod tidy` which is a dependency of the + # target `package-specs`. However the generation of them itself already + # requires go-modules to be tidied up. So we need to generate the files + # before changing `go.mod` and `go.sum`. declare -r current_branch="$(git branch --show-current)" git checkout 'HEAD~1' - pushd './src/acceptance/assets/app/go_app' - make generate - popd + make --directory='./src/acceptance/assets/app/go_app' generate-fakes + make --directory='./src/autoscaler' generate-fakes git checkout "${current_branch}" + # ⚠️ For this workflow to be successful, the subsequent line must not + # trigger again the creation of the generated files. make package-specs declare -i -r changed_files=$(git status --porcelain | wc --lines) diff --git a/.github/workflows/tidy-go-mod.yaml b/.github/workflows/tidy-go-mod.yaml index 6bf8f7b984..ed1c27c028 100644 --- a/.github/workflows/tidy-go-mod.yaml +++ b/.github/workflows/tidy-go-mod.yaml @@ -19,7 +19,7 @@ jobs: run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" - name: run go mod tidy on all .mod's - run: make mod-tidy + run: make go-mod-tidy - name: Check if there is any change id: get_changes From 43d0c94d6ea4b794e1ba6742aacee9b2fdea3e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 15 Sep 2023 17:48:29 +0200 Subject: [PATCH 242/294] Revert "Try to live with dependency on `go.mod` for generated code." and apply to others This reverts commit 541bb4369a22f10f4d07829fb3394f6e4dceff34 but applies the same changes to other files as well. --- src/acceptance/assets/app/go_app/Makefile | 12 ++++++++++-- src/autoscaler/Makefile | 10 +++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/acceptance/assets/app/go_app/Makefile b/src/acceptance/assets/app/go_app/Makefile index 676d7c9d14..9fcad48bc8 100644 --- a/src/acceptance/assets/app/go_app/Makefile +++ b/src/acceptance/assets/app/go_app/Makefile @@ -1,9 +1,11 @@ .ONESHELL: SHELL := /bin/bash .SHELLFLAGS := -eu -o pipefail -c ${SHELLFLAGS} +aes_terminal_font_yellow := \e[38;2;255;255;0m +aes_terminal_reset := \e[0m # TODO: Do we need the next line? -MAKEFLAGS= +MAKEFLAGS = GO_VERSION = $(shell go version | sed --expression='s/^[^0-9.]*\([0-9.]*\).*/\1/') GO_DEPENDENCIES = $(shell find . -type f -name '*.go') @@ -32,7 +34,13 @@ app-fakes-files := $(wildcard ${app-fakes-dir}/*.go) .PHONY: generate-fakes generate-fakes: ${app-fakes-dir} ${app-fakes-files} -${app-fakes-dir} ${app-fakes-files} &: ./go.mod ./internal/generate.go ${openapi-specs-list} +${app-fakes-dir} ${app-fakes-files} &: ./internal/generate.go ${openapi-specs-list} + @echo -ne '${aes_terminal_font_yellow}' + @echo -e '⚠️ The client-fakes generated from the openapi-specification depend on\n' \ + 'the files ./go.mod and ./go.sum. This has not been reflected in this\n' \ + 'make-target to avoid cyclic dependencies because `go mod tidy`, which\n' \ + 'modifies both files, depends itself on the client-fakes.' + @echo -ne '${aes_terminal_reset}' go generate ./... diff --git a/src/autoscaler/Makefile b/src/autoscaler/Makefile index 61e8a4346d..60cff2e904 100644 --- a/src/autoscaler/Makefile +++ b/src/autoscaler/Makefile @@ -1,6 +1,8 @@ SHELL := /bin/bash .SHELLFLAGS := -eu -o pipefail -c MAKEFLAGS := -s +aes_terminal_font_yellow := \e[38;2;255;255;0m +aes_terminal_reset := \e[0m GO_VERSION = $(shell go version | sed --expression='s/^[^0-9.]*\([0-9.]*\).*/\1/') GO_DEPENDENCIES = $(shell find . -type f -name '*.go') @@ -29,7 +31,13 @@ app-fakes-files := $(wildcard ${app-fakes-dir}/*.go) .PHONY: generate-fakes generate-fakes: ${app-fakes-dir} ${app-fakes-files} -${app-fakes-dir} ${app-fakes-files} &: ./go.mod ./generate-fakes.go +${app-fakes-dir} ${app-fakes-files} &: ./generate-fakes.go + @echo -ne '${aes_terminal_font_yellow}' + @echo -e '⚠️ The client-fakes generated from the openapi-specification depend on\n' \ + 'the files ./go.mod and ./go.sum. This has not been reflected in this\n' \ + 'make-target to avoid cyclic dependencies because `go mod tidy`, which\n' \ + 'modifies both files, depends itself on the client-fakes.' + @echo -ne '${aes_terminal_reset}' @echo "# Generating counterfeits" mkdir -p '${app-fakes-dir}' COUNTERFEITER_NO_GENERATE_WARNING='true' go generate ./... From b7d28083402c46a84a3ba674906a72e62592ac29 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 06:55:20 +0000 Subject: [PATCH 243/294] chore(deps): lock file maintenance (#2157) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 4 +- .../github-arc-team-wg-ci/.terraform.lock.hcl | 54 +++++++++---------- jobs/Gemfile.lock | 4 +- spec/Gemfile.lock | 4 +- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c6de4dca97..59613ec56d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -35,7 +35,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.56.2) + rubocop (1.56.3) base64 (~> 0.1.1) json (~> 2.3) language_server-protocol (>= 3.17.0) @@ -49,7 +49,7 @@ GEM unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.29.0) parser (>= 3.2.1.0) - rubocop-performance (1.19.0) + rubocop-performance (1.19.1) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) diff --git a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl index 456861db52..c695f55e62 100644 --- a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl +++ b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl @@ -19,19 +19,19 @@ provider "registry.terraform.io/gavinbunney/kubectl" { } provider "registry.terraform.io/hashicorp/google" { - version = "4.81.0" + version = "4.82.0" hashes = [ - "h1:DI4A02gm/UWqVBjcBRF4hyA+BxFaM9uyQ0ULiaY5q5U=", - "h1:E1zHwlFFs6cFfYor3+aVTvle5r9m6ZGusBn5Q19Et64=", - "h1:GVaAq1vKmccWL0TS5g225hzUkx8W66QKg0W7H83+cUA=", - "h1:HS0XxjsJxYNeyd2COU1Lc3swrKgCv3iIi/ay2Q/xtaI=", - "h1:TKydY88LYRsHJ05icwCU0NNy8ANWinWcs5teuSXVF2k=", - "h1:dADRDQUkYJwwxwrYbZZcOV/SFRrpq3iU2sRSn2ip78k=", - "h1:frqnFqxUCrFzNZhuAbMLo9KqXRNnTJssvR7USuq8/kY=", - "h1:nD0kJSonVXFC1y5blicnLEsGYSkaC7T1zTVig+gI1Dk=", - "h1:nalbTQAn81Spx5arUAAj0N2tbUB7qXywYYm36WA+LQI=", - "h1:t+9t5oXrHA4fniouJ5DNXqfIKKbsttEPh/a6ctW/zWc=", - "h1:xSUmms3luR4lExNyMcYfVZnxdnrJ8wnl++MXxQBf0ck=", + "h1:+fK/35ZXJpT9ObamkkfPv04ckI7/vZz2HD7YaX+FmRE=", + "h1:1WSWw0nEixwpVOTdVaqHIobHrr6EIEgRPses2e0VGkA=", + "h1:2Kq0hZJN97SEHgs6Yc3ZVXY2dsAVFNcAm6ElHXzPNVE=", + "h1:3m7SjHQ6oacGPsBmohGxou14slyFj1hH5FHHbxbVwgM=", + "h1:L5uRqRT63VLPVHzd57xMkNmLf+liFVt7KxcdZNwWmxA=", + "h1:SBzw5m2gpWPLp5YYRJfFqgjCpWQmHONBZNTFaITx1mQ=", + "h1:UCXQC3JJhSE55qmfUIS1AUftH5odVHEwMZokkbnkWGw=", + "h1:VerLMJ2+xfYFYSYXa/i6tPMEpUQuW3nEtFk1I0BYxhI=", + "h1:cgic5im+btaiU54EuPO73+ewYuAZhazPBULTyW0AxSo=", + "h1:yobHGNuj2Z0WDd3w5QD4KX1x7+zP/1u13Khe1pCYz1Y=", + "h1:zNCqgTX3ZOgNe+5XIzXEn2/WVzph98RUNL+gs946I/M=", ] } @@ -53,21 +53,21 @@ provider "registry.terraform.io/hashicorp/kubernetes" { } provider "registry.terraform.io/integrations/github" { - version = "5.35.0" + version = "5.37.0" hashes = [ - "h1:3xSiXBeZKNCPfnCWiKWjW7ukmd6EUB3h3LTlyy5aW+0=", - "h1:9lEwI7xut53p35ScAoVcvrSXOW9VdsxeeX3CIeMeX14=", - "h1:DkPJLp+6G0jybjk7FCYSZvSKglXbtp/e4xdFRMrfAYk=", - "h1:FOXgzZ/xgZt6OsQ3m5HAIX4usYLiKW9J51u4mItqqZ4=", - "h1:FQ0P4u/jrhbN+uAdM0IkJ+ocB1wrqTJQIY9PCyd0IgE=", - "h1:HdQx+n1/ybGmcg/3q+TNmgUVeSWiKggTGW44ZB4D7x8=", - "h1:KTwCJbAW8Wp3QT7WW60PzyLM5vRup7MeN4ReP31hmCc=", - "h1:bpuWgrF1jH7Pebm0heVt9jlCL/TuP1g1b6KJmsAaQBE=", - "h1:cb6h49eXpQYHiYVd86sst51qbW3D82dTLpR+OMcdjSE=", - "h1:nhTRKcQRvEu26dfOy+aDpdZD2mrxPbJJxXRJz5jVSa0=", - "h1:qFjAVmx1Taxf2cJGykcbXj1Obt5++vt88wg3RUjJCGE=", - "h1:qLgZRUUwj9DBlwpvBsWskHkYOlVGU/Pv5Z2YxK0rLjE=", - "h1:tH2Ec5vqFYMMWnksd8zKsjq4t+4H648NL04a8XoP6M0=", - "h1:wJERE8kfD/cUhfE5cE3WC4r996ngEcpr5PyQUdW9/tM=", + "h1:3tKH/krwuaSzYkMmp2xUcSLnLRvFzQLC3ayMesZCEkI=", + "h1:3uaqonpfNk8M0arDVv7i06/lu9DgL4HgQZy1dC/Q4/Y=", + "h1:9fj1PezB73toNyS9ICz9QPq0Y1jxbpoTsuQq1HgXp9I=", + "h1:LznPgweBBPqZqHiPs8ZfR7ZApU/K6LzzCfvP5dKz3mU=", + "h1:NpU2Fcx90IsYhU5Bwc1+3btr+OfJVnydIWu6wJ3BF+E=", + "h1:QFomzv/9K0y7ll5he/Lj4mBeHoB3hPJu4ViMJy3zCb0=", + "h1:UznYN15+EFAEgKp9Oj20KX/K5LxamCc/zjg9cZ7Onhc=", + "h1:bnrhlBIAlluDFqs34wAvm1e9Bte++YkpuW9AKY0I7B0=", + "h1:mYoDpam3koAsEyd6XnKxBII2Lz+uKNIejzngdS+ERcs=", + "h1:ohj/etspnqRu+bxCiC1tAKetZMPWDJZeQBf/NmvKkiE=", + "h1:orcV73iUr6mfo3p+a/y+MZ0EDd461ucHIXcwK59rLaI=", + "h1:qorCAV/FNYW5PwzX7AV8O4ue9cAtNaT1foPjpxjoMVY=", + "h1:uGDZ3k4/9LxyKCrU6qxh+wWJFFXocCH+m25cQ9WeQuo=", + "h1:uPmf3/0IVrCHUx55PltKKFDa2RnZtIfOaHid7LMXACU=", ] } diff --git a/jobs/Gemfile.lock b/jobs/Gemfile.lock index c6de4dca97..59613ec56d 100644 --- a/jobs/Gemfile.lock +++ b/jobs/Gemfile.lock @@ -35,7 +35,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.56.2) + rubocop (1.56.3) base64 (~> 0.1.1) json (~> 2.3) language_server-protocol (>= 3.17.0) @@ -49,7 +49,7 @@ GEM unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.29.0) parser (>= 3.2.1.0) - rubocop-performance (1.19.0) + rubocop-performance (1.19.1) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) diff --git a/spec/Gemfile.lock b/spec/Gemfile.lock index 356e6b76e5..7f18148f88 100644 --- a/spec/Gemfile.lock +++ b/spec/Gemfile.lock @@ -35,7 +35,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.56.2) + rubocop (1.56.3) base64 (~> 0.1.1) json (~> 2.3) language_server-protocol (>= 3.17.0) @@ -49,7 +49,7 @@ GEM unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.29.0) parser (>= 3.2.1.0) - rubocop-performance (1.19.0) + rubocop-performance (1.19.1) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) From 82c9d757a8e2ab284bc2d5e950772cd737140360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Mon, 18 Sep 2023 10:57:09 +0200 Subject: [PATCH 244/294] Switch to order-only dependencies for `go-mod-tidy`. --- src/acceptance/assets/app/go_app/Makefile | 30 +++++++++++++++++------ src/autoscaler/Makefile | 30 ++++++++++++++++------- 2 files changed, 43 insertions(+), 17 deletions(-) diff --git a/src/acceptance/assets/app/go_app/Makefile b/src/acceptance/assets/app/go_app/Makefile index 9fcad48bc8..74ccec8c02 100644 --- a/src/acceptance/assets/app/go_app/Makefile +++ b/src/acceptance/assets/app/go_app/Makefile @@ -29,24 +29,38 @@ GOLANGCI_LINT_VERSION = v$(shell cat ../../../../../.tool-versions | grep --rege openapi-spec-path := ../../../../../api openapi-specs-list := $(wildcard ${openapi-spec-path}/*.openapi.yaml) + +# The presence of the subsequent directory indicates wheather the fakes still need to be generated +# or not. app-fakes-dir := ./internal/app/appfakes app-fakes-files := $(wildcard ${app-fakes-dir}/*.go) .PHONY: generate-fakes generate-fakes: ${app-fakes-dir} ${app-fakes-files} -${app-fakes-dir} ${app-fakes-files} &: ./internal/generate.go ${openapi-specs-list} - @echo -ne '${aes_terminal_font_yellow}' - @echo -e '⚠️ The client-fakes generated from the openapi-specification depend on\n' \ - 'the files ./go.mod and ./go.sum. This has not been reflected in this\n' \ - 'make-target to avoid cyclic dependencies because `go mod tidy`, which\n' \ - 'modifies both files, depends itself on the client-fakes.' - @echo -ne '${aes_terminal_reset}' +${app-fakes-dir} ${app-fakes-files} &: ./go.mod ./go.sum ./internal/generate.go ${openapi-specs-list} go generate ./... +# The generated fakes are order-only dependencies for `go-mod-tidy`. The reason is, that for +# `go-mod-tidy` the generated fakes need to be present but fortunately not necessarily +# up-to-date. This is fortunate because the generation of the fake requires the files `go.mod` and +# `go.sum` to be already tidied up, introducing a cyclic dependency otherwise. But that would make +# any modification to `go.mod` or `go.sum` impossible. This definition now makes it possible to +# update `go.mod` and `go.sum` as follows: +# 1. `make generate-fakes` +# 2. Update `go.mod` and/or `go.sum` +# 3. `make go-mod-tidy` +# 4. Optionally: `make generate-fakes` to update the fakes as well. +# +# For more information on order-only dependencies, see: +# .PHONY: go-mod-tidy -go-mod-tidy: ${app-fakes-dir} ${app-fakes-files} +go-mod-tidy: ./go.mod ./go.sum ${GO_DEPENDENCIES} | ${app-fakes-dir} ${app-fakes-files} + @echo -ne '${aes_terminal_font_yellow}' + @echo -e '⚠️ Warning: The client-fakes generated from the openapi-specification may be\n' \ + 'outdated. Please consider re-generating them, if this is relevant.' + @echo -ne '${aes_terminal_reset}' go mod tidy diff --git a/src/autoscaler/Makefile b/src/autoscaler/Makefile index 60cff2e904..c12357694a 100644 --- a/src/autoscaler/Makefile +++ b/src/autoscaler/Makefile @@ -25,27 +25,39 @@ export GO111MODULE=on GINKGO_OPTS=-r --race --require-suite --randomize-all --cover ${OPTS} GINKGO_VERSION=v$(shell cat ../../.tool-versions | grep ginkgo | cut -d " " -f 2 ) - +# The presence of the subsequent directory indicates wheather the fakes still need to be generated +# or not. app-fakes-dir := ./fakes app-fakes-files := $(wildcard ${app-fakes-dir}/*.go) .PHONY: generate-fakes generate-fakes: ${app-fakes-dir} ${app-fakes-files} -${app-fakes-dir} ${app-fakes-files} &: ./generate-fakes.go - @echo -ne '${aes_terminal_font_yellow}' - @echo -e '⚠️ The client-fakes generated from the openapi-specification depend on\n' \ - 'the files ./go.mod and ./go.sum. This has not been reflected in this\n' \ - 'make-target to avoid cyclic dependencies because `go mod tidy`, which\n' \ - 'modifies both files, depends itself on the client-fakes.' - @echo -ne '${aes_terminal_reset}' +${app-fakes-dir} ${app-fakes-files} &: ./go.mod ./go.sum ./generate-fakes.go @echo "# Generating counterfeits" mkdir -p '${app-fakes-dir}' COUNTERFEITER_NO_GENERATE_WARNING='true' go generate ./... +# The generated fakes are order-only dependencies for `go-mod-tidy`. The reason is, that for +# `go-mod-tidy` the generated fakes need to be present but fortunately not necessarily +# up-to-date. This is fortunate because the generation of the fake requires the files `go.mod` and +# `go.sum` to be already tidied up, introducing a cyclic dependency otherwise. But that would make +# any modification to `go.mod` or `go.sum` impossible. This definition now makes it possible to +# update `go.mod` and `go.sum` as follows: +# 1. `make generate-fakes` +# 2. Update `go.mod` and/or `go.sum` +# 3. `make go-mod-tidy` +# 4. Optionally: `make generate-fakes` to update the fakes as well. +# +# For more information on order-only dependencies, see: +# .PHONY: go-mod-tidy -go-mod-tidy: ${app-fakes-dir} ${app-fakes-files} +go-mod-tidy: ./go.mod ./go.sum ${GO_DEPENDENCIES} | ${app-fakes-dir} ${app-fakes-files} + @echo -ne '${aes_terminal_font_yellow}' + @echo -e '⚠️ Warning: The client-fakes generated from the openapi-specification may be\n' \ + 'outdated. Please consider re-generating them, if this is relevant.' + @echo -ne '${aes_terminal_reset}' go mod tidy From a908827fd7e083d831b34102243da90a4696f45a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 09:06:28 +0000 Subject: [PATCH 245/294] chore(deps): update dependency gruntwork-io/terragrunt to v0.51.0 (#2149) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index a41aefdb96..a2571d987a 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.5 terraform 1.5.7 terraform-lsp -terragrunt 0.50.17 +terragrunt 0.51.0 From 3b022d1e57b3466a9065573e278ccd776707c648 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 23:39:28 +0000 Subject: [PATCH 246/294] chore(deps): update dependency terragrunt to v0.51.1 (#2156) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index a2571d987a..6bab1ed592 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.5 terraform 1.5.7 terraform-lsp -terragrunt 0.51.0 +terragrunt 0.51.1 From 6535415c26e06babfee48254af5a136d81d5fc65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Tue, 19 Sep 2023 10:29:13 +0200 Subject: [PATCH 247/294] Fix the filters for the affected workflow; --- ...pendency-update.go-mod-tidy_and_make-package-specs.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml b/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml index 62e46359a0..a7ab104008 100644 --- a/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml +++ b/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml @@ -1,13 +1,14 @@ name: "renovate-/ospo-bot: go mod tidy and make package-specs" on: - push: + [pull_request, push]: branches: - "renovate/**" - "dependabot/**" paths: - ".github/workflows/dependency-update-go-mod-tidy.yaml" - - "./src/**/go.mod" - - "./src/**/go.sum" + - "src/**/go.mod" + - "src/**/go.sum" + workflow_dispatch: {} jobs: go-mod-tidy: runs-on: ubuntu-latest From 69b5dd916ec0429198ed0e7f6c83fbe01c9984b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Tue, 19 Sep 2023 10:33:50 +0200 Subject: [PATCH 248/294] Fix missing re-naming of make-target; --- README.md | 2 +- ci/autoscaler/pipeline.yml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 31ce351bab..df3ad68cb6 100644 --- a/README.md +++ b/README.md @@ -216,7 +216,7 @@ The purpose of this bosh release is to deploy and setup the [app-autoscaler](htt ```sh git clone https://github.com/cloudfoundry/app-autoscaler-release cd app-autoscaler-release - make mod-tidy vendor db scheduler + make go-mod-tidy vendor db scheduler bosh create-release bosh -e YOUR_ENV upload-release ``` diff --git a/ci/autoscaler/pipeline.yml b/ci/autoscaler/pipeline.yml index 4b6b82ff89..b07988b944 100644 --- a/ci/autoscaler/pipeline.yml +++ b/ci/autoscaler/pipeline.yml @@ -236,7 +236,7 @@ jobs: - task: make-prerelease file: ci/ci/autoscaler/tasks/make/make.yml params: - TARGETS: mod-tidy vendor db scheduler + TARGETS: go-mod-tidy vendor db scheduler - task: deploy-autoscaler file: ci/ci/autoscaler/tasks/deploy-autoscaler.yml params: @@ -282,7 +282,7 @@ jobs: - task: make-prerelease file: ci/ci/autoscaler/tasks/make/make.yml params: - TARGETS: mod-tidy vendor db scheduler + TARGETS: go-mod-tidy vendor db scheduler - task: deploy-autoscaler file: ci/ci/autoscaler/tasks/deploy-autoscaler.yml params: @@ -330,7 +330,7 @@ jobs: - task: make-prerelease file: ci/ci/autoscaler/tasks/make/make.yml params: - TARGETS: mod-tidy vendor db scheduler + TARGETS: go-mod-tidy vendor db scheduler - task: deploy-autoscaler file: ci/ci/autoscaler/tasks/deploy-autoscaler.yml params: @@ -367,7 +367,7 @@ jobs: - task: make-prerelease file: ci/ci/autoscaler/tasks/make/make.yml params: - TARGETS: mod-tidy vendor db scheduler + TARGETS: go-mod-tidy vendor db scheduler - task: deploy-autoscaler file: ci/ci/autoscaler/tasks/deploy-autoscaler.yml params: @@ -424,7 +424,7 @@ jobs: - task: make-prerelease file: ci/ci/autoscaler/tasks/make/make.yml params: - TARGETS: mod-tidy vendor db scheduler + TARGETS: go-mod-tidy vendor db scheduler - task: deploy-autoscaler file: ci/ci/autoscaler/tasks/deploy-autoscaler.yml params: @@ -453,7 +453,7 @@ jobs: - task: make-prerelease file: ci/ci/autoscaler/tasks/make/make.yml params: - TARGETS: mod-tidy vendor db scheduler + TARGETS: go-mod-tidy vendor db scheduler - task: release-autoscaler file: ci/ci/autoscaler/tasks/release-autoscaler.yml params: From 0fe7e9c079b10c2ef47fce930887a1626e26f218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Tue, 19 Sep 2023 14:14:43 +0200 Subject: [PATCH 249/294] Switch from event-list to alias-nodes; --- .../dependency-update.go-mod-tidy_and_make-package-specs.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml b/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml index a7ab104008..1c8895efa2 100644 --- a/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml +++ b/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml @@ -1,6 +1,6 @@ name: "renovate-/ospo-bot: go mod tidy and make package-specs" on: - [pull_request, push]: + pull_request: &on-filter branches: - "renovate/**" - "dependabot/**" @@ -8,6 +8,7 @@ on: - ".github/workflows/dependency-update-go-mod-tidy.yaml" - "src/**/go.mod" - "src/**/go.sum" + push: *on-filter workflow_dispatch: {} jobs: go-mod-tidy: From 9ed18cee18434ba210f6ce90655cd230654061ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Tue, 19 Sep 2023 14:15:41 +0200 Subject: [PATCH 250/294] Adds lsp-implementation for yaml; --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 01f0cdf312..3797b22442 100644 --- a/flake.nix +++ b/flake.nix @@ -37,6 +37,7 @@ google-cloud-sdk maven nodejs + nodePackages.yaml-language-server # # We use the binary-buildpack and nix-build-results have set the wrong ELF-Interpreter. # # For more background, see: # # From 73a41472cec7f0c81a638424f81df8995a765989 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 20 Sep 2023 02:17:35 +0000 Subject: [PATCH 251/294] chore(deps): update dependency ginkgo to v2.12.1 (#2160) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/dockerfiles/autoscaler-deploy/Dockerfile | 2 +- ci/dockerfiles/autoscaler-tools/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/dockerfiles/autoscaler-deploy/Dockerfile b/ci/dockerfiles/autoscaler-deploy/Dockerfile index b8de36da4f..40bf5684f4 100644 --- a/ci/dockerfiles/autoscaler-deploy/Dockerfile +++ b/ci/dockerfiles/autoscaler-deploy/Dockerfile @@ -91,7 +91,7 @@ RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.c gcloud version # renovate: datasource=github-releases depName=ginkgo lookupName=onsi/ginkgo -ARG GINKGO_VERSION=v2.12.0 +ARG GINKGO_VERSION=v2.12.1 RUN go install github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} &&\ ginkgo version diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index aa8de9788e..f07b0a46bf 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -129,7 +129,7 @@ RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.c gcloud version # renovate: datasource=github-releases depName=ginkgo lookupName=onsi/ginkgo -ARG GINKGO_VERSION=v2.12.0 +ARG GINKGO_VERSION=v2.12.1 RUN go install github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} && \ ginkgo version From 3b3d4d97467143db1dee4716527a1482ff0e0ddd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Sep 2023 04:33:05 +0000 Subject: [PATCH 252/294] Bump github.com/onsi/ginkgo/v2 from 2.12.0 to 2.12.1 in /src/autoscaler (#2162) Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.12.0 to 2.12.1. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.12.0...v2.12.1) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 6f53ff213f..99213d2817 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -21,7 +21,7 @@ require ( github.com/jmoiron/sqlx v1.3.5 github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0 github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d - github.com/onsi/ginkgo/v2 v2.12.0 + github.com/onsi/ginkgo/v2 v2.12.1 github.com/onsi/gomega v1.27.10 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pivotal-cf/brokerapi/v10 v10.0.0 diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index b1e6d8000a..ec5ab7401d 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -917,8 +917,8 @@ github.com/onsi/ginkgo/v2 v2.9.0/go.mod h1:4xkjoL/tZv4SMWeww56BU5kAt19mVB47gTWxm github.com/onsi/ginkgo/v2 v2.9.1/go.mod h1:FEcmzVcCHl+4o9bQZVab+4dC9+j+91t2FHSzmGAPfuo= github.com/onsi/ginkgo/v2 v2.9.2/go.mod h1:WHcJJG2dIlcCqVfBAwUCrJxSPFb6v4azBwgxeMeDuts= github.com/onsi/ginkgo/v2 v2.9.4/go.mod h1:gCQYp2Q+kSoIj7ykSVb9nskRSsR6PUj4AiLywzIhbKM= -github.com/onsi/ginkgo/v2 v2.12.0 h1:UIVDowFPwpg6yMUpPjGkYvf06K3RAiJXUhCxEwQVHRI= -github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ= +github.com/onsi/ginkgo/v2 v2.12.1 h1:uHNEO1RP2SpuZApSkel9nEh1/Mu+hmQe7Q+Pepg5OYA= +github.com/onsi/ginkgo/v2 v2.12.1/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= From 53a131bfeabee8bcc2643e25cefc39d37716c770 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 20 Sep 2023 07:22:43 +0000 Subject: [PATCH 253/294] chore(deps): update dependency rhysd/actionlint to v1.6.26 (#2158) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index 46d2b40f3a..2f75527a7a 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,5 +1,5 @@ act 0.2.50 -actionlint 1.6.25 +actionlint 1.6.26 bosh 7.4.0 cf 8.7.3 concourse 7.10.0 From b95dd10893d6c0a4d773cedcb34ad584a71ec868 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 20 Sep 2023 07:22:54 +0000 Subject: [PATCH 254/294] chore(deps): update dependency gruntwork-io/terragrunt to v0.51.3 (#2161) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 6bab1ed592..ec9068b5e2 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.5 terraform 1.5.7 terraform-lsp -terragrunt 0.51.1 +terragrunt 0.51.3 From 2219479edec083e63dde3a730bfd0ecdcf678f3a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Sep 2023 07:23:19 +0000 Subject: [PATCH 255/294] Bump github.com/onsi/ginkgo/v2 in /src/changeloglockcleaner (#2165) Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.12.0 to 2.12.1. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.12.0...v2.12.1) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/changeloglockcleaner/go.mod | 4 ++-- src/changeloglockcleaner/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/changeloglockcleaner/go.mod b/src/changeloglockcleaner/go.mod index bfd9d9f3c1..cbcd0b0b20 100644 --- a/src/changeloglockcleaner/go.mod +++ b/src/changeloglockcleaner/go.mod @@ -6,7 +6,7 @@ require ( github.com/go-sql-driver/mysql v1.7.1 github.com/jackc/pgx/v5 v5.4.3 github.com/jmoiron/sqlx v1.3.5 - github.com/onsi/ginkgo/v2 v2.12.0 + github.com/onsi/ginkgo/v2 v2.12.1 github.com/onsi/gomega v1.27.10 ) @@ -21,7 +21,7 @@ require ( github.com/rogpeppe/go-internal v1.9.0 // indirect golang.org/x/crypto v0.12.0 // indirect golang.org/x/net v0.14.0 // indirect - golang.org/x/sys v0.11.0 // indirect + golang.org/x/sys v0.12.0 // indirect golang.org/x/text v0.12.0 // indirect golang.org/x/tools v0.12.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/src/changeloglockcleaner/go.sum b/src/changeloglockcleaner/go.sum index 112d4e8471..201d0a06de 100644 --- a/src/changeloglockcleaner/go.sum +++ b/src/changeloglockcleaner/go.sum @@ -33,8 +33,8 @@ github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRUbg= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/onsi/ginkgo/v2 v2.12.0 h1:UIVDowFPwpg6yMUpPjGkYvf06K3RAiJXUhCxEwQVHRI= -github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ= +github.com/onsi/ginkgo/v2 v2.12.1 h1:uHNEO1RP2SpuZApSkel9nEh1/Mu+hmQe7Q+Pepg5OYA= +github.com/onsi/ginkgo/v2 v2.12.1/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -52,8 +52,8 @@ golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= From 74f418794e201b34f4e2725c3450546c111316c7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 20 Sep 2023 09:41:33 +0000 Subject: [PATCH 256/294] chore(deps): update dependency onsi/ginkgo to v2.12.1 (#2163) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index 2f75527a7a..84e5323e12 100644 --- a/.tool-versions +++ b/.tool-versions @@ -5,7 +5,7 @@ cf 8.7.3 concourse 7.10.0 direnv 2.32.3 gcloud 446.0.1 -ginkgo 2.12.0 +ginkgo 2.12.1 golang 1.20.5 golangci-lint 1.54.2 java temurin-17.0.8+101 From 6daffa60faeb6988f04656b472a65ef4543d36ef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Sep 2023 10:36:44 +0000 Subject: [PATCH 257/294] Bump github.com/onsi/ginkgo/v2 from 2.12.0 to 2.12.1 in /src/acceptance (#2164) Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.12.0 to 2.12.1. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.12.0...v2.12.1) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/acceptance/go.mod | 4 ++-- src/acceptance/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/acceptance/go.mod b/src/acceptance/go.mod index 9b89f62757..2c31fab6ce 100644 --- a/src/acceptance/go.mod +++ b/src/acceptance/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/cloudfoundry/cf-test-helpers/v2 v2.7.0 - github.com/onsi/ginkgo/v2 v2.12.0 + github.com/onsi/ginkgo/v2 v2.12.1 github.com/onsi/gomega v1.27.10 github.com/stretchr/testify v1.8.4 ) @@ -19,7 +19,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.0 // indirect golang.org/x/net v0.14.0 // indirect - golang.org/x/sys v0.11.0 // indirect + golang.org/x/sys v0.12.0 // indirect golang.org/x/text v0.12.0 // indirect golang.org/x/tools v0.12.0 // indirect google.golang.org/protobuf v1.28.1 // indirect diff --git a/src/acceptance/go.sum b/src/acceptance/go.sum index 705b55dd75..08a3b40682 100644 --- a/src/acceptance/go.sum +++ b/src/acceptance/go.sum @@ -23,8 +23,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/onsi/ginkgo/v2 v2.12.0 h1:UIVDowFPwpg6yMUpPjGkYvf06K3RAiJXUhCxEwQVHRI= -github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ= +github.com/onsi/ginkgo/v2 v2.12.1 h1:uHNEO1RP2SpuZApSkel9nEh1/Mu+hmQe7Q+Pepg5OYA= +github.com/onsi/ginkgo/v2 v2.12.1/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -40,8 +40,8 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= From 69da8e78b2c85cf4a9d1b967e1f35712918d3903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Wed, 20 Sep 2023 14:29:01 +0200 Subject: [PATCH 258/294] Avoid usage of yaml-anchors and -aliases. --- ...update.go-mod-tidy_and_make-package-specs.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml b/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml index 1c8895efa2..f5e08d9775 100644 --- a/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml +++ b/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml @@ -1,6 +1,18 @@ name: "renovate-/ospo-bot: go mod tidy and make package-specs" on: - pull_request: &on-filter + pull_request: + branches: + - "renovate/**" + - "dependabot/**" + paths: + - ".github/workflows/dependency-update-go-mod-tidy.yaml" + - "src/**/go.mod" + - "src/**/go.sum" + push: + # TODO: As soon as Github solves issue + # and this event-configuration remains identical to the one for `pull_request`, + # anchors and aliases may be used, see the official + # [yaml-documentation](). branches: - "renovate/**" - "dependabot/**" @@ -8,7 +20,6 @@ on: - ".github/workflows/dependency-update-go-mod-tidy.yaml" - "src/**/go.mod" - "src/**/go.sum" - push: *on-filter workflow_dispatch: {} jobs: go-mod-tidy: From 16bd7e382f2b4d088ceb896eaa6ae64165be6c6c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 20 Sep 2023 23:50:38 +0000 Subject: [PATCH 259/294] fix(deps): update dependency org.projectlombok:lombok to v1.18.30 (#2167) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- src/scheduler/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scheduler/pom.xml b/src/scheduler/pom.xml index 917fef59b1..31183c56a9 100644 --- a/src/scheduler/pom.xml +++ b/src/scheduler/pom.xml @@ -135,7 +135,7 @@ org.projectlombok lombok - 1.18.28 + 1.18.30 provided From f31d357bca4db600e9649619bc104d9bd846014e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 21 Sep 2023 02:30:13 +0000 Subject: [PATCH 260/294] chore(deps): update google/cloud-sdk docker tag to v447 (#2169) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- ci/terragrunt/.tool-versions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.tool-versions b/.tool-versions index 84e5323e12..8e7c70ebde 100644 --- a/.tool-versions +++ b/.tool-versions @@ -4,7 +4,7 @@ bosh 7.4.0 cf 8.7.3 concourse 7.10.0 direnv 2.32.3 -gcloud 446.0.1 +gcloud 447.0.0 ginkgo 2.12.1 golang 1.20.5 golangci-lint 1.54.2 diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index ec9068b5e2..1b361c0788 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,4 +1,4 @@ -gcloud 446.0.1 +gcloud 447.0.0 helm 3.12.3 python 3.11.5 terraform 1.5.7 From b3d6fbfdca4e441c9a163e585d03af19487725e3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 02:03:50 +0000 Subject: [PATCH 261/294] chore(deps): update dependency gruntwork-io/terragrunt to v0.51.4 (#2171) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 1b361c0788..9e4699c35c 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.5 terraform 1.5.7 terraform-lsp -terragrunt 0.51.3 +terragrunt 0.51.4 From ae39f3ba5c8a9e984a270546203324361edbca6d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 03:22:37 +0000 Subject: [PATCH 262/294] Bump org.springframework.boot:spring-boot-starter-parent in /src (#2172) Bumps [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) from 3.1.3 to 3.1.4. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](https://github.com/spring-projects/spring-boot/compare/v3.1.3...v3.1.4) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter-parent dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/scheduler/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scheduler/pom.xml b/src/scheduler/pom.xml index 31183c56a9..7618772c0a 100644 --- a/src/scheduler/pom.xml +++ b/src/scheduler/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 3.1.3 + 3.1.4 From d5a8be63567a8732cdd20f7055e62599f272e96d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 05:43:36 +0000 Subject: [PATCH 263/294] chore(deps): update dependency credhub-cli to v2.9.21 (#2170) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/dockerfiles/autoscaler-deploy/Dockerfile | 2 +- ci/dockerfiles/autoscaler-tools/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/dockerfiles/autoscaler-deploy/Dockerfile b/ci/dockerfiles/autoscaler-deploy/Dockerfile index 40bf5684f4..9e156601b4 100644 --- a/ci/dockerfiles/autoscaler-deploy/Dockerfile +++ b/ci/dockerfiles/autoscaler-deploy/Dockerfile @@ -60,7 +60,7 @@ RUN wget -q https://github.com/cloudfoundry/bosh-bootloader/releases/download/${ # Install credhub # renovate: datasource=github-releases depName=credhub-cli lookupName=cloudfoundry/credhub-cli -ENV CREDHUB_VERSION 2.9.20 +ENV CREDHUB_VERSION 2.9.21 RUN wget -q https://github.com/cloudfoundry-incubator/credhub-cli/releases/download/${CREDHUB_VERSION}/credhub-linux-${CREDHUB_VERSION}.tgz && \ tar xvfz credhub-linux-${CREDHUB_VERSION}.tgz && \ mv credhub /usr/local/bin/credhub diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index f07b0a46bf..f9b237ea70 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -77,7 +77,7 @@ RUN wget -q https://github.com/cloudfoundry/bosh-bootloader/releases/download/${ # Install credhub # renovate: datasource=github-releases depName=credhub-cli lookupName=cloudfoundry/credhub-cli -ARG CREDHUB_VERSION=2.9.20 +ARG CREDHUB_VERSION=2.9.21 RUN wget -q https://github.com/cloudfoundry/credhub-cli/releases/download/${CREDHUB_VERSION}/credhub-linux-${CREDHUB_VERSION}.tgz && \ tar xvfz credhub-linux-${CREDHUB_VERSION}.tgz && \ mv credhub /usr/local/bin/credhub &&\ From d5069287c9a1c5a214e48fa9193eac1adead1fcb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 06:13:40 +0000 Subject: [PATCH 264/294] Bump google.golang.org/grpc from 1.58.1 to 1.58.2 in /src/autoscaler (#2174) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.1 to 1.58.2. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.58.1...v1.58.2) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 99213d2817..d3f2862a61 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -36,7 +36,7 @@ require ( golang.org/x/exp v0.0.0-20230905200255-921286631fa9 golang.org/x/net v0.15.0 golang.org/x/time v0.3.0 - google.golang.org/grpc v1.58.1 + google.golang.org/grpc v1.58.2 gopkg.in/yaml.v3 v3.0.1 ) diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index ec5ab7401d..612478dd2e 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1670,8 +1670,8 @@ google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5v google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -google.golang.org/grpc v1.58.1 h1:OL+Vz23DTtrrldqHK49FUOPHyY75rvFqJfXC84NYW58= -google.golang.org/grpc v1.58.1/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= +google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/examples v0.0.0-20230512210959-5dcfb37c0b43/go.mod h1:irORyHPQXotoshbRTZVFvPDcfTfFHL23efQeop+H45M= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= From 7cefecfb77842d67d261e0ea019f2b619f076ed0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 02:46:51 +0000 Subject: [PATCH 265/294] Bump com.github.spotbugs:spotbugs-maven-plugin in /src (#2178) Bumps [com.github.spotbugs:spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin) from 4.7.3.5 to 4.7.3.6. - [Release notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases) - [Commits](https://github.com/spotbugs/spotbugs-maven-plugin/compare/spotbugs-maven-plugin-4.7.3.5...spotbugs-maven-plugin-4.7.3.6) --- updated-dependencies: - dependency-name: com.github.spotbugs:spotbugs-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/scheduler/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scheduler/pom.xml b/src/scheduler/pom.xml index 7618772c0a..4d5d8a15c6 100644 --- a/src/scheduler/pom.xml +++ b/src/scheduler/pom.xml @@ -197,7 +197,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.7.3.5 + 4.7.3.6 Max medium From 57fe9b0a7b015c048302befe626acfd181021567 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 02:47:00 +0000 Subject: [PATCH 266/294] chore(deps): update dependency nektos/act to v0.2.51 (#2177) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index 8e7c70ebde..325573ff5a 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,4 +1,4 @@ -act 0.2.50 +act 0.2.51 actionlint 1.6.26 bosh 7.4.0 cf 8.7.3 From d00b3ea6b30fefda8450cac37c366c7f9420177d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 03:57:20 +0000 Subject: [PATCH 267/294] Bump code.cloudfoundry.org/go-loggregator/v9 in /src/autoscaler (#2179) Bumps [code.cloudfoundry.org/go-loggregator/v9](https://github.com/cloudfoundry/go-loggregator) from 9.0.7 to 9.0.8. - [Release notes](https://github.com/cloudfoundry/go-loggregator/releases) - [Commits](https://github.com/cloudfoundry/go-loggregator/compare/v9.0.7...v9.0.8) --- updated-dependencies: - dependency-name: code.cloudfoundry.org/go-loggregator/v9 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index d3f2862a61..a4cb809106 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -6,7 +6,7 @@ require ( code.cloudfoundry.org/cfhttp/v2 v2.0.1-0.20230113212937-05beac96f8c7 code.cloudfoundry.org/clock v1.1.0 code.cloudfoundry.org/go-log-cache v1.0.1-0.20230106184352-6dc0e9ab2e65 - code.cloudfoundry.org/go-loggregator/v9 v9.0.7 + code.cloudfoundry.org/go-loggregator/v9 v9.0.8 code.cloudfoundry.org/lager/v3 v3.0.2 code.cloudfoundry.org/tlsconfig v0.0.0-20220621140725-0e6fbd869921 dario.cat/mergo v1.0.0 diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index 612478dd2e..a41c04c00f 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -600,8 +600,8 @@ code.cloudfoundry.org/go-diodes v0.0.0-20221212174934-b8cb650f2489 h1:bLiGonuL4K code.cloudfoundry.org/go-diodes v0.0.0-20221212174934-b8cb650f2489/go.mod h1:gbU0Jysh1Ep/3KfwjLLdzSJWbd9Ybh59UYCuTNBpm7U= code.cloudfoundry.org/go-log-cache v1.0.1-0.20230106184352-6dc0e9ab2e65 h1:XtOanl6QBUYNDI2+km7qtlY/KOkhQRpVBPPTapd6glc= code.cloudfoundry.org/go-log-cache v1.0.1-0.20230106184352-6dc0e9ab2e65/go.mod h1:80JBMn31Cl0fzUNSsT7m0Qy4lGeT8dtA7kOR0WWt+Os= -code.cloudfoundry.org/go-loggregator/v9 v9.0.7 h1:vM351mliuq6Olxarar6BYFqVPYR8D5SmomD2SZA9fUY= -code.cloudfoundry.org/go-loggregator/v9 v9.0.7/go.mod h1:THyXb1L629OSRLh73ER7SwaRV1OPmWgh0TFgmTsgJMk= +code.cloudfoundry.org/go-loggregator/v9 v9.0.8 h1:Ntt6dubOuV2Rk2Yw0C2OOvaGjZNWSKJoWM72ihTaPo4= +code.cloudfoundry.org/go-loggregator/v9 v9.0.8/go.mod h1:+U07+rozDh39Wd0MmS5Bd9mn/gOwg8NLqv3gnxRvuHI= code.cloudfoundry.org/lager/v3 v3.0.2 h1:H0dcQY+814G1Ea0e5K/AMaMpcr+Pe5Iv+AALJEwrP9U= code.cloudfoundry.org/lager/v3 v3.0.2/go.mod h1:zA6tOIWhr5uZUez+PGpdfBHDWQOfhOrr0cgKDagZPwk= code.cloudfoundry.org/tlsconfig v0.0.0-20220621140725-0e6fbd869921 h1:1PLAuQR56K2pw0lnlcXe+37uOaGg939W1Lqv8wxYpu4= From 849e6c6374b91b50f740f0034d802efa74423511 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 26 Sep 2023 00:50:10 +0000 Subject: [PATCH 268/294] chore(deps): update orange-cloudfoundry/bosh-release-action action to v2.1.0 (#2183) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/bosh-release-checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bosh-release-checks.yaml b/.github/workflows/bosh-release-checks.yaml index 1048639cc8..fa8c0bc54f 100644 --- a/.github/workflows/bosh-release-checks.yaml +++ b/.github/workflows/bosh-release-checks.yaml @@ -50,7 +50,7 @@ jobs: - name: Build Dev Release id: build - uses: orange-cloudfoundry/bosh-release-action@v2.0.0 + uses: orange-cloudfoundry/bosh-release-action@v2.1.0 - name: Compile Dev Release uses: cloudfoundry/bosh-compile-action@main From 6a45821e806f6c04ae56caf1a871dc8f4d56bd7f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 27 Sep 2023 02:01:27 +0000 Subject: [PATCH 269/294] chore(deps): update dependency gruntwork-io/terragrunt to v0.51.5 (#2184) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index 9e4699c35c..b34e13c0f0 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.5 terraform 1.5.7 terraform-lsp -terragrunt 0.51.4 +terragrunt 0.51.5 From 51752a3aa0d322e4eaa458b63ac5db88bb5982fb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Sep 2023 02:57:03 +0000 Subject: [PATCH 270/294] Bump github.com/onsi/gomega from 1.27.10 to 1.28.0 in /src/acceptance (#2187) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.27.10 to 1.28.0. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.27.10...v1.28.0) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/acceptance/go.mod | 2 +- src/acceptance/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/acceptance/go.mod b/src/acceptance/go.mod index 2c31fab6ce..53f7de1fd2 100644 --- a/src/acceptance/go.mod +++ b/src/acceptance/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/cloudfoundry/cf-test-helpers/v2 v2.7.0 github.com/onsi/ginkgo/v2 v2.12.1 - github.com/onsi/gomega v1.27.10 + github.com/onsi/gomega v1.28.0 github.com/stretchr/testify v1.8.4 ) diff --git a/src/acceptance/go.sum b/src/acceptance/go.sum index 08a3b40682..724a3bc21e 100644 --- a/src/acceptance/go.sum +++ b/src/acceptance/go.sum @@ -25,8 +25,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/onsi/ginkgo/v2 v2.12.1 h1:uHNEO1RP2SpuZApSkel9nEh1/Mu+hmQe7Q+Pepg5OYA= github.com/onsi/ginkgo/v2 v2.12.1/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/gomega v1.28.0 h1:i2rg/p9n/UqIDAMFUJ6qIUUMcsqOuUHgbpbu235Vr1c= +github.com/onsi/gomega v1.28.0/go.mod h1:A1H2JE76sI14WIP57LMKj7FVfCHx3g3BcZVjJG8bjX8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= From fbe44b88cb508017a0719436de1603569e329dd3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 29 Sep 2023 05:30:02 +0000 Subject: [PATCH 271/294] chore(deps): update dependency mikefarah/yq to v4.35.2 (#2185) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index 325573ff5a..e53bd85912 100644 --- a/.tool-versions +++ b/.tool-versions @@ -13,4 +13,4 @@ make 4.4 maven 3.8.6 ruby 3.2.1 shellcheck 0.9.0 -yq 4.35.1 +yq 4.35.2 From 12d60e051f254f46781c5d4314aae88876a38f1a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Sep 2023 07:06:08 +0000 Subject: [PATCH 272/294] Bump github.com/onsi/gomega from 1.27.10 to 1.28.0 in /src/autoscaler (#2188) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.27.10 to 1.28.0. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.27.10...v1.28.0) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/autoscaler/go.mod | 2 +- src/autoscaler/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index a4cb809106..601a29681f 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -22,7 +22,7 @@ require ( github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0 github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d github.com/onsi/ginkgo/v2 v2.12.1 - github.com/onsi/gomega v1.27.10 + github.com/onsi/gomega v1.28.0 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pivotal-cf/brokerapi/v10 v10.0.0 github.com/pkg/errors v0.9.1 diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index a41c04c00f..50ac8e6ad4 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -933,8 +933,8 @@ github.com/onsi/gomega v1.27.1/go.mod h1:aHX5xOykVYzWOV4WqQy0sy8BQptgukenXpCXfad github.com/onsi/gomega v1.27.3/go.mod h1:5vG284IBtfDAmDyrK+eGyZmUgUlmi+Wngqo557cZ6Gw= github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/gomega v1.28.0 h1:i2rg/p9n/UqIDAMFUJ6qIUUMcsqOuUHgbpbu235Vr1c= +github.com/onsi/gomega v1.28.0/go.mod h1:A1H2JE76sI14WIP57LMKj7FVfCHx3g3BcZVjJG8bjX8= github.com/openzipkin/zipkin-go v0.4.1 h1:kNd/ST2yLLWhaWrkgchya40TJabe8Hioj9udfPcEO5A= github.com/openzipkin/zipkin-go v0.4.1/go.mod h1:qY0VqDSN1pOBN94dBc6w2GJlWLiovAyg7Qt6/I9HecM= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= From b68e6f608fa7ffd70a053f8ad4bbf26fd0149306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 22 Sep 2023 11:58:30 +0200 Subject: [PATCH 273/294] Fix in the Makefiles and renaming of the job in the workflow; --- ...te.go-mod-tidy_and_make-package-specs.yaml | 3 +- src/acceptance/assets/app/go_app/Makefile | 25 ++++++++-------- src/autoscaler/Makefile | 30 +++++++++---------- 3 files changed, 28 insertions(+), 30 deletions(-) diff --git a/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml b/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml index f5e08d9775..9d9401a253 100644 --- a/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml +++ b/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml @@ -22,7 +22,8 @@ on: - "src/**/go.sum" workflow_dispatch: {} jobs: - go-mod-tidy: + pkgs-specs_and_go-mod-tidy: + name: "go mod tidy && make package-specs" runs-on: ubuntu-latest permissions: pull-requests: write diff --git a/src/acceptance/assets/app/go_app/Makefile b/src/acceptance/assets/app/go_app/Makefile index 74ccec8c02..db492e23eb 100644 --- a/src/acceptance/assets/app/go_app/Makefile +++ b/src/acceptance/assets/app/go_app/Makefile @@ -19,7 +19,7 @@ binaries = $(shell find . -name "main.go" -exec dirname {} \; \ test_dirs = $(shell find . -name "*_test.go" -exec dirname {} \; \ | cut --delimiter='/' --fields='2' | sort | uniq) -GINKGO_OPTS :=-r --race --require-suite --randomize-all --cover ${OPTS} +GINKGO_OPTS := -r --race --require-suite --randomize-all --cover ${OPTS} export CONFIG ?= ../../../../acceptance_config.json GINKGO_VERSION = v$(shell cat ../../../../../.tool-versions | grep --regexp='ginkgo' | cut --delimiter=' ' --fields='2') @@ -28,12 +28,14 @@ GOLANGCI_LINT_VERSION = v$(shell cat ../../../../../.tool-versions | grep --rege openapi-spec-path := ../../../../../api -openapi-specs-list := $(wildcard ${openapi-spec-path}/*.openapi.yaml) +openapi-specs-list = $(wildcard ${openapi-spec-path}/*.openapi.yaml) # The presence of the subsequent directory indicates wheather the fakes still need to be generated # or not. app-fakes-dir := ./internal/app/appfakes -app-fakes-files := $(wildcard ${app-fakes-dir}/*.go) +app-fakes-files = $(wildcard ${app-fakes-dir}/*.go) +go_deps_without_fakes = $(shell find . -type f -name '*.go' \ + | grep --invert-match --regexp='${app-fakes-dir}') .PHONY: generate-fakes generate-fakes: ${app-fakes-dir} ${app-fakes-files} @@ -42,21 +44,18 @@ ${app-fakes-dir} ${app-fakes-files} &: ./go.mod ./go.sum ./internal/generate.go -# The generated fakes are order-only dependencies for `go-mod-tidy`. The reason is, that for -# `go-mod-tidy` the generated fakes need to be present but fortunately not necessarily -# up-to-date. This is fortunate because the generation of the fake requires the files `go.mod` and -# `go.sum` to be already tidied up, introducing a cyclic dependency otherwise. But that would make -# any modification to `go.mod` or `go.sum` impossible. This definition now makes it possible to -# update `go.mod` and `go.sum` as follows: +# This target should depend additionally on `${app-fakes-dir}` and on `${app-fakes-files}`. However +# this is not defined here. The reason is, that for `go-mod-tidy` the generated fakes need to be +# present but fortunately not necessarily up-to-date. This is fortunate because the generation of +# the fake requires the files `go.mod` and `go.sum` to be already tidied up, introducing a cyclic +# dependency otherwise. But that would make any modification to `go.mod` or `go.sum` +# impossible. This definition now makes it possible to update `go.mod` and `go.sum` as follows: # 1. `make generate-fakes` # 2. Update `go.mod` and/or `go.sum` # 3. `make go-mod-tidy` # 4. Optionally: `make generate-fakes` to update the fakes as well. -# -# For more information on order-only dependencies, see: -# .PHONY: go-mod-tidy -go-mod-tidy: ./go.mod ./go.sum ${GO_DEPENDENCIES} | ${app-fakes-dir} ${app-fakes-files} +go-mod-tidy: ./go.mod ./go.sum ${go_deps_without_fakes} @echo -ne '${aes_terminal_font_yellow}' @echo -e '⚠️ Warning: The client-fakes generated from the openapi-specification may be\n' \ 'outdated. Please consider re-generating them, if this is relevant.' diff --git a/src/autoscaler/Makefile b/src/autoscaler/Makefile index c12357694a..057ec2de6d 100644 --- a/src/autoscaler/Makefile +++ b/src/autoscaler/Makefile @@ -16,44 +16,42 @@ export GOWORK=off BUILDFLAGS := -ldflags '-linkmode=external' binaries=$(shell find . -name "main.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq | grep -v vendor) -test_dirs=$(shell find . -name "*_test.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq) +test_dirs=$(shell find . -name "*_test.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq) export GO111MODULE=on #TODO: https://github.com/cloudfoundry/app-autoscaler-release/issues/564 allow the tests to be run in parallel #GINKGO_OPTS=-r --race --require-suite -p --randomize-all --cover -GINKGO_OPTS=-r --race --require-suite --randomize-all --cover ${OPTS} -GINKGO_VERSION=v$(shell cat ../../.tool-versions | grep ginkgo | cut -d " " -f 2 ) +GINKGO_OPTS = -r --race --require-suite --randomize-all --cover ${OPTS} +GINKGO_VERSION = v$(shell cat ../../.tool-versions | grep ginkgo | cut --delimiter=' ' --fields='2' ) # The presence of the subsequent directory indicates wheather the fakes still need to be generated # or not. app-fakes-dir := ./fakes -app-fakes-files := $(wildcard ${app-fakes-dir}/*.go) - +app-fakes-files = $(wildcard ${app-fakes-dir}/*.go) +go_deps_without_fakes = $(shell find . -type f -name '*.go' \ + | grep --invert-match --regexp='${app-fakes-dir}') .PHONY: generate-fakes generate-fakes: ${app-fakes-dir} ${app-fakes-files} ${app-fakes-dir} ${app-fakes-files} &: ./go.mod ./go.sum ./generate-fakes.go @echo "# Generating counterfeits" mkdir -p '${app-fakes-dir}' - COUNTERFEITER_NO_GENERATE_WARNING='true' go generate ./... + COUNTERFEITER_NO_GENERATE_WARNING='true' go generate './...' -# The generated fakes are order-only dependencies for `go-mod-tidy`. The reason is, that for -# `go-mod-tidy` the generated fakes need to be present but fortunately not necessarily -# up-to-date. This is fortunate because the generation of the fake requires the files `go.mod` and -# `go.sum` to be already tidied up, introducing a cyclic dependency otherwise. But that would make -# any modification to `go.mod` or `go.sum` impossible. This definition now makes it possible to -# update `go.mod` and `go.sum` as follows: +# This target should depend additionally on `${app-fakes-dir}` and on `${app-fakes-files}`. However +# this is not defined here. The reason is, that for `go-mod-tidy` the generated fakes need to be +# present but fortunately not necessarily up-to-date. This is fortunate because the generation of +# the fake requires the files `go.mod` and `go.sum` to be already tidied up, introducing a cyclic +# dependency otherwise. But that would make any modification to `go.mod` or `go.sum` +# impossible. This definition now makes it possible to update `go.mod` and `go.sum` as follows: # 1. `make generate-fakes` # 2. Update `go.mod` and/or `go.sum` # 3. `make go-mod-tidy` # 4. Optionally: `make generate-fakes` to update the fakes as well. -# -# For more information on order-only dependencies, see: -# .PHONY: go-mod-tidy -go-mod-tidy: ./go.mod ./go.sum ${GO_DEPENDENCIES} | ${app-fakes-dir} ${app-fakes-files} +go-mod-tidy: ./go.mod ./go.sum ${go_deps_without_fakes} @echo -ne '${aes_terminal_font_yellow}' @echo -e '⚠️ Warning: The client-fakes generated from the openapi-specification may be\n' \ 'outdated. Please consider re-generating them, if this is relevant.' From e33d03dc8488dfbb15e6e8f45068f69e145b3692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 22 Sep 2023 15:31:13 +0200 Subject: [PATCH 274/294] Fix definition of the workflow `go-mod-tidy`. --- .github/workflows/tidy-go-mod.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tidy-go-mod.yaml b/.github/workflows/tidy-go-mod.yaml index ed1c27c028..98730efd18 100644 --- a/.github/workflows/tidy-go-mod.yaml +++ b/.github/workflows/tidy-go-mod.yaml @@ -19,7 +19,14 @@ jobs: run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" - name: run go mod tidy on all .mod's - run: make go-mod-tidy + shell: bash + run: | + #! /usr/bin/env bash + set -eu -o pipefail + + make --directory='./src/acceptance/assets/app/go_app' generate-fakes + make --directory='./src/autoscaler' generate-fakes + make go-mod-tidy - name: Check if there is any change id: get_changes From b9115cc244b01b6cac613608b8e19fd9d7ca1916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 22 Sep 2023 15:34:22 +0200 Subject: [PATCH 275/294] Fix definition of the workflow `bosh-release-checks.yaml`. --- .github/workflows/bosh-release-checks.yaml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/bosh-release-checks.yaml b/.github/workflows/bosh-release-checks.yaml index fa8c0bc54f..02fe1445c7 100644 --- a/.github/workflows/bosh-release-checks.yaml +++ b/.github/workflows/bosh-release-checks.yaml @@ -13,15 +13,19 @@ jobs: runs-on: ubuntu-latest container: image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main - steps: - name: Trust my checkout run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" - - uses: actions/checkout@v4 - name: sync-package-specs - run: make package-specs + shell: bash + run: | + #! /usr/bin/env bash + set -eu -o pipefail + make --directory='./src/acceptance/assets/app/go_app' generate-fakes + make --directory='./src/autoscaler' generate-fakes + make package-specs - name: Check if there is any change run: | [ $(git status --porcelain | wc -l) -eq 0 ] || \ @@ -30,7 +34,6 @@ jobs: echo "::error::Specs are out of date, run \"make package-specs\" to update";\ exit 1;\ } - bosh-release: needs: generate-gosub name: Create Bosh Release @@ -43,9 +46,15 @@ jobs: - uses: actions/checkout@v4 - name: Run Update + shell: bash run: | - set -e - export PATH=$PATH:/usr/local/maven/bin + #! /usr/bin/env bash + set -eu -o pipefail + + make --directory='./src/acceptance/assets/app/go_app' generate-fakes + make --directory='./src/autoscaler' generate-fakes + + export PATH="${PATH}:/usr/local/maven/bin" make go-mod-tidy vendor db scheduler - name: Build Dev Release From 499c869d75efca6db6b937159f64d25666f0bfaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 22 Sep 2023 16:24:03 +0200 Subject: [PATCH 276/294] Fix definition of the workflow `acceptance-tests-resusable`. --- .../workflows/acceptance_tests_reusable.yaml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/acceptance_tests_reusable.yaml b/.github/workflows/acceptance_tests_reusable.yaml index 5be07d7086..36ad893741 100644 --- a/.github/workflows/acceptance_tests_reusable.yaml +++ b/.github/workflows/acceptance_tests_reusable.yaml @@ -87,9 +87,15 @@ jobs: with: ssh-key: ${{ secrets.bbl_ssh_key}} - name: Deploy autoscaler + shell: bash run: | - cd "${AUTOSCALER_DIR}" - make deploy-autoscaler + #! /usr/bin/env bash + set -eu -o pipefail + + make --directory="${AUTOSCALER_DIR}/src/acceptance/assets/app/go_app" generate-fakes + make --directory="${AUTOSCALER_DIR}/src/autoscaler" generate-fakes + + make --directory="${AUTOSCALER_DIR}" deploy-autoscaler acceptance_tests: needs: [ deploy_autoscaler ] @@ -113,10 +119,15 @@ jobs: - name: Run acceptance test - ${{ matrix.suite }} env: MATRIX_SUITE: ${{ matrix.suite }} + shell: bash run: | - cd "${AUTOSCALER_DIR}" - make acceptance-tests SUITES="${MATRIX_SUITE,,}" + #! /usr/bin/env bash + set -eu -o pipefail + + make --directory="${AUTOSCALER_DIR}/src/acceptance/assets/app/go_app" generate-fakes + make --directory="${AUTOSCALER_DIR}/src/autoscaler" generate-fakes + make --directory="${AUTOSCALER_DIR}" acceptance-tests SUITES="${MATRIX_SUITE,,}" acceptance_tests_verify: name: "${{ github.workflow }} Result" From 361a6129daeb2a8abbab3b48074866635291485d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 22 Sep 2023 15:45:16 +0200 Subject: [PATCH 277/294] Fix definition of the workflow `dependency-spec-updates.yaml`. --- .github/workflows/dependency-spec-updates.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dependency-spec-updates.yaml b/.github/workflows/dependency-spec-updates.yaml index c84f2861cd..d79e5191cb 100644 --- a/.github/workflows/dependency-spec-updates.yaml +++ b/.github/workflows/dependency-spec-updates.yaml @@ -11,7 +11,13 @@ jobs: - uses: actions/checkout@v4 - name: package-specs + shell: bash run: | + #! /usr/bin/env bash + set -eu -o pipefail + + make --directory='./src/acceptance/assets/app/go_app' generate-fakes + make --directory='./src/autoscaler' generate-fakes make package-specs - name: Check if there are changes id: changes @@ -23,5 +29,3 @@ jobs: add: './packages/**/spec' message: 'Updating spec files from `dependabot[bot]` changes' push: true - - From dbfa27c3b65d0cfc6722046d25eec0f59aabd203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Mon, 25 Sep 2023 13:46:41 +0200 Subject: [PATCH 278/294] Remove dependency `go-mod-tidy` from make-target `deploy-autoscaler`; --- .github/workflows/acceptance_tests_reusable.yaml | 9 +-------- Makefile | 9 ++++----- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/acceptance_tests_reusable.yaml b/.github/workflows/acceptance_tests_reusable.yaml index 36ad893741..9d84659522 100644 --- a/.github/workflows/acceptance_tests_reusable.yaml +++ b/.github/workflows/acceptance_tests_reusable.yaml @@ -88,14 +88,7 @@ jobs: ssh-key: ${{ secrets.bbl_ssh_key}} - name: Deploy autoscaler shell: bash - run: | - #! /usr/bin/env bash - set -eu -o pipefail - - make --directory="${AUTOSCALER_DIR}/src/acceptance/assets/app/go_app" generate-fakes - make --directory="${AUTOSCALER_DIR}/src/autoscaler" generate-fakes - - make --directory="${AUTOSCALER_DIR}" deploy-autoscaler + run: make --directory="${AUTOSCALER_DIR}" deploy-autoscaler acceptance_tests: needs: [ deploy_autoscaler ] diff --git a/Makefile b/Makefile index 7b480c7ad9..1d8c5026ef 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ CI ?= false VERSION ?= 0.0.testing DEST ?= build -GOLANGCI_LINT_VERSION = v$(shell cat .tool-versions | grep golangci-lint | cut -d " " -f 2 ) +GOLANGCI_LINT_VERSION = v$(shell cat .tool-versions | grep golangci-lint | cut --delimiter=' ' --fields='2') export BUILDIN_MODE ?= false export DEBUG ?= false @@ -214,7 +214,7 @@ stop-db: check-db_type .PHONY: integration integration: build init-db test-certs @echo " - using DBURL=${DBURL} OPTS=${OPTS}" - make -C src/autoscaler integration DBURL="${DBURL}" OPTS="${OPTS}" + make --directory='./src/autoscaler' integration DBURL="${DBURL}" OPTS="${OPTS}" .PHONY:lint $(addprefix lint_,$(go_modules)) @@ -316,9 +316,8 @@ uaac: markdownlint-cli: which markdownlint || npm install -g --omit=dev markdownlint-cli -.PHONY: deploy deploy-autoscaler deploy-register-cf deploy-autoscaler-bosh deploy-cleanup -deploy-autoscaler: deploy -deploy: go-mod-tidy vendor uaac db scheduler deploy-autoscaler-bosh deploy-register-cf +.PHONY: deploy-autoscaler deploy-register-cf deploy-autoscaler-bosh deploy-cleanup +deploy-autoscaler: vendor uaac db scheduler deploy-autoscaler-bosh deploy-register-cf deploy-register-cf: echo " - registering broker with cf" [ "$${BUILDIN_MODE}" == "false" ] && { ${CI_DIR}/autoscaler/scripts/register-broker.sh; } || echo " - Not registering broker due to buildin mode enabled" From 49d4ad4e181b68e787ee7b16a209304bc101fda0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Mon, 25 Sep 2023 17:07:53 +0200 Subject: [PATCH 279/294] Rename make-target `vendor` to `go-mod-vendor` and define its dependencies; --- .github/workflows/bosh-release-checks.yaml | 2 +- Makefile | 48 ++++++++++++---------- ci/autoscaler/scripts/deploy-autoscaler.sh | 32 +++++++-------- src/acceptance/Makefile | 17 ++++++++ src/autoscaler/Makefile | 25 +++++++---- src/changelog/Makefile | 4 +- src/changeloglockcleaner/Makefile | 4 +- 7 files changed, 83 insertions(+), 49 deletions(-) diff --git a/.github/workflows/bosh-release-checks.yaml b/.github/workflows/bosh-release-checks.yaml index 02fe1445c7..c30957fe4a 100644 --- a/.github/workflows/bosh-release-checks.yaml +++ b/.github/workflows/bosh-release-checks.yaml @@ -55,7 +55,7 @@ jobs: make --directory='./src/autoscaler' generate-fakes export PATH="${PATH}:/usr/local/maven/bin" - make go-mod-tidy vendor db scheduler + make go-mod-tidy go-mod-vendor db scheduler - name: Build Dev Release id: build diff --git a/Makefile b/Makefile index 1d8c5026ef..900bb8d807 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,7 @@ clean-vendor: @echo " - cleaning vendored go" @find . -depth -name "vendor" -type d -exec rm -rf {} \; clean-autoscaler: - @make -C src/autoscaler clean + @make --directory='./src/autoscaler' clean clean-scheduler: @echo " - cleaning scheduler test resources" @rm -rf src/scheduler/src/test/resources/certs @@ -96,14 +96,14 @@ scheduler: @echo "# building $@" @cd src && mvn --no-transfer-progress package -pl scheduler ${MVN_OPTS} && cd .. autoscaler: - @make -C src/autoscaler build + @make --directory='./src/autoscaler' build changeloglockcleaner: - @make -C src/changeloglockcleaner build + @make --directory='./src/changeloglockcleaner' build changelog: - @make -C src/changelog build + @make --directory='./src/changelog' build $(addprefix test_,$(go_modules)): @echo "# Compiling '$(patsubst test_%,%,$@)' tests" - @make -C src/$(patsubst test_%,%,$@) build_tests + @make --directory='./src/$(patsubst test_%,%,$@)' build_tests .PHONY: test-certs @@ -120,20 +120,20 @@ target/scheduler_test_certs: test: test-autoscaler test-scheduler test-changelog test-changeloglockcleaner test-acceptance-unit test-autoscaler: check-db_type init-db test-certs @echo " - using DBURL=${DBURL} OPTS=${OPTS}" - @make -C src/autoscaler test DBURL="${DBURL}" OPTS="${OPTS}" + @make --directory='./src/autoscaler' test DBURL="${DBURL}" OPTS="${OPTS}" test-autoscaler-suite: check-db_type init-db test-certs @echo " - using DBURL=${DBURL} TEST=${TEST} OPTS=${OPTS}" - @make -C src/autoscaler testsuite TEST=${TEST} DBURL="${DBURL}" OPTS="${OPTS}" + @make --directory='./src/autoscaler' testsuite TEST=${TEST} DBURL="${DBURL}" OPTS="${OPTS}" test-scheduler: check-db_type init-db test-certs @export DB_HOST=${DB_HOST}; \ cd src && mvn test --no-transfer-progress -Dspring.profiles.include=${db_type} && cd .. test-changelog: - @make -C src/changelog test + @make --directory='./src/changelog' test test-changeloglockcleaner: init-db test-certs - @make -C src/changeloglockcleaner test DBURL="${DBURL}" + @make --directory='./src/changeloglockcleaner' test DBURL="${DBURL}" test-acceptance-unit: - @make -C src/acceptance test-unit - @make -C src/acceptance/assets/app/go_app test + @make --directory='./src/acceptance' test-unit + @make --directory='./src/acceptance/assets/app/go_app' test .PHONY: start-db @@ -291,16 +291,20 @@ mod-download: cd $${folder}; echo " - go mod download '$${folder}'"; go mod download; cd - >/dev/null;\ done -.PHONY: vendor -vendor: - @for folder in $$(find . -maxdepth 3 -name "go.mod" -exec dirname {} \;);\ - do\ - cd $${folder}; echo " - go mod vendor '$${folder}'"; go mod vendor; cd - >/dev/null;\ - done +.PHONY: vendor acceptance.go-mod-vendor autoscaler.go-mod-vendor changelog.go-mod-vendor \ + changeloglockcleander.go-mod-vendor +go-mod-vendor: acceptance.go-mod-vendor autoscaler.go-mod-vendor changelog.go-mod-vendor \ + changeloglockcleander.go-mod-vendor +acceptance.go-mod-vendor: + make --directory='${go-acceptance-dir}' go-mod-vendor +autoscaler.go-mod-vendor: + make --directory='${go-autoscaler-dir}' go-mod-vendor +changelog.go-mod-vendor: + make --directory='${go-changelog-dir}' go-mod-vendor +changeloglockcleander.go-mod-vendor: + make --directory='${go-changeloglockcleander-dir}' go-mod-vendor + -.PHONY: fakes -fakes: - @make -C src/autoscaler fakes # https://github.com/golang/tools/blob/master/gopls/doc/workspace.md .PHONY: workspace @@ -317,7 +321,7 @@ markdownlint-cli: which markdownlint || npm install -g --omit=dev markdownlint-cli .PHONY: deploy-autoscaler deploy-register-cf deploy-autoscaler-bosh deploy-cleanup -deploy-autoscaler: vendor uaac db scheduler deploy-autoscaler-bosh deploy-register-cf +deploy-autoscaler: go-mod-vendor uaac db scheduler deploy-autoscaler-bosh deploy-register-cf deploy-register-cf: echo " - registering broker with cf" [ "$${BUILDIN_MODE}" == "false" ] && { ${CI_DIR}/autoscaler/scripts/register-broker.sh; } || echo " - Not registering broker due to buildin mode enabled" @@ -354,7 +358,7 @@ deploy-prometheus: ${prometheus-bosh-release-path}/manifests .PHONY: build-test-app build-test-app: - @make -C src/acceptance/assets/app/go_app build + @make --directory='./src/acceptance/assets/app/go_app' build .PHONY: acceptance-tests acceptance-tests: build-test-app diff --git a/ci/autoscaler/scripts/deploy-autoscaler.sh b/ci/autoscaler/scripts/deploy-autoscaler.sh index 4ebe7528b3..595c9b16d0 100755 --- a/ci/autoscaler/scripts/deploy-autoscaler.sh +++ b/ci/autoscaler/scripts/deploy-autoscaler.sh @@ -9,19 +9,19 @@ bosh_deploy_opts="${BOSH_DEPLOY_OPTS:-""}" bosh_upload_release_opts="${BOSH_UPLOAD_RELEASE_OPTS:-""}" bosh_upload_stemcell_opts="${BOSH_UPLOAD_STEMCELL_OPTS:-""}" ops_files=${OPS_FILES:-"${autoscaler_dir}/operations/add-releases.yml\ - ${autoscaler_dir}/operations/instance-identity-cert-from-cf.yml\ - ${autoscaler_dir}/operations/add-postgres-variables.yml\ - ${autoscaler_dir}/operations/connect_to_postgres_with_certs.yml\ - ${autoscaler_dir}/operations/enable-nats-tls.yml\ - ${autoscaler_dir}/operations/loggregator-certs-from-cf.yml\ - ${autoscaler_dir}/operations/add-extra-plan.yml\ - ${autoscaler_dir}/operations/set-release-version.yml\ - ${autoscaler_dir}/operations/enable-log-cache.yml\ - ${autoscaler_dir}/operations/log-cache-syslog-server.yml\ - ${autoscaler_dir}/operations/remove-metricsserver.yml\ - ${autoscaler_dir}/operations/remove-metricsgateway.yml\ - ${autoscaler_dir}/operations/enable-log-cache-via-uaa.yml\ - ${autoscaler_dir}/operations/enable-scheduler-logging.yml"} + ${autoscaler_dir}/operations/instance-identity-cert-from-cf.yml\ + ${autoscaler_dir}/operations/add-postgres-variables.yml\ + ${autoscaler_dir}/operations/connect_to_postgres_with_certs.yml\ + ${autoscaler_dir}/operations/enable-nats-tls.yml\ + ${autoscaler_dir}/operations/loggregator-certs-from-cf.yml\ + ${autoscaler_dir}/operations/add-extra-plan.yml\ + ${autoscaler_dir}/operations/set-release-version.yml\ + ${autoscaler_dir}/operations/enable-log-cache.yml\ + ${autoscaler_dir}/operations/log-cache-syslog-server.yml\ + ${autoscaler_dir}/operations/remove-metricsserver.yml\ + ${autoscaler_dir}/operations/remove-metricsgateway.yml\ + ${autoscaler_dir}/operations/enable-log-cache-via-uaa.yml\ + ${autoscaler_dir}/operations/enable-scheduler-logging.yml"} if [[ "${buildin_mode}" == "true" ]]; then ops_files+=" ${autoscaler_dir}/operations/use_buildin_mode.yml"; fi; @@ -38,7 +38,7 @@ function setup_autoscaler_uaac(){ local autoscaler_secret="autoscaler_client_secret" local uaa_client_secret=$(credhub get -n /bosh-autoscaler/cf/uaa_admin_client_secret --quiet) uaac target "https://uaa.${system_domain}" --skip-ssl-validation > /dev/null - uaac token client get admin -s "$uaa_client_secret" > /dev/null + uaac token client get admin -s "${uaa_client_secret}" > /dev/null if uaac client get autoscaler_client_id >/dev/null; then step "updating autoscaler uaac client" @@ -127,7 +127,7 @@ function find_or_upload_stemcell() { if ! bosh stemcells | grep "${stemcell_name}" >/dev/null; then URL="https://bosh.io/d/stemcells/${stemcell_name}" if [ "${stemcell_version}" != "latest" ]; then - URL="${URL}?v=${stemcell_version}" + URL="${URL}?v=${stemcell_version}" fi wget "${URL}" -O stemcell.tgz bosh -n upload-stemcell $bosh_upload_stemcell_opts stemcell.tgz @@ -163,4 +163,4 @@ pushd "${autoscaler_dir}" > /dev/null find_or_upload_stemcell find_or_upload_release deploy -popd > /dev/null \ No newline at end of file +popd > /dev/null diff --git a/src/acceptance/Makefile b/src/acceptance/Makefile index cf287d533f..16802fbe15 100644 --- a/src/acceptance/Makefile +++ b/src/acceptance/Makefile @@ -19,12 +19,29 @@ GOLANGCI_LINT_VERSION = v$(shell cat '../../.tool-versions' | grep --regexp='gol | cut --delimiter=' ' --fields='2' ) + +.PHONY: clean +clean: + rm --recursive --force './vendor' + + .PHONY: go-mod-tidy go-mod-tidy: go mod tidy +go-vendoring-folder := ./vendor +go-vendored-files = $(shell find '${go-vendoring-folder}' -type f -name '*.go' 2> '/dev/null') +## This does not work: go-vendored-files = $(wildcard ${go-vendoring-folder}/**/*.go) + +.PHONY: go-mod-vendor +go-mod-vendor: ${go-vendoring-folder} ${go-vendored-files} +${go-vendoring-folder} ${go-vendored-files} &: + go mod vendor + + + test_dirs = $(shell find . -name "*_test.go" -exec dirname {} \; | cut --delimiter='/' --fields='2' \ | sort | uniq) build_tests: $(addprefix build_test-,$(test_dirs)) diff --git a/src/autoscaler/Makefile b/src/autoscaler/Makefile index 057ec2de6d..d9e6bac902 100644 --- a/src/autoscaler/Makefile +++ b/src/autoscaler/Makefile @@ -60,6 +60,17 @@ go-mod-tidy: ./go.mod ./go.sum ${go_deps_without_fakes} +go-vendoring-folder := ./vendor +go-vendored-files = $(shell find '${go-vendoring-folder}' -type f -name '*.go' 2> '/dev/null') +## This does not work: go-vendored-files = $(wildcard ${go-vendoring-folder}/**/*.go) + +.PHONY: go-mod-vendor +go-mod-vendor: ${go-vendoring-folder} ${go-vendored-files} +${go-vendoring-folder} ${go-vendored-files} &: ${app-fakes-dir} ${app-fakes-files} + go mod vendor + + + build-%: @echo "# building $*" @CGO_ENABLED=$(CGO_ENABLED) go build $(BUILDTAGS) $(BUILDFLAGS) -o build/$* $*/cmd/$*/main.go @@ -69,7 +80,7 @@ build: $(addprefix build-,$(binaries)) build_tests: $(addprefix build_test-,$(test_dirs)) -build_test-%: generate +build_test-%: generate-fakes @echo " - building '$*' tests" @export build_folder=${PWD}/build/tests/$* &&\ mkdir -p $${build_folder} &&\ @@ -83,22 +94,19 @@ build_test-%: generate check: fmt lint build test -test: generate +test: generate-fakes @echo "Running tests" @APP_AUTOSCALER_TEST_RUN=true go run github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} -p ${GINKGO_OPTS} --skip-package=integration -testsuite: generate +testsuite: generate-fakes APP_AUTOSCALER_TEST_RUN=true go run github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} -p ${GINKGO_OPTS} ${TEST} .PHONY: integration -integration: generate +integration: generate-fakes @echo "# Running integration tests" APP_AUTOSCALER_TEST_RUN=true go run github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} ${GINKGO_OPTS} integration -.PHONY: generate -generate: - @echo "# Generating counterfeits" - @COUNTERFEITER_NO_GENERATE_WARNING=true go generate ./... + importfmt: @echo "# Formatting the imports" @@ -117,3 +125,4 @@ clean: @go clean -cache -testcache @rm --force --recursive 'build' @rm --force --recursive 'fakes' + @rm --force --recursive 'vendor' diff --git a/src/changelog/Makefile b/src/changelog/Makefile index 3f6cc342aa..6ecb51efa3 100644 --- a/src/changelog/Makefile +++ b/src/changelog/Makefile @@ -20,9 +20,11 @@ GOLANGCI_LINT_VERSION = v$(shell cat '../../.tool-versions' | grep --regexp='gol | cut --delimiter=' ' --fields='2' ) -.PHONY: go-mod-tidy +.PHONY: go-mod-tidy go-mod-vendor go-mod-tidy: go mod tidy +go-mod-vendor: + go mod vendor diff --git a/src/changeloglockcleaner/Makefile b/src/changeloglockcleaner/Makefile index 1a4a060222..8239c61d69 100644 --- a/src/changeloglockcleaner/Makefile +++ b/src/changeloglockcleaner/Makefile @@ -20,9 +20,11 @@ GOLANGCI_LINT_VERSION = v$(shell cat '../../.tool-versions' | grep --regexp='gol | cut --delimiter=' ' --fields='2' ) -.PHONY: go-mod-tidy +.PHONY: go-mod-tidy go-mod-vendor go-mod-tidy: go mod tidy +go-mod-vendor: + go mod vendor From 177451e89907b03ff7217c57241bd65b36c455bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Tue, 19 Sep 2023 16:30:57 +0200 Subject: [PATCH 280/294] Update flake --- flake.lock | 6 +++--- src/autoscaler/Makefile | 12 +++++------- src/autoscaler/scalingengine/scalingengine_test.go | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index bfc4792983..2ec32d7752 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1692174805, - "narHash": "sha256-xmNPFDi/AUMIxwgOH/IVom55Dks34u1g7sFKKebxUm0=", + "lastModified": 1694959747, + "narHash": "sha256-CXQ2MuledDVlVM5dLC4pB41cFlBWxRw4tCBsFrq3cRk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "caac0eb6bdcad0b32cb2522e03e4002c8975c62e", + "rev": "970a59bd19eff3752ce552935687100c46e820a5", "type": "github" }, "original": { diff --git a/src/autoscaler/Makefile b/src/autoscaler/Makefile index d9e6bac902..1775e4395c 100644 --- a/src/autoscaler/Makefile +++ b/src/autoscaler/Makefile @@ -23,7 +23,7 @@ export GO111MODULE=on #GINKGO_OPTS=-r --race --require-suite -p --randomize-all --cover GINKGO_OPTS = -r --race --require-suite --randomize-all --cover ${OPTS} -GINKGO_VERSION = v$(shell cat ../../.tool-versions | grep ginkgo | cut --delimiter=' ' --fields='2' ) +GINKGO_VERSION = v$(shell cat ../../.tool-versions | grep ginkgo | cut --delimiter=' ' --fields='2') # The presence of the subsequent directory indicates wheather the fakes still need to be generated # or not. @@ -85,7 +85,7 @@ build_test-%: generate-fakes @export build_folder=${PWD}/build/tests/$* &&\ mkdir -p $${build_folder} &&\ cd $* &&\ - for package in $$( go list ./... | sed 's|.*/autoscaler/$*|.|' | awk '{ print length, $$0 }' | sort -n -r | cut -d" " -f2- );\ + for package in $$(go list ./... | sed 's|.*/autoscaler/$*|.|' | awk '{ print length, $$0 }' | sort -n -r | cut -d" " -f2- );\ do\ export test_file=$${build_folder}/$${package}.test;\ echo " - compiling $${package} to $${test_file}";\ @@ -96,17 +96,15 @@ check: fmt lint build test test: generate-fakes @echo "Running tests" - @APP_AUTOSCALER_TEST_RUN=true go run github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} -p ${GINKGO_OPTS} --skip-package=integration + APP_AUTOSCALER_TEST_RUN='true' go run 'github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION}' -p ${GINKGO_OPTS} --skip-package='integration' testsuite: generate-fakes - APP_AUTOSCALER_TEST_RUN=true go run github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} -p ${GINKGO_OPTS} ${TEST} + APP_AUTOSCALER_TEST_RUN='true' go run 'github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION}' -p ${GINKGO_OPTS} ${TEST} .PHONY: integration integration: generate-fakes @echo "# Running integration tests" - APP_AUTOSCALER_TEST_RUN=true go run github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} ${GINKGO_OPTS} integration - - + APP_AUTOSCALER_TEST_RUN='true' go run 'github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION}' ${GINKGO_OPTS} integration importfmt: @echo "# Formatting the imports" diff --git a/src/autoscaler/scalingengine/scalingengine_test.go b/src/autoscaler/scalingengine/scalingengine_test.go index a8bbf1cd2a..27e18ad658 100644 --- a/src/autoscaler/scalingengine/scalingengine_test.go +++ b/src/autoscaler/scalingengine/scalingengine_test.go @@ -347,7 +347,7 @@ var _ = Describe("ScalingEngine", func() { }) }) - Context("when it exceeds min instances limit in active schedule", func() { + Context("when it exceeds min instances limit in active schedule", func() { BeforeEach(func() { trigger.Adjustment = "-60%" setAppAndProcesses(5, appState) From 9f65bf4bd295122d12ee9512a58a369dc95d4cbf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 23:34:25 +0000 Subject: [PATCH 281/294] chore(deps): lock file maintenance (#2191) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 4 +- .../github-arc-team-wg-ci/.terraform.lock.hcl | 54 +++++++++---------- jobs/Gemfile.lock | 4 +- spec/Gemfile.lock | 4 +- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 59613ec56d..1fa5f8b980 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -35,7 +35,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.56.3) + rubocop (1.56.4) base64 (~> 0.1.1) json (~> 2.3) language_server-protocol (>= 3.17.0) @@ -66,7 +66,7 @@ GEM standard-performance (1.2.0) lint_roller (~> 1.1) rubocop-performance (~> 1.19.0) - unicode-display_width (2.4.2) + unicode-display_width (2.5.0) PLATFORMS ruby diff --git a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl index c695f55e62..b098c74dfc 100644 --- a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl +++ b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl @@ -19,19 +19,19 @@ provider "registry.terraform.io/gavinbunney/kubectl" { } provider "registry.terraform.io/hashicorp/google" { - version = "4.82.0" + version = "4.84.0" hashes = [ - "h1:+fK/35ZXJpT9ObamkkfPv04ckI7/vZz2HD7YaX+FmRE=", - "h1:1WSWw0nEixwpVOTdVaqHIobHrr6EIEgRPses2e0VGkA=", - "h1:2Kq0hZJN97SEHgs6Yc3ZVXY2dsAVFNcAm6ElHXzPNVE=", - "h1:3m7SjHQ6oacGPsBmohGxou14slyFj1hH5FHHbxbVwgM=", - "h1:L5uRqRT63VLPVHzd57xMkNmLf+liFVt7KxcdZNwWmxA=", - "h1:SBzw5m2gpWPLp5YYRJfFqgjCpWQmHONBZNTFaITx1mQ=", - "h1:UCXQC3JJhSE55qmfUIS1AUftH5odVHEwMZokkbnkWGw=", - "h1:VerLMJ2+xfYFYSYXa/i6tPMEpUQuW3nEtFk1I0BYxhI=", - "h1:cgic5im+btaiU54EuPO73+ewYuAZhazPBULTyW0AxSo=", - "h1:yobHGNuj2Z0WDd3w5QD4KX1x7+zP/1u13Khe1pCYz1Y=", - "h1:zNCqgTX3ZOgNe+5XIzXEn2/WVzph98RUNL+gs946I/M=", + "h1:/JoTJdmrba01bXAXhJox4D7HIppGAE8IcdmwrC1+NeI=", + "h1:1UxlwVhklQbnsyuCelue0dkQZUHA2cMjgYvl8lWRE8Q=", + "h1:3qXFXgT2RAseuYW20OUqBLMeSuKt5tbpNI15GU5J7KE=", + "h1:FtmujB+frf40ztU300FEd/cnah5o/ZVItCTYk+Qj1Wo=", + "h1:PhC05RRIJi2iPLf9ny2JsYxVlhdC4LvXsuPfg4U/Pbg=", + "h1:W9PU6CJQSb0p6pL+OonuWrCW2HJITiIykQkrwCAgYnw=", + "h1:c4ksHVh0kRBFDvP3peYx99oZgh/afzOGxPJwdApcKBU=", + "h1:fybaK74buTd4Ys2CUZm6jw7NXtSqtcLoW2jeNB4Ff2E=", + "h1:h55lVbwYeHIfdysoWDXaDQ5y9LSXc2vEfRKmpM4wzlA=", + "h1:xUcvXNL047wjwjSqmOLjP1k1hAjiFPCdYc235503v2k=", + "h1:yF3EvGbN+7hGQKhPbZijmFk24UDTw9yldkQ1isUM+B4=", ] } @@ -53,21 +53,21 @@ provider "registry.terraform.io/hashicorp/kubernetes" { } provider "registry.terraform.io/integrations/github" { - version = "5.37.0" + version = "5.39.0" hashes = [ - "h1:3tKH/krwuaSzYkMmp2xUcSLnLRvFzQLC3ayMesZCEkI=", - "h1:3uaqonpfNk8M0arDVv7i06/lu9DgL4HgQZy1dC/Q4/Y=", - "h1:9fj1PezB73toNyS9ICz9QPq0Y1jxbpoTsuQq1HgXp9I=", - "h1:LznPgweBBPqZqHiPs8ZfR7ZApU/K6LzzCfvP5dKz3mU=", - "h1:NpU2Fcx90IsYhU5Bwc1+3btr+OfJVnydIWu6wJ3BF+E=", - "h1:QFomzv/9K0y7ll5he/Lj4mBeHoB3hPJu4ViMJy3zCb0=", - "h1:UznYN15+EFAEgKp9Oj20KX/K5LxamCc/zjg9cZ7Onhc=", - "h1:bnrhlBIAlluDFqs34wAvm1e9Bte++YkpuW9AKY0I7B0=", - "h1:mYoDpam3koAsEyd6XnKxBII2Lz+uKNIejzngdS+ERcs=", - "h1:ohj/etspnqRu+bxCiC1tAKetZMPWDJZeQBf/NmvKkiE=", - "h1:orcV73iUr6mfo3p+a/y+MZ0EDd461ucHIXcwK59rLaI=", - "h1:qorCAV/FNYW5PwzX7AV8O4ue9cAtNaT1foPjpxjoMVY=", - "h1:uGDZ3k4/9LxyKCrU6qxh+wWJFFXocCH+m25cQ9WeQuo=", - "h1:uPmf3/0IVrCHUx55PltKKFDa2RnZtIfOaHid7LMXACU=", + "h1:06Scx58eTkq75+Gab2yLEGSJVExgBrs3x41VzZsqLpM=", + "h1:1husYTourHfAVSU5PBw+2Zy+lHEOo5Ps5it7ImFpgzI=", + "h1:67gvGDvZwT3y2Mm2KLwU27UlnRBJYmoX46umuEYYRcA=", + "h1:AMn+8x91H4L0bNXgfGA4mEmjumfd7lslBRNsf+Z3J9Q=", + "h1:B2pPhXlLR5IHfoO6MQ70EgfavVLUlFd8FQw2zxy04RM=", + "h1:CWHfRWb9wFjeatvmSIptEI7AC4XEytP0qL5G8NMwCRY=", + "h1:EsDsxcxdtvQ6D64PNbkGG6PbAC2l2ECeCryGPw6uKIw=", + "h1:GbDlqPqMnI0DAmfb4BYpgAVZr2COQ1W6SHmeZCuWCO0=", + "h1:LepBhd6HaETXMLOUZUQvjCnRnv656U5rxRNgdN9A8rA=", + "h1:SWuVpPS2BGa1FfeN4XbRUHaGfB7/MXE2889UDb2LkWk=", + "h1:Ub3ir2MB3ST+iUELd6oXBYhKpvPVal9be8GaUzLyCTs=", + "h1:mpO68ifHJruMIuSvOuCa4PQt841arZr50O+uCxjhVak=", + "h1:sCvgFP1CL4oUkic0FXxNc8Xbi7ShAaqfMxv7JuHi7p8=", + "h1:ycsN9UqZkAhye5wBb8HRGyarfBeUCVBwoweenzGqtWA=", ] } diff --git a/jobs/Gemfile.lock b/jobs/Gemfile.lock index 59613ec56d..1fa5f8b980 100644 --- a/jobs/Gemfile.lock +++ b/jobs/Gemfile.lock @@ -35,7 +35,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.56.3) + rubocop (1.56.4) base64 (~> 0.1.1) json (~> 2.3) language_server-protocol (>= 3.17.0) @@ -66,7 +66,7 @@ GEM standard-performance (1.2.0) lint_roller (~> 1.1) rubocop-performance (~> 1.19.0) - unicode-display_width (2.4.2) + unicode-display_width (2.5.0) PLATFORMS ruby diff --git a/spec/Gemfile.lock b/spec/Gemfile.lock index 7f18148f88..df957ec195 100644 --- a/spec/Gemfile.lock +++ b/spec/Gemfile.lock @@ -35,7 +35,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.56.3) + rubocop (1.56.4) base64 (~> 0.1.1) json (~> 2.3) language_server-protocol (>= 3.17.0) @@ -66,7 +66,7 @@ GEM standard-performance (1.2.0) lint_roller (~> 1.1) rubocop-performance (~> 1.19.0) - unicode-display_width (2.4.2) + unicode-display_width (2.5.0) PLATFORMS x86_64-darwin-21 From 2648663e8a2c4b3d785333e923cb2acb77fb9459 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 03:26:09 +0000 Subject: [PATCH 282/294] Bump com.puppycrawl.tools:checkstyle from 10.12.3 to 10.12.4 in /src (#2193) Bumps [com.puppycrawl.tools:checkstyle](https://github.com/checkstyle/checkstyle) from 10.12.3 to 10.12.4. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-10.12.3...checkstyle-10.12.4) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/scheduler/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scheduler/pom.xml b/src/scheduler/pom.xml index 4d5d8a15c6..2292862719 100644 --- a/src/scheduler/pom.xml +++ b/src/scheduler/pom.xml @@ -189,7 +189,7 @@ com.puppycrawl.tools checkstyle - 10.12.3 + 10.12.4 From bdc308deb9f22385d530b96ceaea20382138b26d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 06:09:44 +0000 Subject: [PATCH 283/294] chore(deps): update dependency gruntwork-io/terragrunt to v0.51.7 (#2192) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index b34e13c0f0..a92962bf18 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.5 terraform 1.5.7 terraform-lsp -terragrunt 0.51.5 +terragrunt 0.51.7 From ece72efca98f76eccd72888fe24aa1b6641c3b78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Mon, 2 Oct 2023 10:37:24 +0200 Subject: [PATCH 284/294] Rename files; --- ci/autoscaler/pipeline.yml | 17 ++++++++--------- .../tasks/make/{make.yml => make.yaml} | 0 2 files changed, 8 insertions(+), 9 deletions(-) rename ci/autoscaler/tasks/make/{make.yml => make.yaml} (100%) diff --git a/ci/autoscaler/pipeline.yml b/ci/autoscaler/pipeline.yml index b07988b944..55c759b70e 100644 --- a/ci/autoscaler/pipeline.yml +++ b/ci/autoscaler/pipeline.yml @@ -26,7 +26,6 @@ anchors: operations/remove-metricsgateway.yml operations/enable-scheduler-logging.yml - app-autoscaler-ops-files-upgrade: &app-autoscaler-ops-files-upgrade OPS_FILES: | operations/add-releases.yml @@ -234,7 +233,7 @@ jobs: trigger: true - get: ci - task: make-prerelease - file: ci/ci/autoscaler/tasks/make/make.yml + file: ci/ci/autoscaler/tasks/make/make.yaml params: TARGETS: go-mod-tidy vendor db scheduler - task: deploy-autoscaler @@ -280,7 +279,7 @@ jobs: trigger: true - get: ci - task: make-prerelease - file: ci/ci/autoscaler/tasks/make/make.yml + file: ci/ci/autoscaler/tasks/make/make.yaml params: TARGETS: go-mod-tidy vendor db scheduler - task: deploy-autoscaler @@ -328,7 +327,7 @@ jobs: trigger: true - get: ci - task: make-prerelease - file: ci/ci/autoscaler/tasks/make/make.yml + file: ci/ci/autoscaler/tasks/make/make.yaml params: TARGETS: go-mod-tidy vendor db scheduler - task: deploy-autoscaler @@ -365,7 +364,7 @@ jobs: - get: bbl-state - get: app-autoscaler-release - task: make-prerelease - file: ci/ci/autoscaler/tasks/make/make.yml + file: ci/ci/autoscaler/tasks/make/make.yaml params: TARGETS: go-mod-tidy vendor db scheduler - task: deploy-autoscaler @@ -378,11 +377,11 @@ jobs: params: <<: *performance-env - task: setup-performance - file: ci/ci/autoscaler/tasks/make/make.yml + file: ci/ci/autoscaler/tasks/make/make.yaml params: TARGETS: setup-performance - task: run-performance - file: ci/ci/autoscaler/tasks/make/make.yml + file: ci/ci/autoscaler/tasks/make/make.yaml params: TARGETS: run-performance @@ -422,7 +421,7 @@ jobs: pre_upgrade NODES: 1 - task: make-prerelease - file: ci/ci/autoscaler/tasks/make/make.yml + file: ci/ci/autoscaler/tasks/make/make.yaml params: TARGETS: go-mod-tidy vendor db scheduler - task: deploy-autoscaler @@ -451,7 +450,7 @@ jobs: passed: [upgrade-test] - get: ci - task: make-prerelease - file: ci/ci/autoscaler/tasks/make/make.yml + file: ci/ci/autoscaler/tasks/make/make.yaml params: TARGETS: go-mod-tidy vendor db scheduler - task: release-autoscaler diff --git a/ci/autoscaler/tasks/make/make.yml b/ci/autoscaler/tasks/make/make.yaml similarity index 100% rename from ci/autoscaler/tasks/make/make.yml rename to ci/autoscaler/tasks/make/make.yaml From 07cc4a34ed992bdf3b8c119d4ca237a3d7a90b17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Mon, 2 Oct 2023 10:56:19 +0200 Subject: [PATCH 285/294] Fix pipeline; --- Makefile | 24 +++++++++++++++--------- ci/autoscaler/pipeline.yml | 18 ++++++++++++------ ci/autoscaler/tasks/make/make.sh | 4 ++-- 3 files changed, 29 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 900bb8d807..c102a5c0dc 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,13 @@ SHELL := /bin/bash .SHELLFLAGS := -eu -o pipefail -c ${SHELLFLAGS} MAKEFLAGS = -s -go_modules := $(shell find . -maxdepth 3 -name "*.mod" -exec dirname {} \; | sed 's|\./src/||' | sort) +go-acceptance-dir := ./src/acceptance +go-autoscaler-dir := ./src/autoscaler +go-changelog-dir := ./src/changelog +go-changeloglockcleander-dir := ./src/changeloglockcleaner +go-test-app-dir := ./src/acceptance/assets/app/go_app + +go_modules := $(shell find . -maxdepth 3 -name "*.mod" -exec dirname {} \; | sed 's|\./src/||' | sort) all_modules := $(go_modules) db scheduler MVN_OPTS = "-Dmaven.test.skip=true" @@ -23,7 +29,8 @@ CI ?= false VERSION ?= 0.0.testing DEST ?= build -GOLANGCI_LINT_VERSION = v$(shell cat .tool-versions | grep golangci-lint | cut --delimiter=' ' --fields='2') +GOLANGCI_LINT_VERSION = v$(shell cat .tool-versions | grep golangci-lint \ + | cut --delimiter=' ' --fields='2') export BUILDIN_MODE ?= false export DEBUG ?= false @@ -257,18 +264,17 @@ acceptance-release: clean-acceptance go-mod-tidy vendor build-test-app @mkdir -p ${DEST} @tar --create --auto-compress --directory="src" --file="${ACCEPTANCE_TESTS_FILE}" 'acceptance' - +.PHONY: generate-fakes autoscaler.generate-fakes test-app.generate-fakes +generate-fakes: autoscaler.generate-fakes test-app.generate-fakes +autoscaler.generate-fakes: + make --directory='${go-autoscaler-dir}' generate-fakes +test-app.generate-fakes: + make --directory='${go-test-app-dir}' generate-fakes .PHONY: go-mod-tidy go-mod-tidy: acceptance.go-mod-tidy autoscaler.go-mod-tidy changelog.go-mod-tidy \ changeloglockcleander.go-mod-tidy test-app.go-mod-tidy -go-acceptance-dir := ./src/acceptance -go-autoscaler-dir := ./src/autoscaler -go-changelog-dir := ./src/changelog -go-changeloglockcleander-dir := ./src/changeloglockcleaner -go-test-app-dir := ./src/acceptance/assets/app/go_app - .PHONY: acceptance.go-mod-tidy autoscaler.go-mod-tidy changelog.go-mod-tidy \ changeloglockcleander.go-mod-tidy test-app.go-mod-tidy acceptance.go-mod-tidy: diff --git a/ci/autoscaler/pipeline.yml b/ci/autoscaler/pipeline.yml index 55c759b70e..3102162071 100644 --- a/ci/autoscaler/pipeline.yml +++ b/ci/autoscaler/pipeline.yml @@ -235,7 +235,8 @@ jobs: - task: make-prerelease file: ci/ci/autoscaler/tasks/make/make.yaml params: - TARGETS: go-mod-tidy vendor db scheduler + # ⚠️ Here it is used that make officially guarantees to reach the goals in the provided order. + TARGETS: generate-fakes go-mod-tidy go-mod-vendor db scheduler - task: deploy-autoscaler file: ci/ci/autoscaler/tasks/deploy-autoscaler.yml params: @@ -281,7 +282,8 @@ jobs: - task: make-prerelease file: ci/ci/autoscaler/tasks/make/make.yaml params: - TARGETS: go-mod-tidy vendor db scheduler + # ⚠️ Here it is used that make officially guarantees to reach the goals in the provided order. + TARGETS: generate-fakes go-mod-tidy go-mod-vendor db scheduler - task: deploy-autoscaler file: ci/ci/autoscaler/tasks/deploy-autoscaler.yml params: @@ -329,7 +331,8 @@ jobs: - task: make-prerelease file: ci/ci/autoscaler/tasks/make/make.yaml params: - TARGETS: go-mod-tidy vendor db scheduler + # ⚠️ Here it is used that make officially guarantees to reach the goals in the provided order. + TARGETS: generate-fakes go-mod-tidy go-mod-vendor db scheduler - task: deploy-autoscaler file: ci/ci/autoscaler/tasks/deploy-autoscaler.yml params: @@ -366,7 +369,8 @@ jobs: - task: make-prerelease file: ci/ci/autoscaler/tasks/make/make.yaml params: - TARGETS: go-mod-tidy vendor db scheduler + # ⚠️ Here it is used that make officially guarantees to reach the goals in the provided order. + TARGETS: generate-fakes go-mod-tidy go-mod-vendor db scheduler - task: deploy-autoscaler file: ci/ci/autoscaler/tasks/deploy-autoscaler.yml params: @@ -423,7 +427,8 @@ jobs: - task: make-prerelease file: ci/ci/autoscaler/tasks/make/make.yaml params: - TARGETS: go-mod-tidy vendor db scheduler + # ⚠️ Here it is used that make officially guarantees to reach the goals in the provided order. + TARGETS: generate-fakes go-mod-tidy go-mod-vendor db scheduler - task: deploy-autoscaler file: ci/ci/autoscaler/tasks/deploy-autoscaler.yml params: @@ -452,7 +457,8 @@ jobs: - task: make-prerelease file: ci/ci/autoscaler/tasks/make/make.yaml params: - TARGETS: go-mod-tidy vendor db scheduler + # ⚠️ Here it is used that make officially guarantees to reach the goals in the provided order. + TARGETS: generate-fakes go-mod-tidy go-mod-vendor db scheduler - task: release-autoscaler file: ci/ci/autoscaler/tasks/release-autoscaler.yml params: diff --git a/ci/autoscaler/tasks/make/make.sh b/ci/autoscaler/tasks/make/make.sh index c327bf968f..d2248da180 100755 --- a/ci/autoscaler/tasks/make/make.sh +++ b/ci/autoscaler/tasks/make/make.sh @@ -1,5 +1,5 @@ #!/bin/bash # shellcheck disable=SC2086 -set -euo pipefail +set -eu -o pipefail -make -C $1 ${TARGETS} +make --directory="${1}" ${TARGETS} From 9473e20409bab0f1309373d75de6721fcc5cc9f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Fri, 29 Sep 2023 17:55:50 +0200 Subject: [PATCH 286/294] Add test-skeleton; --- src/autoscaler/cf/errors.go | 6 +-- .../scalingengine/scalingengine_test.go | 54 +++++++++++++++---- 2 files changed, 47 insertions(+), 13 deletions(-) diff --git a/src/autoscaler/cf/errors.go b/src/autoscaler/cf/errors.go index 06f8b44dee..e274fc9162 100644 --- a/src/autoscaler/cf/errors.go +++ b/src/autoscaler/cf/errors.go @@ -33,7 +33,7 @@ func NewCfError(url string, resourceId string, statusCode int, respBody []byte) } cfError.ResourceId = resourceId cfError.StatusCode = statusCode - cfError.url = url + cfError.Url = url if !cfError.IsValid() { return fmt.Errorf("invalid cfError: resource %s status:%d body:%s :%w", resourceId, statusCode, truncateString(string(respBody), 512), ErrInvalidJson) @@ -46,7 +46,7 @@ type CfError struct { Errors ErrorItems `json:"errors"` StatusCode int ResourceId string - url string + Url string } type ErrorItems []CfErrorItem @@ -75,7 +75,7 @@ func (c *CfError) Error() string { if len(errs) > 0 { message = strings.Join(errs, ", ") } - return fmt.Sprintf("cf api Error url='%s', resourceId='%s': %s", c.url, c.ResourceId, message) + return fmt.Sprintf("cf api Error url='%s', resourceId='%s': %s", c.Url, c.ResourceId, message) } func (c *CfError) IsValid() bool { diff --git a/src/autoscaler/scalingengine/scalingengine_test.go b/src/autoscaler/scalingengine/scalingengine_test.go index 27e18ad658..b0783703be 100644 --- a/src/autoscaler/scalingengine/scalingengine_test.go +++ b/src/autoscaler/scalingengine/scalingengine_test.go @@ -1,6 +1,9 @@ package scalingengine_test import ( + "encoding/json" + "fmt" + "code.cloudfoundry.org/app-autoscaler/src/autoscaler/cf" "code.cloudfoundry.org/app-autoscaler/src/autoscaler/fakes" "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" @@ -104,7 +107,6 @@ var _ = Describe("ScalingEngine", func() { Expect(scalingResult.Status).To(Equal(models.ScalingStatusSucceeded)) Expect(scalingResult.Adjustment).To(Equal(1)) Expect(scalingResult.CooldownExpiredAt).To(Equal(clock.Now().Add(30 * time.Second).UnixNano())) - }) }) @@ -131,7 +133,6 @@ var _ = Describe("ScalingEngine", func() { Expect(scalingResult.Status).To(Equal(models.ScalingStatusIgnored)) Expect(scalingResult.Adjustment).To(Equal(0)) Expect(scalingResult.CooldownExpiredAt).To(Equal(int64(0))) - }) }) @@ -192,7 +193,6 @@ var _ = Describe("ScalingEngine", func() { Expect(scalingResult.Status).To(Equal(models.ScalingStatusIgnored)) Expect(scalingResult.Adjustment).To(Equal(0)) Expect(scalingResult.CooldownExpiredAt).To(Equal(int64(0))) - }) }) @@ -202,7 +202,6 @@ var _ = Describe("ScalingEngine", func() { setAppAndProcesses(5, appState) scalingEngineDB.CanScaleAppReturns(true, clock.Now().Add(0-30*time.Second).UnixNano(), nil) policyDB.GetAppPolicyReturns(&models.ScalingPolicy{InstanceMin: 1, InstanceMax: 6}, nil) - }) It("updates the app instance with max instances and stores the succeeded scaling history", func() { @@ -231,7 +230,6 @@ var _ = Describe("ScalingEngine", func() { Expect(scalingResult.Status).To(Equal(models.ScalingStatusSucceeded)) Expect(scalingResult.Adjustment).To(Equal(1)) Expect(scalingResult.CooldownExpiredAt).To(Equal(clock.Now().Add(30 * time.Second).UnixNano())) - }) }) @@ -241,7 +239,6 @@ var _ = Describe("ScalingEngine", func() { setAppAndProcesses(6, appState) scalingEngineDB.CanScaleAppReturns(true, clock.Now().Add(0-30*time.Second).UnixNano(), nil) policyDB.GetAppPolicyReturns(&models.ScalingPolicy{InstanceMin: 1, InstanceMax: 6}, nil) - }) It("updates the app instance with max instances and stores the ignored scaling history", func() { @@ -265,7 +262,6 @@ var _ = Describe("ScalingEngine", func() { Expect(scalingResult.Status).To(Equal(models.ScalingStatusIgnored)) Expect(scalingResult.Adjustment).To(Equal(0)) Expect(scalingResult.CooldownExpiredAt).To(Equal(int64(0))) - }) }) @@ -300,7 +296,6 @@ var _ = Describe("ScalingEngine", func() { Expect(scalingResult.Status).To(Equal(models.ScalingStatusSucceeded)) Expect(scalingResult.Adjustment).To(Equal(-1)) Expect(scalingResult.CooldownExpiredAt).To(Equal(clock.Now().Add(30 * time.Second).UnixNano())) - }) }) @@ -343,7 +338,6 @@ var _ = Describe("ScalingEngine", func() { Expect(scalingResult.Status).To(Equal(models.ScalingStatusSucceeded)) Expect(scalingResult.Adjustment).To(Equal(1)) Expect(scalingResult.CooldownExpiredAt).To(Equal(clock.Now().Add(30 * time.Second).UnixNano())) - }) }) @@ -377,10 +371,50 @@ var _ = Describe("ScalingEngine", func() { Expect(scalingResult.Status).To(Equal(models.ScalingStatusSucceeded)) Expect(scalingResult.Adjustment).To(Equal(-2)) Expect(scalingResult.CooldownExpiredAt).To(Equal(clock.Now().Add(30 * time.Second).UnixNano())) - }) }) + }) + Context("when the internal cf-client returns with an non-400 http-status-code", func() { + BeforeEach(func() { + cfAPIError := cf.CfError{ + Errors: cf.ErrorItems([]cf.CfErrorItem{cf.CfErrorItem{ + Code: 404, + Title: "Some title", + Detail: "Something went wrong.", + }}), + StatusCode: 404, ResourceId: "unknown resource", Url: "https://some.url", + } + cfAPIErrorJson, err := json.Marshal(cfAPIError) + if err != nil { + Fail("Test implementation wrong: Object not json-serializable!") + } + requestError := cf.NewCfError( + "A URL for an cloud-controller", "resourceID", cfAPIError.StatusCode, cfAPIErrorJson) + clientError := fmt.Errorf("Error doing a request: %w", requestError) + cfc.GetAppAndProcessesReturns(nil, clientError) + }) + + It("returns the error-message and the http-status-code", func() { + Expect(err).To(HaveOccurred()) + fmt.Print(err.Error()) // To do: Debug + + cfAPIError := cf.CfError{ + Errors: cf.ErrorItems([]cf.CfErrorItem{{ + Code: 404, + Title: "Some title", + Detail: "Something went wrong.", + }}), + StatusCode: 404, ResourceId: "unknown resource", Url: "https://some.url", + } + cfAPIErrorJson, err2 := json.Marshal(cfAPIError) + if err2 != nil { + Fail("Test implementation wrong: Object not json-serializable!") + } + cfErrorTypeProxy := cf.NewCfError("", "", 0, cfAPIErrorJson) // values don't matter + Expect(err).To(MatchError(cfErrorTypeProxy)) + Fail("🛠️ To do: Test still not implemented!") + }) }) Context("when getting app info from cloud foundry fails", func() { From 8ad8a9776050aaae3c0fe51118992e5ca5efc4d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Mon, 2 Oct 2023 16:03:11 +0200 Subject: [PATCH 287/294] Move test to the correct suite; --- .../scalingengine/scalingengine_test.go | 45 ---------------- .../server/scaling_handler_test.go | 51 +++++++++++++++++++ 2 files changed, 51 insertions(+), 45 deletions(-) diff --git a/src/autoscaler/scalingengine/scalingengine_test.go b/src/autoscaler/scalingengine/scalingengine_test.go index b0783703be..d5fc7bf653 100644 --- a/src/autoscaler/scalingengine/scalingengine_test.go +++ b/src/autoscaler/scalingengine/scalingengine_test.go @@ -1,9 +1,6 @@ package scalingengine_test import ( - "encoding/json" - "fmt" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/cf" "code.cloudfoundry.org/app-autoscaler/src/autoscaler/fakes" "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" @@ -375,48 +372,6 @@ var _ = Describe("ScalingEngine", func() { }) }) - Context("when the internal cf-client returns with an non-400 http-status-code", func() { - BeforeEach(func() { - cfAPIError := cf.CfError{ - Errors: cf.ErrorItems([]cf.CfErrorItem{cf.CfErrorItem{ - Code: 404, - Title: "Some title", - Detail: "Something went wrong.", - }}), - StatusCode: 404, ResourceId: "unknown resource", Url: "https://some.url", - } - cfAPIErrorJson, err := json.Marshal(cfAPIError) - if err != nil { - Fail("Test implementation wrong: Object not json-serializable!") - } - requestError := cf.NewCfError( - "A URL for an cloud-controller", "resourceID", cfAPIError.StatusCode, cfAPIErrorJson) - clientError := fmt.Errorf("Error doing a request: %w", requestError) - cfc.GetAppAndProcessesReturns(nil, clientError) - }) - - It("returns the error-message and the http-status-code", func() { - Expect(err).To(HaveOccurred()) - fmt.Print(err.Error()) // To do: Debug - - cfAPIError := cf.CfError{ - Errors: cf.ErrorItems([]cf.CfErrorItem{{ - Code: 404, - Title: "Some title", - Detail: "Something went wrong.", - }}), - StatusCode: 404, ResourceId: "unknown resource", Url: "https://some.url", - } - cfAPIErrorJson, err2 := json.Marshal(cfAPIError) - if err2 != nil { - Fail("Test implementation wrong: Object not json-serializable!") - } - cfErrorTypeProxy := cf.NewCfError("", "", 0, cfAPIErrorJson) // values don't matter - Expect(err).To(MatchError(cfErrorTypeProxy)) - Fail("🛠️ To do: Test still not implemented!") - }) - }) - Context("when getting app info from cloud foundry fails", func() { BeforeEach(func() { cfc.GetAppAndProcessesReturns(nil, errors.New("test error")) diff --git a/src/autoscaler/scalingengine/server/scaling_handler_test.go b/src/autoscaler/scalingengine/server/scaling_handler_test.go index 1983d05d82..ea0ba097e8 100644 --- a/src/autoscaler/scalingengine/server/scaling_handler_test.go +++ b/src/autoscaler/scalingengine/server/scaling_handler_test.go @@ -1,6 +1,9 @@ package server_test import ( + "fmt" + + "code.cloudfoundry.org/app-autoscaler/src/autoscaler/cf" "code.cloudfoundry.org/app-autoscaler/src/autoscaler/db" "code.cloudfoundry.org/app-autoscaler/src/autoscaler/fakes" "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" @@ -106,6 +109,54 @@ var _ = Describe("ScalingHandler", func() { }) }) + Context("when an internal cf-call fails", func() { + BeforeEach(func() { + cfAPIError := cf.CfError{ + Errors: cf.ErrorItems([]cf.CfErrorItem{cf.CfErrorItem{ + Code: http.StatusNotFound, + Title: "Some title", + Detail: "Something went wrong.", + }}), + StatusCode: http.StatusNotFound, ResourceId: "unknown resource", Url: "https://some.url", + } + cfAPIErrorJson, err := json.Marshal(cfAPIError) + Expect(err).NotTo(HaveOccurred()) // Test implementation wrong: Object not json-serializable!" + requestError := cf.NewCfError( + "A URL for an cloud-controller", "resourceID", cfAPIError.StatusCode, cfAPIErrorJson) + clientError := fmt.Errorf("Error doing a request: %w", requestError) + + scalingEngine.ScaleReturns(&models.AppScalingResult{ + AppId: "an-app-id", + Status: models.ScalingStatusFailed, + Adjustment: 0, + CooldownExpiredAt: 0, + }, clientError) + + trigger = &models.Trigger{ + MetricType: testMetricName, + Adjustment: "+1", + } + body, err = json.Marshal(trigger) + Expect(err).NotTo(HaveOccurred()) + + req, err = http.NewRequest("POST", "", bytes.NewReader(body)) + Expect(err).NotTo(HaveOccurred()) + }) + + It("returns the status code of the cloud api", func() { + Expect(resp.Code).To(Equal(http.StatusNotFound)) + + // errJson := &models.ErrorResponse{} + // err = json.Unmarshal(resp.Body.Bytes(), errJson) + // Expect(err).ToNot(HaveOccurred()) + // Expect(errJson).To(Equal(&models.ErrorResponse{ + // Code: "Internal-server-error", + // Message: "Error taking scaling action", + // })) + Fail("🛠️ To do: Test still not implemented!") + }) + }) + Context("when scaling app fails", func() { BeforeEach(func() { scalingEngine.ScaleReturns(&models.AppScalingResult{ From 34c65dfc379d37df6798060980fce079317719ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Mon, 2 Oct 2023 16:15:38 +0200 Subject: [PATCH 288/294] Make the code pass the test and improve the test; --- .../scalingengine/server/scaling_handler.go | 18 +++++++++++++++--- .../server/scaling_handler_test.go | 15 +++++++-------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/autoscaler/scalingengine/server/scaling_handler.go b/src/autoscaler/scalingengine/server/scaling_handler.go index 72523eeff8..58c2b7607d 100644 --- a/src/autoscaler/scalingengine/server/scaling_handler.go +++ b/src/autoscaler/scalingengine/server/scaling_handler.go @@ -1,6 +1,9 @@ package server import ( + "errors" + + "code.cloudfoundry.org/app-autoscaler/src/autoscaler/cf" "code.cloudfoundry.org/app-autoscaler/src/autoscaler/db" "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" "code.cloudfoundry.org/app-autoscaler/src/autoscaler/scalingengine" @@ -49,9 +52,18 @@ func (h *ScalingHandler) Scale(w http.ResponseWriter, r *http.Request, vars map[ if err != nil { logger.Error("failed-to-scale", err, lager.Data{"trigger": trigger}) - handlers.WriteJSONResponse(w, http.StatusInternalServerError, models.ErrorResponse{ - Code: "Internal-server-error", - Message: "Error taking scaling action"}) + + var cfApiClientErrTypeProxy *cf.CfError + if errors.As(err, &cfApiClientErrTypeProxy) { + handlers.WriteJSONResponse(w, cfApiClientErrTypeProxy.StatusCode, models.ErrorResponse{ + Code: "Error on request to the cloud-controller via a cf-client", + Message: "Error taking scaling action"}) + } else { + handlers.WriteJSONResponse(w, http.StatusInternalServerError, models.ErrorResponse{ + Code: "Internal-server-error", + Message: "Error taking scaling action"}) + } + return } diff --git a/src/autoscaler/scalingengine/server/scaling_handler_test.go b/src/autoscaler/scalingengine/server/scaling_handler_test.go index ea0ba097e8..3fca57de0c 100644 --- a/src/autoscaler/scalingengine/server/scaling_handler_test.go +++ b/src/autoscaler/scalingengine/server/scaling_handler_test.go @@ -146,14 +146,13 @@ var _ = Describe("ScalingHandler", func() { It("returns the status code of the cloud api", func() { Expect(resp.Code).To(Equal(http.StatusNotFound)) - // errJson := &models.ErrorResponse{} - // err = json.Unmarshal(resp.Body.Bytes(), errJson) - // Expect(err).ToNot(HaveOccurred()) - // Expect(errJson).To(Equal(&models.ErrorResponse{ - // Code: "Internal-server-error", - // Message: "Error taking scaling action", - // })) - Fail("🛠️ To do: Test still not implemented!") + errJson := &models.ErrorResponse{} + err = json.Unmarshal(resp.Body.Bytes(), errJson) + Expect(err).ToNot(HaveOccurred()) + Expect(errJson).To(Equal(&models.ErrorResponse{ + Code: "Error on request to the cloud-controller via a cf-client", + Message: "Error taking scaling action", + })) }) }) From ae5325e5fd3177e597673f5a537b4c5ef7f73db2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 02:05:27 +0000 Subject: [PATCH 289/294] Bump org.liquibase:liquibase-core from 4.23.2 to 4.24.0 in /src (#2196) Bumps [org.liquibase:liquibase-core](https://github.com/liquibase/liquibase) from 4.23.2 to 4.24.0. - [Release notes](https://github.com/liquibase/liquibase/releases) - [Changelog](https://github.com/liquibase/liquibase/blob/master/changelog.txt) - [Commits](https://github.com/liquibase/liquibase/compare/v4.23.2...v4.24.0) --- updated-dependencies: - dependency-name: org.liquibase:liquibase-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/db/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/pom.xml b/src/db/pom.xml index b20cbbb9b5..685221f32f 100644 --- a/src/db/pom.xml +++ b/src/db/pom.xml @@ -20,7 +20,7 @@ org.liquibase liquibase-core - 4.23.2 + 4.24.0 org.yaml From 9e0108d5ed49e0d96f20689fdd08db247b3e87cd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 04:54:14 +0000 Subject: [PATCH 290/294] chore(deps): update dependency nektos/act to v0.2.52 (#2195) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tool-versions b/.tool-versions index e53bd85912..5dda113c31 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,4 +1,4 @@ -act 0.2.51 +act 0.2.52 actionlint 1.6.26 bosh 7.4.0 cf 8.7.3 From d98f5814bcaa56f9e11d8cb23d19d4ff882e53d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 09:21:49 +0200 Subject: [PATCH 291/294] Bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0 in /src/autoscaler (#2186) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump github.com/prometheus/client_golang in /src/autoscaler Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.16.0 to 1.17.0. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/v1.17.0/CHANGELOG.md) - [Commits](https://github.com/prometheus/client_golang/compare/v1.16.0...v1.17.0) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * 🤖🦾🛠️ go mod tidy & make package-specs --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- packages/golangapiserver/spec | 1 - packages/operator/spec | 1 - packages/scalingengine/spec | 1 - src/autoscaler/go.mod | 9 ++++----- src/autoscaler/go.sum | 16 ++++++++-------- 5 files changed, 12 insertions(+), 16 deletions(-) diff --git a/packages/golangapiserver/spec b/packages/golangapiserver/spec index 123daa30c2..f58c0cd975 100644 --- a/packages/golangapiserver/spec +++ b/packages/golangapiserver/spec @@ -40,7 +40,6 @@ files: - autoscaler/vendor/github.com/go-chi/chi/v5/* # gosub - autoscaler/vendor/github.com/go-sql-driver/mysql/* # gosub - autoscaler/vendor/github.com/golang/protobuf/proto/* # gosub -- autoscaler/vendor/github.com/golang/protobuf/ptypes/timestamp/* # gosub - autoscaler/vendor/github.com/google/uuid/* # gosub - autoscaler/vendor/github.com/gorilla/mux/* # gosub - autoscaler/vendor/github.com/hashicorp/go-cleanhttp/* # gosub diff --git a/packages/operator/spec b/packages/operator/spec index 04e479ef29..9ffcd12dbe 100644 --- a/packages/operator/spec +++ b/packages/operator/spec @@ -29,7 +29,6 @@ files: - autoscaler/vendor/github.com/cespare/xxhash/v2/* # gosub - autoscaler/vendor/github.com/go-sql-driver/mysql/* # gosub - autoscaler/vendor/github.com/golang/protobuf/proto/* # gosub -- autoscaler/vendor/github.com/golang/protobuf/ptypes/timestamp/* # gosub - autoscaler/vendor/github.com/gorilla/mux/* # gosub - autoscaler/vendor/github.com/hashicorp/go-cleanhttp/* # gosub - autoscaler/vendor/github.com/hashicorp/go-retryablehttp/* # gosub diff --git a/packages/scalingengine/spec b/packages/scalingengine/spec index d15e97c1fb..1c211d2b02 100644 --- a/packages/scalingengine/spec +++ b/packages/scalingengine/spec @@ -31,7 +31,6 @@ files: - autoscaler/vendor/github.com/cespare/xxhash/v2/* # gosub - autoscaler/vendor/github.com/go-sql-driver/mysql/* # gosub - autoscaler/vendor/github.com/golang/protobuf/proto/* # gosub -- autoscaler/vendor/github.com/golang/protobuf/ptypes/timestamp/* # gosub - autoscaler/vendor/github.com/gorilla/mux/* # gosub - autoscaler/vendor/github.com/hashicorp/go-cleanhttp/* # gosub - autoscaler/vendor/github.com/hashicorp/go-retryablehttp/* # gosub diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 601a29681f..f4210ed029 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -26,7 +26,7 @@ require ( github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pivotal-cf/brokerapi/v10 v10.0.0 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.16.0 + github.com/prometheus/client_golang v1.17.0 github.com/rubyist/circuitbreaker v2.2.1+incompatible github.com/steinfletcher/apitest v1.5.15 github.com/stretchr/testify v1.8.4 @@ -69,10 +69,9 @@ require ( github.com/pborman/uuid v1.2.1 // indirect github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect + github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect + github.com/prometheus/common v0.44.0 // indirect + github.com/prometheus/procfs v0.11.1 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect golang.org/x/mod v0.12.0 // indirect diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index 50ac8e6ad4..ad9113beae 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -957,23 +957,23 @@ github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= +github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM= +github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= +github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rubyist/circuitbreaker v2.2.1+incompatible h1:KUKd/pV8Geg77+8LNDwdow6rVCAYOp8+kHUyFvL6Mhk= github.com/rubyist/circuitbreaker v2.2.1+incompatible/go.mod h1:Ycs3JgJADPuzJDwffe12k6BZT8hxVi6lFK+gWYJLN4A= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= From ad8e4bf2292c3869b216091c9ff3dd1091f7ce1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Wed, 4 Oct 2023 11:22:43 +0200 Subject: [PATCH 292/294] Print error-description into the output; --- src/autoscaler/scalingengine/server/scaling_handler.go | 7 ++++++- .../scalingengine/server/scaling_handler_test.go | 6 ++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/autoscaler/scalingengine/server/scaling_handler.go b/src/autoscaler/scalingengine/server/scaling_handler.go index 58c2b7607d..146a10897e 100644 --- a/src/autoscaler/scalingengine/server/scaling_handler.go +++ b/src/autoscaler/scalingengine/server/scaling_handler.go @@ -55,9 +55,14 @@ func (h *ScalingHandler) Scale(w http.ResponseWriter, r *http.Request, vars map[ var cfApiClientErrTypeProxy *cf.CfError if errors.As(err, &cfApiClientErrTypeProxy) { + errorDescription, err := json.Marshal(cfApiClientErrTypeProxy) + if err != nil { + logger.Error("failed-to-serialize cf-api-error", err) + } + handlers.WriteJSONResponse(w, cfApiClientErrTypeProxy.StatusCode, models.ErrorResponse{ Code: "Error on request to the cloud-controller via a cf-client", - Message: "Error taking scaling action"}) + Message: fmt.Sprintf("Error taking scaling action:\n%s", string(errorDescription))}) } else { handlers.WriteJSONResponse(w, http.StatusInternalServerError, models.ErrorResponse{ Code: "Internal-server-error", diff --git a/src/autoscaler/scalingengine/server/scaling_handler_test.go b/src/autoscaler/scalingengine/server/scaling_handler_test.go index 3fca57de0c..eebafc7409 100644 --- a/src/autoscaler/scalingengine/server/scaling_handler_test.go +++ b/src/autoscaler/scalingengine/server/scaling_handler_test.go @@ -148,11 +148,9 @@ var _ = Describe("ScalingHandler", func() { errJson := &models.ErrorResponse{} err = json.Unmarshal(resp.Body.Bytes(), errJson) + Expect(err).ToNot(HaveOccurred()) - Expect(errJson).To(Equal(&models.ErrorResponse{ - Code: "Error on request to the cloud-controller via a cf-client", - Message: "Error taking scaling action", - })) + Expect(errJson.Code).To(Equal("Error on request to the cloud-controller via a cf-client")) }) }) From 66d179237cb5ed196f7a23064268bde31f802795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Weisbarth?= Date: Wed, 4 Oct 2023 12:06:58 +0200 Subject: [PATCH 293/294] gofmt --- src/autoscaler/scalingengine/server/scaling_handler_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/autoscaler/scalingengine/server/scaling_handler_test.go b/src/autoscaler/scalingengine/server/scaling_handler_test.go index eebafc7409..127311409d 100644 --- a/src/autoscaler/scalingengine/server/scaling_handler_test.go +++ b/src/autoscaler/scalingengine/server/scaling_handler_test.go @@ -112,9 +112,9 @@ var _ = Describe("ScalingHandler", func() { Context("when an internal cf-call fails", func() { BeforeEach(func() { cfAPIError := cf.CfError{ - Errors: cf.ErrorItems([]cf.CfErrorItem{cf.CfErrorItem{ - Code: http.StatusNotFound, - Title: "Some title", + Errors: cf.ErrorItems([]cf.CfErrorItem{{ + Code: http.StatusNotFound, + Title: "Some title", Detail: "Something went wrong.", }}), StatusCode: http.StatusNotFound, ResourceId: "unknown resource", Url: "https://some.url", From 7fa945e659addf29f2707953ecae103bb258457e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 10:57:22 +0000 Subject: [PATCH 294/294] chore(deps): update dependency gruntwork-io/terragrunt to v0.51.8 (#2197) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- ci/terragrunt/.tool-versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index a92962bf18..e429e32a6f 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -3,4 +3,4 @@ helm 3.12.3 python 3.11.5 terraform 1.5.7 terraform-lsp -terragrunt 0.51.7 +terragrunt 0.51.8