Skip to content

Commit 245af94

Browse files
authored
Merge branch 'main' into aa/version-sidebar-fix-18909
2 parents b6c384e + 983126a commit 245af94

File tree

5 files changed

+50
-0
lines changed

5 files changed

+50
-0
lines changed

.changeset/young-glasses-tickle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@redocly/respect-core": patch
3+
---
4+
5+
Fixed a bug where workflows triggered by `onFailure` actions with retries were shown with inaccurate results in the overall report.

.github/workflows/pre-release.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Pre-release Checks
2+
3+
permissions:
4+
contents: read
5+
pull-requests: write
6+
7+
on:
8+
pull_request:
9+
branches:
10+
- main
11+
12+
env:
13+
CI: true
14+
REDOCLY_TELEMETRY: off
15+
16+
jobs:
17+
checks:
18+
# Run only on release branch (changeset-release/main):
19+
if: github.head_ref == 'changeset-release/main'
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: actions/setup-node@v3
24+
with:
25+
node-version: 24
26+
- name: Check Redocly Config Version
27+
run: |
28+
LATEST_VERSION=$(npm view @redocly/config version)
29+
CURRENT_VERSION=$(jq -r '.dependencies["@redocly/config"] | ltrimstr("^") | ltrimstr("~")' packages/core/package.json)
30+
echo Latest: $LATEST_VERSION, Current: $CURRENT_VERSION
31+
if [ "$LATEST_VERSION" != "$CURRENT_VERSION" ]; then
32+
COMMENT="⚠️ **Redocly Config version mismatch**: The latest published version of \`@redocly/config\` is \`$LATEST_VERSION\`, but the current version is \`$CURRENT_VERSION\`. Please consider updating to the latest version."
33+
echo "$COMMENT"
34+
gh pr comment $PR_NUMBER --body "$COMMENT"
35+
exit 1
36+
else
37+
echo "Redocly Config version is up to date: $CURRENT_VERSION"
38+
fi
39+
env:
40+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
PR_NUMBER: ${{ github.event.pull_request.number }}

packages/respect-core/src/modules/flow-runner/run-step.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ export async function runStep({
334334
skipLineSeparator: true,
335335
invocationContext: `Retry action for step ${stepId}`,
336336
executedStepsCount,
337+
retriesLeft: retriesLeft - 1,
337338
});
338339
ctx.executedSteps.push(stepWorkflowResult);
339340
} else if (targetStep) {

packages/respect-core/src/modules/flow-runner/runner.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ export async function runWorkflow({
115115
parentStepId,
116116
invocationContext,
117117
executedStepsCount,
118+
retriesLeft,
118119
}: RunWorkflowInput): Promise<WorkflowExecutionResult> {
119120
const { logger } = ctx.options;
120121
const workflowStartTime = performance.now();
@@ -166,6 +167,7 @@ export async function runWorkflow({
166167
ctx,
167168
workflowId,
168169
executedStepsCount,
170+
retriesLeft,
169171
});
170172

171173
// When `end` action is used, we should not continue with the next steps

packages/respect-core/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ export type RunWorkflowInput = {
212212
skipLineSeparator?: boolean;
213213
invocationContext?: string;
214214
executedStepsCount: ExecutedStepsCount;
215+
retriesLeft?: number;
215216
};
216217

217218
export type ArrazoItemExecutionResult = StepExecutionResult | WorkflowExecutionResult;

0 commit comments

Comments
 (0)