Skip to content

Commit 08242e6

Browse files
Merge branch 'main' into busy-lobster
2 parents 50ec83f + e7cd49e commit 08242e6

22 files changed

Lines changed: 264 additions & 118 deletions

.github/linters/.trivyignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Ignore the dataplexAdmin role issue
2+
AVD-GCP-0007
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ export default [
2121
operate: 'readonly',
2222
ctx: 'readonly',
2323
constants: 'readonly',
24-
reports: 'readonly'
24+
reports: 'readonly',
25+
reservations: 'readonly'
2526
}
2627
},
2728
rules: {

.github/linters/trivy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ignorefile: ".github/linters/.trivyignore"

.github/linters/zizmor.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
rules:
2+
unpinned-uses:
3+
ignore:
4+
- ci.yaml

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
uses: actions/checkout@v5
2525
with:
2626
fetch-depth: 0
27+
persist-credentials: false
2728

2829
- name: Lint Code Base
29-
uses: super-linter/super-linter/slim@v8.0.0
30+
uses: super-linter/super-linter/slim@v8.1.0
3031
env:
3132
DEFAULT_BRANCH: main
3233
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33-
LINTER_RULES_PATH: .
3434
VALIDATE_JSCPD: false
3535
VALIDATE_JAVASCRIPT_PRETTIER: false
3636
VALIDATE_MARKDOWN_PRETTIER: false

definitions/output/crawl/pages.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
assert('corrupted_technology_values')
33
.tags(['crawl_complete'])
44
.query(ctx => `
5+
${reservations.reservation_setter(ctx)}
6+
57
SELECT
68
/*
79
date,
@@ -30,6 +32,20 @@ ORDER BY cnt_pages DESC
3032
HAVING cnt_pages > 200
3133
`)
3234

35+
assert('pages_per_client')
36+
.tags(['crawl_complete'])
37+
.query(ctx => `
38+
SELECT
39+
client,
40+
COUNT(DISTINCT page) AS cnt_pages
41+
FROM ${ctx.ref('crawl_staging', 'pages')}
42+
WHERE
43+
date = '${constants.currentMonth}'
44+
GROUP BY
45+
client
46+
HAVING cnt_pages < 20000000
47+
`)
48+
3349
publish('pages', {
3450
type: 'incremental',
3551
protected: true,
@@ -82,7 +98,7 @@ publish('pages', {
8298
tags: ['crawl_complete'],
8399
dependOnDependencyAssertions: true
84100
}).preOps(ctx => `
85-
SET @@RESERVATION='${constants.reservation_id}';
101+
${reservations.reservation_setter(ctx)}
86102
87103
DELETE FROM ${ctx.self()}
88104
WHERE date = '${constants.currentMonth}' AND

definitions/output/crawl/parsed_css.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,26 @@ publish('parsed_css', {
77
clusterBy: ['client', 'is_root_page', 'rank', 'page'],
88
requirePartitionFilter: true
99
},
10+
columns: {
11+
date: 'YYYY-MM-DD format of the HTTP Archive monthly crawl',
12+
client: 'Test environment: desktop or mobile',
13+
page: 'The URL of the page being tested',
14+
is_root_page: 'Whether the page is the root of the origin.',
15+
root_page: 'The URL of the root page being tested',
16+
rank: 'Site popularity rank, from CrUX',
17+
url: 'The URL of the request',
18+
css: 'The parsed CSS, in JSON format'
19+
},
1020
tags: ['crawl_complete']
1121
}).preOps(ctx => `
12-
SET @@RESERVATION='${constants.reservation_id}';
22+
${reservations.reservation_setter(ctx)}
1323
1424
DELETE FROM ${ctx.self()}
1525
WHERE date = '${constants.currentMonth}'
1626
AND client = 'desktop';
1727
`).query(ctx => `
18-
SELECT *
28+
SELECT
29+
*
1930
FROM ${ctx.ref('crawl_staging', 'parsed_css')}
2031
WHERE date = '${constants.currentMonth}'
2132
AND client = 'desktop'
@@ -26,7 +37,8 @@ WHERE date = '${constants.currentMonth}'
2637
AND client = 'mobile';
2738
2839
INSERT INTO ${ctx.self()}
29-
SELECT *
40+
SELECT
41+
*
3042
FROM ${ctx.ref('crawl_staging', 'parsed_css')}
3143
WHERE date = '${constants.currentMonth}'
3244
AND client = 'mobile'

definitions/output/crawl/requests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ publish('requests', {
3838
},
3939
tags: ['crawl_complete']
4040
}).preOps(ctx => `
41-
SET @@RESERVATION='${constants.reservation_id}';
41+
${reservations.reservation_setter(ctx)}
4242
4343
FOR client_var IN (SELECT * FROM UNNEST(['desktop', 'mobile']) AS value) DO
4444
FOR is_root_page_var IN (SELECT * FROM UNNEST([TRUE, FALSE]) AS value) DO

definitions/output/f1/pages_latest.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ publish('pages_latest', {
77
clusterBy: ['client', 'is_root_page', 'rank', 'page']
88
},
99
tags: ['crawl_complete']
10-
}).preOps(`
11-
SET @@RESERVATION='${constants.reservation_id}';
10+
}).preOps(ctx => `
11+
${reservations.reservation_setter(ctx)}
1212
`).query(ctx => `
1313
SELECT
1414
date,

definitions/output/f1/requests_latest.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ publish('requests_latest', {
77
clusterBy: ['client', 'is_root_page', 'rank', 'type']
88
},
99
tags: ['crawl_complete']
10-
}).preOps(`
11-
SET @@RESERVATION='${constants.reservation_id}';
10+
}).preOps(ctx => `
11+
${reservations.reservation_setter(ctx)}
1212
`).query(ctx => `
1313
SELECT
1414
date,

0 commit comments

Comments
 (0)