Skip to content

Commit c2d70da

Browse files
author
ebembi-crdb
committed
Create retry testing configuration with intentional failures
- Add test-remote-failure.md with multiple failure scenarios - Configure netlify.toml for retry testing environment - Keep cache plugin for performance during testing - Ready for manual PR creation to trigger deploy preview
1 parent 28da9e7 commit c2d70da

File tree

3 files changed

+73
-10
lines changed

3 files changed

+73
-10
lines changed

src/current/netlify.toml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,35 @@
1+
# TESTING CONFIGURATION - RETRY TESTING
2+
# This file contains retry testing configuration with intentional failures
3+
14
[build]
25
base = "src/current/"
36
publish = "_site/"
4-
command = "./netlify/build.sh"
7+
command = "./netlify/build-test.sh"
58
edge_functions = "./netlify/edge-functions"
69
[build.environment]
710
NODE_VERSION = "18.14.0"
811
RUBY_VERSION = "3.2.1"
12+
# Enable retry testing with failures
13+
NETLIFY_RETRY_TEST = "true"
14+
JEKYLL_REMOTE_INCLUDE_CACHE = "true"
15+
JEKYLL_REMOTE_INCLUDE_CACHE_TTL = "3600"
916
[build.processing.html]
1017
pretty_urls = true
1118

19+
# Cache Plugin (keep caching for performance)
20+
[[plugins]]
21+
package = "netlify-plugin-cache"
22+
[plugins.inputs]
23+
paths = [
24+
".jekyll-cache",
25+
".remote-includes-cache",
26+
"node_modules/.cache",
27+
"_data/cached"
28+
]
29+
30+
# Note: Retry functionality implemented in build script with intentional failures
31+
# Using build script retry logic to test failure scenarios
32+
1233
[[edge_functions]]
1334
path = "/*"
14-
function = "blockBytedance"
15-
16-
#[[plugins]]
17-
# package = "@netlify/plugin-lighthouse"
18-
# [plugins.inputs]
19-
# output_path = "./reports/lighthouse.html"
20-
# [[plugins.inputs.audits]]
21-
# path = "./docs/index.html"
35+
function = "blockBytedance"

src/current/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"devDependencies": {
55
"@netlify/plugin-lighthouse": "^4.0.7",
66
"jest": "^26",
7-
"jest-cli": "^26"
7+
"jest-cli": "^26",
8+
"netlify-plugin-cache": "^1.0.3"
89
},
910
"dependencies": {
1011
"@netlify/edge-functions": "^2.10.0",
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: "Test Remote Include Failures"
3+
summary: "Test page to inject remote include failures for testing retry mechanisms"
4+
toc: true
5+
docs_area: testing
6+
---
7+
8+
# Testing Remote Include Failures
9+
10+
This page is designed to test how the build system handles remote include failures.
11+
12+
## Working Remote Include (Control)
13+
14+
This should work fine:
15+
{% remote_include https://raw.githubusercontent.com/cockroachdb/generated-diagrams/release-22.2/grammar_svg/select.html %}
16+
17+
## Intentional Failure #1 - Non-existent Domain
18+
19+
This will definitely fail and should trigger retry:
20+
{% remote_include https://non-existent-domain-for-testing.fake/test.html %}
21+
22+
## Intentional Failure #2 - Valid Domain, Bad Path
23+
24+
This will fail with 404:
25+
{% remote_include https://raw.githubusercontent.com/cockroachdb/cockroach/non-existent-branch/docs/test.md %}
26+
27+
## Intentional Failure #3 - Timeout Simulation
28+
29+
This should timeout (using a slow endpoint):
30+
{% remote_include https://httpbin.org/delay/30 %}
31+
32+
## Another Working Remote Include
33+
34+
This should work to verify system recovery:
35+
{% remote_include https://raw.githubusercontent.com/cockroachdb/generated-diagrams/release-22.2/grammar_svg/create_table.html %}
36+
37+
## Test Notes
38+
39+
- **Failure #1**: Tests DNS resolution failure
40+
- **Failure #2**: Tests HTTP 404 error handling
41+
- **Failure #3**: Tests network timeout handling
42+
- Working includes test that system can recover after failures
43+
44+
Expected behavior:
45+
1. First build attempt should fail due to these broken includes
46+
2. Retry mechanism should attempt 2-3 more times
47+
3. Final build may still fail, but we should see retry attempts in logs
48+
4. Cache mechanism should not cache failed requests

0 commit comments

Comments
 (0)