View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000308 | My infrastructure | General | public | 2025-07-24 12:05 | 2025-07-27 13:27 |
Reporter | dvl | Assigned To | dvl | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | assigned | Resolution | open | ||
Summary | 0000308: Is the daily_refreshes table required? | ||||
Description | Deleted from all tables. Next up for removal: daily_refreshes freshports.org=> select count(*) from daily_refreshes; count ------- 8112 (1 row) freshports.org=> select * from daily_refreshes order by 1 desc; refresh_date -------------- 2025-07-23 2025-07-22 2025-07-21 2025-07-20 2025-07-19 2025-07-18 2025-07-17 ... | ||||
Steps To Reproduce | We may be able to delete:scripts/main-page-update.pl scripts/refresh-daily-summaries.pl Both invoke: FreshPorts::Cache::RefreshDailySummaries($dbh); This module also references daily_refreshes as well as a non-existent table: housekeeping modules/housekeeping.pm Which is implemented within modules/cache.pm - which opens a file here: my $OutputFile = $FreshPorts::Config::DailySummaryDir . "/" . substr($CommitDateStart, 0, 4); Which is a file on the web node, not on the ingress node. I suspect these scripts are never invoked. I don't see the main query in the logs: [12:03 pg03 dvl ~] % sudo grep 'select commit_log.commit_date, categories.name as category, element.name as port' /var/log/postgresql.log* [12:04 pg03 dvl ~] % | ||||
Additional Information | I think both the table and the scripts and the cache.pm code can be removed edit: 2025-07-25 : cache.pm has been removed on dev - let's see how that goes. | ||||
Tags | No tags attached. | ||||
|
modules/housekeeping.pm has been removed via Committed revision 6158 |
|
modules/housekeeping.pm removed via Committed revision 6159 |
|
I suspect we can alsorefresh-an-unrefreshed-port.pl refresh-unrefreshed-ports.pl This code has been commented out: [12:19 dev-ingress01 dvl ~/scripts] % grep -r DailySummaryDateAdd * refresh-an-unrefreshed-port.pl: $sql = "select DailySummaryDateAdd('$key')"; refresh-unrefreshed-ports.pl: $sql = "select DailySummaryDateAdd('$key')"; |
|
Stored procedures to be deleted:drop FUNCTION DailySummaryDateAdd(date); drop FUNCTION DailySummaryDateRemove(date); Done on dev: freshports.dev=# begin; BEGIN freshports.dev=*# drop FUNCTION DailySummaryDateAdd(date); DROP FUNCTION freshports.dev=*# drop FUNCTION DailySummaryDateRemove(date); DROP FUNCTION freshports.dev=*# commit; COMMIT freshports.dev=# |
|
I see this table mentioned in the old data diagram, which means it has old origins.[12:26 pg03 dvl ~/src/freshports/database-schema] % grep -ri daily_refreshes * FreshPorts2.pdm:daily_refreshes FreshPorts2.pdm:daily_refreshes FreshPorts2.pdm:daily_refreshes FreshPorts2.pdm:PK_daily_refreshes |
|
Let's see how dev handles this:freshports.dev=# alter table daily_refreshes rename to delete_me_daily_refreshes; ALTER TABLE freshports.dev=# |
|
Well, seems someone wants it:Jul 25 15:33:02 dev-ingress01 ingress[40580]: running /usr/local/bin/perl ./job-waiting.pl Jul 25 15:33:02 dev-ingress01 ingress[40580]: from directory /usr/local/libexec/freshports Jul 25 15:33:02 dev-ingress01 ingress[40580]: -rw-r--r-- 1 dvl dvl 3742 Nov 10 2024 ./job-waiting.pl Jul 25 15:33:02 dev-ingress01 ingress[40580]: Can't locate FreshPorts/cache.pm in @INC (you may need to install the FreshPorts::cache module) (@INC entries checked: /usr/local/lib/perl5/site_perl/mach/5.42 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.42/mach /usr/local/lib/perl5/5.42) at ./job-waiting.pl line 16. |
|
Fixed by[13:27 dev-ingress01 dvl ~/scripts] % svn di job-waiting.pl Index: job-waiting.pl =================================================================== --- job-waiting.pl (revision 6152) +++ job-waiting.pl (working copy) @@ -13,7 +13,7 @@ use DBI; use FreshPorts::database; -use FreshPorts::cache; +#use FreshPorts::cache; use FreshPorts::commit_log_ports_ignore; use FreshPorts::system_status; use FreshPorts::utilities; [13:27 dev-ingress01 dvl ~/scripts] % |
Date Modified | Username | Field | Change |
---|---|---|---|
2025-07-24 12:05 | dvl | New Issue | |
2025-07-24 12:05 | dvl | Status | new => assigned |
2025-07-24 12:05 | dvl | Assigned To | => dvl |
2025-07-24 12:09 | dvl | Steps to Reproduce Updated | |
2025-07-24 12:12 | dvl | Note Added: 0000395 | |
2025-07-24 12:15 | dvl | Note Added: 0000396 | |
2025-07-24 12:15 | dvl | Note Edited: 0000395 | |
2025-07-24 12:22 | dvl | Note Added: 0000397 | |
2025-07-24 12:26 | dvl | Note Added: 0000398 | |
2025-07-24 12:26 | dvl | Note Added: 0000399 | |
2025-07-24 12:39 | dvl | Note Added: 0000400 | |
2025-07-25 11:55 | dvl | Note Edited: 0000398 | |
2025-07-25 12:01 | dvl | Additional Information Updated | |
2025-07-25 15:40 | dvl | Note Added: 0000401 | |
2025-07-27 13:27 | dvl | Note Added: 0000402 |