Commit Graph

57 Commits

Author SHA1 Message Date
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
Christophe Bliard 47431a37c7 Add pull request link to displayed information
[skip ci]
2022-11-08 10:29:12 +01:00
Christophe Bliard fee8ffd0a5 Can specify workflow run id with --run-id
[skip ci]
2022-11-08 10:15:48 +01:00
Christophe Bliard 4f8efc6734 Add --compact option to output all on one line
[skip ci]
2022-11-03 08:54:44 +01:00
Christophe Bliard 554ec0a277 Fix missing import + output failing specs line by line 2022-10-21 17:06:17 +02:00
Christophe Bliard f1c7cfb7ea Get failures from in-progress runs if none completed yet
And display better error message for failed GitHub requests.

[skip ci]
2022-09-30 14:33:32 +02:00
Christophe Bliard ff8dc42543 Add colors and url for each job and run 2022-09-21 18:02:21 +02:00
Christophe Bliard e31fa64855 Detect more errors in script/github_pr_errors 2022-09-01 12:27:53 +02:00
Christophe Bliard 2fb8505ada tooling: Cache some GitHub api results
[skip ci]
2022-08-30 18:11:31 +02:00
Christophe Bliard 25ad65d88e Enclose failing spec in single quotes
So that when copy pasting it, zsh won't complain with "zsh: no matches found" error due to presence of unescaped `[]` in the command.

[skip ci]
2022-08-23 15:48:50 +02:00