Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix postgres statements case sensitivity #3007

Merged
merged 8 commits into from
Dec 4, 2024

Conversation

alishakawaguchi
Copy link
Contributor

fast follow: write better postgres manager integration tests

Copy link

linear bot commented Dec 4, 2024

Copy link

vercel bot commented Dec 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
neosync-docs ⬜️ Ignored (Inspect) Visit Preview Dec 4, 2024 7:25am

@alishakawaguchi alishakawaguchi self-assigned this Dec 4, 2024
@alishakawaguchi alishakawaguchi added the bug Something isn't working label Dec 4, 2024
Copy link

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 32.55814% with 29 lines in your changes missing coverage. Please review.

Project coverage is 36.11%. Comparing base (302dd92) to head (1cc6977).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ws/datasync/activities/post-table-sync/activity.go 0.00% 19 Missing ⚠️
worker/internal/cmds/worker/serve/serve.go 0.00% 6 Missing ⚠️
...ackend/pkg/sqlmanager/postgres/postgres-manager.go 60.00% 2 Missing ⚠️
...atasync/activities/sync-redis-clean-up/activity.go 77.77% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3007      +/-   ##
==========================================
+ Coverage   36.06%   36.11%   +0.05%     
==========================================
  Files         344      344              
  Lines       39454    39476      +22     
==========================================
+ Hits        14228    14257      +29     
+ Misses      23571    23558      -13     
- Partials     1655     1661       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

if redisConfig == nil {
return nil, fmt.Errorf("missing redis config. this operation requires redis.")
return nil, nil
Copy link
Member

Choose a reason for hiding this comment

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

Is this intentional?


w.RegisterWorkflow(datasync_workflow.Workflow)
w.RegisterActivity(syncActivity.Sync)
w.RegisterActivity(retrieveActivityOpts.RetrieveActivityOptions)
w.RegisterActivity(runSqlInitTableStatements.RunSqlInitTableStatements)
w.RegisterActivity(syncrediscleanup_activity.DeleteRedisHash)
w.RegisterActivity(redisCleanUpActivity)
Copy link
Member

Choose a reason for hiding this comment

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

I think this needs to be redisCleanUpActivity.DeleteRedisHash

redisClient, err := neosync_redis.GetRedisClient()
if err != nil {
return nil, err
if a.redisclient == nil {
Copy link
Member

Choose a reason for hiding this comment

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

Okay so I'm guessing the way this works is that you are providing an empty redis client but the activity is never invoked via the workflow unless we detect redis clients, yes?

@@ -420,7 +421,7 @@ func runRedisCleanUpActivity(
},
HeartbeatTimeout: 1 * time.Minute,
}),
syncrediscleanup_activity.DeleteRedisHash,
redisCleanUpActivity,
Copy link
Member

Choose a reason for hiding this comment

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

Missing the .DeleteRedisHash

Slightly concerning the tests didn't catch this, but maybe it suffers the same fate as the post table sync.

@alishakawaguchi alishakawaguchi merged commit ef70005 into main Dec 4, 2024
9 of 10 checks passed
@alishakawaguchi alishakawaguchi deleted the alisha/neos-1649-posttablesync branch December 4, 2024 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants