Commit Graph

66 Commits

Author SHA1 Message Date
Alexander Brandon Coles 474324fb18 Add out-of-hours CI failure reporting 2026-03-10 15:26:38 -03:00
Christophe Bliard 8b25e16864 Add rm -f db/structure.sql to reset the test database
When `db/structure.sql` exists, it's used when doing `rails db:migrate`
instead of running the migrations. When switching to a branch with less
migrations, the test database will be created with the
`db/structure.sql` file which contains the migrations of the previous
branch. They should not be there.

To have the correct database structure for tests, the `db/structure.sql`
file must be removed before running `db:migrate`.
2025-11-13 11:35:03 +01:00
Christophe Bliard c17e5a703b Fix some certificate checking issues with openssl 3.6.0
[skip ci]
2025-10-29 14:11:36 +01:00
Christophe Bliard 0108374bd3 Update script/github_pr_errors with better rerun instructions
The script now recommends using the commands from
`docs/development/testing/handling-flaky-tests/README.md` to be closer
to CI conditions.

[skip ci]
2025-10-21 16:26:49 +02:00
Oliver Günther f7e8e9a954 require cgi in github script 2025-09-17 14:22:25 +02:00
Christophe Bliard 4be455ef3b Print Pull Request base branch and SHA
I found it useful to know which branch the PR is based on to run it
locally.

[skip ci]
2025-08-29 11:17:49 +02:00
Christophe Bliard 387aa29673 Add TZ=UTC to the CI command suggested by github_pr_errors
The CI runs in UTC, so we should use `TZ=UTC` when trying to reproduce
the failure locally.

Co-authored-by: Klaus Zanders <k.zanders@openproject.com>
2025-05-19 11:41:56 +02:00
Christophe Bliard 612a8bf2cf Disable rubocop Metrics/AbcSize for #parse_args 2025-04-18 10:02:54 +02:00
Christophe Bliard 932fac68f3 Clean up test failure backtrace output
- Remove rspec_retry and retriable lines
- Remove top level lines which are mostly around blocks executing on each spec
- Make the spec file name bold (more visible)
2025-04-18 09:10:43 +02:00
Christophe Bliard 1eeebb72bb Fix rubocop warning
And use Data class to make Report a value object.
2025-04-10 16:15:15 +02:00
Christophe Bliard b751170f61 Use job_id from URL to display errors from given job
When giving a url of the first attempt, the script was displaying the
results of the last attempt. That's probably not the intended behavior.

Now it parses the job_id from the url, and if present it will display
the errors from that job.

Also changed the output to display the instructions to checkout the
correct commit at the end of the script, to make it easier to see.
2025-04-09 12:28:39 +02:00
Christophe Bliard c57544e321 Use -B to reset branch repro_ci_failures in one command
[skip ci]
2025-03-12 17:57:32 +01:00
ulferts d91de29d7c Merge remote-tracking branch 'origin/dev' into rails-7.2 2025-02-27 17:51:34 +01:00
Christophe Bliard 13082c14a1 Simpler instructions to run on same commit as CI 2025-02-19 15:52:04 +01:00
Klaus Zanders 80072ea9e8 Update Ruby to version 3.3.6 2024-11-19 11:37:02 +01:00
Dombi Attila f23461a604 Update Bundler to 2.5.13 2024-06-20 10:34:45 +03:00
Christophe Bliard 5e4766f072 Merge branch 'dev' into feature/49409-status-exclude-from-totals 2024-06-03 17:56:41 +02:00
Klaus Zanders 1eec6cad54 Update Ruby to 3.3.2 2024-06-03 12:57:25 +02:00
Dombi Attila 543e87a67d Fix the pr errors script, show the in progress run even if there is a successful previous run.
When there is an in progress run and a previous successful run, the
successful run is being displayed. This gives a false information about
the current run being successful. The fix is to display the in progress
run instead.
2024-05-29 19:46:32 +03:00
Christophe Bliard 76f2989a3b Display workflow run start time in github_pr_errors 2024-05-23 10:50:29 +02:00
Klaus Zanders a88ab2eeef Bundler 2.5.9 -> 2.5.10 2024-05-07 09:31:50 +02:00
Klaus Zanders c19aa3c74b Update Ruby to 3.3.1 in all relevant places 2024-04-25 08:54:06 +02:00
Christophe Bliard eb93a03e00 github_pr_error: add information about merge commit 2024-03-28 11:46:59 +01:00
ulferts 3b2121f733 Revert "Merge remote-tracking branch 'origin/release/13.4' into dev"
This reverts commit 40b2bbeb09, reversing
changes made to b4c6cb17cc.
2024-03-21 11:31:17 +01:00
Ivan Kuchin 7787e457a3 Revert "Merge branch 'dev' into release/13.4"
This reverts commit a901541269, reversing
changes made to e573ca00b7.
2024-03-20 20:19:08 +01:00
Ivan Kuchin 9e4934cd0a change quotes using rubocop --only Style/StringLiterals,Style/QuotedSymbols -a 2024-03-20 18:05:22 +01:00
Christophe Bliard 5aefbbc8dd Do not try displaying local screenshot urls 2024-02-19 16:02:40 +01:00
Christophe Bliard 2d6023adab github_pr_errors: use -i to display screenshots in terminal
This works only with `imgcat` and iTerm2 (or any terminal implementing
iTerm2 image protocol like Konsole).

