Граф коммитов

5806 Коммитов

Автор SHA1 Сообщение Дата
Ben Dean-Kawamura 6c6951cdfe Updating the fxa-client example
Added flags to:
  - Request the session scope.
  - Control how log messages get printed to the console.

Updated the code to re-authenticated using the existing data rather than
throwing it away and starting from scratch.

These changes make it possible to repro
https://bugzilla.mozilla.org/show_bug.cgi?id=1887071

- run `cargo run -- --log -d devices` with fresh credentials.
  - Any command should do, but I used `devices`
  - The client should ask you to login and paste your credentials
  - You should see the device list printed out
- In a browser session, change your FxA password
- run `cargo run -- --log -d devices` again
  - The client should tell you there was an auth-problem and ask you to
    reauthenticate.
  - After you paste the reauthentication URL you should see an error
    printed out
2024-04-04 15:32:33 +00:00
Ben Dean-Kawamura e6ccfed09e Bumping UniFFI to 0.27.1 2024-04-04 14:34:31 +00:00
Julien Cristau 63ea14408b ci: index release-publish task by revision
This should help with bug 1886984 where updatebot / mach vendor want to
look things up by commit sha.
2024-04-02 16:09:39 +00:00
Ryan VanderMeulen 9518409ae1 Update some Gradle dependencies to the latest releases 2024-04-01 15:22:15 +00:00
Ryan VanderMeulen 32181d434f Update Gradle to version 8.7 and kotlin-dsl to version 4.3.0 2024-04-01 15:21:20 +00:00
Ben Dean-Kawamura a69ebea123 Speedup ingestion times
Changed the ingestion code to prepare statements outside of any loops
rather than creating them on each iteration.  Also, use tuples rather
than named arguments.  This cuts ingestion time in half for the 2 record
types that dominate the total time:

```
ingest/ingest-amp-wikipedia
                        time:   [446.26 ms 446.85 ms 447.53 ms]
                        change: [-51.727% -51.566% -51.408%] (p = 0.00 < 0.05)
                        Performance has improved.

ingest/ingest-amp-mobile
                        time:   [240.08 ms 240.25 ms 240.48 ms]
                        change: [-49.921% -49.801% -49.672%] (p = 0.00 < 0.05)
                        Performance has improved.
```

Refactored the prepare and execute calls into their own struct.  This
way it's easy to make sure that the arguments line up correctly with the
statement placeholders.  I also think it simplifies things to remove the
specifics of each SQL statement from the general ingestion logic.
2024-03-26 20:11:06 +00:00
Ben Dean-Kawamura ad2a484e77 Bug 1887071 - Clear out tokens/keys when starting an oauth flow 2024-03-26 19:48:00 +00:00
Charlie 9003f77ada update Nimbus to write targeting attributes after each individual enrollment 2024-03-25 15:21:07 +00:00
Ben Dean-Kawamura be6735f29c Adding command to print out ingestion sizes
Knowing these sizes can help us optimize things.  I'm going to use the
row counts as guidance to improve our ingestion benchmarks.
2024-03-22 23:09:35 +00:00
Ben Dean-Kawamura d6eeec7590 Bug 1886272: Starting suggest benchmarks
These can be run using `cargo suggest-bench`.
The only benchmarks I added so far is ingestion time.
2024-03-22 20:03:06 +00:00
Tarik Eshaq 4cd00c6006 Adds error reporting for bad synced bookmarks 2024-03-21 19:21:51 +00:00
Ryan VanderMeulen cd42116f49 Update Kotlin to version 1.9.23 2024-03-21 17:41:03 +00:00
Ben Dean-Kawamura e300532e81 Implement Eq, Ord, and Hash on GetItemOptions
A side issue here is that there are inherint methods with the same
method names as these traits. This is normally not a big deal because
inherent methods have a higher precedence than trait methods. However,
the methods also take `&mut self` and which has a lower precedent than
`&self` and this rule as a higher precedence (meta-precedence?) than the
other rule.

I prefixed the inherint method names with `filter_` and everything seems
to work okay.
2024-03-20 20:29:34 +00:00
Ben Dean-Kawamura 5f00479234 Bug 1876208 - API for dismissing suggestions
Dismissed suggestion Url hashes are stored in the database and the
suggestions are not returned again in subsequent queries.

This currently works with most providers, but not Yelp or Weather.
2024-03-20 15:02:42 +00:00
Ryan VanderMeulen 48798d244a Start release v126.0 2024-03-18 14:11:40 +00:00
Ryan VanderMeulen ffacc52804 Update NSS to version 3.99 2024-03-16 21:13:59 +00:00
Ben Dean-Kawamura 9054db4bb5 Rename .cargo/config -> .cargo/config.toml
I was getting this message when running
`tools/regenerate_dependency_summaries.sh`

```
warning: `/home/ben/application-services/main/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
    Updating git repository `https://github.com/martinthomson/ohttp.git`
