Mikayla Maki
71da81c743
SSH Remoting: Fix bugs in worktree syncing ( #18406 )
...
Release Notes:
- N/A
---------
Co-authored-by: conrad <conrad@zed.dev>
2024-09-26 12:03:57 -07:00
Marshall Bowers
692590bff4
collab: Fix GitHub user retrieval in seed script ( #18296 )
...
This PR fixes the GitHub user retrieval in the database seed script.
The users returned from the [list
users](https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#list-users )
endpoint don't have a `created_at` timestamp, so we need to fetch them
individually.
I want to rework this further at a later date, this is just a bandaid to
get things working again.
Release Notes:
- N/A
2024-09-24 15:44:55 -04:00
Marshall Bowers
1fc391f696
Make Buffer::apply_ops
infallible ( #18089 )
...
This PR makes the `Buffer::apply_ops` method infallible for
`text::Buffer` and `language::Buffer`.
We discovered that `text::Buffer::apply_ops` was only fallible due to
`apply_undo`, which didn't actually need to be fallible.
Release Notes:
- N/A
2024-09-19 13:14:15 -04:00
Peter Tripp
c28b22d1cf
Update typos-cli to v1.24.6. Add scripts/check-spelling. Fix typos ( #17961 )
2024-09-17 15:08:14 -04:00
Conrad Irwin
e66ea9e5d4
Fix renames over language server for SSH remoting ( #17897 )
...
Release Notes:
- ssh remoting: Fix rename over language server
---------
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Max <max@zed.dev>
2024-09-16 16:20:17 -06:00
Richard Feldman
91ffa02e2c
/auto ( #16696 )
...
Add `/auto` behind a feature flag that's disabled for now, even for
staff.
We've decided on a different design for context inference, but there are
parts of /auto that will be useful for that, so we want them in the code
base even if they're unused for now.
Release Notes:
- N/A
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-09-13 13:17:49 -04:00
Piotr Osiewicz
095a08d9c8
chore: Another round of style lints fixes ( #17519 )
...
Closes #ISSUE
Release Notes:
- N/A
2024-09-07 02:36:55 +02:00
Piotr Osiewicz
e6c1c51b37
chore: Fix several style lints ( #17488 )
...
It's not comprehensive enough to start linting on `style` group, but
hey, it's a start.
Release Notes:
- N/A
2024-09-06 11:58:39 +02:00
Marshall Bowers
bb9f2f8713
collab: Require github_user_created_at
at ingress points ( #17180 )
...
This PR makes the `github_user_created_at` field required at ingress
points into collab.
In practice we already have this value passed up, this change just makes
that explicit.
This is a precursor to making it required in the database.
Release Notes:
- N/A
2024-08-30 17:09:59 -04:00
renovate[bot]
760e1a6db0
Update Rust crate sqlx to 0.8 [SECURITY] ( #16791 )
...
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [sqlx](https://togithub.com/launchbadge/sqlx ) | dev-dependencies |
minor | `0.7` -> `0.8` |
| [sqlx](https://togithub.com/launchbadge/sqlx ) | dependencies | minor |
`0.7` -> `0.8` |
### GitHub Vulnerability Alerts
####
[GHSA-xmrp-424f-vfpx](https://togithub.com/launchbadge/sqlx/issues/3440 )
The following presentation at this year's DEF CON was brought to our
attention on the SQLx Discord:
> SQL Injection isn't Dead: Smuggling Queries at the Protocol Level
>
<http://web.archive.org/web/20240812130923/https://media.defcon.org/DEF%20CON%2032/DEF%20CON%2032%20presentations/DEF%20CON%2032%20-%20Paul%20Gerste%20-%20SQL%20Injection%20Isn't%20Dead%20Smuggling%20Queries%20at%20the%20Protocol%20Level.pdf >
> (Archive link for posterity.)
Essentially, encoding a value larger than 4GiB can cause the length
prefix in the protocol to overflow,
causing the server to interpret the rest of the string as binary
protocol commands or other data.
It appears SQLx _does_ perform truncating casts in a way that could be
problematic,
for example:
<6f2905695b/sqlx-postgres/src/arguments.rs (L163)
>
This code has existed essentially since the beginning,
so it is reasonable to assume that all published versions `<= 0.8.0` are
affected.
## Mitigation
As always, you should make sure your application is validating
untrustworthy user input.
Reject any input over 4 GiB, or any input that could _encode_ to a
string longer than 4 GiB.
Dynamically built queries are also potentially problematic if it pushes
the message size over this 4 GiB bound.
[`Encode::size_hint()`](https://docs.rs/sqlx/latest/sqlx/trait.Encode.html#method.size_hint )
can be used for sanity checks, but do not assume that the size returned
is accurate.
For example, the `Json<T>` and `Text<T>` adapters have no reasonable way
to predict or estimate the final encoded size,
so they just return `size_of::<T>()` instead.
For web application backends, consider adding some middleware that
limits the size of request bodies by default.
## Resolution
Work has started on a branch to add `#[deny]` directives for the
following Clippy lints:
*
[`cast_possible_truncation`](https://rust-lang.github.io/rust-clippy/master/#/cast_possible_truncation )
*
[`cast_possible_wrap`](https://rust-lang.github.io/rust-clippy/master/#/cast_possible_wrap )
*
[`cast_sign_loss`](https://rust-lang.github.io/rust-clippy/master/#/cast_sign_loss )
and to manually audit the code that they flag.
A fix is expected to be included in the `0.8.1` release (still WIP as of
writing).
---
### Release Notes
<details>
<summary>launchbadge/sqlx (sqlx)</summary>
###
[`v0.8.1`](https://togithub.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#081---2024-08-23 )
[Compare
Source](https://togithub.com/launchbadge/sqlx/compare/v0.8.0...v0.8.1 )
16 pull requests were merged this release cycle.
This release contains a fix for [RUSTSEC-2024-0363].
Postgres users are advised to upgrade ASAP as a possible exploit has
been demonstrated:
[#​3440
(comment)](https://togithub.com/launchbadge/sqlx/issues/3440#issuecomment-2307956901 )
MySQL and SQLite do not *appear* to be exploitable, but upgrading is
recommended nonetheless.
##### Added
- \[[#​3421]]: correct spelling of
`MySqlConnectOptions::no_engine_substitution()`
\[\[[@​kolinfluence](https://togithub.com/kolinfluence )]]
- Deprecates `MySqlConnectOptions::no_engine_subsitution()` (oops) in
favor of the correctly spelled version.
##### Changed
- \[[#​3376]]: doc: hide `spec_error` module
\[\[[@​abonander](https://togithub.com/abonander )]]
- This is a helper module for the macros and was not meant to be
exposed.
- It is not expected to receive any breaking changes for the 0.8.x
release, but is not designed as a public API.
Use at your own risk.
- \[[#​3382]]: feat: bumped to `libsqlite3-sys=0.30.1` to support
sqlite 3.46
\[\[[@​CommanderStorm](https://togithub.com/CommanderStorm )]]
- \[[#​3385]]: chore(examples):Migrated the pg-chat example to
ratatui
\[\[[@​CommanderStorm](https://togithub.com/CommanderStorm )]]
- \[[#​3399]]: Upgrade to rustls 0.23
\[\[[@​djc](https://togithub.com/djc )]]
- RusTLS now has pluggable cryptography providers: `ring` (the existing
implementation),
and `aws-lc-rs` which has optional FIPS certification.
- The existing features activating RusTLS (`runtime-tokio-rustls`,
`runtime-async-std-rustls`, `tls-rustls`)
enable the `ring` provider of RusTLS to match the existing behavior so
this *should not* be a breaking change.
- Switch to the `tls-rustls-aws-lc-rs` feature to use the `aws-lc-rs`
provider.
- If using `runtime-tokio-rustls` or `runtime-async-std-rustls`,
this will necessitate switching to the appropriate non-legacy runtime
feature:
`runtime-tokio` or `runtime-async-std`
- See the RusTLS README for more details:
<https://github.com/rustls/rustls?tab=readme-ov-file#cryptography-providers >
##### Fixed
- \[[#​2786]]: fix(sqlx-cli): do not clean sqlx during prepare
\[\[[@​cycraig](https://togithub.com/cycraig )]]
- \[[#​3354]]: sqlite: fix inconsistent read-after-write
\[\[[@​ckampfe](https://togithub.com/ckampfe )]]
- \[[#​3371]]: Fix encoding and decoding of MySQL enums in
`sqlx::Type` \[\[[@​alu](https://togithub.com/alu )]]
- \[[#​3374]]: fix: usage of `node12` in `SQLx` action
\[\[[@​hamirmahal](https://togithub.com/hamirmahal )]]
- \[[#​3380]]: chore: replace structopt with clap in examples
\[\[[@​tottoto](https://togithub.com/tottoto )]]
- \[[#​3381]]: Fix CI after Rust 1.80, remove dead feature
references \[\[[@​abonander](https://togithub.com/abonander )]]
- \[[#​3384]]: chore(tests): fixed deprecation warnings
\[\[[@​CommanderStorm](https://togithub.com/CommanderStorm )]]
- \[[#​3386]]: fix(dependencys):bumped cargo_metadata to `v0.18.1`
to avoid yanked `v0.14.3`
\[\[[@​CommanderStorm](https://togithub.com/CommanderStorm )]]
- \[[#​3389]]: fix(cli): typo in error for required DB URL
\[\[[@​ods](https://togithub.com/ods )]]
- \[[#​3417]]: Update version to 0.8 in README
\[\[[@​soucosmo](https://togithub.com/soucosmo )]]
- \[[#​3441]]: fix: audit protocol handling
\[\[[@​abonander](https://togithub.com/abonander )]]
- This addresses [RUSTSEC-2024-0363] and includes regression tests for
MySQL, Postgres and SQLite.
[#​2786]: https://togithub.com/launchbadge/sqlx/pull/2786
[#​3354]: https://togithub.com/launchbadge/sqlx/pull/3354
[#​3371]: https://togithub.com/launchbadge/sqlx/pull/3371
[#​3374]: https://togithub.com/launchbadge/sqlx/pull/3374
[#​3376]: https://togithub.com/launchbadge/sqlx/pull/3376
[#​3380]: https://togithub.com/launchbadge/sqlx/pull/3380
[#​3381]: https://togithub.com/launchbadge/sqlx/pull/3381
[#​3382]: https://togithub.com/launchbadge/sqlx/pull/3382
[#​3384]: https://togithub.com/launchbadge/sqlx/pull/3384
[#​3385]: https://togithub.com/launchbadge/sqlx/pull/3385
[#​3386]: https://togithub.com/launchbadge/sqlx/pull/3386
[#​3389]: https://togithub.com/launchbadge/sqlx/pull/3389
[#​3399]: https://togithub.com/launchbadge/sqlx/pull/3399
[#​3417]: https://togithub.com/launchbadge/sqlx/pull/3417
[#​3421]: https://togithub.com/launchbadge/sqlx/pull/3421
[#​3441]: https://togithub.com/launchbadge/sqlx/pull/3441
[RUSTSEC-2024-0363]:
https://rustsec.org/advisories/RUSTSEC-2024-0363.html
###
[`v0.8.0`](https://togithub.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#080---2024-07-22 )
[Compare
Source](https://togithub.com/launchbadge/sqlx/compare/v0.7.4...v0.8.0 )
70 pull requests were merged this release cycle.
[#​2697] was merged the same day as release 0.7.4 and so was
missed by the automatic CHANGELOG generation.
##### Breaking
- \[[#​2697]]: fix(macros): only enable chrono when time is
disabled
\[\[[@​saiintbrisson](https://togithub.com/saiintbrisson )]]
- \[[#​2973]]: Generic Associated Types in Database, replacing
HasValueRef, HasArguments, HasStatement
\[\[[@​nitn3lav](https://togithub.com/nitn3lav )]]
- \[[#​2482]]: chore: bump syn to 2.0
\[\[[@​saiintbrisson](https://togithub.com/saiintbrisson )]]
- Deprecated type ascription syntax in the query macros was removed.
- \[[#​2736]]: Fix describe on PostgreSQL views with rules
\[\[[@​tsing](https://togithub.com/tsing )]]
- Potentially breaking: nullability inference changes for Postgres.
- \[[#​2869]]: Implement PgHasArrayType for all references
\[\[[@​tylerhawkes](https://togithub.com/tylerhawkes )]]
- Conflicts with existing manual implementations.
- \[[#​2940]]: fix: Decode and Encode derives
([#​1031](https://togithub.com/launchbadge/sqlx/issues/1031 ))
\[\[[@​benluelo](https://togithub.com/benluelo )]]
- Changes lifetime obligations for field types.
- \[[#​3064]]: Sqlite explain graph
\[\[[@​tyrelr](https://togithub.com/tyrelr )]]
- Potentially breaking: nullability inference changes for SQLite.
- \[[#​3123]]: Reorder attrs in sqlx::test macro
\[\[[@​bobozaur](https://togithub.com/bobozaur )]]
- Potentially breaking: attributes on `#[sqlx::test]` usages are applied
in the correct order now.
- \[[#​3126]]: Make Encode return a result
\[\[[@​FSMaxB](https://togithub.com/FSMaxB )]]
- \[[#​3130]]: Add version information for failed cli migration
([#​3129](https://togithub.com/launchbadge/sqlx/issues/3129 ))
\[\[[@​FlakM](https://togithub.com/FlakM )]]
- Breaking changes to `MigrateError`.
- \[[#​3181]]: feat: no tx migration
\[\[[@​cleverjam](https://togithub.com/cleverjam )]]
- (Postgres only) migrations that should not run in a transaction can be
flagged by adding `-- no-transaction` to the beginning.
- Breaking change: added field to `Migration`
- \[[#​3184]]: \[BREAKING} fix(sqlite): always use `i64` as
intermediate when decoding
\[\[[@​abonander](https://togithub.com/abonander )]]
- integer decoding will now loudly error on overflow instead of silently
truncating.
- some usages of the query!() macros might change an i32 to an i64.
- \[[#​3252]]: fix `#[derive(sqlx::Type)]` in Postgres
\[\[[@​abonander](https://togithub.com/abonander )]]
- Manual implementations of PgHasArrayType for enums will conflict with
the generated one. Delete the manual impl or add `#[sqlx(no_pg_array)]`
where conflicts occur.
- Type equality for PgTypeInfo is now schema-aware.
- \[[#​3329]]: fix: correct handling of arrays of custom types in
Postgres \[\[[@​abonander](https://togithub.com/abonander )]]
- Potential breaking change: `PgTypeInfo::with_name()` infers types that
start with `_` to be arrays of the un-prefixed type. Wrap type names in
quotes to bypass this behavior.
- \[[#​3356]]: breaking: fix name collision in `FromRow`, return
`Error::ColumnDecode` for `TryFrom` errors
\[\[[@​abonander](https://togithub.com/abonander )]]
- Breaking behavior change: errors with `#[sqlx(try_from = "T")]` now
return `Error::ColumnDecode` instead of `Error::ColumnNotFound`.
- Breaking because `#[sqlx(default)]` on an individual field or the
struct itself would have previously suppressed the error.
This doesn't seem like good behavior as it could result in some
potentially very difficult bugs.
- Instead, create a wrapper implementing `From` and apply the default
explicitly.
- \[[#​3337]]: allow rename with rename_all (close
[#​2896](https://togithub.com/launchbadge/sqlx/issues/2896 ))
\[\[[@​DirectorX](https://togithub.com/DirectorX )]]
- Changes the precedence of `#[sqlx(rename)]` and `#[sqlx(rename_all)]`
to match the expected behavior (`rename` wins).
- \[[#​3285]]: fix: use correct names for sslmode options
\[\[[@​lily-mosquitoes](https://togithub.com/lily-mosquitoes )]]
- Changes the output of `ConnectOptions::to_url_lossy()` to match what
parsing expects.
##### Added
- \[[#​2917]]: Add Debug impl for PgRow
\[\[[@​g-bartoszek](https://togithub.com/g-bartoszek )]]
- \[[#​3113]]: feat: new derive feature flag
\[\[[@​saiintbrisson](https://togithub.com/saiintbrisson )]]
- \[[#​3154]]: feat: add `MySqlTime`, audit `mysql::types` for
panics \[\[[@​abonander](https://togithub.com/abonander )]]
- \[[#​3188]]: feat(cube): support postgres cube
\[\[[@​jayy-lmao](https://togithub.com/jayy-lmao )]]
- \[[#​3244]]: feat: support `NonZero*` scalar types
\[\[[@​AlphaKeks](https://togithub.com/AlphaKeks )]]
- \[[#​3260]]: feat: Add set_update_hook on SqliteConnection
\[\[[@​gridbox](https://togithub.com/gridbox )]]
- \[[#​3291]]: feat: support the Postgres Bool type for the Any
driver \[\[[@​etorreborre](https://togithub.com/etorreborre )]]
- \[[#​3293]]: Add LICENSE-\* files to crates
\[\[[@​LecrisUT](https://togithub.com/LecrisUT )]]
- \[[#​3303]]: add array support for NonZeroI\* in postgres
\[\[[@​JohannesIBK](https://togithub.com/JohannesIBK )]]
- \[[#​3311]]: Add example on how to use Transaction as Executor
\[\[[@​Lachstec](https://togithub.com/Lachstec )]]
- \[[#​3343]]: Add support for PostgreSQL HSTORE data type
\[\[[@​KobusEllis](https://togithub.com/KobusEllis )]]
##### Changed
- \[[#​2652]]: MySQL: Remove collation compatibility check for
strings \[\[[@​alu](https://togithub.com/alu )]]
- \[[#​2960]]: Removed `Send` trait bound from argument binding
\[\[[@​bobozaur](https://togithub.com/bobozaur )]]
- \[[#​2970]]: refactor: lift type mappings into driver crates
\[\[[@​abonander](https://togithub.com/abonander )]]
- \[[#​3148]]: Bump libsqlite3-sys to v0.28
\[\[[@​NfNitLoop](https://togithub.com/NfNitLoop )]]
- Note: version bumps to `libsqlite3-sys` are not considered breaking
changes as per our semver guarantees.
- \[[#​3265]]: perf: box `MySqlConnection` to reduce sizes of
futures
\[\[[@​stepantubanov](https://togithub.com/stepantubanov )]]
- \[[#​3352]]: chore:added a testcase for `sqlx migrate add ...`
\[\[[@​CommanderStorm](https://togithub.com/CommanderStorm )]]
- \[[#​3340]]: ci: Add job to check that sqlx builds with its
declared minimum dependencies
\[\[[@​iamjpotts](https://togithub.com/iamjpotts )]]
##### Fixed
- \[[#​2702]]: Constrain cyclic associated types to themselves
\[\[[@​BadBastion](https://togithub.com/BadBastion )]]
- \[[#​2954]]: Fix several inter doc links
\[\[[@​ralpha](https://togithub.com/ralpha )]]
- \[[#​3073]]: feat(logging): Log slow acquires from connection
pool \[\[[@​iamjpotts](https://togithub.com/iamjpotts )]]
- \[[#​3137]]: SqliteConnectOptions::filename() memory fix
([#​3136](https://togithub.com/launchbadge/sqlx/issues/3136 ))
\[\[[@​hoxxep](https://togithub.com/hoxxep )]]
- \[[#​3138]]: PostgreSQL Bugfix: Ensure connection is usable
after failed COPY inside a transaction
\[\[[@​feikesteenbergen](https://togithub.com/feikesteenbergen )]]
- \[[#​3146]]: fix(sqlite): delete unused `ConnectionHandleRaw`
type \[\[[@​abonander](https://togithub.com/abonander )]]
- \[[#​3162]]: Drop urlencoding dependency
\[\[[@​paolobarbolini](https://togithub.com/paolobarbolini )]]
- \[[#​3165]]: Bump deps that do not need code changes
\[\[[@​GnomedDev](https://togithub.com/GnomedDev )]]
- \[[#​3167]]: fix(ci): use `docker compose` instead of
`docker-compose`
\[\[[@​abonander](https://togithub.com/abonander )]]
- \[[#​3172]]: fix: Option decoding in any driver
\[\[[@​pxp9](https://togithub.com/pxp9 )]]
- \[[#​3173]]: fix(postgres) : int type conversion while decoding
\[\[[@​RaghavRox](https://togithub.com/RaghavRox )]]
- \[[#​3190]]: Update time to 0.3.36
\[\[[@​BlackSoulHub](https://togithub.com/BlackSoulHub )]]
- \[[#​3191]]: Fix unclean TLS shutdown
\[\[[@​levkk](https://togithub.com/levkk )]]
- \[[#​3194]]: Fix leaking connections in fetch_optional
([#​2647](https://togithub.com/launchbadge/sqlx/issues/2647 ))
\[\[[@​danjpgriffin](https://togithub.com/danjpgriffin )]]
- \[[#​3216]]: security: bump rustls to 0.21.11
\[\[[@​toxeus](https://togithub.com/toxeus )]]
- \[[#​3230]]: fix: sqlite pragma order for auto_vacuum
\[\[[@​jasonish](https://togithub.com/jasonish )]]
- \[[#​3233]]: fix: get_filename should not consume self
\[\[[@​jasonish](https://togithub.com/jasonish )]]
- \[[#​3234]]: fix(ci): pin Rust version, ditch unmaintained
actions \[\[[@​abonander](https://togithub.com/abonander )]]
- \[[#​3236]]: fix: resolve `path` ownership problems when using
`sqlx_macros_unstable`
\[\[[@​lily-mosquitoes](https://togithub.com/lily-mosquitoes )]]
- \[[#​3254]]: fix: hide `sqlx_postgres::any`
\[\[[@​Zarathustra2](https://togithub.com/Zarathustra2 )]]
- \[[#​3266]]: ci: MariaDB - add back 11.4 and add 11.5
\[\[[@​grooverdan](https://togithub.com/grooverdan )]]
- \[[#​3267]]: ci: syntax fix
\[\[[@​grooverdan](https://togithub.com/grooverdan )]]
- \[[#​3271]]: docs(sqlite): fix typo - unixtime() -> unixepoch()
\[\[[@​joelkoen](https://togithub.com/joelkoen )]]
- \[[#​3276]]: Invert boolean for `migrate` error message.
([#​3275](https://togithub.com/launchbadge/sqlx/issues/3275 ))
\[\[[@​nk9](https://togithub.com/nk9 )]]
- \[[#​3279]]: fix Clippy errors
\[\[[@​abonander](https://togithub.com/abonander )]]
- \[[#​3288]]: fix: sqlite update_hook char types
\[\[[@​jasonish](https://togithub.com/jasonish )]]
- \[[#​3297]]: Pass the `persistent` query setting when preparing
queries with the `Any` driver
\[\[[@​etorreborre](https://togithub.com/etorreborre )]]
- \[[#​3298]]: Track null arguments in order to provide the
appropriate type when converting them.
\[\[[@​etorreborre](https://togithub.com/etorreborre )]]
- \[[#​3312]]: doc: Minor rust docs fixes
\[\[[@​SrGesus](https://togithub.com/SrGesus )]]
- \[[#​3327]]: chore: fixed one usage of `select_input_type!()`
being unhygenic
\[\[[@​CommanderStorm](https://togithub.com/CommanderStorm )]]
- \[[#​3328]]: fix(ci): comment not separated from other
characters \[\[[@​hamirmahal](https://togithub.com/hamirmahal )]]
- \[[#​3341]]: refactor: Resolve cargo check warnings in postgres
examples \[\[[@​iamjpotts](https://togithub.com/iamjpotts )]]
- \[[#​3346]]: fix(postgres): don't panic if `M` or `C` Notice
fields are not UTF-8
\[\[[@​YgorSouza](https://togithub.com/YgorSouza )]]
- \[[#​3350]]: fix:the `json`-feature should activate
`sqlx-postgres?/json` as well
\[\[[@​CommanderStorm](https://togithub.com/CommanderStorm )]]
- \[[#​3353]]: fix: build script new line at eof
\[\[[@​Zarthus](https://togithub.com/Zarthus )]]
- (no PR): activate `clock` and `std` features of
`workspace.dependencies.chrono`.
[#​2482]: https://togithub.com/launchbadge/sqlx/pull/2482
[#​2652]: https://togithub.com/launchbadge/sqlx/pull/2652
[#​2697]: https://togithub.com/launchbadge/sqlx/pull/2697
[#​2702]: https://togithub.com/launchbadge/sqlx/pull/2702
[#​2736]: https://togithub.com/launchbadge/sqlx/pull/2736
[#​2869]: https://togithub.com/launchbadge/sqlx/pull/2869
[#​2917]: https://togithub.com/launchbadge/sqlx/pull/2917
[#​2940]: https://togithub.com/launchbadge/sqlx/pull/2940
[#​2954]: https://togithub.com/launchbadge/sqlx/pull/2954
[#​2960]: https://togithub.com/launchbadge/sqlx/pull/2960
[#​2970]: https://togithub.com/launchbadge/sqlx/pull/2970
[#​2973]: https://togithub.com/launchbadge/sqlx/pull/2973
[#​3064]: https://togithub.com/launchbadge/sqlx/pull/3064
[#​3073]: https://togithub.com/launchbadge/sqlx/pull/3073
[#​3113]: https://togithub.com/launchbadge/sqlx/pull/3113
[#​3123]: https://togithub.com/launchbadge/sqlx/pull/3123
[#​3126]: https://togithub.com/launchbadge/sqlx/pull/3126
[#​3130]: https://togithub.com/launchbadge/sqlx/pull/3130
[#​3137]: https://togithub.com/launchbadge/sqlx/pull/3137
[#​3138]: https://togithub.com/launchbadge/sqlx/pull/3138
[#​3146]: https://togithub.com/launchbadge/sqlx/pull/3146
[#​3148]: https://togithub.com/launchbadge/sqlx/pull/3148
[#​3154]: https://togithub.com/launchbadge/sqlx/pull/3154
[#​3162]: https://togithub.com/launchbadge/sqlx/pull/3162
[#​3165]: https://togithub.com/launchbadge/sqlx/pull/3165
[#​3167]: https://togithub.com/launchbadge/sqlx/pull/3167
[#​3172]: https://togithub.com/launchbadge/sqlx/pull/3172
[#​3173]: https://togithub.com/launchbadge/sqlx/pull/3173
[#​3181]: https://togithub.com/launchbadge/sqlx/pull/3181
[#​3184]: https://togithub.com/launchbadge/sqlx/pull/3184
[#​3188]: https://togithub.com/launchbadge/sqlx/pull/3188
[#​3190]: https://togithub.com/launchbadge/sqlx/pull/3190
[#​3191]: https://togithub.com/launchbadge/sqlx/pull/3191
[#​3194]: https://togithub.com/launchbadge/sqlx/pull/3194
[#​3216]: https://togithub.com/launchbadge/sqlx/pull/3216
[#​3230]: https://togithub.com/launchbadge/sqlx/pull/3230
[#​3233]: https://togithub.com/launchbadge/sqlx/pull/3233
[#​3234]: https://togithub.com/launchbadge/sqlx/pull/3234
[#​3236]: https://togithub.com/launchbadge/sqlx/pull/3236
[#​3244]: https://togithub.com/launchbadge/sqlx/pull/3244
[#​3252]: https://togithub.com/launchbadge/sqlx/pull/3252
[#​3254]: https://togithub.com/launchbadge/sqlx/pull/3254
[#​3260]: https://togithub.com/launchbadge/sqlx/pull/3260
[#​3265]: https://togithub.com/launchbadge/sqlx/pull/3265
[#​3266]: https://togithub.com/launchbadge/sqlx/pull/3266
[#​3267]: https://togithub.com/launchbadge/sqlx/pull/3267
[#​3271]: https://togithub.com/launchbadge/sqlx/pull/3271
[#​3276]: https://togithub.com/launchbadge/sqlx/pull/3276
[#​3279]: https://togithub.com/launchbadge/sqlx/pull/3279
[#​3285]: https://togithub.com/launchbadge/sqlx/pull/3285
[#​3288]: https://togithub.com/launchbadge/sqlx/pull/3288
[#​3291]: https://togithub.com/launchbadge/sqlx/pull/3291
[#​3293]: https://togithub.com/launchbadge/sqlx/pull/3293
[#​3297]: https://togithub.com/launchbadge/sqlx/pull/3297
[#​3298]: https://togithub.com/launchbadge/sqlx/pull/3298
[#​3303]: https://togithub.com/launchbadge/sqlx/pull/3303
[#​3311]: https://togithub.com/launchbadge/sqlx/pull/3311
[#​3312]: https://togithub.com/launchbadge/sqlx/pull/3312
[#​3327]: https://togithub.com/launchbadge/sqlx/pull/3327
[#​3328]: https://togithub.com/launchbadge/sqlx/pull/3328
[#​3329]: https://togithub.com/launchbadge/sqlx/pull/3329
[#​3337]: https://togithub.com/launchbadge/sqlx/pull/3337
[#​3340]: https://togithub.com/launchbadge/sqlx/pull/3340
[#​3341]: https://togithub.com/launchbadge/sqlx/pull/3341
[#​3343]: https://togithub.com/launchbadge/sqlx/pull/3343
[#​3346]: https://togithub.com/launchbadge/sqlx/pull/3346
[#​3350]: https://togithub.com/launchbadge/sqlx/pull/3350
[#​3352]: https://togithub.com/launchbadge/sqlx/pull/3352
[#​3353]: https://togithub.com/launchbadge/sqlx/pull/3353
[#​3356]: https://togithub.com/launchbadge/sqlx/pull/3356
###
[`v0.7.4`](https://togithub.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#074---2024-03-11 )
[Compare
Source](https://togithub.com/launchbadge/sqlx/compare/v0.7.3...v0.7.4 )
38 pull requests were merged this release cycle.
This is officially the **last** release of the 0.7.x release cycle.
As of this release, development of 0.8.0 has begun on `main` and only
high-priority bugfixes may be backported.
##### Added
- \[[#​2891]]: feat: expose getters for connect options fields
\[\[[@​saiintbrisson](https://togithub.com/saiintbrisson )]]
- \[[#​2902]]: feat: add `to_url_lossy` to connect options
\[\[[@​lily-mosquitoes](https://togithub.com/lily-mosquitoes )]]
- \[[#​2927]]: Support `query!` for cargo-free systems
\[\[[@​kshramt](https://togithub.com/kshramt )]]
- \[[#​2997]]: doc(FAQ): add entry explaining prepared statements
\[\[[@​abonander](https://togithub.com/abonander )]]
- \[[#​3001]]: Update README to clarify MariaDB support
\[\[[@​iangilfillan](https://togithub.com/iangilfillan )]]
- \[[#​3004]]: feat(logging): Add numeric elapsed time field
elapsed_secs \[\[[@​iamjpotts](https://togithub.com/iamjpotts )]]
- \[[#​3007]]: feat: add `raw_sql` API
\[\[[@​abonander](https://togithub.com/abonander )]]
- This hopefully makes it easier to find how to execute statements which
are not supported by the default
prepared statement interfaces `query*()` and `query!()`.
- Improved documentation across the board for the `query*()` functions.
- Deprecated: `execute_many()` and `fetch_many()` on interfaces that use
prepared statements.
- Multiple SQL statements in one query string were only supported by
SQLite because its prepared statement
interface is the *only* way to execute SQL. All other database flavors
forbid multiple statements in
one prepared statement string as an extra defense against SQL injection.
- The new `raw_sql` API retains this functionality because it explicitly
does *not* use prepared statements.
Raw or text-mode query interfaces generally allow multiple statements in
one query string, and this is
supported by all current databases. Due to their nature, however, one
cannot use bind parameters with them.
- If this change affects you, an issue is open for discussion:
[https://github.com/launchbadge/sqlx/issues/3108 ](https://togithub.com/launchbadge/sqlx/issues/3108 )
- \[[#​3011]]: Added support to IpAddr with MySQL/MariaDB.
\[\[[@​Icerath](https://togithub.com/Icerath )]]
- \[[#​3013]]: Add default implementation for PgInterval
\[\[[@​pawurb](https://togithub.com/pawurb )]]
- \[[#​3018]]: Add default implementation for PgMoney
\[\[[@​pawurb](https://togithub.com/pawurb )]]
- \[[#​3026]]: Update docs to reflect support for MariaDB data
types \[\[[@​iangilfillan](https://togithub.com/iangilfillan )]]
- \[[#​3037]]: feat(mysql): allow to connect with mysql driver
without default behavor
\[\[[@​darkecho731](https://togithub.com/darkecho731 )]]
##### Changed
- \[[#​2900]]: Show latest url to docs for macro.migrate
\[\[[@​Vrajs16](https://togithub.com/Vrajs16 )]]
- \[[#​2914]]: Use `create_new` instead of `atomic-file-write`
\[\[[@​mattfbacon](https://togithub.com/mattfbacon )]]
- \[[#​2926]]: docs: update example for `PgConnectOptions`
\[\[[@​Fyko](https://togithub.com/Fyko )]]
- \[[#​2989]]: sqlx-core: Remove dotenvy dependency
\[\[[@​joshtriplett](https://togithub.com/joshtriplett )]]
- \[[#​2996]]: chore: Update ahash to 0.8.7
\[\[[@​takenoko-gohan](https://togithub.com/takenoko-gohan )]]
- \[[#​3006]]: chore(deps): Replace unmaintained tempdir crate
with tempfile \[\[[@​iamjpotts](https://togithub.com/iamjpotts )]]
- \[[#​3008]]: chore: Ignore .sqlx folder created by running ci
steps locally \[\[[@​iamjpotts](https://togithub.com/iamjpotts )]]
- \[[#​3009]]: chore(dev-deps): Upgrade env_logger from 0.9 to
0.11 \[\[[@​iamjpotts](https://togithub.com/iamjpotts )]]
- \[[#​3010]]: chore(deps): Upgrade criterion to 0.5.1
\[\[[@​iamjpotts](https://togithub.com/iamjpotts )]]
- \[[#​3050]]: Optimize SASL auth in sqlx-postgres
\[\[[@​mirek26](https://togithub.com/mirek26 )]]
- \[[#​3055]]: Set TCP_NODELAY option on TCP sockets
\[\[[@​mirek26](https://togithub.com/mirek26 )]]
- \[[#​3065]]: Improve max_lifetime handling
\[\[[@​mirek26](https://togithub.com/mirek26 )]]
- \[[#​3072]]: Change the name of "inner" function generated by
`#[sqlx::test]` \[\[[@​ciffelia](https://togithub.com/ciffelia )]]
- \[[#​3083]]: Remove sha1 because it's not being used in postgres
\[\[[@​rafaelGuerreiro](https://togithub.com/rafaelGuerreiro )]]
##### Fixed
- \[[#​2898]]: Fixed docs
\[\[[@​Vrajs16](https://togithub.com/Vrajs16 )]]
- \[[#​2905]]: fix(mysql): Close prepared statement if persistence
is disabled
\[\[[@​larsschumacher](https://togithub.com/larsschumacher )]]
- \[[#​2913]]: Fix handling of deferred constraints
\[\[[@​Thomasdezeeuw](https://togithub.com/Thomasdezeeuw )]]
- \[[#​2919]]: fix duplicate "\`" in FromRow "default" attribute
doc comment \[\[[@​shengsheng](https://togithub.com/shengsheng )]]
- \[[#​2932]]: fix(postgres): avoid unnecessary flush in
PgCopyIn::read_from \[\[[@​tsing](https://togithub.com/tsing )]]
- \[[#​2955]]: Minor fixes
\[\[[@​Dawsoncodes](https://togithub.com/Dawsoncodes )]]
- \[[#​2963]]: Fixed ReadMe badge styling
\[\[[@​tadghh](https://togithub.com/tadghh )]]
- \[[#​2976]]: fix: AnyRow not support PgType::Varchar
\[\[[@​holicc](https://togithub.com/holicc )]]
- \[[#​3053]]: fix: do not panic when binding a large BigDecimal
\[\[[@​Ekleog](https://togithub.com/Ekleog )]]
- \[[#​3056]]: fix: spans in sqlite tracing
([#​2876](https://togithub.com/launchbadge/sqlx/issues/2876 ))
\[\[[@​zoomiti](https://togithub.com/zoomiti )]]
- \[[#​3089]]: fix(migrate): improve error message when parsing
version from filename
\[\[[@​abonander](https://togithub.com/abonander )]]
- \[[#​3098]]: Migrations fixes
\[\[[@​abonander](https://togithub.com/abonander )]]
- Unhides `sqlx::migrate::Migrator`.
- Improves I/O error message when failing to read a file in
`migrate!()`.
[#​2891]: https://togithub.com/launchbadge/sqlx/pull/2891
[#​2898]: https://togithub.com/launchbadge/sqlx/pull/2898
[#​2900]: https://togithub.com/launchbadge/sqlx/pull/2900
[#​2902]: https://togithub.com/launchbadge/sqlx/pull/2902
[#​2905]: https://togithub.com/launchbadge/sqlx/pull/2905
[#​2913]: https://togithub.com/launchbadge/sqlx/pull/2913
[#​2914]: https://togithub.com/launchbadge/sqlx/pull/2914
[#​2919]: https://togithub.com/launchbadge/sqlx/pull/2919
[#​2926]: https://togithub.com/launchbadge/sqlx/pull/2926
[#​2927]: https://togithub.com/launchbadge/sqlx/pull/2927
[#​2932]: https://togithub.com/launchbadge/sqlx/pull/2932
[#​2955]: https://togithub.com/launchbadge/sqlx/pull/2955
[#​2963]: https://togithub.com/launchbadge/sqlx/pull/2963
[#​2976]: https://togithub.com/launchbadge/sqlx/pull/2976
[#​2989]: https://togithub.com/launchbadge/sqlx/pull/2989
[#​2996]: https://togithub.com/launchbadge/sqlx/pull/2996
[#​2997]: https://togithub.com/launchbadge/sqlx/pull/2997
[#​3001]: https://togithub.com/launchbadge/sqlx/pull/3001
[#​3004]: https://togithub.com/launchbadge/sqlx/pull/3004
[#​3006]: https://togithub.com/launchbadge/sqlx/pull/3006
[#​3007]: https://togithub.com/launchbadge/sqlx/pull/3007
[#​3008]: https://togithub.com/launchbadge/sqlx/pull/3008
[#​3009]: https://togithub.com/launchbadge/sqlx/pull/3009
[#​3010]: https://togithub.com/launchbadge/sqlx/pull/3010
[#​3011]: https://togithub.com/launchbadge/sqlx/pull/3011
[#​3013]: https://togithub.com/launchbadge/sqlx/pull/3013
[#​3018]: https://togithub.com/launchbadge/sqlx/pull/3018
[#​3026]: https://togithub.com/launchbadge/sqlx/pull/3026
[#​3037]: https://togithub.com/launchbadge/sqlx/pull/3037
[#​3050]: https://togithub.com/launchbadge/sqlx/pull/3050
[#​3053]: https://togithub.com/launchbadge/sqlx/pull/3053
[#​3055]: https://togithub.com/launchbadge/sqlx/pull/3055
[#​3056]: https://togithub.com/launchbadge/sqlx/pull/3056
[#​3065]: https://togithub.com/launchbadge/sqlx/pull/3065
[#​3072]: https://togithub.com/launchbadge/sqlx/pull/3072
[#​3083]: https://togithub.com/launchbadge/sqlx/pull/3083
[#​3089]: https://togithub.com/launchbadge/sqlx/pull/3089
[#​3098]: https://togithub.com/launchbadge/sqlx/pull/3098
###
[`v0.7.3`](https://togithub.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#073---2023-11-22 )
38 pull requests were merged this release cycle.
##### Added
- \[[#​2478]]: feat(citext): support postgres citext
\[\[[@​hgranthorner](https://togithub.com/hgranthorner )]]
- \[[#​2545]]: Add `fixtures_path` in sqlx::test args
\[\[[@​ripa1995](https://togithub.com/ripa1995 )]]
- \[[#​2665]]: feat(mysql): support packet splitting
\[\[[@​tk2217](https://togithub.com/tk2217 )]]
- \[[#​2752]]: Enhancement
[#​2747](https://togithub.com/launchbadge/sqlx/issues/2747 )
Provide `fn PgConnectOptions::get_host(&self)`
\[\[[@​boris-lok](https://togithub.com/boris-lok )]]
- \[[#​2769]]: Customize the macro error message based on the
metadata \[\[[@​Nemo157](https://togithub.com/Nemo157 )]]
- \[[#​2793]]: derived Hash trait for PgInterval
\[\[[@​yasamoka](https://togithub.com/yasamoka )]]
- \[[#​2801]]: derive FromRow: sqlx(default) for all fields
\[\[[@​grgi](https://togithub.com/grgi )]]
- \[[#​2827]]: Add impl `FromRow` for the unit type
\[\[[@​nanoqsh](https://togithub.com/nanoqsh )]]
- \[[#​2871]]: Add `MySqlConnectOptions::get_database()`
\[\[[@​shiftrightonce](https://togithub.com/shiftrightonce )]]
- \[[#​2873]]: Sqlx Cli: Added force flag to drop database for
postgres \[\[[@​Vrajs16](https://togithub.com/Vrajs16 )]]
- \[[#​2894]]: feat: `Text` adapter
\[\[[@​abonander](https://togithub.com/abonander )]]
##### Changed
- \[[#​2701]]: Remove documentation on offline feature
\[\[[@​Baptistemontan](https://togithub.com/Baptistemontan )]]
- \[[#​2713]]: Add additional info regarding using Transaction and
PoolConnection as…
\[\[[@​satwanjyu](https://togithub.com/satwanjyu )]]
- \[[#​2770]]: Update README.md
\[\[[@​snspinn](https://togithub.com/snspinn )]]
- \[[#​2797]]: doc(mysql): document behavior regarding `BOOLEAN`
and the query macros
\[\[[@​abonander](https://togithub.com/abonander )]]
- \[[#​2803]]: Don't use separate temp dir for query jsons (2)
\[\[[@​mattfbacon](https://togithub.com/mattfbacon )]]
- \[[#​2819]]: postgres begin cancel safe
\[\[[@​conradludgate](https://togithub.com/conradludgate )]]
- \[[#​2832]]: Update extra_float_digits default to 2 instead of 3
\[\[[@​brianheineman](https://togithub.com/brianheineman )]]
- \[[#​2865]]: Update Faq - Bulk upsert with optional fields
\[\[[@​Vrajs16](https://togithub.com/Vrajs16 )]]
- \[[#​2880]]: feat: use specific message for slow query logs
\[\[[@​abonander](https://togithub.com/abonander )]]
- \[[#​2882]]: Do not require db url for prepare
\[\[[@​tamasfe](https://togithub.com/tamasfe )]]
- \[[#​2890]]: doc(sqlite): cover lack of `NUMERIC` support
\[\[[@​abonander](https://togithub.com/abonander )]]
- \[No PR]: Upgraded `libsqlite3-sys` to 0.27.0
- Note: linkage to `libsqlite3-sys` is considered semver-exempt;
see the release notes for 0.7.0 below for details.
##### Fixed
- \[[#​2640]]: fix: sqlx::macro db cleanup race condition by
adding a margin to current timestamp
\[\[[@​fhsgoncalves](https://togithub.com/fhsgoncalves )]]
- \[[#​2655]]: \[fix] Urlencode when passing filenames to sqlite3
\[\[[@​uttarayan21](https://togithub.com/uttarayan21 )]]
- \[[#​2684]]: Make PgListener recover from UnexpectedEof
\[\[[@​hamiltop](https://togithub.com/hamiltop )]]
- \[[#​2688]]: fix: Make rust_decimal and bigdecimal decoding more
lenient \[\[[@​cameronbraid](https://togithub.com/cameronbraid )]]
- \[[#​2754]]: Is tests/x.py maintained? And I tried fix it.
\[\[[@​qwerty2501](https://togithub.com/qwerty2501 )]]
- \[[#​2784]]: fix: decode postgres time without subsecond
\[\[[@​granddaifuku](https://togithub.com/granddaifuku )]]
- \[[#​2806]]: Depend on version of async-std with non-private
spawn-blocking \[\[[@​A248](https://togithub.com/A248 )]]
- \[[#​2820]]: fix: correct decoding of `rust_decimal::Decimal`
for high-precision values
\[\[[@​abonander](https://togithub.com/abonander )]]
- \[[#​2822]]: issue
[#​2821](https://togithub.com/launchbadge/sqlx/issues/2821 ) Update
error handling logic when opening a TCP connection
\[\[[@​anupj](https://togithub.com/anupj )]]
- \[[#​2826]]: chore: bump some sqlx-core dependencies
\[\[[@​djc](https://togithub.com/djc )]]
- \[[#​2838]]: Fixes rust_decimal scale for Postgres
\[\[[@​jkleinknox](https://togithub.com/jkleinknox )]]
- \[[#​2847]]: Fix comment in `sqlx migrate add` help text
\[\[[@​cryeprecision](https://togithub.com/cryeprecision )]]
- \[[#​2850]]: fix(core): avoid unncessary wakeups in
`try_stream!()`
\[\[[@​abonander](https://togithub.com/abonander )]]
- \[[#​2856]]: Prevent warnings running `cargo build`
\[\[[@​nyurik](https://togithub.com/nyurik )]]
- \[[#​2864]]: fix(sqlite): use `AtomicUsize` for thread IDs
\[\[[@​abonander](https://togithub.com/abonander )]]
- \[[#​2892]]: Fixed force dropping bug
\[\[[@​Vrajs16](https://togithub.com/Vrajs16 )]]
[#​2478]: https://togithub.com/launchbadge/sqlx/pull/2478
[#​2545]: https://togithub.com/launchbadge/sqlx/pull/2545
[#​2640]: https://togithub.com/launchbadge/sqlx/pull/2640
[#​2655]: https://togithub.com/launchbadge/sqlx/pull/2655
[#​2665]: https://togithub.com/launchbadge/sqlx/pull/2665
[#​2684]: https://togithub.com/launchbadge/sqlx/pull/2684
[#​2688]: https://togithub.com/launchbadge/sqlx/pull/2688
[#​2701]: https://togithub.com/launchbadge/sqlx/pull/2701
[#​2713]: https://togithub.com/launchbadge/sqlx/pull/2713
[#​2752]: https://togithub.com/launchbadge/sqlx/pull/2752
[#​2754]: https://togithub.com/launchbadge/sqlx/pull/2754
[#​2769]: https://togithub.com/launchbadge/sqlx/pull/2769
[#​2770]: https://togithub.com/launchbadge/sqlx/pull/2770
[#​2782]: https://togithub.com/launchbadge/sqlx/pull/2782
[#​2784]: https://togithub.com/launchbadge/sqlx/pull/2784
[#​2793]: https://togithub.com/launchbadge/sqlx/pull/2793
[#​2797]: https://togithub.com/launchbadge/sqlx/pull/2797
[#​2801]: https://togithub.com/launchbadge/sqlx/pull/2801
[#​2803]: https://togithub.com/launchbadge/sqlx/pull/2803
[#​2806]: https://togithub.com/launchbadge/sqlx/pull/2806
[#​2819]: https://togithub.com/launchbadge/sqlx/pull/2819
[#​2820]: https://togithub.com/launchbadge/sqlx/pull/2820
[#​2822]: https://togithub.com/launchbadge/sqlx/pull/2822
[#​2826]: https://togithub.com/launchbadge/sqlx/pull/2826
[#​2827]: https://togithub.com/launchbadge/sqlx/pull/2827
[#​2832]: https://togithub.com/launchbadge/sqlx/pull/2832
[#​2838]: https://togithub.com/launchbadge/sqlx/pull/2838
[#​2847]: https://togithub.com/launchbadge/sqlx/pull/2847
[#​2850]: https://togithub.com/launchbadge/sqlx/pull/2850
[#​2856]: https://togithub.com/launchbadge/sqlx/pull/2856
[#​2864]: https://togithub.com/launchbadge/sqlx/pull/2864
[#​2865]: https://togithub.com/launchbadge/sqlx/pull/2865
[#​2871]: https://togithub.com/launchbadge/sqlx/pull/2871
[#​2873]: https://togithub.com/launchbadge/sqlx/pull/2873
[#​2880]: https://togithub.com/launchbadge/sqlx/pull/2880
[#​2882]: https://togithub.com/launchbadge/sqlx/pull/2882
[#​2890]: https://togithub.com/launchbadge/sqlx/pull/2890
[#​2892]: https://togithub.com/launchbadge/sqlx/pull/2892
[#​2894]: https://togithub.com/launchbadge/sqlx/pull/2894
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "" in timezone America/New_York,
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
Release Notes:
- N/A
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-08-28 21:08:15 -07:00
TheCub3
2f08a0a28c
Fix fifo files hanging the project wide search ( #16039 )
...
Release Notes:
- Fixed the issue related to the project wide search being stuck when
project contains .fifo files
- Might potentially solve the following issue
https://github.com/zed-industries/zed/issues/7360
2024-08-26 10:40:20 -06:00
Marshall Bowers
78120cc568
collab: Upsert users by github_user_id
instead of github_login
( #16706 )
...
This PR makes it so users are upserted by their `github_user_id` instead
of by their `github_login`.
The `github_user_id` is a stable identifier that does not change, while
the `github_login` can change.
In practice we were already using
`get_or_create_user_by_github_account`, which already checks for an
existing user with a `github_user_id` first, so this change doesn't
result in a change in behavior.
This change is primarily for correctness in the event that `create_user`
is called directly, as we want to be upserting by the stable identifier.
Release Notes:
- N/A
2024-08-22 19:15:32 -04:00
Marshall Bowers
4ddf2cbb9f
collab: Make users.github_user_id
required and unique ( #16704 )
...
This PR makes the `github_user_id` column on the `users` table required
and replaces the index with a unique index.
I have gone through and ensured that all users have a unique
`github_user_id` in the staging and production databases.
Release Notes:
- N/A
2024-08-22 18:27:22 -04:00
Marshall Bowers
8a5fcc2c22
collab: Backfill github_user_created_at
on users ( #16600 )
...
This PR adds a backfiller to backfill the `github_user_created_at`
column on users.
Release Notes:
- N/A
2024-08-21 12:38:51 -04:00
Marshall Bowers
35cd397a40
collab: Allow enabling feature flags for all users ( #16372 )
...
This PR adds a new `enabled_for_all` column to the `feature_flags` table
to allow enabling a feature flag for all users.
Release Notes:
- N/A
2024-08-16 15:17:03 -04:00
Marshall Bowers
98516b5527
collab: Restrict usage of the LLM service to accounts older than 30 days ( #16133 )
...
This PR restricts usage of the LLM service to accounts older than 30
days.
We now store the GitHub user's `created_at` timestamp to check the
GitHub account age. If this is not set—which it won't be for existing
users—then we use the `created_at` timestamp in the Zed database.
Release Notes:
- N/A
---------
Co-authored-by: Max <max@zed.dev>
2024-08-12 17:27:21 -04:00
Thorsten Ball
fbb533b3e0
assistant: Require user to accept TOS for cloud provider ( #16111 )
...
This adds the requirement for users to accept the terms of service the
first time they send a message with the Cloud provider.
Once this is out and in a nightly, we need to add the check to the
server side too, to authenticate access to the models.
Demo:
https://github.com/user-attachments/assets/0edebf74-8120-4fa2-b801-bb76f04e8a17
Release Notes:
- N/A
2024-08-12 17:43:35 +02:00
Max Brunsfeld
d96afde5bf
Avoid insert ... on conflict
on startup ( #16045 )
...
These queries advance the id sequence even when there's nothing to
insert
Release Notes:
- N/A
Co-authored-by: Marshall <marshall@zed.dev>
2024-08-09 15:32:11 -04:00
Marshall Bowers
b19f85f9b5
collab: Remove unused parameter to run_database_migrations
( #15883 )
...
This PR removes the unused `ignore_checksum_mismatch` parameter to
`run_database_migrations`.
We were always passing `false`, which meant the behavior didn't need to
be parameterized.
Release Notes:
- N/A
2024-08-06 17:31:52 -04:00
Marshall Bowers
7f6d0919c9
collab: Setup database for LLM service ( #15882 )
...
This PR puts the initial infrastructure for the LLM service's database
in place.
The LLM service will be using a separate Postgres database, with its own
set of migrations.
Currently we only connect to the database in development, as we don't
yet have the database setup for the staging/production environments.
Release Notes:
- N/A
2024-08-06 17:18:08 -04:00
Max Brunsfeld
1b2d4ee132
Allow users to stop a previously scheduled cancelation of their Zed Pro plan ( #15562 )
...
Release Notes:
- N/A
Co-authored-by: Marshall <marshall@zed.dev>
2024-07-31 16:36:46 -04:00
Marshall Bowers
8c54a46202
collab: Adapt rate limits based on plan ( #15548 )
...
This PR updates the rate limits to adapt based on the user's current
plan.
For the free plan rate limits I just took one-tenth of the existing rate
limits (which are now the Pro limits). We can adjust, as needed.
Release Notes:
- N/A
---------
Co-authored-by: Max <max@zed.dev>
2024-07-31 14:27:28 -04:00
Marshall Bowers
2b019ff9e2
collab: Add GET /billing/subscriptions
endpoint ( #15516 )
...
This PR adds a new `GET /billing/subscriptions` endpoint to collab for
retrieving the subscriptions to display on the account settings page.
Release Notes:
- N/A
2024-07-30 21:17:35 -04:00
Marshall Bowers
7c5f4b72fb
collab: Rework Stripe event processing ( #15510 )
...
This PR reworks how we process Stripe events for reconciliation
purposes.
The previous approach in #15480 turns out to not be workable, on account
of the Stripe event IDs not being strictly in order. This meant that we
couldn't reliably compare two arbitrary event IDs and determine which
one was more recent.
This new approach leans on the guidance that Stripe provides for
webhooks events:
> Webhook endpoints might occasionally receive the same event more than
once. You can guard against duplicated event receipts by logging the
[event IDs](https://docs.stripe.com/api/events/object#event_object-id )
you’ve processed, and then not processing already-logged events.
>
> https://docs.stripe.com/webhooks#handle-duplicate-events
We now record processed Stripe events in the `processed_stripe_events`
table and use this to filter out events that have already been
processed, so we do not process them again.
When retrieving events from the Stripe events API we now buffer the
unprocessed events so that we can sort them by their `created` timestamp
and process them in (roughly) the order they occurred.
Release Notes:
- N/A
2024-07-30 16:35:11 -04:00
Marshall Bowers
b160e13f20
collab: Keep track of last seen Stripe event for each record ( #15480 )
...
This PR improves our Stripe event handling by keeping track of the last
event we've seen for each record.
The `billing_customers` and `billing_subscriptions` tables both have a
new `last_stripe_event_id` column. When we apply an event to one of
these records, we store the event ID that was applied.
Then, when we are going through events we can ignore any event that has
an ID that came before the `last_stripe_event_id` (based on the
lexicographical ordering of the IDs).
Release Notes:
- N/A
2024-07-30 10:00:16 -04:00
Marshall Bowers
d93891ba63
collab: Lay groundwork for reconciling with Stripe using the events API ( #15459 )
...
This PR lays the initial groundwork for using the Stripe events API to
reconcile the data in our system with what's in Stripe.
We're using the events API over webhooks so that we don't need to stand
up the associated infrastructure needed to handle webhooks effectively
(namely an asynchronous job queue).
Since we haven't configured the Stripe API keys yet, we won't actually
spawn the reconciliation background task yet, so this is currently a
no-op.
Release Notes:
- N/A
2024-07-29 23:50:07 -04:00
Marshall Bowers
28c14cdee4
collab: Add separate billing_customers
table ( #15457 )
...
This PR adds a new `billing_customers` table to hold the billing
customers.
Previously we were storing both the `stripe_customer_id` and
`stripe_subscription_id` in the `billable_subscriptions` table. However,
this creates problems when we need to correlate subscription events back
to the subscription record, as we don't know the user that the Stripe
event corresponds to.
By moving the `stripe_customer_id` to a separate table we can create the
Stripe customer earlier in the flow—before we create the Stripe Checkout
session—and associate that customer with a user. This way when we
receive events down the line we can use the Stripe customer ID to
correlate it back to the user.
We're doing some destructive actions to the `billing_subscriptions`
table, but this is fine, as we haven't started using them yet.
Release Notes:
- N/A
2024-07-29 22:48:21 -04:00
Marshall Bowers
66121fa0e8
collab: Add endpoint for managing a billing subscription ( #15455 )
...
This PR adds a new `POST /billing/subscriptions/manage` endpoint that
can be used to manage a billing subscription.
The endpoint accepts a `github_user_id` to identify the user, as well as
an optional `subscription_id` for managing a specific subscription. If
`subscription_id` is not provided, it try and use the active
subscription, if there is only one.
Right now the endpoint only supports cancelling an active subscription.
This is done by passing `"intent": "cancel"` in the request body.
The endpoint will return the URL to a Stripe customer portal session,
which the caller can redirect the user to.
Here's an example of how to call it:
```sh
curl -X POST "http://localhost:8080/billing/subscriptions/manage " \
-H "Authorization: <ADMIN_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"github_user_id": 12345, "intent": "cancel"}'
```
Release Notes:
- N/A
2024-07-29 20:05:17 -04:00
Marshall Bowers
e15d59c445
collab: Add endpoint for initiating a billing subscription ( #15452 )
...
This PR adds a new `POST /billing/subscriptions` endpoint that can be
used to initiate a billing subscription.
The endpoint will use the provided `github_user_id` to look up a user,
generate a Stripe Checkout session, and then return the URL.
The caller would then redirect the user to the URL to initiate the
checkout flow.
Here's an example of how to call it:
```sh
curl -X POST "http://localhost:8080/billing/subscriptions " \
-H "Authorization: <ADMIN_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"github_user_id": 12345}'
```
Release Notes:
- N/A
2024-07-29 17:31:36 -04:00
Marshall Bowers
085d41b121
collab: Add billing_subscriptions
table ( #15448 )
...
This PR adds a new `billing_subscriptions` table to the database, as
well as some accompanying models/queries.
In this table we store a minimal amount of data from Stripe:
- The Stripe customer ID
- The Stripe subscription ID
- The status of the Stripe subscription
This should be enough for interactions with the Stripe API (e.g., to
[create a customer portal
session](https://docs.stripe.com/api/customer_portal/sessions/create )),
as well as determine whether a subscription is active (based on the
`status`).
Release Notes:
- N/A
2024-07-29 14:32:13 -04:00
Richard Feldman
f5d50f2b1e
Delete obsolete and unused remote_projects.rs ( #14811 )
...
See
https://github.com/zed-industries/zed/pull/11301#issuecomment-2234239630
for context
Release Notes:
- N/A
2024-07-19 08:50:49 -06:00
Conrad Irwin
62ab6e1a11
remoting: Allow Add/Remove remote folder ( #14532 )
...
Release Notes:
- remoting (alpha only): Allow add/remove folders to projects
---------
Co-authored-by: Max <max@zed.dev>
2024-07-16 12:01:59 -06:00
Piotr Osiewicz
33a67ad6b9
chore: Clippy fixes for 1.80 ( #13987 )
...
The biggest hurdle turned out to be use of `Arc<Language>` in maps, as
`clippy::mutable_key_type` started triggering on it (due to - I suppose
- internal mutability on `HighlightMap`?). I switched over to using
`LanguageId` as the key type in some of the callsites, as that's what
`Language` uses anyways for it's hash/eq, though I've still had to
suppress the lint outside of language crate.
/cc @maxdeviant , le clippy guru.
Release Notes:
- N/A
2024-07-10 17:53:17 +02:00
Kyle Kelley
221edfc267
Bring Jupyter to Zed Editing ( #12062 )
...
Run any Jupyter kernel in Zed on any buffer (editor):
<img width="1074" alt="image"
src="https://github.com/zed-industries/zed/assets/836375/eac8ed69-d02b-4d46-b379-6186d8f59470 ">
## TODO
### Lifecycle
* [x] Launch kernels on demand
* [x] Wait for kernel to be started
* [x] Request Kernel info on start
* [x] Show in progress indicator
* [ ] Allow picking kernel (it defaults to first matching language name)
* [ ] Menu for interrupting and shutting down the kernel
* [ ] Drop running kernels once editor is dropped
### Media Outputs
* [x] Render text and tracebacks with ANSI color handling
* [x] Render markdown as text
* [x] Render PNG and JPEG images using an explicit height based on
line-height
* ~~Render SVG~~ -- not happening for this PR due to lack of text in SVG
support
* [ ] Process `update_display_data` message and related `display_id`
* [x] Process `page` data from payloads as outputs
* [ ] Render markdown as, well, rendered markdown -- Note: unsure if we
can get line heights here
### Document
* [x] Select code and run
* [x] Run current line
* [x] Clear previous overlapping runs
* [ ] Support running markdown code blocks
* [ ] Action to export session as notebook or output files
* [ ] Action to clear all outputs
* [ ] Delete outputs when lines are deleted
## Other missing features
The following is a list of missing functionality or expectations that
are out of scope for this PR.
### Python Environments
Detecting python environments should probably be done in a separate PR
in tandem with how they're used with LSP. Users likely want to pick an
environment for their project, whether a virtualenv, conda env, pyenv,
poetry backed virtualenv, or the system. Related issues:
* https://github.com/zed-industries/zed/issues/7646
* https://github.com/zed-industries/zed/issues/7808
* https://github.com/zed-industries/zed/issues/7296
### LSP Integration
* Submit `complete_request` messages for completions to interleave
interactive variables with LSP
* LSP for IPython semantics (`%%timeit`, `!ls`, `get_ipython`, etc.)
## Future release notes
- Run code in any editor, whether it's a script or a markdown document
Release Notes:
- N/A
2024-06-17 10:02:31 -07:00
Mikayla Maki
10d3ad4e33
Enable linux tests ( #12493 )
...
Note:
- We have disabled all tests that rely on Postgres in the Linux CI. We
only really need to test these once, and as macOS is our team's primary
platform, we'll only enable them on macOS for local reproduction.
- We have disabled all tests that rely on the font metrics. We
standardized on Zed Mono in many fonts, but our CoreText Text System and
Cosmic Text System proved to be very different in effect. We should
revisit if we decide to standardize our text system across platforms
(e.g. using Harfbuzz everywhere)
- Extended the condition timeout significantly. Our CI machines are slow
enough that this is causing spurious errors in random tests.
Release Notes:
- N/A
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-06-13 16:38:53 -07:00
Max Brunsfeld
279c5ab81f
Reduce DB load upon initial connection due to channel loading ( #12500 )
...
#### Lazily loading channels
I've added a new RPC message called `SubscribeToChannels` that the
client now sends when it first renders the channels panel. This causes
the server to load the channels for that client and send updates to that
client as channels are updated. Previously, the server did this upon
connection.
For backwards compatibility, the server will inspect clients' version,
and continue to do this work immediately for old clients.
#### Optimizations
Running collab locally, I realized that upon connecting, we were running
two concurrent transactions that *both* queried the `channel_members`
table: one for loading your channels, and one for loading your channel
invites. I've combined these into one query. In addition, we now use a
join to load channels + members, as opposed to two separate queries.
Even though `where id in` is efficient, it adds an extra round trip to
the database, keeping the transaction open for slightly longer.
Release Notes:
- N/A
2024-05-30 13:02:55 -07:00
Jakob Hellermann
a1e5b122e7
Fix some warnings/issues uncovered by the new cfg checking ( #12310 )
...
Rust recently got the ability to check for typos or errors in `cfg`
attributes: https://blog.rust-lang.org/2024/05/06/check-cfg.html
This PR fixes the new warnings.
- gpui can be run with `RUSTFLAGS="--cfg gles"`, make this explicit in
`[workspace.lints.rust]`
- `cfg!(any(test, sqlite))` was just a bug, it should be
`feature(sqlite)`
- the `languages` crate had a `#[cfg(any(test, feature =
"test-support"))]` function without ever declaring the `test-support`
feature
- the `MarkdownTag` enum had a `cfg_attr` for serde without actually
having serde support
Now the only warnings when building are unused fields
`InlayHover.excerpt`, `SavedConversationMetadata.path` ,
`UserTestPlan.allow_client_reconnection` and `SyntaxMapCapture.depth`.
Release Notes:
- N/A
2024-05-26 12:50:20 +02:00
Kirill Bulatov
055a13a9b6
Allow clients to run Zed tasks on remote projects ( #12199 )
...
Release Notes:
- Enabled Zed tasks on remote projects with ssh connection string
specified
---------
Co-authored-by: Conrad Irwin <conrad@zed.dev>
2024-05-24 22:26:57 +03:00
Conrad Irwin
ec4703a8d5
Add missing access control check ( #12213 )
...
Release Notes:
- N/A
2024-05-23 16:59:04 -06:00
Kirill Bulatov
c4e87444e7
Tidy up the code ( #12116 )
...
Small follow-ups for https://github.com/zed-industries/zed/pull/12063
and https://github.com/zed-industries/zed/pull/12103
Release Notes:
- N/A
2024-05-22 14:36:15 +03:00
Conrad Irwin
e5b9e2044e
Allow ssh connection for setting up zed ( #12063 )
...
Co-Authored-By: Mikayla <mikayla@zed.dev>
Release Notes:
- Magic `ssh` login feature for remote development
---------
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Nate Butler <iamnbutler@gmail.com>
2024-05-21 22:39:16 -06:00
Kirill Bulatov
8631280baa
Support terminals with ssh in remote projects ( #11913 )
...
Release Notes:
- Added a way to create terminal tabs in remote projects, if an ssh
connection string is specified
2024-05-17 17:48:07 +03:00
Conrad Irwin
57b5bff299
Support very large channel membership lists ( #11939 )
...
Fixes the channel membership dialogue for the zed channel by not
downloading all 111k people in one go.
Release Notes:
- N/A
2024-05-16 20:02:25 -06:00
Conrad Irwin
ba8aba4d17
hotfix for collab crashes ( #11885 )
...
Release Notes:
- N/A
2024-05-15 21:04:37 -06:00
Conrad Irwin
a3e75540af
Reduce serializability of project delete ( #11628 )
...
This may reduce locks when deleting projects.
Release Notes:
- N/A
2024-05-09 16:17:13 -06:00
Bennet Bo Fenner
593f0e0c3e
remoting: Edit dev server ( #11344 )
...
This PR allows configuring existing dev server, right now you can:
- Change the dev servers name
- Generate a new token (and invalidate the old one)
<img width="563" alt="image"
src="https://github.com/zed-industries/zed/assets/53836821/9bc95042-c969-4293-90fd-0848d021b664 ">
Release Notes:
- N/A
2024-05-06 12:58:11 +02:00
Kyle Kelley
f576bd3aaf
Clean up some stray todos ( #11380 )
...
Quick little todo comment cleanups, either because they aren't needed or
a comment will suffice.
Release Notes:
- N/A
2024-05-03 16:17:56 -07:00
Conrad Irwin
1abd58070b
Slicker remote project creation ( #11309 )
...
Inline the editor into the modal
Release Notes:
- N/A
---------
Co-authored-by: Bennet <bennetbo@gmx.de>
2024-05-02 12:46:52 -06:00
Conrad Irwin
9bac64a9c1
Rename RemoteProject -> DevServerProject ( #11301 )
...
Co-Authored-By: Mikayla <mikayla@zed.dev>
In a fit of ill-advisedness I called these things remote projects;
forgetting that remote project is also what we call collaboratively
shared projects.
Release Notes:
- N/A
---------
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Bennet <bennetbo@gmx.de>
2024-05-02 11:00:08 -06:00
Conrad Irwin
e0c83a1d32
remote projects per user ( #10594 )
...
Release Notes:
- Made remote projects per-user instead of per-channel. If you'd like to
be part of the remote development alpha, please email hi@zed.dev .
---------
Co-authored-by: Bennet Bo Fenner <53836821+bennetbo@users.noreply.github.com>
Co-authored-by: Bennet <bennetbo@gmx.de>
Co-authored-by: Nate Butler <1714999+iamnbutler@users.noreply.github.com>
Co-authored-by: Nate Butler <iamnbutler@gmail.com>
2024-04-23 15:33:09 -06:00