0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-08 17:53:55 +08:00
discourse/spec
Martin Brennan 67d2410919
DEV: Fix UC status report when reverted files encountered (#41821)
Fixes the following error when generating the upcoming changes status
report
on a weekly basis in GitHub actions:

```
/__w/discourse/discourse/lib/upcoming_changes/status_report.rb:56:in 'UpcomingChanges::StatusReport::Git#capture': git show 45535887f1231b40f8a21b8c154e58cef8670063:plugins/discourse-workflows/config/settings.yml failed: fatal: path 'plugins/discourse-workflows/config/settings.yml' exists on disk, but not in '45535887f1' (RuntimeError)
	from /__w/discourse/discourse/lib/upcoming_changes/status_report.rb:47:in 'UpcomingChanges::StatusReport::Git#show_file'
	from /__w/discourse/discourse/lib/upcoming_changes/status_report.rb:227:in 'UpcomingChanges::StatusReport::GitHistory#statuses_at'
	from /__w/discourse/discourse/lib/upcoming_changes/status_report.rb:215:in 'block in UpcomingChanges::StatusReport::GitHistory#add_history_for_settings_file'
	from /__w/discourse/discourse/lib/upcoming_changes/status_report.rb:214:in 'Array#reverse_each'
	from /__w/discourse/discourse/lib/upcoming_changes/status_report.rb:214:in 'UpcomingChanges::StatusReport::GitHistory#add_history_for_settings_file'
	from /__w/discourse/discourse/lib/upcoming_changes/status_report.rb:205:in 'block in UpcomingChanges::StatusReport::GitHistory#by_change'
	from /__w/discourse/discourse/lib/upcoming_changes/status_report.rb:202:in 'Hash#each'
	from /__w/discourse/discourse/lib/upcoming_changes/status_report.rb:202:in 'Enumerable#each_with_object'
	from /__w/discourse/discourse/lib/upcoming_changes/status_report.rb:202:in 'UpcomingChanges::StatusReport::GitHistory#by_change'
	from /__w/discourse/discourse/lib/upcoming_changes/status_report.rb:422:in 'UpcomingChanges::StatusReport#history_by_change'
	from /__w/discourse/discourse/lib/upcoming_changes/status_report.rb:363:in 'block in UpcomingChanges::StatusReport#report'
	from /__w/discourse/discourse/lib/upcoming_changes/status_report.rb:362:in 'Hash#each'
	from /__w/discourse/discourse/lib/upcoming_changes/status_report.rb:362:in 'Enumerable#map'
	from /__w/discourse/discourse/lib/upcoming_changes/status_report.rb:362:in 'UpcomingChanges::StatusReport#report'
	from /__w/discourse/discourse/lib/upcoming_changes/status_report.rb:499:in 'UpcomingChanges::StatusReport::CLI.run'
	from /__w/discourse/discourse/script/upcoming_changes_status_report:9:in '<main>'
```

This happened because we were trying to run `git sho` on a file that was
reverted in a commit. Now, we check whether the file exists for the
specific commit hash before running git show, and continue with the
next valid commit for the file.
2026-07-20 16:37:35 +10:00
..
db FIX: Prevent backslash accumulation in upload markdown labels (#39461) 2026-06-03 18:10:38 +02:00
fabricators FEATURE: Show bounce rate and average session duration on the dashboard (#40936) 2026-07-03 10:49:32 +08:00
fixtures FIX: Strip SET transaction_timeout when restoring backups 2026-07-16 00:02:53 +00:00
generator DEV: Enable Rails/FilePath rubocop rule (#40097) 2026-05-19 19:07:54 +02:00
helpers SECURITY: Bind shared session key to auth token and enforce user gates (#41610) 2026-07-14 13:25:05 +08:00
import_export
initializers DEV: Do not seed TOS and Privacy topics even if company_name is present (#41814) 2026-07-17 13:29:49 -04:00
integration FIX: store method in route matcher (#41512) 2026-07-07 11:49:56 -04:00
integrity DEV: hide and disable upcoming changes for disabled plugins (#41657) 2026-07-16 14:35:20 +04:00
jobs FEATURE: Support users in DAccessControl and backend (#41358) 2026-07-15 09:18:06 +10:00
lib DEV: Add disallowed_groups to theme/component settings (#41792) 2026-07-20 09:28:52 +10:00
mailers FIX: allow custom email sender name via translation overrides (#40674) 2026-06-09 14:03:03 +04:00
migrations FIX: Ensure each flag gets a unique name_key (#40899) 2026-06-24 16:37:59 +02:00
models FIX: Correctly close fully merged topics containing whispers (#41800) 2026-07-17 11:07:29 +02:00
multisite DEV: Enable Rails/FilePath rubocop rule (#40097) 2026-05-19 19:07:54 +02:00
queries/reports FEATURE: Change default upcoming change promotion status to Beta (#41275) 2026-07-06 09:13:37 +10:00
requests SECURITY: Stale featured rows expose unlisted topic content (#41810) 2026-07-17 09:19:08 -05:00
script DEV: Fix UC status report when reverted files encountered (#41821) 2026-07-20 16:37:35 +10:00
serializers DEV: Add disallowed_groups to theme/component settings (#41792) 2026-07-20 09:28:52 +10:00
services SECURITY: Stale featured rows expose unlisted topic content (#41810) 2026-07-17 09:19:08 -05:00
support DEV: Use none persistent sessions in system tests (#41685) 2026-07-14 06:44:47 +08:00
system FIX: Restore enabled checkboxes for similar users in penalty modals (#41801) 2026-07-17 17:14:39 +05:30
tasks DEV: set enable_gifs to true in migrate gifs rake task (#41502) 2026-07-07 17:04:28 +04:00
views
rails_helper.rb DEV: Block external requests in system specs via Chrome DNS resolver (#40685) 2026-06-17 12:29:57 +01:00
regenerate_swagger_docs
swagger_helper.rb