```
2024-03-13 20:04:00 +00:00
Tif Tran a1b5ea435c Bug 1878990 - Suggest: Extract out common SELECT SQL 2024-03-13 00:16:14 +00:00
Ryan VanderMeulen bd92517fa0 Update Glean to v58.1.0 2024-03-13 00:14:59 +00:00
Tarik Eshaq f684a2abcb Swiftformat 2024-03-12 19:12:56 +00:00
Tarik Eshaq 359ce692ce Fixes ktlint 2024-03-12 19:12:56 +00:00
Tarik Eshaq 8d26d0d463 Adds tests and changelog 2024-03-12 19:12:56 +00:00
Tarik Eshaq 3ccf6c1c8e Recieves session token from application before oauth 2024-03-12 19:12:56 +00:00
Ben Dean-Kawamura 222573ce1d Bug 1882381 - Switch to using the data path for the suggest DB
- Use the `data_path` rather than `cache_path` for the suggest DB.  This
  is prep for for storing the suggestion dismissal data in the DB, which
  should not be reset on schema upgrades.
- Don't always drop and recreate the database when the schema upgrades.
  Instead, I'm hoping we can use the code from `SuggestDao.clear` to
  delete the suggestion data so that we re-ingest it.
- Other than adding the `dismissed_suggestions` table, this doesn't
  implement any of the suggestion dismissal functionality.
2024-03-12 16:33:08 +00:00
Lina Butler f44e9d0196 Improve the Suggest component's `README`. 2024-03-08 22:55:46 +00:00
Ben Dean-Kawamura 497daa010f Bug 1884434 - log a breadcrumb when check_internal_state is successful
I also updated the check_public_state breadcrumb code so that we don't
output the successfull breadcrumb after a state mismatch.
2024-03-08 21:30:26 +00:00
Ben Dean-Kawamura ec40bd649e Initial commit for the relevancy component
Added boilerplate for UniFFI, error handling, databases, etc.  I tried
to follow the best practices from other application-services components.

Created the initial types and methods for the API.  I think all of these
should be considered works-in-progress.  It seems likely that some or
all of them will change as we implement the functionality.

Added some code to read / write URL interest data from a test binary
file currently stored in the repo.  This is also a WIP, at the very
least it needs to change to download the data from remote settings.
2024-03-08 16:18:37 +00:00
Ben Dean-Kawamura 4a2dd4c2d8 Bug 1876217 - Add full keyword support for AMP items
Parse the `full_keyword` field for downloaded AMP / wikipedia
suggestions and store it in the DB.

Use the field for AMP suggestions rather than the current
hueristic-based code.

Don't use this field for Wikimedia suggestions.  This is because the
full keyword field is just the full article title, which is already
included in the suggestion.
2024-03-07 17:08:43 +00:00
Mark Hammond a5e715b286 Remove the rc_log crate. 2024-03-07 16:51:12 +00:00
Mark Hammond 47ef7c8c98 Update some crates to avoid cargo audit errors
As part of this, update clap for app-services examples.
2024-03-06 16:02:17 +00:00
dadaa 01a52c7e6d Bug 1882954 - Expose icon mimetype in suggestions 2024-03-05 04:35:43 +00:00
Ben Dean-Kawamura a70d9ca7b1 Bug 1883413 - Handle `Disconnect` event from `AuthIssues` state
Also updated the state machine error messages.  This was based on me
trying to read through them and finding the current ones lacking.
2024-03-04 16:47:41 +00:00
Travis Long 219ca78e2c Update Glean to v58.0.0 2024-03-01 23:15:02 +00:00
Michelle Tran 78f2d581f6 PR suggestions 2024-03-01 16:18:40 +00:00
Michelle Tran 205617f7db Update components/suggest/src/store.rs
Co-authored-by: Nan Jiang <njiang028@gmail.com>
2024-03-01 16:18:40 +00:00
Michelle Tran adfdc9d4b1 Make the snapshot return specific Remote Settings Record types 2024-03-01 16:18:40 +00:00
Michelle Tran 9ce740d39f Split Suggest Ingest into Separate Remote Settings Calls
This helps with keeping track of the last ingested item for each
of the record types.

Update components/suggest/src/store.rs

Co-authored-by: Nan Jiang <njiang028@gmail.com>

Update components/suggest/src/store.rs

Co-authored-by: Nan Jiang <njiang028@gmail.com>

Update components/suggest/src/store.rs

Co-authored-by: Nan Jiang <njiang028@gmail.com>
2024-03-01 16:18:40 +00:00
Ryan VanderMeulen 84c511ee4c Bump work-testing to version 2.9.0 2024-02-29 01:56:00 +00:00
Ryan VanderMeulen e9dbc97074 Bump Android-Components to version 123.0 2024-02-29 01:56:00 +00:00
lougeniac64 c1bd7dbede Prevented outgoing syncs of scrubbed credit card records 2024-02-28 22:55:01 +00:00
Ben Dean-Kawamura 592063cbab Fxa state checker: handle public events that immediately transition to a new state
Handle the case where a public event results in an immediate public
state transition (i.e. the initial state of the internal state machine
is `Complete(new_state)`).  Copied the code that does this from
`handle_internal_event` to `handle_public_event`.

Also reworked a couple of the breadcrumb messages.  In particular, I got
confused because was both the public and internal event handlers sent
out breadcrumbs that look the same.
2024-02-28 21:24:54 +00:00
dadaa 5fc8ee2f0f Use LEFT JOIN for yelp_custom_detail SQL 2024-02-28 00:50:37 +00:00
dadaa 9fb958917b Bug 1881387 - Add score to Yelp Suggestion 2024-02-27 06:20:34 +00:00
Issam Mani fd6df75f42 fix: add more test comments 2024-02-26 15:14:43 +00:00
Issam Mani f86fd74ee9 fix: missed failing test 2024-02-26 15:14:43 +00:00
Issam Mani 396eb28c03 fix: enhance comments 2024-02-26 15:14:43 +00:00
Issam Mani 63e2bd66cb fix: lint 2024-02-26 15:14:43 +00:00
Issam Mani 116677bd05 chore: add change description to CHANGELOG.md 2024-02-26 15:14:43 +00:00
Issam Mani dc3e53408c chore: cleanup code 2024-02-26 15:14:43 +00:00
Issam Mani 0abd35b1a5 feat: port FormAutofillNameUtils 2024-02-26 15:14:43 +00:00