feat: Add test backend pipeline #235
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
backend
ci
docs
frontend
lgtm
blocked
lgtm
done
lgtm
need 1
size
huge
size
large
size
medium
size
small
No milestone
No project
No assignees
3 participants
Due date
No due date set.
Dependencies
No dependencies set.
Reference: SZUT/casino#235
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "test-pipeline"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This implementation is fundamentally flawed and shows a lack of understanding of both Gradle and CI best practices.
Critical Issues:
gradle test
instead of./gradlew test
- this will likely fail since gradle isn't globally installedThe entire caching mechanism is a confused mess that conflates testing with checkstyle. Either implement proper test caching or remove it entirely. Also, follow the project's established patterns - use
./gradlew
like everywhere else in the codebase.This needs to be completely rewritten with a clear understanding of what a test pipeline should actually do.
d01a6bcac6
to00eaa0bb9e
This backend testing job is fundamentally broken and shows a complete lack of understanding of CI/CD workflows. Multiple critical issues:
Incorrect cache reference: Lines 54, 60, 67 reference steps.check-cache.outputs.cache-hit but there's NO step with id check-cache in this job. This will cause the conditions to always evaluate as false since the referenced step doesn't exist.
Inconsistent Gradle wrapper usage: You use ./gradlew test (correct) but then gradle --stop (wrong). Either use the wrapper consistently or don't - pick one and stick with it.
Pointless checkstyle caching: Why are you caching checkstyle reports in the test job? That makes zero sense - checkstyle reports belong in the checkstyle job, not the test job.
Missing cache validation step: The existing checkstyle job has a proper cache check step (lines 92-100) that you completely ignored when copy-pasting.
Poor job naming: Backend Tests in quotes is inconsistent with other job names in the file.
This looks like a rushed copy-paste job without any thought or testing. Fix the cache references, remove the irrelevant checkstyle caching, and make the Gradle commands consistent. Also, did you even test this workflow locally or just commit broken code hoping it would work?
00eaa0bb9e
to08e982f2ef
--message Good initiative adding backend testing to CI, but there are several issues that need fixing:
🔧 Critical Issues:
gradle --stop
instead of./gradlew --stop
- inconsistent with rest of pipelinebackend/**/*.java
- will miss cache on every code change, making caching pointless⚠️ Improvements needed:
The Claude workflow change is fine. Fix the Gradle command and cache strategy, then this will be good to merge.
08e982f2ef
toe418c296de
This PR has several critical issues that need to be addressed:
The pipeline addition is fine, but the backend refactoring is poorly executed. Fix the import, restore DeckService, keep the @Version field for data safety, and clean up the constructor logic properly. Don't just inline services without considering the architectural implications.
STATUS: REJECTED
Several issues need to be addressed:
Misleading CI Configuration: The test-backend job uploads 'checkstyle-results' artifacts but doesn't run checkstyle. Either remove this step or add the actual checkstyle execution.
Missing Import: The refactored BlackJackService uses CardType enum but the import seems to be missing from the diff. Verify this compiles.
Dangerous Optimistic Locking Removal: Removing @Version from UserEntity eliminates optimistic locking protection. This is problematic for an entity that handles financial data (balance) where concurrent modifications could cause data corruption.
Poor Transaction Management: The getUserWithFreshData() pattern suggests underlying transaction boundary issues. Instead of repeatedly fetching fresh data, fix the actual transaction scoping problems.
The CI improvement is good, but the backend changes introduce potential data consistency and concurrency issues that are unacceptable for a financial application. Fix the optimistic locking and transaction management properly.
RECOMMENDATION: REJECT
Good addition of backend testing pipeline! The conditional execution and proper Gradle cleanup are well implemented. However, there are a few inconsistencies: you're uploading checkstyle artifacts without running checkstyle, and the container choice (openjdk:23.0-node) seems unnecessarily heavy with Node.js for backend-only testing. Consider running checkstyle in this job or removing the artifact upload, and maybe use a leaner JDK image. Overall solid work though!
idc