Skip to content

ci: select Hurl examples by path - #1537

Merged
lovasoa merged 4 commits into
mainfrom
codex/ci-select-hurl
Oct 8, 2026
Merged

lovasoa merged 4 commits into
mainfrom
codex/ci-select-hurl

Conversation

@lovasoa

@lovasoa lovasoa commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Run Hurl suites selected by changed paths, skipping the Hurl jobs when no examples match. Example, build, and harness changes run all examples; tags and skipped or failed path filtering also run all examples.

Keep file associations in .github/hurl-examples.yml, using example folders as filter names, and use a small selector script instead of inline workflow logic. Each association takes one YAML line; new test.hurl examples are discovered automatically, and adding a dedicated filter requires no workflow or script changes.

The mapping focuses on distinct integration coverage: real Keycloak login and claims, nginx over a Unix socket, Apache with a site prefix, native SpatiaLite loading, pages created through PostgreSQL's sqlpage_files, MySQL JSON_TABLE and posted arrays, cookie encoding and removal across requests, signup/password/session lifecycle, and persisted multipart uploads. Telemetry checks trace propagation and OTLP export into Tempo; SMTP checks delivered MIME parts and attachment bytes. A few complex templates also select focused suites: shell JSON menus and icon-only submenus in the CRUD example, dynamic table rows in the developer UI, Markdown and embeds in remote-content cards, and form select options and delayed multipart encoding. Comments above each entry explain why it is included.

Validation: actionlint, ShellCheck, Bash syntax check, and selection checks for source paths and five template cases passed. Every mapped suite and source glob exists. Checks cover shared and dedicated paths, multiple and empty selections, fallback behavior, and adding a filter with one line. Hurl integration suites will run in CI.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T11:15:30.547268Z 551da3a New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c6207d8b56

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/select-hurl-examples.sh Outdated
Comment on lines +34 to +35
case "$path" in
Dockerfile|.dockerignore|Cargo.toml|Cargo.lock|build.rs|.cargo/*|scripts/*|.github/workflows/ci.yml)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Select consumers of the shared root Hurl test

When the shared root test.hurl is modified, this case statement ignores the path and emits [], even though examples/microsoft sql server advanced forms/test.hurl is a symlink to that file. Consequently, the workflow skips the Hurl job and never validates changes to this suite; map test.hurl to its consuming example (or run all suites for shared Hurl files).

AGENTS.md reference: AGENTS.md:L123-L123

Useful? React with 👍 / 👎.

Comment thread .github/workflows/ci.yml Outdated
elif ! git cat-file -e "${DIFF_BASE}^{commit}" || ! git cat-file -e "${DIFF_HEAD}^{commit}"; then
echo "Could not resolve the event's diff range; running all Hurl examples."
examples="$(scripts/select-hurl-examples.sh --all)"
elif ! changed_paths="$(git diff --name-only "${DIFF_BASE}...${DIFF_HEAD}")"; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include both sides of cross-example renames

When a file is moved from one example directory to another, Git's default rename detection makes this --name-only command report only the destination: the Git documentation defines that output as names from the post-image tree and notes that rename detection defaults to enabled. The selector therefore tests only the destination example, while the source example—now missing the moved file—can be broken without being run; disable rename detection for this diff or parse both paths from --name-status.

AGENTS.md reference: AGENTS.md:L123-L123

Useful? React with 👍 / 👎.

Comment thread .github/workflows/ci.yml Outdated
Comment on lines 345 to 347
- id: examples
name: Select relevant Hurl examples
run: |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Run the selector regression script in CI

The newly added scripts/test-select-hurl-examples.sh is listed under “CI runs these,” but this workflow invokes only the selector itself; a repository-wide search finds no job or package script that executes the regression test. As a result, future mapping regressions can pass CI even when the supplied assertions would fail, so this job should execute the test script before consuming the selector output.

Useful? React with 👍 / 👎.

Comment thread scripts/select-hurl-examples.sh Outdated
Comment on lines +41 to +42
src/app_config.rs|src/webserver/database/sqlpage_functions/functions/send_mail.rs)
add_example "examples/sending emails"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Select the SSO suite for OIDC configuration changes

When a PR changes an OIDC field, default, list parser, or validation in src/app_config.rs, this branch selects only examples/sending emails; the real-Keycloak flow in examples/single sign on/test.hurl is skipped even though OIDC configuration is read from AppConfig. This can let an OIDC configuration or provider-compatibility regression pass, so this shared configuration path should also select the SSO suite (or all configuration-sensitive suites).

AGENTS.md reference: AGENTS.md:L55-L58

Useful? React with 👍 / 👎.

@lovasoa
lovasoa force-pushed the codex/ci-select-hurl branch from c6207d8 to 51d67d3 Compare October 7, 2026 21:09
@lovasoa lovasoa changed the title ci: run only relevant Hurl examples ci: select Hurl examples by path Oct 7, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 51d67d3fd0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml Outdated
Comment on lines +394 to +395
elif ((${#selected[@]} == 0)); then
examples='[]'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Run the routing Hurl suite for routing changes

When a PR changes src/webserver/routing.rs, none of the source-path cases match, so selected remains empty and this branch skips every Hurl job. This omits examples/handle-404/test.hurl, which specifically exercises nearest-ancestor 404 routing; map routing.rs to that suite or fall back to broader Hurl coverage for unmapped runtime code.

AGENTS.md reference: AGENTS.md:L144-L144

Useful? React with 👍 / 👎.

@lovasoa
lovasoa force-pushed the codex/ci-select-hurl branch from 51d67d3 to bdb0918 Compare October 7, 2026 21:14

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bdb0918ea7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml Outdated
ref: ${{ env.DIFF_HEAD }}
filters: |
all_examples:
- 'examples/**'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restrict example edits to their own Hurl suites

Any change under examples/** sets all_examples to true, so the selection branch enumerates every Hurl suite rather than only the modified example. Consequently, even a one-line SQL or README edit launches roughly thirty Docker Compose integration jobs, defeating the per-example optimization this selector is intended to provide; derive the affected example directories and reserve the full matrix for shared build or harness changes.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 80cdff2d81

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/hurl-examples.yml
'examples/telemetry':
- 'src/telemetry.rs'
- 'src/main.rs'
- 'src/webserver/http.rs'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Treat the shared HTTP server as an all-example dependency

A change to src/webserver/http.rs now selects only examples/telemetry, although this module builds the request pipeline used by every suite and wires routing, static assets, uploads, and OIDC middleware. For example, a change that breaks multipart limits or OIDC middleware ordering can pass the telemetry test while the upload and single-sign-on suites are skipped; move this path to all_examples or associate every dependent suite.

AGENTS.md reference: AGENTS.md:L49-L54

Useful? React with 👍 / 👎.

Comment thread .github/hurl-examples.yml
@@ -0,0 +1,22 @@
# Shared changes run every examples/*/test.hurl, including newly added examples.
all_examples:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include built-in templates in the shared-change filter

The all_examples filter omits sqlpage/**, so a PR that changes only a built-in Handlebars component produces [] and skips every Hurl suite. These templates are embedded into the binary and consumed throughout the examples—for instance, the cards and forms suites assert their rendered HTML—so template regressions that appear only in complete example flows will no longer be exercised; add sqlpage/** (or at least sqlpage/templates/**) to this filter.

AGENTS.md reference: AGENTS.md:L36-L42

Useful? React with 👍 / 👎.

@lovasoa
lovasoa enabled auto-merge October 8, 2026 11:13

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 551da3a510

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/hurl-examples.yml
Comment on lines +14 to +15
# Keys are example folders; add one glob per line to associate more files.
# Keep suites with distinctive integration coverage; describe it above each entry.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Map the custom-component Hurl suite

When a PR changes src/templates.rs, src/dynamic_component.rs, or src/webserver/database/sqlpage_functions/functions/run_sql.rs, none of these filters match, so the selector emits [] and skips Hurl. examples/custom form component/index.sql combines a sqlpage.run_sql-driven dynamic row with a custom dual-list Handlebars template, and its test.hurl verifies the rendered and submitted flow, so this distinctive integration suite should be mapped to those runtime paths.

AGENTS.md reference: AGENTS.md:L36-L42

Useful? React with 👍 / 👎.

Comment thread .github/hurl-examples.yml
Comment on lines +30 to +33
- 'src/webserver/database/sqlpage_functions/functions/send_mail.rs'
- 'src/webserver/database/sqlpage_functions/functions/uploaded_file_name.rs'
- 'src/webserver/database/sqlpage_functions/functions/uploaded_file_path.rs'
- 'src/webserver/database/sqlpage_functions/functions/read_file_as_data_url.rs'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Select the mail suite for data-URL codec changes

When src/webserver/database/blob_to_data_url.rs changes, no filter selects the sending-email suite even though both read_file_as_data_url and send_mail call this module to encode and decode attachments. The suite uploads an attachment and verifies its filename, MIME type, and contents through Mailpit, so this path should be included here to prevent an attachment codec regression from skipping its only end-to-end coverage.

AGENTS.md reference: AGENTS.md:L25-L29

Useful? React with 👍 / 👎.

Comment thread .github/hurl-examples.yml
Comment on lines +85 to +89
# A real cookie jar round-trips an encoded space and removes it from a subfolder.
'examples/read-and-set-http-cookies':
- 'src/render.rs'
- 'src/webserver/http_request_info.rs'
- 'src/webserver/database/sqlpage_functions/functions/cookie.rs'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Select the theme suite for header-function changes

When src/webserver/database/sqlpage_functions/functions/header.rs changes, none of the filters match and Hurl is skipped. The light/dark-toggle suite sends different Referer headers to toggle.sql, which obtains them through sqlpage.header('referer'), and asserts the resulting redirect locations, so mapping that function to this suite preserves its direct end-to-end coverage of request-header access.

AGENTS.md reference: AGENTS.md:L25-L29

Useful? React with 👍 / 👎.

Comment thread .github/hurl-examples.yml
Comment on lines +76 to +78
- 'src/webserver/http_request_info.rs'
- 'src/webserver/request_variables.rs'
- 'src/webserver/single_or_vec.rs'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Select a variables suite for the variables function

A change confined to src/webserver/database/sqlpage_functions/functions/variables.rs does not match this entry or any other filter, despite being the implementation of sqlpage.variables(). The variable-number form suite posts fields whose names are product IDs, consumes sqlpage.variables('post') in order_insert.sql, and verifies the resulting quantities and total, so that suite should be selected for changes to the function itself.

AGENTS.md reference: AGENTS.md:L19-L24

Useful? React with 👍 / 👎.

Comment thread .github/hurl-examples.yml
Comment on lines +110 to +111
# Cards combine Markdown and remote chart/map/table embed markup.
'examples/cards-with-remote-content': ['sqlpage/templates/card.handlebars']

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Select the quiz suite for file-reader changes

When src/webserver/database/sqlpage_functions/functions/read_file_as_text.rs changes, the selector currently emits []. The multiple-choice-question pages exercised by Hurl load website_header.json through sqlpage.read_file_as_text before rendering both the quiz and its results, so mapping this function to that suite would retain end-to-end coverage of file-backed component properties.

AGENTS.md reference: AGENTS.md:L25-L29

Useful? React with 👍 / 👎.

@lovasoa
lovasoa added this pull request to the merge queue Oct 8, 2026
Merged via the queue into main with commit 78f310a Oct 8, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant