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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff36371d856b56cbafa201913319fda084fa7083f1483c7c3051bb595055efbe
4
- data.tar.gz: 54dfba3bb65b0577d09ecda2d2bba42caa27e0f2c8abfaad35e8a7e122042cef
3
+ metadata.gz: 65fe10d6cb1f109a3f95af0c20ee5abbcbfc5c9e0bd188dc65d6c118662db667
4
+ data.tar.gz: 5ba3db65f470b9569f543a137df5dab30a8e730ab2a4d396d6160b8d88011c34
5
5
  SHA512:
6
- metadata.gz: 18ff88e88b9d3d6db95f1f5048b3d4d05eef1f93d7620432681dc12f64dbc4343df1400595fa81841ab5f7a2e294e41c378f4c6c989c9d209062fa99f19038f3
7
- data.tar.gz: a29a25f83a159a634eb68871396695b3309f4ca7a50d23a37b0d775ac28c5f2443dcf3201de917e5c5d6eb0357cbb00688cc359e52661c86a822bdbc0aece365
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- source_monitor (0.10.1)
4
+ source_monitor (0.10.2)
5
5
  cssbundling-rails (~> 1.4)
6
6
  faraday (~> 2.9)
7
7
  faraday-follow_redirects (~> 0.4)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.1
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.update!(fetch_status: "queued")
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.update!(fetch_status: "failed") if source.fetch_status == "fetching"
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.update!(attrs)
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.items.new
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SourceMonitor
4
- VERSION = "0.10.1"
4
+ VERSION = "0.10.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: source_monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - dchuk