Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

momobel
Copy link
Contributor

@momobel momobel commented May 3, 2024

Starts handling #293

Plan

Diesel async support for sqlite has been added in weiznich/diesel_async#146.

To kickstart integration of sqlite into Chirpstack, I planned the work in 2 steps:

  1. rebase initial work which essentially managed types for both postgres and sqlite (this PR)
  2. Integrate latest diesel_async

This PR handles both steps based on v4.8.0, albeit only on the compilation/unit tests side.

Status

All unit tests are passing at the moment except one on class_a_b which will be fixed soon. Usage is described below, tested under the docker-devshell.

cargo build --no-default-features --features sqlite --target-dir target-sqlite
TEST_POSTGRESQL_DSN=sqlite:///tmp/test.sqlite cargo test --no-default-features --features sqlite --target-dir target-sqlite

I believe this is ready to review at least to have overall feedback on the direction targeting a first merge into the feature branch.

Next

Next tasks (probably split in multiple PRs):

  • diesel_async integration
  • Test in real scenario
  • Proper integration for development with docker and diesel using postgres/sqlite discrimination
  • Improving sqlite migrations and documenting limitations with examples
  • Cleanup

Happy to hear your feedback!

@brocaar
Copy link
Contributor

brocaar commented May 7, 2024

@momobel great work! Please allow me some time to review this, because these are quite some lines of code.

I did notice that there are some conflicts. Do you want me to update the feat_sqlite_support branch to the latest master version before fixing these merge conflicts?

@momobel
Copy link
Contributor Author

momobel commented May 13, 2024

It's quite a handful to rebase and use diesel-async.

As my current work is older, I based on 4.6.0 to facilitate the integration so I would prefer to actually move back feat_sqlite_support to v4.6.0.

My next PR will target v4.7.0 and handle diesel-async so I will probably merge v4.7.0 into the feature branch.

What do you think?

Copy link
Contributor

@brocaar brocaar left a comment

Choose a reason for hiding this comment

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

Thanks again for all your work. This is my first set of feedback on this work. I think it would be easier to rebase this onto v4.7. There is some code that will change and it would be a waste of time to review code-changes that we know are already outdated.

I think if you could rebase this (or merge the v4.7 into your branch), then we can work on shaping this PR into a mergable state. Then the next part of work can be done in a separate PR.

@brocaar
Copy link
Contributor

brocaar commented May 13, 2024

I have updated the feat_sqlite_support branch to the latest master changes. If you could rebase / merge that would be great so that we can get feedback from the CI workflow....

momobel added 14 commits May 17, 2024 19:31
- Select diesel UUID and serde_json only for postgres
- sqlite: Enable returning clause for sqlite
- sqlite: Change SQL uuid with text
- sqlite: Change SQL bytea to text
- sqlite: Change SQL json to text
- sqlite: Switch sqlite SQL from text/timestamp timezone to datetime
- sqlite: Use smallint for class_b_ping_slot_dr of device profile
- sqlite: Draft SQL down migrations
- sqlite: Explicitely mark primary keys as not null
- Tweak sqlite schema with timestamp tz sqlite
Ignore search tests for sqlite
Select like (sqlite) or ilike (postgres) depending on storage backend
@momobel momobel force-pushed the experiment_sqlite branch 2 times, most recently from 2ca2b3b to f4cfec6 Compare May 28, 2024 11:19
@momobel momobel changed the title Initial support for sqlite based on v4.6.0 Initial support for sqlite based on v4.8.0 May 28, 2024
@momobel momobel force-pushed the experiment_sqlite branch from ffc5079 to 7c1586d Compare June 3, 2024 16:40
momobel added 7 commits June 4, 2024 11:25
This is to avoid error below when multiple backends are enabled within
diesel. There are 2 options, switch the generig *const str to String or
change the from_sql to use String. The first was chosen since it also
avoids some extra allocation.

cannot infer type for type parameter `DB` declared on the trait `FromSql`
Diesel SQL types:
- Timestamptz
- Json
- Uuid

Rust types:
- Json based types
- Uuid
- BigDecimal
- DevNonces
- Move storage KeyValue into module
- Move storage Measurements* into module
- Move storage MulticastGroupSchedulingType into module
Diesel uses BEGIN for transactions but this can create deadlocks [1] with sqlite when transactions first execute reads then write [2].

To avoid contention and transactions failing in the middle with busy, locking with BEGIN IMMEDIATE/EXCLUSIVE is necessary, depending on the application need [3].

[1] https://sqlite.org/forum/forumpost/bde839c27d7afb61
[2] https://sqlite.org/forum/forumpost/aa8f6e362442540f12b3e8a9a92fcc66205ddac2df1b7653f216
[3] https://www.sqlite.org/lang_transaction.html
@momobel momobel force-pushed the experiment_sqlite branch from 895ea6a to fcff1d1 Compare August 2, 2024 15:10
@momobel momobel force-pushed the experiment_sqlite branch from fcff1d1 to 45b4a77 Compare August 2, 2024 15:20
#
# This sets the max. number of open connections that are allowed in the
# connection pool.
max_open_connections=4
Copy link
Contributor

Choose a reason for hiding this comment

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

I remember we discussed this, but I forgot if this was solved or not in diesel. Should this be exposed, or should this be left as default=1?

# Set this to control the SQLite journaling mode. None is set if it isn't configured,
# which means the SQLite default will be used.
# See https://sqlite.org/pragma.html#pragma_journal_mode
journal_mode="{{ sqlite.journal_mode }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't it be easier to expose a pragmas config option, such that any pragma option can be configured? That way all pragmas can be configured using one setting.

