Skip to content

[CI] Workflow#1

Merged
hmdros merged 5 commits intomasterfrom
ci-workflow
Mar 6, 2026
Merged

[CI] Workflow#1
hmdros merged 5 commits intomasterfrom
ci-workflow

Conversation

@hmdros
Copy link
Copy Markdown

@hmdros hmdros commented Feb 13, 2026

This PR adds docker setup and Github CI workflow

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 13, 2026

Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit fa82860.

♻️ This comment has been updated with latest results.

@hmdros hmdros force-pushed the ci-workflow branch 4 times, most recently from 2f8952e to 367b396 Compare February 25, 2026 16:11
Comment thread spec/spec_helper.rb
options.add_argument('--window-size=1920,1080')
options.add_argument('--no-sandbox')
# options.add_argument('--disable-dev-shm-usage')
options.add_argument('--disable-dev-shm-usage')
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

failing to run in docker container

Comment thread app/models/episode.rb
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude: The controller loads @series with includes(episodes: :article), which pre-loads @series.episodes into an in-memory cache. Rails 7 uses inverse_of auto-detection for belongs_to :serieshas_many :episodes, so when Episode.create(series: @series, ...) is called, the new unsaved episode is added to @series.episodes.target (the in-memory cache).

When accomodate_new_number ran before the fix, series.episodes.each iterated that stale cache — which included the new unsaved record itself. When the loop reached self, it called update_column on a new (unpersisted) record, which raises ActiveRecord::ActiveRecordError: cannot update a new record. This caused the positional shift to fail, so the episode fell through to max + 1 (position 3) instead of the requested position 1.

update_all executes a single UPDATE ... WHERE series_id = ? AND number >= ? directly against the database. Because the new episode hasn't been saved yet, it doesn't exist in the episodes table and is never touched by the query. The stale in-memory cache is bypassed entirely.

ninkibah and others added 4 commits March 2, 2026 15:28
Fixed the admin/items page to search for items with a given fee id.
…ay-the-manage-event-button-for-users-with-the-treasurer-role

Gave treasurers the ability to see and click on the manage event button.
Add requires to run tests locally

add github ci workflow

adjust docker compose command

copy example files

adjust database example file

create db command

remove formater

remove requried byebug

remove byebug use

remove coverage steps

remove publish coverage results

Adjust app setup and docker setup

adjust capybara drivers config - remove capybara_lockstep from application layout

prevent dockerfile and selenium conflict

remove double block

add one more iframe layer

Change iframe css finders

debug pay spec in ci

setup iframes

setup iframes with correct selectors

setup iframes with correct selectors

adjust to new strategy

test adding address to card.js.erb

adjust cofirmpayment code

add 5 seconds to confirm payment

add postal code

update clicable button

add new rescue and wait time
Both accomodate_new_number and squash_old_numbers iterated series.episodes using the in-memory association cache (loaded via includes(episodes: :article) in the controller set_series). Due to Rails inverse_of auto-detection, when a new Episode is built with series: @Series, it gets added to @series.episodes.target. The shift loop then calls update_column on this unsaved record, which raises ActiveRecord::ActiveRecordError: cannot update a new record. This prevented the positional shift from completing correctly, so the new episode ended up at max + 1 (position 3) instead of the requested position 1.

Fix: Replaced both each + update_column loops with update_all SQL:

series.episodes.where("number >= ?", number).update_all("number = number + 1") — shifts existing episodes up to make room for the new one at the requested position
series.episodes.where("number > ?", number).update_all("number = number - 1") — squashes gaps after a destroy
update_all executes a single UPDATE SQL statement directly against the DB, bypassing the stale association cache and never touching the unsaved new record. The same pattern was applied to squash_old_numbers for consistency (the same stale-cache issue exists there for the self record just before its destroyed).

adjust spec

adjust readme
@etagwerker etagwerker changed the title Ci workflow [CI] Workflow Mar 3, 2026
@hmdros hmdros force-pushed the ci-workflow branch 2 times, most recently from a4a351e to 302bb6e Compare March 5, 2026 20:30
@hmdros hmdros merged commit 3c8a588 into master Mar 6, 2026
1 check passed
@etagwerker etagwerker deleted the ci-workflow branch March 6, 2026 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants