Skip to content

Commit 26bd806

Browse files
committed
Merge branch 'main' of https://github.com/ClickHouse/clickhouse-docs into remove-hydra-limitation
2 parents ee1e9e0 + e73c05d commit 26bd806

File tree

5 files changed

+83
-40
lines changed

5 files changed

+83
-40
lines changed

docs/cloud/features/08_backups/backups-to-own-cloud/backup_restore_using_commands.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ See the [backup command summary](/operations/backup#command-summary) for full ba
5656
```sql
5757
BACKUP DATABASE test_backups
5858
TO S3(
59-
'https://testchbackups.s3.amazonaws.com/<uuid>',
60-
'<key id>',
61-
'<key secret>'
59+
'https://testchbackups.s3.amazonaws.com/<uuid>',
60+
'<key id>',
61+
'<key secret>'
6262
)
6363
```
6464

@@ -74,9 +74,9 @@ For example, if you are taking daily backups, you will need to use a new uuid ea
7474
```sql
7575
RESTORE DATABASE test_backups
7676
FROM S3(
77-
'https://testchbackups.s3.amazonaws.com/<uuid>',
78-
'<key id>',
79-
'<key secret>'
77+
'https://testchbackups.s3.amazonaws.com/<uuid>',
78+
'<key id>',
79+
'<key secret>'
8080
)
8181
```
8282
</TabItem>
@@ -89,9 +89,9 @@ FROM S3(
8989
```sql
9090
BACKUP DATABASE test_backups
9191
TO S3(
92-
'https://storage.googleapis.com/<bucket>/<uuid>',
93-
'<hmac-key>',
94-
'<hmac-secret>'
92+
'https://storage.googleapis.com/<bucket>/<uuid>',
93+
'<hmac-key>',
94+
'<hmac-secret>'
9595
)
9696
```
9797

@@ -107,9 +107,9 @@ For example, if you are taking daily backups, you will need to use a new uuid ea
107107
```sql
108108
RESTORE DATABASE test_backups
109109
FROM S3(
110-
'https://storage.googleapis.com/<bucket>/<uuid>',
111-
'<hmac-key>',
112-
'<hmac-secret>'
110+
'https://storage.googleapis.com/<bucket>/<uuid>',
111+
'<hmac-key>',
112+
'<hmac-secret>'
113113
)
114114
```
115115
</TabItem>
@@ -122,10 +122,9 @@ FROM S3(
122122
```sql
123123
BACKUP DATABASE test_backups
124124
TO AzureBlobStorage(
125-
'<AzureBlobStorage endpoint connection string>',
126-
'<container>',
127-
'<blob>/<>'
128-
);
125+
'<AzureBlobStorage endpoint connection string>',
126+
'<container>',
127+
'<blob>/<>'
129128
)
130129
```
131130

@@ -140,9 +139,9 @@ For example, if you are taking daily backups, you will need to use a new uuid ea
140139
```sql
141140
RESTORE DATABASE test_backups
142141
FROM AzureBlobStorage(
143-
'<AzureBlobStorage endpoint connection string>',
144-
'<container>',
145-
'<blob>/<uuid>'
142+
'<AzureBlobStorage endpoint connection string>',
143+
'<container>',
144+
'<blob>/<uuid>'
146145
)
147146
```
148147
</TabItem>

scripts/sed_links.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
1919
sed -i '' 's|(/cloud/security/cloud-access-management/overview#initial-settings)|(/cloud/security/console-roles)|g' docs/sql-reference/statements/grant.md
2020
sed -i '' 's|(/cloud/security/secure-s3#access-your-s3-bucket-with-the-clickhouseaccess-role)|(/cloud/data-sources/secure-s3#access-your-s3-bucket-with-the-clickhouseaccess-role)|g' docs/sql-reference/table-functions/s3.md
2121
sed -i '' 's|(/cloud/security/secure-s3#access-your-s3-bucket-with-the-clickhouseaccess-role)|(/cloud/data-sources/secure-s3#access-your-s3-bucket-with-the-clickhouseaccess-role)|g' docs/sql-reference/table-functions/s3Cluster.md
22-
sed -i '' 's|<auxiliary_zookeepers>|`<auxiliary_zookeepers>`|g' docs/operations/server-configuration-parameters/settings.md
22+
sed -i '' 's|(#cuttofirstsignificantsubdomaincustom)|(#cutToFirstSignificantSubdomainCustom)|g' docs/sql-reference/functions/url-functions.md
2323
else
2424
# Linux
2525
sed -i 's|(../../quick-start\.mdx)|(/get-started/quick-start)|g' docs/operations/utilities/clickhouse-local.md
@@ -32,5 +32,5 @@ else
3232
sed -i 's|(/cloud/security/cloud-access-management/overview#initial-settings)|(/cloud/security/console-roles)|g' docs/sql-reference/statements/grant.md
3333
sed -i 's|(/cloud/security/secure-s3#access-your-s3-bucket-with-the-clickhouseaccess-role)|(/cloud/data-sources/secure-s3#access-your-s3-bucket-with-the-clickhouseaccess-role)|g' docs/sql-reference/table-functions/s3.md
3434
sed -i 's|(/cloud/security/secure-s3#access-your-s3-bucket-with-the-clickhouseaccess-role)|(/cloud/data-sources/secure-s3#access-your-s3-bucket-with-the-clickhouseaccess-role)|g' docs/sql-reference/table-functions/s3Cluster.md
35-
sed -i 's|<auxiliary_zookeepers>|`<auxiliary_zookeepers>`|g' docs/operations/server-configuration-parameters/settings.md
35+
sed -i 's|(#cuttofirstsignificantsubdomaincustom)|(#cutToFirstSignificantSubdomainCustom)|g' docs/sql-reference/functions/url-functions.md
3636
fi

src/components/IntegrationGrid/IntegrationGrid.tsx

Lines changed: 54 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -162,37 +162,72 @@ function useCMSIntegrations() {
162162

163163
useEffect(() => {
164164
const fetchIntegrations = async () => {
165+
// Step 1: Load fallback data first for immediate display
165166
try {
166-
setLoading(true);
167-
const response = await fetch('https://cms.clickhouse-dev.com:1337/api/integrations?populate[]=logo&populate[]=logo_dark');
167+
const fallbackResponse = await fetch('/integrations-fallback.json', {
168+
cache: 'force-cache' // Use cached version if available
169+
});
170+
171+
if (fallbackResponse.ok) {
172+
const fallbackData = await fallbackResponse.json();
173+
const transformedData = transformCMSData(fallbackData.data || []);
174+
setIntegrations(transformedData);
175+
setError(null);
176+
setLoading(false); // Show content immediately with fallback data
177+
console.log('Loaded fallback integrations data');
178+
} else {
179+
console.warn('Fallback file not available, will try CMS only');
180+
}
181+
} catch (fallbackErr) {
182+
console.error('Failed to load fallback integrations data:', fallbackErr);
183+
// Continue to try CMS even if fallback fails
184+
}
185+
186+
// Step 2: Try to fetch fresh data from CMS with timeout
187+
try {
188+
const controller = new AbortController();
189+
const timeoutId = setTimeout(() => {
190+
controller.abort();
191+
console.log('CMS request timed out after 8 seconds');
192+
}, 8000); // 8 second timeout
193+
194+
const response = await fetch(
195+
'https://cms.clickhouse-dev.com:1337/api/integrations?populate[]=logo&populate[]=logo_dark',
196+
{
197+
signal: controller.signal,
198+
// Add headers to help with CORS and caching
199+
headers: {
200+
'Accept': 'application/json',
201+
}
202+
}
203+
);
204+
205+
clearTimeout(timeoutId);
168206

169207
if (!response.ok) {
170208
throw new Error(`HTTP error! status: ${response.status}`);
171209
}
172210

173211
const data = await response.json();
174212
const transformedData = transformCMSData(data.data || []);
213+
214+
// Update with fresh CMS data
175215
setIntegrations(transformedData);
176216
setError(null);
177-
} catch (err) {
178-
console.error('Error loading integrations data from endpoint. Falling back to static JSON file.');
179-
180-
// Fallback to static JSON file
181-
try {
182-
const fallbackResponse = await fetch('/integrations-fallback.json');
183-
184-
if (!fallbackResponse.ok) {
185-
throw new Error(`Failed to load fallback data: ${fallbackResponse.status}`);
217+
console.log('Successfully updated with fresh CMS data');
218+
} catch (cmsErr) {
219+
// CMS fetch failed, but that's okay - we already have fallback data
220+
if (cmsErr instanceof Error) {
221+
if (cmsErr.name === 'AbortError') {
222+
console.log('CMS request was aborted due to timeout, using fallback data');
223+
} else {
224+
console.error('Error loading integrations from CMS:', cmsErr.message);
186225
}
226+
}
187227

188-
const fallbackData = await fallbackResponse.json();
189-
const transformedData = transformCMSData(fallbackData.data || []);
190-
setIntegrations(transformedData);
191-
setError(null);
192-
} catch (fallbackErr) {
193-
console.error('Failed to load fallback integrations data:', fallbackErr);
194-
setError(fallbackErr instanceof Error ? fallbackErr.message : 'Failed to fetch integrations');
195-
setIntegrations([]);
228+
// Only set error if we don't have any integrations data at all
229+
if (integrations.length === 0) {
230+
setError('Unable to load integrations. Please try refreshing the page.');
196231
}
197232
} finally {
198233
setLoading(false);

src/css/custom.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,10 @@ button.DocSearch {
11611161
color: black !important;
11621162
}
11631163

1164+
[data-theme='dark'] .alert a {
1165+
color: black !important;
1166+
}
1167+
11641168
.theme-admonition-tip {
11651169
&.alert--warning {
11661170
.alert-icon {

vercel.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3592,6 +3592,11 @@
35923592
"source": "/docs/about-clickhouse",
35933593
"destination": "/docs/intro",
35943594
"permanent": true
3595+
},
3596+
{
3597+
"source": "/docs/cloud/security/inviting-new-users",
3598+
"destination": "/docs/cloud/security/manage-cloud-users#invite-users",
3599+
"permanent": true
35953600
}
35963601
]
35973602
}

0 commit comments

Comments
 (0)