See https://iterm2.com/documentation-images.html to know more.

Feel free to add support for more terminals.
2024-02-16 15:05:50 +01:00
Christophe Bliard 3e2a0331ab Report error if unrecognized url is given 2024-02-13 10:00:06 +01:00
Christophe Bliard d026f7d79c Add failures explanation to the output
The uninteresting part of the backtrace is filtered out
2024-02-05 17:05:13 +01:00
Christophe Bliard cafadbbfbc Replace faraday with httpx 2024-01-31 17:00:17 +01:00
Dombi Attila d4ce6b2aed Require Base64 in the github_pr_errors script 2024-01-29 13:13:03 +01:00
Aaron Contreras 6eb4a1932b Update docs to reference Bundler 2.5.5 2024-01-22 11:52:06 -05:00
Christophe Bliard 8fa8584538 Run rubocop --autocorrect on all files
Only the safe cops have run. rubocop version is 1.59.0.
2024-01-05 15:27:09 +01:00
Dombi Attila e74eb4ee32 Bump ruby to 3.2.2 & bundler to 2.4.22 2023-12-15 16:26:05 +02:00
ulferts cfe4580e5c Merge remote-tracking branch 'origin/release/13.0' into dev 2023-09-26 09:07:04 +02:00
Christophe Bliard c46e674b4c Do not fail github_pr_errors if PR is closed or merged 2023-09-25 09:55:34 +02:00
Klaus Zanders f64fde1c15 Fixes Performance/StringReplacement offenses 2023-09-06 13:08:22 +02:00
Eric Schubert 7c81f09b6a Merge branch 'release/13.0' into dev 2023-09-05 15:33:48 +02:00
Christophe Bliard 329cb855af Make script/github_pr_error extract run_id from job url
Instead of `script/github_pr_errors -r 6073044922`, you can now use
`script/github_pr_errors https://github.com/opf/openproject/actions/runs/6073044922/job/16474191600`.
2023-09-05 08:26:15 +02:00
Christophe Bliard 0f56928b49 Follow redirects for script/github_pr_errors
When log files are really big, the log API sends a redirects to where the big file is stored.
2023-08-29 10:57:32 +02:00
Pavel Balashou 0a2cc19e67 [#48457] Replace RestClient with Net::HTTP in storages module.
https://community.openproject.org/work_packages/48457
2023-08-22 15:40:14 +02:00
Christophe Bliard 547e490f13 Add verbose output to script/github_pr_errors 2023-06-30 09:26:33 +02:00
Christophe Bliard 4b68d96d55 Improve script/github_pr_errors
* Fix mismatch between the rerun_location and location: rerun_location
  can be the example location or the example id if multiple examples
  share the same location (like for shared examples). The screenshot
  formatter now includes the example id in addition to the example
  location to make the matching possible.
* Add `-d` / `--display-rerun-info` option so that the tests execution
  group information and the instructions to rerun with same seed as CI
  is not shown by default.
* Add `-f` / `--failed-job-log` option to give an already downloaded job
  log as argument instead of fetching it from GitHub. Most useful for
  testing the script too.
2023-06-28 16:32:24 +02:00
Christophe Bliard 9bdf225d97 Add tests rerun command with seed to github_pr_errors 2023-06-22 21:36:43 +02:00
Christophe Bliard d1f0827f17 Add screenshots to github_pr_errors output
And make rubocop happier.
2023-06-22 21:36:43 +02:00
Christophe Bliard e42155fbd7 Exclude eslint job from script/github_pr_errors 2023-06-20 16:39:42 +02:00
Christophe Bliard 763c647f46 Add option to avoid caching network responses 2023-05-31 17:20:29 +02:00
Dombi Attila 4bf9f53802 Raise an error in the github pr errors script when the PR cannot be found on the workflow, this happens when a PR is closed or merged 2023-02-07 14:54:04 +01:00
Christophe Bliard 44bfa1f8b4 Exclude rubocop job when fetching logs
Because there are no logs, it leads to a 404 and the script fails.
2023-01-20 10:15:21 +01:00