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

bug: Add proper update_user logic for Bigtable #503

Merged
merged 34 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c3ab560
bug: Add proper `update_user` logic for Bigtable
jrconlin Nov 3, 2023
893f902
f fmt
jrconlin Nov 3, 2023
45bd934
Merge branch 'master' of github.com:mozilla-services/autopush-rs into…
jrconlin Nov 3, 2023
c80da41
Merge branch 'master' into bug/SYNC-3982-bt_reg
jrconlin Nov 15, 2023
77cccb5
Merge branch 'master' of github.com:mozilla-services/autopush-rs into…
jrconlin Nov 15, 2023
4e008fd
f move `write_row` to make diff a bit easier to read
jrconlin Nov 15, 2023
a77cbe7
Merge branch 'bug/SYNC-3982-bt_reg' of github.com:mozilla-services/au…
jrconlin Nov 15, 2023
62942d0
f adjust jobs to prevent OOM
jrconlin Nov 15, 2023
017d592
f make optional libs optional
jrconlin Nov 15, 2023
ae68006
Merge branch 'master' of github.com:mozilla-services/autopush-rs into…
jrconlin Nov 16, 2023
58e5d8b
Merge branch 'master' of github.com:mozilla-services/autopush-rs into…
jrconlin Nov 17, 2023
09d662d
Merge branch 'master' of github.com:mozilla-services/autopush-rs into…
jrconlin Nov 21, 2023
c14927c
Merge branch 'master' of github.com:mozilla-services/autopush-rs into…
jrconlin Nov 29, 2023
0cbfa26
Merge branch 'master' into bug/SYNC-3982-bt_reg
jrconlin Dec 2, 2023
0984779
Merge branch 'master' of github.com:mozilla-services/autopush-rs into…
jrconlin Dec 12, 2023
5347221
Merge branch 'bug/SYNC-3982-bt_reg' of github.com:mozilla-services/au…
jrconlin Dec 12, 2023
af8ffd9
f cleanup (removed old comments/todos)
jrconlin Dec 13, 2023
978a28d
Merge branch 'master' of github.com:mozilla-services/autopush-rs into…
jrconlin Dec 14, 2023
e38fdde
Merge branch 'master' into bug/SYNC-3982-bt_reg
jrconlin Dec 14, 2023
df86e48
Merge branch 'master' into bug/SYNC-3982-bt_reg
jrconlin Dec 16, 2023
7abf310
f r's
jrconlin Dec 19, 2023
4017332
f nightly
jrconlin Dec 20, 2023
758c93f
Merge branch 'master' of github.com:mozilla-services/autopush-rs into…
jrconlin Dec 20, 2023
c0bf195
f nightly
jrconlin Dec 20, 2023
ffae893
BROKEN: update_user has two filter chains
jrconlin Dec 20, 2023
e55b014
f build out chains
jrconlin Dec 20, 2023
9aefd08
Merge branch 'master' of github.com:mozilla-services/autopush-rs into…
jrconlin Dec 21, 2023
bab2a76
f add pjenvey's fix
jrconlin Dec 21, 2023
e9121ac
Merge branch 'bug/3982-jr' into bug/SYNC-3982-bt_reg
jrconlin Dec 21, 2023
ad650a2
f revert default feature set
jrconlin Dec 21, 2023
9fdbb79
f update rust version (for clippy)
jrconlin Dec 21, 2023
982f032
f strip dbg! and comment block
jrconlin Dec 21, 2023
e5a47c2
f remove escape
jrconlin Jan 10, 2024
26717cb
f remove commented escape
jrconlin Jan 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
audit:
docker:
# NOTE: update version for all # RUST_VER
- image: rust:1.73
- image: rust:1.74
auth:
username: $DOCKER_USER
password: $DOCKER_PASS
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# NOTE: Ensure builder's Rust version matches CI's in .circleci/config.yml
FROM rust:1.73-buster as builder
FROM rust:1.74-buster as builder
ARG CRATE

ADD . /app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ impl UnidentifiedClient {
if let Some(mut user) = self.app_state.db.get_user(&uaid).await? {
if let Some(flags) = process_existing_user(&self.app_state, &user).await? {
user.node_id = Some(self.app_state.router_url.to_owned());
if user.connected_at > connected_at {
let _ = self.app_state.metrics.incr("ua.already_connected");
return Err(SMErrorKind::AlreadyConnected.into());
}
user.connected_at = connected_at;
user.set_last_connect();
if !self.app_state.db.update_user(&user).await? {
Expand Down
Loading