Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
feat: addressed next llm review comments
=4f2f04c26f44
diff --git a/backend/src/server/app.ts b/backend/src/server/app.tsindex 32213a9794..bb64e1dea0 100644--- a/backend/src/server/app.ts+++ b/backend/src/server/app.ts@@ -149,7 +149,7 @@ export const main = async ({}await server.register(fastifyErrHandler);- await server.register(fastifySwagger);+ await server.register(fastifySwagger, { fullSpec: appCfg.isOpenApiFullSpec });await server.register(fastifyFormBody);await server.register(websocket, {options: { maxPayload: 64 * 1024 } // 64 KBdiff --git a/backend/src/server/plugins/swagger.ts b/backend/src/server/plugins/swagger.tsindex a7352bfe98..fb8186fa8c 100644--- a/backend/src/server/plugins/swagger.ts+++ b/backend/src/server/plugins/swagger.ts@@ -10,8 +10,6 @@ import { z } from "zod";import { ApiDocsTags } from "@app/lib/api-docs";-import { getConfig } from "@app/lib/config/env";-import { fullJsonSchemaTransform, jsonSchemaTransform } from "./fastify-zod";const DOCS_ROUTE_PREFIX = "/api/docs";@@ -141,9 +139,9 @@ const pickSpecEncoding = (header: FastifyRequest["headers"]["accept-encoding"]):return null;};-export const fastifySwagger = fp(async (fastify) => {+export const fastifySwagger = fp(async (fastify, { fullSpec = false }: { fullSpec?: boolean }) => {await fastify.register(swagger, {- transform: getConfig().isOpenApiFullSpec ? fullJsonSchemaTransform : jsonSchemaTransform,+ transform: fullSpec ? fullJsonSchemaTransform : jsonSchemaTransform,openapi: {info: {title: "Infisical API",diff --git a/tests/go.mod b/tests/go.modindex 74dea0cd58..ebac1c8741 100644--- a/tests/go.mod+++ b/tests/go.mod@@ -32,7 +32,7 @@ require (github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 // indirectgithub.com/ebitengine/purego v0.10.1 // indirectgithub.com/felixge/httpsnoop v1.1.0 // indirect- github.com/getkin/kin-openapi v0.142.0 // indirect+ github.com/getkin/kin-openapi v0.148.0 // indirectgithub.com/go-logr/logr v1.4.3 // indirectgithub.com/go-logr/stdr v1.2.2 // indirectgithub.com/go-ole/go-ole v1.3.0 // indirect@@ -56,7 +56,7 @@ require (github.com/opencontainers/image-spec v1.1.1 // indirectgithub.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirectgithub.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect- github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect+ github.com/santhosh-tekuri/jsonschema/v6 v6.0.3 // indirectgithub.com/shirou/gopsutil/v4 v4.26.6 // indirectgithub.com/sirupsen/logrus v1.9.4 // indirectgithub.com/speakeasy-api/jsonpath v0.6.3 // indirectdiff --git a/tests/go.sum b/tests/go.sumindex c5e811bac4..b7fef67460 100644--- a/tests/go.sum+++ b/tests/go.sum@@ -53,8 +53,8 @@ github.com/felixge/httpsnoop v1.1.0/go.mod h1:Zqxgdd+1Rkcz8euOqdr7lqgCRJztwr5hp9github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=-github.com/getkin/kin-openapi v0.142.0 h1:izj0vBdFprMhitfzaX8sTqztsEQyvwhssBoB6n8NO7w=-github.com/getkin/kin-openapi v0.142.0/go.mod h1:3BH9M9XDe/y9M5DSvEocVYAYq1w0qrhJHjC/vZi0AaY=+github.com/getkin/kin-openapi v0.148.0 h1:+7YqIOP2D1r7ht8LkPQE5dpty2pr9NFSP/7xXIxwNUA=+github.com/getkin/kin-openapi v0.148.0/go.mod h1:1+BHDzstro+P5CKtPy1X4PfofnFgmRe6uvMy9+r9fKY=github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=@@ -160,8 +160,8 @@ github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVtgithub.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=-github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ=-github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU=+github.com/santhosh-tekuri/jsonschema/v6 v6.0.3 h1:1EYB5IzjZawrrnELUi78f9fPu57HuXjmddZPjrls/28=+github.com/santhosh-tekuri/jsonschema/v6 v6.0.3/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU=github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=github.com/shirou/gopsutil/v4 v4.26.6 h1:Mzr/npDtQC/xpeEuQKHZt8Zo9CmPvhTj8nkR8w5TLDs=diff --git a/tests/infra/runner.go b/tests/infra/runner.goindex ab4744c67a..0b3834a450 100644--- a/tests/infra/runner.go+++ b/tests/infra/runner.go@@ -276,8 +276,9 @@ func (r *dockerRunner) Run(ctx context.Context, spec ContainerSpec) (Container,if spec.Check != nil {if err := spec.Check(ctx, c); err != nil {- // Left running, the next run would adopt it by name and fail the same way.- _ = c.Stop(context.WithoutCancel(ctx))+ if !c.Adopted {+ _ = c.Stop(context.WithoutCancel(ctx))+ }return Container{}, fmt.Errorf("infra: %s came up but is not usable: %w", spec.Name, err)}}