Sqlite {
path: "chirpstack.sqlite".into(),
max_open_connections: 4,
busy_timeout: default_sqlite_busy_timeout(),
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no need to put the default in a function. The #[serde(default)] will already make sure that undefined config options are filled with the value from default().

pub path: String,
pub max_open_connections: u32,
#[serde(default = "default_sqlite_busy_timeout")]
pub busy_timeout: u32,
Copy link
Contributor

Choose a reason for hiding this comment

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

If it is a timeout, then a Duration type would be more appropriate. As well as the usage of #[serde(with = "humantime_serde")]. That way, users can specify 100ms, 10s, etc...

// see https://sqlite.org/rescode.html#busy
// - set user journal mode
let conf = config::get();
let pragmas = pragma_generate(&conf.sqlite);
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of using pragma_generate, we could get the list of pragmas from the config. E.g. we would have in the config:

pragmas = [
    "journal_mode = XXX",
    "busy_timeout = YYYY",
    "foreign_keys = ON",
    ...
]

Would that make sense instead of specifying each config option within ChirpStack? E.g. if some options are missing (e.g. foreign-keys) ChirpStack might not work correctly, but on the other hand, some other pragmas can't be configured currently. We also want to avoid that each pragma turns into a ChirpStack option.

Copy link
Contributor

Choose a reason for hiding this comment

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

We would provide sane defaults and if users want to override, they would have the option to do so.

pub async fn get_counts_by_state(tenant_id: &Option<Uuid>) -> Result<GatewayCountsByState, Error> {
let counts: GatewayCountsByState = diesel::sql_query(r#"
select
coalesce(sum(case when last_seen_at is null then 1 end), 0) as never_seen_count,
Copy link
Contributor

Choose a reason for hiding this comment

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

The coalesce is needed because else it still might return NULL and you will see an error in the web-interface. I will push a fix.

coalesce(sum(case when last_seen_at is null then 1 end), 0) as never_seen_count,
coalesce(sum(case when (now() - make_interval(secs => stats_interval_secs * 2)) > last_seen_at then 1 end), 0) as offline_count,
coalesce(sum(case when (now() - make_interval(secs => stats_interval_secs * 2)) <= last_seen_at then 1 end), 0) as online_count
coalesce(sum(case when last_seen_at is null then 1 else 0 end), 0) as never_seen_count,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm reverting these else 0 changes, as I still get null errors.

brocaar added 7 commits August 6, 2024 12:05
This will cause confusion, as the default binaries will not be compiled
against SQLite, but this config example might be included in for example
the .deb or .rpm.
We should set DATABASE variable rather than FEATURES.
@brocaar brocaar merged commit 21f07fe into chirpstack:feat_sqlite_support Aug 6, 2024
@brocaar
Copy link
Contributor

brocaar commented Aug 6, 2024

Thanks again for your great work @momobel 👍 💯 🎉

brocaar added a commit that referenced this pull request Aug 26, 2024
This feature makes it possible to select between PostgreSQL and SQLite as database backend using a compile feature-flag. It is not possible to enable both at the same time.

---------

Co-authored-by: Momo Bel <[email protected]>
onizmx added a commit to halter/chirpstack that referenced this pull request Mar 12, 2025
* Add option to increase RX1 Delay in device-profile.

In general ChirpStack is configured with a rx1_delay configuration
matching the network latency (e.g. on cellular, one might want to set
this to rx1_delay=3). However, this does not take into account a
possible latency of the end-application. Handling the uplink and
enqueueing a downlink might take more time than the configured rx1_delay
(and get_downlink_data_delay) allows.

This option makes it possible to increase the RX1 Delay in the
device-profile. If the RX1 Delay has between increased relative to
the system default, then the get_downlink_data_delay will be
incremented with the same amount of seconds.

* Bump tar from 6.1.15 to 6.2.1 in /api/js (chirpstack#399)

Bumps [tar](https://github.com/isaacs/node-tar) from 6.1.15 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](isaacs/node-tar@v6.1.15...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump tar from 6.1.15 to 6.2.1 in /api/grpc-web (chirpstack#400)

Bumps [tar](https://github.com/isaacs/node-tar) from 6.1.15 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](isaacs/node-tar@v6.1.15...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump protobufjs from 7.2.4 to 7.2.6 in /api/js (chirpstack#401)

Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 7.2.4 to 7.2.6.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/master/CHANGELOG.md)
- [Commits](protobufjs/protobuf.js@protobufjs-v7.2.4...protobufjs-v7.2.6)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump golang.org/x/net from 0.19.0 to 0.23.0 in /examples/request_log/go (chirpstack#404)

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.19.0 to 0.23.0.
- [Commits](golang/net@v0.19.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump golang.org/x/net from 0.19.0 to 0.23.0 in /examples/frame_log/go (chirpstack#405)

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.19.0 to 0.23.0.
- [Commits](golang/net@v0.19.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump golang.org/x/net from 0.22.0 to 0.23.0 in /api/go (chirpstack#406)

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0.
- [Commits](golang/net@v0.22.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Auto-detect if MQTT broker supports shared-subscriptions.

Closes chirpstack#413.

* Convert Local to NaiveDateTime before calculating intervals.

This makes it a lot easier to iterate over the intervals, as we no
longer have to take into account DST changes that could either result in
an invalid or ambiguous date, or not incrementing by the expected
interval. E.g. incrementing by 1 day resulting in a 23 hour increment
because or DST change.

On returning the metrics, we try to convert the NaiveDateTime back into
a DateTime<Local>, failing that, we skip it rather than failing on it.

Closes chirpstack#415.

* Fix loading options (onFocus > onDropdownVisibleChange).

onFocus is only triggered when when dropdown doesn't have focus where
onDropdownVisibleChange is always triggered when opening / closing the
dropdown.

Closes chirpstack#334.

* Use mold linker for development.

This speeds up check and build times.

* Exclude disabled devices from Class-B/C scheduler.

Closes brocaar/chirpstack-network-server#612.

* Update rquickjs dependency.

* api: add `--depth=1` to googleapis and protobuf clones (chirpstack#420)

* Add support for handling HomeNSReq requests.

In this case, we return the (primary) NetID of the ChirpStack instance.
Supporting the HomeNSReq is useful in the case the roaming ChirpStack
instances are setup to resolve the servers using DNS. In case of OTAA,
the fNS resolves the JoinEUI to a hostname to which it must make the
HomeNSReq. This returns the HNetID, which then can be used to resolve
the hostname of the hNS to which the join-request must be forwarded.

* lrwn: Validate max payload sizes for RP002-1.0.4.

* Bump ejs from 3.1.9 to 3.1.10 in /ui (chirpstack#414)

Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](mde/ejs@v3.1.9...v3.1.10)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update dependencies.

* Speed up cargo check.

See also:
https://corrode.dev/blog/tips-for-faster-rust-compile-times/#avoid-procedural-macro-crates.

* Fix cargo clippy warnings.

* Fix formatting after cargo clippy --fix.

* Set CARGO_INCREMENTAL=0 for CI builds.

* Add RP002-1.0.4 option to device-profile.

* Bump version to 4.8.0-test.3

* Revert "Use mold linker for development."

This reverts commit 4f1a1bb. This was
intended to improve the development speed, but it breaks the build. This
is because even when cross-compiling, the Rust compiler does compile
some code for the host target for code-generation.

* Bump version to 4.8.0-test.4

* Revert "Update dependencies."

This reverts commit f475e4f. One of the
updated dependencies introduces aws-lc-rs as dependency, which fails to
build on ARMv7.

* Update Rust to v1.78.

* Bump version to 4.8.0-test.5

* Bump version to 4.8.0

* api: Fix empty JS packages.

NPM uses the .gitignore file, which includes the generated JS code. This
caused the v4.8.0 JS packages to be completely empty. Adding an empty
.npmignore file resolves the issue as if a .npmignore file is detected,
the .gitignore file is ignored.

* Bump version to 4.8.1

* Update cross-rs image to :main.

The :latest tag points to a very old image versions, which are not
consistent with regards to the base-image. This is causing differences
in library versions across different target platforms.

Once a v0.3.0 release is available, :main can be changed into :0.3.0.

Closes chirpstack#421.

* api: Remove frame_log from __init__.py (Python).

Closes chirpstack#422.

* backend: Fix sending HomeNSAns response to HomeNSReq request.

* Add passive_roaming_validate_mic option.

This option does two things:

1) In case the passive-roaming agreement is not state-less, it will
   trigger the validation of MIC (this was already implemented at the
   roaming-session retrieval, but never used).
2) On PRStartAns, it will return the NwkSKey / FNwkSIntKey to the
   requester (such that the MIC validation can be performed).

For state-less passive-roaming, it is recommended to leave this option
set to false, such that no session-keys are exposed.

* ui: Fix empty string in revision column (chirpstack#432)

* Update sslmode options in config template. (chirpstack#433)

* api: add grpc php support (chirpstack#431)

* Update Rust, Diesel CLI and dev. environment.

* Fix cargo check / clippy warnings.

* Fix exposing full JS codec error.

In some cases tests would fail (I assume based on load / running
concurrent tests) without the full JS codec error.

Fixes chirpstack#440.

* Integrate Gateway Mesh feature.

This adds a Gateway Mesh section to the web-interface (+ API endpoints)
to see the status op each Relay Gateway within the Gateway Mesh.

The Gateway Mesh (https://github.com/chirpstack/chirpstack-gateway-mesh)
is an experimental feature to extend LoRaWAN coverage throug Relay
Gateways.

* Bump version to 4.9.0-test.2

* Update mesh heartbeat MQTT topic.

* Bump version to 4.9.0-test.3

* ui: Fix isGatewayAdmin build error.

* lrwn: Fix cargo clippy feedback.

* lrwn: Fix typo in snr clamp.

* api: Remove generated PHP code. (chirpstack#452)

* Bump @grpc/grpc-js from 1.10.4 to 1.10.9 in /api/js (chirpstack#434)

Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.10.4 to 1.10.9.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/[email protected]...@grpc/[email protected])

---
updated-dependencies:
- dependency-name: "@grpc/grpc-js"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump braces from 3.0.2 to 3.0.3 in /ui (chirpstack#436)

Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump ws from 7.5.9 to 7.5.10 in /ui (chirpstack#441)

Bumps [ws](https://github.com/websockets/ws) from 7.5.9 to 7.5.10.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](websockets/ws@7.5.9...7.5.10)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump curve25519-dalek from 4.1.2 to 4.1.3 (chirpstack#442)

Bumps [curve25519-dalek](https://github.com/dalek-cryptography/curve25519-dalek) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/dalek-cryptography/curve25519-dalek/releases)
- [Commits](dalek-cryptography/curve25519-dalek@curve25519-4.1.2...curve25519-4.1.3)

---
updated-dependencies:
- dependency-name: curve25519-dalek
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ui: Make tileserver + attribution configurable. (chirpstack#451)

Co-authored-by: Orne Brocaar <[email protected]>

* Improved device activation api documentation (chirpstack#454)

* Fix typo in gateway stats handling. (chirpstack#458)

* Update oauth2 dependency.

* Update openidconnect dependency.

Fixes chirpstack#423.

* lrwn: Allow empty string for AES128Key, DevAddr, EUI64 and NetID.

In case an empty string is provided, the default "null" value will be
used.

Fixes chirpstack#453.

* Make OIDC and OAuth2 scopes configurable. (chirpstack#445)

Co-authored-by: Orne Brocaar <[email protected]>

* ui: Migrate from create-react-app to vite (chirpstack#459)

* Update main.yml workflow. (chirpstack#461)

* ui: Replace moment with date-fns. (chirpstack#460)

* Add user_info config to region_... + format TOML.

Closes chirpstack#462.

* Update dependencies.

There are still a few dependencies left to update, but these updates
require additional code changes.

* Update install-nix-action workflow step.

* Bump version to 4.9.0-test.4

* Fix updating dependencies.

The previous update dependencies commit contained a dependency that
pulled in the aws-lc-rs crate, which fails to build on ARMv7. See also
370b84c.

This commit reverts the updates and only updates part of the crates.

A proper fix will be to update all dependencies to rustls 0.23 such that
we can enable the ring feature flag (which is the 0.22 default).

* Bump version to 4.9.0-test.5

* Update rustls to 0.23.

* Update lapin crate.

This disables the default features (rustls), because lapin enables the
default rustls features, which pulls in the aws-lc-rs dependency besides
ring.

Most likely, the next lapin version will fix this by exposing feature
flags to either enable aws-lc-rs or ring backend for rustls.

* Update dependencies.

* ui: Fix formatting template after merging chirpstack#460.

* Replace warp with axum.

The warp dependency was causing some issues with upgrading dependencies
as it depends on http v0.2, where other dependencies (e.g. tonic) have
already upgraded to http v1+.

* Update redis dependency.

* Update dependencies.

* ui: Update codec template with JSDoc (chirpstack#473)

* Fix clippy feedback (cargo clippy --fix).

* Bump version to 4.9.0-test.6

* Update deadpool-redis.

* Add signal handling.

Fixes chirpstack#480.

* Fix missing last_seen_at field update of relay gateway.

* Bump version to 4.9.0

* api: Upgrade io.grpc dependencies in Java API. (chirpstack#494)

This fixes a compatibility issue with Netty.

---
Co-authored-by: Guillaume Milani <[email protected]>

* Implement support for SQLite database backend. (chirpstack#418) (chirpstack#500)

This feature makes it possible to select between PostgreSQL and SQLite as database backend using a compile feature-flag. It is not possible to enable both at the same time.

---------

Co-authored-by: Momo Bel <[email protected]>

* ui: Fix tooltip date formatting.

With the migration from moment to date-fns (chirpstack#460) some of the formatting
strings were not updated accordingly.

Fixes chirpstack#503.

* ui: Run make format to format ui code.

* api: Re-export pbjson_types and tonic.

Closes chirpstack#504.

* Update dependencies.

* lrwn: Update Deserialize trait implementation.

* Implement importer for lorawan-device-profiles repo.

* Remove OFF, which is not a valid tracing Level.

* Fix escaping issue in TOML template.

Closes chirpstack#486.

* Add expires_at to queue-items (unicast & multicast).

This makes it possible to automatically remove items from the queue in
case the expires_at timestamp has reached. This field is optional and
the default remains to never expire queue-items.

* ui: Implement queue-item expires-at timestamp in UI.

* Bump vite from 5.3.3 to 5.3.6 in /ui (chirpstack#516)

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.3.3 to 5.3.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.3.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.3.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump micromatch from 4.0.7 to 4.0.8 in /ui (chirpstack#501)

Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.7 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/4.0.8/CHANGELOG.md)
- [Commits](micromatch/micromatch@4.0.7...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update dependencies.

* Return with abort instead of error.

This is not an operational error, we are already logging the message as
warn, which is more appropriate as it is caused by user-input.

* Bump version to 4.10.0-test.1

* Fix validate_mic clause.

* Update dependencies.

* Bump rollup from 4.18.1 to 4.22.4 in /ui (chirpstack#526)

Bumps [rollup](https://github.com/rollup/rollup) from 4.18.1 to 4.22.4.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](rollup/rollup@v4.18.1...v4.22.4)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* api: Rename compile > compile_protos.

* Fix clippy feedback.

* Fix fmt after clippy fixes.

* ui: Update page-title according to page. (chirpstack#539)

* Build/archive package for both Postgres and SQLite (chirpstack#540)

* lrwn-filters: Expose is_match method on prefix types.

* api: Add C support (chirpstack#549)

* Remove debug println.

* Bump version to 4.10.0-test.2

* Build separate Docker image for SQLite.

* Bump version to 4.10.0-test.3

* Fix GitHub workflow.

* Bump version to 4.10.0-test.4

* Try fix matrix.database == 'postgres'.

* Bump version to 4.10.0-test.5

* Attempt #2 to fix matrix.database Docker image suffix.

* Bump version to 4.10.0-test.6

* Update dependencies.

* Attempt #3 to fix matrix.database Docker image suffix.

* Bump version to 4.10.0-test.7

* Update dependencies.

* Bump version to 4.10.0

* Fix incorrect systemd service-name after chirpstack#540.

Currently, cargo-deb does not use the variant name option as systemd
service-name, causing the postgres variant with name 'chirpstack' to
install a 'chirpstack-postgres' systemd service. See also
kornelski/cargo-deb#150.

This also fixes the RPM systemd service-name for the sqlite variant.

* Bump version to 4.10.1-test.1

* Bump version to 4.10.1

* Implement support for storing DevNonces per JoinEUI.

* Fix dev_nonces migration.

* Update multicast function to return expired queue items.

In case a gateway is offline, associated queue-items would be excluded
by the get_schedulable_queue_items function. With this change when the
queue item has expired it will be returned even if the gateway is
offline. This way, the expired queue item will be deleted by the
multicast flow.

* Update nix version to 24.11.

* Fix multicast tests for SQLite.

* Update dependencies.

* Bump cross-spawn from 7.0.3 to 7.0.6 in /ui (chirpstack#562)

Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](moxystudio/node-cross-spawn@v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump thiserror from 1.0.69 to 2.0.4 (chirpstack#571)

Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.69 to 2.0.4.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](dtolnay/thiserror@1.0.69...2.0.4)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update base image version.

* Remove old build config.

* Update dependencies.

* Bump version to 4.10.2

* Refactor handling same uplink under multiple regions.

* Expose region_config_id in Uplink and Join event.

* Bump version to 4.11.0-test.1

* Bump tower from 0.5.1 to 0.5.2 (chirpstack#580)

Bumps [tower](https://github.com/tower-rs/tower) from 0.5.1 to 0.5.2.
- [Release notes](https://github.com/tower-rs/tower/releases)
- [Commits](tower-rs/tower@tower-0.5.1...tower-0.5.2)

---
updated-dependencies:
- dependency-name: tower
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump rustls from 0.23.19 to 0.23.20 (chirpstack#581)

Bumps [rustls](https://github.com/rustls/rustls) from 0.23.19 to 0.23.20.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](rustls/rustls@v/0.23.19...v/0.23.20)

---
updated-dependencies:
- dependency-name: rustls
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump serde_json from 1.0.133 to 1.0.134 (chirpstack#584)

Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.133 to 1.0.134.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](serde-rs/json@v1.0.133...v1.0.134)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump nanoid from 3.3.7 to 3.3.8 in /ui (chirpstack#577)

Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](ai/nanoid@3.3.7...3.3.8)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump serde from 1.0.215 to 1.0.217 (chirpstack#587)

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.215 to 1.0.217.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.215...v1.0.217)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump serde_json from 1.0.134 to 1.0.135 (chirpstack#593)

Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.134 to 1.0.135.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](serde-rs/json@v1.0.134...v1.0.135)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump thiserror from 2.0.6 to 2.0.10 (chirpstack#592)

Bumps [thiserror](https://github.com/dtolnay/thiserror) from 2.0.6 to 2.0.10.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](dtolnay/thiserror@2.0.6...2.0.10)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump golang.org/x/net from 0.23.0 to 0.33.0 in /examples/frame_log/go (chirpstack#591)

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.23.0 to 0.33.0.
- [Commits](golang/net@v0.23.0...v0.33.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump version to 4.11.0

* Update Rust toolchain + fix Clippy feedback.

* Bump version to 4.11.0-test.2

* Bump version to 4.11.0

* Return LinkCheckAns with margin=0 for non-LoRa modulations.

* Re-use http clients within integrations.

This reduces CPU load, especially in case when HTTPS is being used
as connections will be pooled by the http client.

* Bump version to 4.11.1-test.1

* Fix ns_time + setting of JSON flag.

These lines were accidentally removed by 922a835
when removing the metadata keys as part of the region refactor.

* Bump version to 4.11.1

* Update dev-dependencies to shell.nix.

* Revert from sqlite-interactive to sqlite.

* Bump version to 4.11.1-test.2

* Bump version to 4.11.1

* Accept GPS epoch time as argument to multicast enqueue function

* Set same verison of protoc across cross dockerfiles and fix GitHub actions

* Run protoc

* Add support for skipping downlink in response to Halter data uplink

* Adding an option to ignore certain gateways in MC group when enqueuing messages. This is required to reduce noise during periods of high downlink traffic, for MC groups sharing gateways.

* feat: add minute aggregation for gateway stats

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Orne Brocaar <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sajad Abdollahi <[email protected]>
Co-authored-by: Bernd Storath <[email protected]>
Co-authored-by: tuialexandre <[email protected]>
Co-authored-by: pyttel <[email protected]>
Co-authored-by: SAGAR PATEL <[email protected]>
Co-authored-by: Guillaume Milani <[email protected]>
Co-authored-by: Momo Bel <[email protected]>
Co-authored-by: Julien Catalano <[email protected]>
Co-authored-by: Diego Valcarce <[email protected]>
Co-authored-by: Kurt McAlpine <[email protected]>
Co-authored-by: Alastair Bain <[email protected]>
Co-authored-by: J.Z. Zhou <[email protected]>
onizmx added a commit to halter/chirpstack that referenced this pull request Mar 13, 2025
* Add option to increase RX1 Delay in device-profile.

In general ChirpStack is configured with a rx1_delay configuration
matching the network latency (e.g. on cellular, one might want to set
this to rx1_delay=3). However, this does not take into account a
possible latency of the end-application. Handling the uplink and
enqueueing a downlink might take more time than the configured rx1_delay
(and get_downlink_data_delay) allows.

This option makes it possible to increase the RX1 Delay in the
device-profile. If the RX1 Delay has between increased relative to
the system default, then the get_downlink_data_delay will be
incremented with the same amount of seconds.

* Bump tar from 6.1.15 to 6.2.1 in /api/js (chirpstack#399)

Bumps [tar](https://github.com/isaacs/node-tar) from 6.1.15 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](isaacs/node-tar@v6.1.15...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump tar from 6.1.15 to 6.2.1 in /api/grpc-web (chirpstack#400)

Bumps [tar](https://github.com/isaacs/node-tar) from 6.1.15 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](isaacs/node-tar@v6.1.15...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump protobufjs from 7.2.4 to 7.2.6 in /api/js (chirpstack#401)

Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 7.2.4 to 7.2.6.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/master/CHANGELOG.md)
- [Commits](protobufjs/protobuf.js@protobufjs-v7.2.4...protobufjs-v7.2.6)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump golang.org/x/net from 0.19.0 to 0.23.0 in /examples/request_log/go (chirpstack#404)

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.19.0 to 0.23.0.
- [Commits](golang/net@v0.19.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump golang.org/x/net from 0.19.0 to 0.23.0 in /examples/frame_log/go (chirpstack#405)

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.19.0 to 0.23.0.
- [Commits](golang/net@v0.19.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump golang.org/x/net from 0.22.0 to 0.23.0 in /api/go (chirpstack#406)

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0.
- [Commits](golang/net@v0.22.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Auto-detect if MQTT broker supports shared-subscriptions.

Closes chirpstack#413.

* Convert Local to NaiveDateTime before calculating intervals.

This makes it a lot easier to iterate over the intervals, as we no
longer have to take into account DST changes that could either result in
an invalid or ambiguous date, or not incrementing by the expected
interval. E.g. incrementing by 1 day resulting in a 23 hour increment
because or DST change.

On returning the metrics, we try to convert the NaiveDateTime back into
a DateTime<Local>, failing that, we skip it rather than failing on it.

Closes chirpstack#415.

* Fix loading options (onFocus > onDropdownVisibleChange).

onFocus is only triggered when when dropdown doesn't have focus where
onDropdownVisibleChange is always triggered when opening / closing the
dropdown.

Closes chirpstack#334.

* Use mold linker for development.

This speeds up check and build times.

* Exclude disabled devices from Class-B/C scheduler.

Closes brocaar/chirpstack-network-server#612.

* Update rquickjs dependency.

* api: add `--depth=1` to googleapis and protobuf clones (chirpstack#420)

* Add support for handling HomeNSReq requests.

In this case, we return the (primary) NetID of the ChirpStack instance.
Supporting the HomeNSReq is useful in the case the roaming ChirpStack
instances are setup to resolve the servers using DNS. In case of OTAA,
the fNS resolves the JoinEUI to a hostname to which it must make the
HomeNSReq. This returns the HNetID, which then can be used to resolve
the hostname of the hNS to which the join-request must be forwarded.

* lrwn: Validate max payload sizes for RP002-1.0.4.

* Bump ejs from 3.1.9 to 3.1.10 in /ui (chirpstack#414)

Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](mde/ejs@v3.1.9...v3.1.10)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update dependencies.

* Speed up cargo check.

See also:
https://corrode.dev/blog/tips-for-faster-rust-compile-times/#avoid-procedural-macro-crates.

* Fix cargo clippy warnings.

* Fix formatting after cargo clippy --fix.

* Set CARGO_INCREMENTAL=0 for CI builds.

* Add RP002-1.0.4 option to device-profile.

* Bump version to 4.8.0-test.3

* Revert "Use mold linker for development."

This reverts commit 4f1a1bb. This was
intended to improve the development speed, but it breaks the build. This
is because even when cross-compiling, the Rust compiler does compile
some code for the host target for code-generation.

* Bump version to 4.8.0-test.4

* Revert "Update dependencies."

This reverts commit f475e4f. One of the
updated dependencies introduces aws-lc-rs as dependency, which fails to
build on ARMv7.

* Update Rust to v1.78.

* Bump version to 4.8.0-test.5

* Bump version to 4.8.0

* api: Fix empty JS packages.

NPM uses the .gitignore file, which includes the generated JS code. This
caused the v4.8.0 JS packages to be completely empty. Adding an empty
.npmignore file resolves the issue as if a .npmignore file is detected,
the .gitignore file is ignored.

* Bump version to 4.8.1

* Update cross-rs image to :main.

The :latest tag points to a very old image versions, which are not
consistent with regards to the base-image. This is causing differences
in library versions across different target platforms.

Once a v0.3.0 release is available, :main can be changed into :0.3.0.

Closes chirpstack#421.

* api: Remove frame_log from __init__.py (Python).

Closes chirpstack#422.

* backend: Fix sending HomeNSAns response to HomeNSReq request.

* Add passive_roaming_validate_mic option.

This option does two things:

1) In case the passive-roaming agreement is not state-less, it will
   trigger the validation of MIC (this was already implemented at the
   roaming-session retrieval, but never used).
2) On PRStartAns, it will return the NwkSKey / FNwkSIntKey to the
   requester (such that the MIC validation can be performed).

For state-less passive-roaming, it is recommended to leave this option
set to false, such that no session-keys are exposed.

* ui: Fix empty string in revision column (chirpstack#432)

* Update sslmode options in config template. (chirpstack#433)

* api: add grpc php support (chirpstack#431)

* Update Rust, Diesel CLI and dev. environment.

* Fix cargo check / clippy warnings.

* Fix exposing full JS codec error.

In some cases tests would fail (I assume based on load / running
concurrent tests) without the full JS codec error.

Fixes chirpstack#440.

* Integrate Gateway Mesh feature.

This adds a Gateway Mesh section to the web-interface (+ API endpoints)
to see the status op each Relay Gateway within the Gateway Mesh.

The Gateway Mesh (https://github.com/chirpstack/chirpstack-gateway-mesh)
is an experimental feature to extend LoRaWAN coverage throug Relay
Gateways.

* Bump version to 4.9.0-test.2

* Update mesh heartbeat MQTT topic.

* Bump version to 4.9.0-test.3

* ui: Fix isGatewayAdmin build error.

* lrwn: Fix cargo clippy feedback.

* lrwn: Fix typo in snr clamp.

* api: Remove generated PHP code. (chirpstack#452)

* Bump @grpc/grpc-js from 1.10.4 to 1.10.9 in /api/js (chirpstack#434)

Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.10.4 to 1.10.9.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/[email protected]...@grpc/[email protected])

---
updated-dependencies:
- dependency-name: "@grpc/grpc-js"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump braces from 3.0.2 to 3.0.3 in /ui (chirpstack#436)

Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump ws from 7.5.9 to 7.5.10 in /ui (chirpstack#441)

Bumps [ws](https://github.com/websockets/ws) from 7.5.9 to 7.5.10.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](websockets/ws@7.5.9...7.5.10)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump curve25519-dalek from 4.1.2 to 4.1.3 (chirpstack#442)

Bumps [curve25519-dalek](https://github.com/dalek-cryptography/curve25519-dalek) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/dalek-cryptography/curve25519-dalek/releases)
- [Commits](dalek-cryptography/curve25519-dalek@curve25519-4.1.2...curve25519-4.1.3)

---
updated-dependencies:
- dependency-name: curve25519-dalek
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ui: Make tileserver + attribution configurable. (chirpstack#451)

Co-authored-by: Orne Brocaar <[email protected]>

* Improved device activation api documentation (chirpstack#454)

* Fix typo in gateway stats handling. (chirpstack#458)

* Update oauth2 dependency.

* Update openidconnect dependency.

Fixes chirpstack#423.

* lrwn: Allow empty string for AES128Key, DevAddr, EUI64 and NetID.

In case an empty string is provided, the default "null" value will be
used.

Fixes chirpstack#453.

* Make OIDC and OAuth2 scopes configurable. (chirpstack#445)

Co-authored-by: Orne Brocaar <[email protected]>

* ui: Migrate from create-react-app to vite (chirpstack#459)

* Update main.yml workflow. (chirpstack#461)

* ui: Replace moment with date-fns. (chirpstack#460)

* Add user_info config to region_... + format TOML.

Closes chirpstack#462.

* Update dependencies.

There are still a few dependencies left to update, but these updates
require additional code changes.

* Update install-nix-action workflow step.

* Bump version to 4.9.0-test.4

* Fix updating dependencies.

The previous update dependencies commit contained a dependency that
pulled in the aws-lc-rs crate, which fails to build on ARMv7. See also
370b84c.

This commit reverts the updates and only updates part of the crates.

A proper fix will be to update all dependencies to rustls 0.23 such that
we can enable the ring feature flag (which is the 0.22 default).

* Bump version to 4.9.0-test.5

* Update rustls to 0.23.

* Update lapin crate.

This disables the default features (rustls), because lapin enables the
default rustls features, which pulls in the aws-lc-rs dependency besides
ring.

Most likely, the next lapin version will fix this by exposing feature
flags to either enable aws-lc-rs or ring backend for rustls.

* Update dependencies.

* ui: Fix formatting template after merging chirpstack#460.

* Replace warp with axum.

The warp dependency was causing some issues with upgrading dependencies
as it depends on http v0.2, where other dependencies (e.g. tonic) have
already upgraded to http v1+.

* Update redis dependency.

* Update dependencies.

* ui: Update codec template with JSDoc (chirpstack#473)

* Fix clippy feedback (cargo clippy --fix).

* Bump version to 4.9.0-test.6

* Update deadpool-redis.

* Add signal handling.

Fixes chirpstack#480.

* Fix missing last_seen_at field update of relay gateway.

* Bump version to 4.9.0

* api: Upgrade io.grpc dependencies in Java API. (chirpstack#494)

This fixes a compatibility issue with Netty.

---
Co-authored-by: Guillaume Milani <[email protected]>

* Implement support for SQLite database backend. (chirpstack#418) (chirpstack#500)

This feature makes it possible to select between PostgreSQL and SQLite as database backend using a compile feature-flag. It is not possible to enable both at the same time.

---------

Co-authored-by: Momo Bel <[email protected]>

* ui: Fix tooltip date formatting.

With the migration from moment to date-fns (chirpstack#460) some of the formatting
strings were not updated accordingly.

Fixes chirpstack#503.

* ui: Run make format to format ui code.

* api: Re-export pbjson_types and tonic.

Closes chirpstack#504.

* Update dependencies.

* lrwn: Update Deserialize trait implementation.

* Implement importer for lorawan-device-profiles repo.

* Remove OFF, which is not a valid tracing Level.

* Fix escaping issue in TOML template.

Closes chirpstack#486.

* Add expires_at to queue-items (unicast & multicast).

This makes it possible to automatically remove items from the queue in
case the expires_at timestamp has reached. This field is optional and
the default remains to never expire queue-items.

* ui: Implement queue-item expires-at timestamp in UI.

* Bump vite from 5.3.3 to 5.3.6 in /ui (chirpstack#516)

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.3.3 to 5.3.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.3.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.3.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump micromatch from 4.0.7 to 4.0.8 in /ui (chirpstack#501)

Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.7 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/4.0.8/CHANGELOG.md)
- [Commits](micromatch/micromatch@4.0.7...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update dependencies.

* Return with abort instead of error.

This is not an operational error, we are already logging the message as
warn, which is more appropriate as it is caused by user-input.

* Bump version to 4.10.0-test.1

* Fix validate_mic clause.

* Update dependencies.

* Bump rollup from 4.18.1 to 4.22.4 in /ui (chirpstack#526)

Bumps [rollup](https://github.com/rollup/rollup) from 4.18.1 to 4.22.4.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](rollup/rollup@v4.18.1...v4.22.4)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* api: Rename compile > compile_protos.

* Fix clippy feedback.

* Fix fmt after clippy fixes.

* ui: Update page-title according to page. (chirpstack#539)

* Build/archive package for both Postgres and SQLite (chirpstack#540)

* lrwn-filters: Expose is_match method on prefix types.

* api: Add C support (chirpstack#549)

* Remove debug println.

* Bump version to 4.10.0-test.2

* Build separate Docker image for SQLite.

* Bump version to 4.10.0-test.3

* Fix GitHub workflow.

* Bump version to 4.10.0-test.4

* Try fix matrix.database == 'postgres'.

* Bump version to 4.10.0-test.5

* Attempt #2 to fix matrix.database Docker image suffix.

* Bump version to 4.10.0-test.6

* Update dependencies.

* Attempt #3 to fix matrix.database Docker image suffix.

* Bump version to 4.10.0-test.7

* Update dependencies.

* Bump version to 4.10.0

* Fix incorrect systemd service-name after chirpstack#540.

Currently, cargo-deb does not use the variant name option as systemd
service-name, causing the postgres variant with name 'chirpstack' to
install a 'chirpstack-postgres' systemd service. See also
kornelski/cargo-deb#150.

This also fixes the RPM systemd service-name for the sqlite variant.

* Bump version to 4.10.1-test.1

* Bump version to 4.10.1

* Implement support for storing DevNonces per JoinEUI.

* Fix dev_nonces migration.

* Update multicast function to return expired queue items.

In case a gateway is offline, associated queue-items would be excluded
by the get_schedulable_queue_items function. With this change when the
queue item has expired it will be returned even if the gateway is
offline. This way, the expired queue item will be deleted by the
multicast flow.

* Update nix version to 24.11.

* Fix multicast tests for SQLite.

* Update dependencies.

* Bump cross-spawn from 7.0.3 to 7.0.6 in /ui (chirpstack#562)

Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](moxystudio/node-cross-spawn@v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump thiserror from 1.0.69 to 2.0.4 (chirpstack#571)

Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.69 to 2.0.4.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](dtolnay/thiserror@1.0.69...2.0.4)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update base image version.

* Remove old build config.

* Update dependencies.

* Bump version to 4.10.2

* Refactor handling same uplink under multiple regions.

* Expose region_config_id in Uplink and Join event.

* Bump version to 4.11.0-test.1

* Bump tower from 0.5.1 to 0.5.2 (chirpstack#580)

Bumps [tower](https://github.com/tower-rs/tower) from 0.5.1 to 0.5.2.
- [Release notes](https://github.com/tower-rs/tower/releases)
- [Commits](tower-rs/tower@tower-0.5.1...tower-0.5.2)

---
updated-dependencies:
- dependency-name: tower
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump rustls from 0.23.19 to 0.23.20 (chirpstack#581)

Bumps [rustls](https://github.com/rustls/rustls) from 0.23.19 to 0.23.20.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](rustls/rustls@v/0.23.19...v/0.23.20)

---
updated-dependencies:
- dependency-name: rustls
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump serde_json from 1.0.133 to 1.0.134 (chirpstack#584)

Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.133 to 1.0.134.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](serde-rs/json@v1.0.133...v1.0.134)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump nanoid from 3.3.7 to 3.3.8 in /ui (chirpstack#577)

Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](ai/nanoid@3.3.7...3.3.8)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump serde from 1.0.215 to 1.0.217 (chirpstack#587)

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.215 to 1.0.217.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.215...v1.0.217)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump serde_json from 1.0.134 to 1.0.135 (chirpstack#593)

Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.134 to 1.0.135.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](serde-rs/json@v1.0.134...v1.0.135)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump thiserror from 2.0.6 to 2.0.10 (chirpstack#592)

Bumps [thiserror](https://github.com/dtolnay/thiserror) from 2.0.6 to 2.0.10.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](dtolnay/thiserror@2.0.6...2.0.10)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump golang.org/x/net from 0.23.0 to 0.33.0 in /examples/frame_log/go (chirpstack#591)

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.23.0 to 0.33.0.
- [Commits](golang/net@v0.23.0...v0.33.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump version to 4.11.0

* Update Rust toolchain + fix Clippy feedback.

* Bump version to 4.11.0-test.2

* Bump version to 4.11.0

* Return LinkCheckAns with margin=0 for non-LoRa modulations.

* Re-use http clients within integrations.

This reduces CPU load, especially in case when HTTPS is being used
as connections will be pooled by the http client.

* Bump version to 4.11.1-test.1

* Fix ns_time + setting of JSON flag.

These lines were accidentally removed by 922a835
when removing the metadata keys as part of the region refactor.

* Bump version to 4.11.1

* Update dev-dependencies to shell.nix.

* Revert from sqlite-interactive to sqlite.

* Bump version to 4.11.1-test.2

* Bump version to 4.11.1

* Accept GPS epoch time as argument to multicast enqueue function

* Set same verison of protoc across cross dockerfiles and fix GitHub actions

* Run protoc

* Add support for skipping downlink in response to Halter data uplink

* Adding an option to ignore certain gateways in MC group when enqueuing messages. This is required to reduce noise during periods of high downlink traffic, for MC groups sharing gateways.

* feat: add minute aggregation for gateway stats

* add mqtt enabled regions

* make gateway region config id only set via api

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Orne Brocaar <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sajad Abdollahi <[email protected]>
Co-authored-by: Bernd Storath <[email protected]>
Co-authored-by: tuialexandre <[email protected]>
Co-authored-by: pyttel <[email protected]>
Co-authored-by: SAGAR PATEL <[email protected]>
Co-authored-by: Guillaume Milani <[email protected]>
Co-authored-by: Momo Bel <[email protected]>
Co-authored-by: Julien Catalano <[email protected]>
Co-authored-by: Diego Valcarce <[email protected]>
Co-authored-by: Kurt McAlpine <[email protected]>
Co-authored-by: Alastair Bain <[email protected]>
Co-authored-by: J.Z. Zhou <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants