Repository navigation
ci: select Hurl examples by path - #1537
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
| case "$path" in | ||
| Dockerfile|.dockerignore|Cargo.toml|Cargo.lock|build.rs|.cargo/*|scripts/*|.github/workflows/ci.yml) |
There was a problem hiding this comment.
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 👍 / 👎.
| 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 |
There was a problem hiding this comment.
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 👍 / 👎.
| - id: examples | ||
| name: Select relevant Hurl examples | ||
| run: | |
There was a problem hiding this comment.
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 👍 / 👎.
| src/app_config.rs|src/webserver/database/sqlpage_functions/functions/send_mail.rs) | ||
| add_example "examples/sending emails" |
There was a problem hiding this comment.
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 👍 / 👎.
c6207d8 to
51d67d3
Compare
There was a problem hiding this comment.
💡 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".
| elif ((${#selected[@]} == 0)); then | ||
| examples='[]' |
There was a problem hiding this comment.
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 👍 / 👎.
51d67d3 to
bdb0918
Compare
There was a problem hiding this comment.
💡 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".
| ref: ${{ env.DIFF_HEAD }} | ||
| filters: | | ||
| all_examples: | ||
| - 'examples/**' |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
💡 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".
| 'examples/telemetry': | ||
| - 'src/telemetry.rs' | ||
| - 'src/main.rs' | ||
| - 'src/webserver/http.rs' |
There was a problem hiding this comment.
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 👍 / 👎.
| @@ -0,0 +1,22 @@ | |||
| # Shared changes run every examples/*/test.hurl, including newly added examples. | |||
| all_examples: | |||
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
💡 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".
| # Keys are example folders; add one glob per line to associate more files. | ||
| # Keep suites with distinctive integration coverage; describe it above each entry. |
There was a problem hiding this comment.
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 👍 / 👎.
| - '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' |
There was a problem hiding this comment.
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 👍 / 👎.
| # 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' |
There was a problem hiding this comment.
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 👍 / 👎.
| - 'src/webserver/http_request_info.rs' | ||
| - 'src/webserver/request_variables.rs' | ||
| - 'src/webserver/single_or_vec.rs' |
There was a problem hiding this comment.
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 👍 / 👎.
| # Cards combine Markdown and remote chart/map/table embed markup. | ||
| 'examples/cards-with-remote-content': ['sqlpage/templates/card.handlebars'] |
There was a problem hiding this comment.
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 👍 / 👎.
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; newtest.hurlexamples 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.