source_monitor 0.10.1 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/lib/source_monitor/fetching/fetch_runner.rb +4 -3
- data/lib/source_monitor/items/item_creator.rb +1 -1
- data/lib/source_monitor/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 65fe10d6cb1f109a3f95af0c20ee5abbcbfc5c9e0bd188dc65d6c118662db667
|
|
4
|
+
data.tar.gz: 5ba3db65f470b9569f543a137df5dab30a8e730ab2a4d396d6160b8d88011c34
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d6b374cac60f5f5d057212033ec101a859a35e3c1d09a3ba7dc7f64e15bfb2554e24c8648b96c06855cd176ab297d5e395198e97ff4fb4f02e33b69e29182a19
|
|
7
|
+
data.tar.gz: '00954ab911a13c252358a44fd5c822d928c8ab2e2c6f7b9b2bc00df21af0035486edbc45903bd805ac2904539f49e5baa92508ce6e5ce1c788c5f1516f53f3a2'
|
data/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,12 @@ All notable changes to this project are documented below. The format follows [Ke
|
|
|
15
15
|
|
|
16
16
|
- No unreleased changes yet.
|
|
17
17
|
|
|
18
|
+
## [0.10.2] - 2026-02-26
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- **Association cache pollution in ItemCreator no longer causes cascading validation failures.** When `source.items.new` was used to build new items, failed saves (e.g., invalid URLs) left unsaved records in the association cache. Subsequent `source.update!` calls triggered Rails' has_many auto-save on the invalid cached items, causing `RecordInvalid: Items is invalid` errors. Fixed by constructing items via `Item.new(source_id:)` to bypass the association cache, and by switching FetchRunner's status updates to `update_columns` for defense-in-depth.
|
|
23
|
+
|
|
18
24
|
## [0.10.1] - 2026-02-25
|
|
19
25
|
|
|
20
26
|
### Fixed
|
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.10.
|
|
1
|
+
0.10.2
|
|
@@ -42,7 +42,7 @@ module SourceMonitor
|
|
|
42
42
|
return unless source
|
|
43
43
|
|
|
44
44
|
# Don't broadcast here - controller handles immediate UI update
|
|
45
|
-
source.
|
|
45
|
+
source.update_columns(fetch_status: "queued")
|
|
46
46
|
SourceMonitor::FetchFeedJob.perform_later(source.id, force: force)
|
|
47
47
|
end
|
|
48
48
|
|
|
@@ -72,7 +72,7 @@ module SourceMonitor
|
|
|
72
72
|
ensure
|
|
73
73
|
begin
|
|
74
74
|
source.reload
|
|
75
|
-
source.
|
|
75
|
+
source.update_columns(fetch_status: "failed") if source.fetch_status == "fetching"
|
|
76
76
|
rescue StandardError # :nocov:
|
|
77
77
|
nil
|
|
78
78
|
end
|
|
@@ -88,7 +88,8 @@ module SourceMonitor
|
|
|
88
88
|
private_class_method :resolve_source
|
|
89
89
|
|
|
90
90
|
def self.update_source_state!(source, attrs)
|
|
91
|
-
source.
|
|
91
|
+
source.update_columns(attrs)
|
|
92
|
+
source.reload
|
|
92
93
|
begin
|
|
93
94
|
SourceMonitor::Realtime.broadcast_source(source)
|
|
94
95
|
rescue StandardError => error
|
|
@@ -117,7 +117,7 @@ module SourceMonitor
|
|
|
117
117
|
end
|
|
118
118
|
|
|
119
119
|
def create_new_item(attributes, raw_guid_present:)
|
|
120
|
-
new_item = source.
|
|
120
|
+
new_item = SourceMonitor::Item.new(source_id: source.id)
|
|
121
121
|
apply_attributes(new_item, attributes)
|
|
122
122
|
new_item.save!
|
|
123
123
|
new_item.ensure_feed_content_record
|