Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix review

Thiago Araujo da Silvaa5aada3c5b0b
diff --git a/.github/actions/generate-openapi-spec/action.yml b/.github/actions/generate-openapi-spec/action.yml
index 4c0fa7abd1..ee855aaa42 100644
--- a/.github/actions/generate-openapi-spec/action.yml
+++ b/.github/actions/generate-openapi-spec/action.yml
@@ -55,8 +55,9 @@ runs:
shell: bash
run: |
docker run --name "${{ inputs.container-name }}" -d -p ${{ inputs.port }}:4000 \
- -e DB_CONNECTION_URI="postgres://infisical:[email protected]:5432/${OPENAPI_SPEC_DB}?sslmode=disable" \
- -e REDIS_URL=redis://172.17.0.1:6379 \
+ --add-host=host.docker.internal:host-gateway \
+ -e DB_CONNECTION_URI="postgres://infisical:[email protected]:5432/${OPENAPI_SPEC_DB}?sslmode=disable" \
+ -e REDIS_URL=redis://host.docker.internal:6379 \
-e JWT_AUTH_SECRET=something-random \
-e ENCRYPTION_KEY=4bnfe4e407b8921c104518903515b218 \
-e TELEMETRY_ENABLED=false \
diff --git a/.github/workflows/check-api-for-breaking-changes.yml b/.github/workflows/check-api-for-breaking-changes.yml
index a9bcdbaa44..8dfa0a0e55 100644
--- a/.github/workflows/check-api-for-breaking-changes.yml
+++ b/.github/workflows/check-api-for-breaking-changes.yml
@@ -207,14 +207,16 @@ jobs:
const { owner, repo } = context.repo;
const issue_number = context.payload.pull_request.number;
- const existing = (await github.rest.issues.listComments({ owner, repo, issue_number }))
- .data.find((c) => c.body?.startsWith(marker));
- // Comment only when something breaks, so the bot stays quiet on the large
- // majority of PRs. The full changelog is always in the job summary.
+ const comments = await github.paginate(github.rest.issues.listComments, {
+ owner,
+ repo,
+ issue_number,
+ per_page: 100
+ });
+ const existing = comments.find((c) => c.body?.startsWith(marker));
+
if (!breaking) {
- // A previous push did break something and this one fixed it. Replace the
- // stale warning instead of leaving it to be read as still current.
if (existing) {
const head = context.payload.pull_request.head.sha.slice(0, 7);
await github.rest.issues.updateComment({
diff --git a/.github/workflows/publish-openapi-spec.yml b/.github/workflows/publish-openapi-spec.yml
index e17757e8eb..8a48ab1c6d 100644
--- a/.github/workflows/publish-openapi-spec.yml
+++ b/.github/workflows/publish-openapi-spec.yml
@@ -6,6 +6,11 @@ name: "Publish OpenAPI Spec"
# This job exists because of GitHub's cache scoping: a PR can read caches written on
# the default branch, but caches a PR writes are visible only to that PR. Baselines
# therefore have to be produced by a run on main.
+#
+# The cache path below MUST stay identical to the one the checker restores, because
+# actions/cache folds the path into the cache version. A mismatched path misses even
+# on an exact key match, and it misses silently: the checker just rebuilds the
+# baseline every time and this job's work is thrown away.
on:
push:
@@ -39,7 +44,7 @@ jobs:
id: probe
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
- path: spec.json
+ path: base-spec.json
key: ${{ steps.key.outputs.key }}
lookup-only: true
@@ -51,13 +56,13 @@ jobs:
if: steps.probe.outputs.cache-hit != 'true'
uses: ./.github/actions/generate-openapi-spec
with:
- output: spec.json
+ output: base-spec.json
- name: Publish spec
if: steps.probe.outputs.cache-hit != 'true'
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
- path: spec.json
+ path: base-spec.json
key: ${{ steps.key.outputs.key }}
- name: Cleanup