Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Merge v3.30 into console-redesign #7069

Merged
merged 29 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ae690b2
api: Add packet error rate to ApplicationUplink
adriansmares Apr 25, 2024
e27dcfc
ns: Emit packet error rate in the uplink message
adriansmares Apr 25, 2024
8d1d201
gs: Increase Basic Station read headers timeout
johanstokking Apr 26, 2024
42a16a7
Merge pull request #7052 from TheThingsNetwork/fix/lbs-read-headers-t…
johanstokking Apr 26, 2024
43a0e72
Merge pull request #7048 from TheThingsNetwork/feature/4205-per
adriansmares Apr 29, 2024
8feb431
console: Fix choosing different adr
ryaplots Apr 29, 2024
4865de1
console: Add back devAddr
ryaplots Apr 29, 2024
c480c24
api: Fix bookmarks creation endpoint
adriansmares Apr 29, 2024
2d0c9e0
console: Fix condition
ryaplots Apr 29, 2024
cacab3d
console: Fix repetition
ryaplots Apr 29, 2024
bc0a0c5
Merge pull request #7055 from TheThingsNetwork/fix/create-bookmark-path
adriansmares Apr 29, 2024
7e19348
console: Fix linting
ryaplots Apr 29, 2024
0975a05
Merge pull request #7053 from TheThingsNetwork/fix/adr-logic
ryaplots Apr 29, 2024
459a40c
Merge pull request #7054 from TheThingsNetwork/fix/device-session-info
ryaplots Apr 29, 2024
c4eed51
dev: bump the safe group with 13 updates
dependabot[bot] Apr 29, 2024
02d45e0
dev: bump golangci/golangci-lint-action from 4 to 5 in the all group
dependabot[bot] Apr 29, 2024
273a8b5
Merge pull request #7058 from TheThingsNetwork/dependabot/github_acti…
adriansmares May 1, 2024
ac105e2
dev: bump ejs from 3.1.9 to 3.1.10
dependabot[bot] May 1, 2024
7764fdf
dev: bump the safe group with 12 updates
dependabot[bot] Apr 29, 2024
ba9196b
Merge pull request #7057 from TheThingsNetwork/dependabot/go_modules/…
adriansmares May 1, 2024
8761915
dev: Add section for test results
KrishnaIyer May 1, 2024
fed69e2
Merge pull request #7061 from TheThingsNetwork/update/pr-template
KrishnaIyer May 2, 2024
85bb71e
dev: Update CI dependencies
adriansmares May 3, 2024
5b58183
Merge pull request #7060 from TheThingsNetwork/dependabot/npm_and_yar…
kschiffer May 6, 2024
0423470
Merge pull request #7056 from TheThingsNetwork/dependabot/npm_and_yar…
kschiffer May 6, 2024
d52d2c8
dev: bump the safe group with 10 updates
dependabot[bot] May 6, 2024
7d31230
Merge pull request #7064 from TheThingsNetwork/dependabot/npm_and_yar…
kschiffer May 7, 2024
89702ce
Merge branch 'refs/heads/v3.30' into merge/v3.30
PavelJankoski May 10, 2024
abe32fc
console: Update yarn.lock
PavelJankoski May 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Typically, issues should be closed manually after validation.

#### Testing

##### Steps

<!--
Explain the detailed steps to test this feature.
Please note that these steps may be used by others to test this feature.
Expand All @@ -31,6 +33,12 @@ Describe pre-requisites and/or assumptions made about the testing environment.

...

##### Results

<!--
Please add screenshots, command outputs, and/or relevant screen captures of the tests.
-->

##### Regressions

<!--
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,10 @@ jobs:
- name: Check for diff
run: tools/bin/mage git:diff
- name: Lint code
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v5
with:
version: v1.56.2
version: v1.57.2
only-new-issues: true
skip-pkg-cache: true # Caching is set up by install-go-and-deps
skip-build-cache: true # Caching is set up by install-go-and-deps
args: --timeout=10m ./pkg/... ./cmd/...

test:
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ For details about compatibility between different releases, see the **Commitment

### Fixed

- Increased the timeout for Basic Station gateways sending HTTP headers. There should now be enough time for embedded devices with little to no hardware acceleration to perform a TLS handshake. In particular, The Things Indoor Gateway can now connect to The Things Stack presenting a ECDSA certificate.

### Security

## [3.30.1] - unreleased

### Added

- Support fine-grained NbTrans controls while using Dynamic ADR mode in the Console.
- User bookmark listing now supports filtering bookmarks by entity type.
- User bookmark listing now supports filtering bookmarks by entity type.
- This can be specified by setting `entity_types` field in `ListUserBookmarksRequest`.

### Fixed
Expand Down
3 changes: 2 additions & 1 deletion api/ttn/lorawan/v3/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -8183,6 +8183,7 @@ Application uplink message.
| `last_a_f_cnt_down` | [`uint32`](#uint32) | | The last AFCntDown of the current session. This field is only present if the skip_payload_crypto field of the EndDevice is true. Can be used with app_s_key to encrypt downlink payloads. |
| `confirmed` | [`bool`](#bool) | | Indicates whether the end device used confirmed data uplink. |
| `consumed_airtime` | [`google.protobuf.Duration`](#google.protobuf.Duration) | | Consumed airtime for the transmission of the uplink message. Calculated by Network Server using the raw payload size and the transmission settings. |
| `packet_error_rate` | [`float`](#float) | | Packet error rate of the recent uplinks in the current session. Calculated by the Network Server. The value is defined in the [0, 1] interval. |
| `locations` | [`ApplicationUplink.LocationsEntry`](#ttn.lorawan.v3.ApplicationUplink.LocationsEntry) | repeated | End device location metadata, set by the Application Server while handling the message. |
| `version_ids` | [`EndDeviceVersionIdentifiers`](#ttn.lorawan.v3.EndDeviceVersionIdentifiers) | | End device version identifiers, set by the Application Server while handling the message. |
| `network_ids` | [`NetworkIdentifiers`](#ttn.lorawan.v3.NetworkIdentifiers) | | Network identifiers, set by the Network Server that handles the message. |
Expand Down Expand Up @@ -11174,7 +11175,7 @@ API keys of users.

| Method Name | Method | Pattern | Body |
| ----------- | ------ | ------- | ---- |
| `Create` | `POST` | `/api/v3/users/bookmarks` | `*` |
| `Create` | `POST` | `/api/v3/users/{user_ids.user_id}/bookmarks` | `*` |
| `List` | `GET` | `/api/v3/users/{user_ids.user_id}/bookmarks` | |
| `Delete` | `DELETE` | `/api/v3/users/{user_ids.user_id}/bookmarks/applications/{entity_ids.application_ids.application_id}` | |
| `Delete` | `DELETE` | `/api/v3/users/{user_ids.user_id}/bookmarks/clients/{entity_ids.client_ids.client_id}` | |
Expand Down
104 changes: 60 additions & 44 deletions api/ttn/lorawan/v3/api.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -12704,39 +12704,6 @@
]
}
},
"/users/bookmarks": {
"post": {
"summary": "Create a bookmark for the given user.",
"operationId": "UserBookmarkRegistry_Create",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v3UserBookmark"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/googlerpcStatus"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v3CreateUserBookmarkRequest"
}
}
],
"tags": [
"UserBookmarkRegistry"
]
}
},
"/users/{collaborator.user_ids.user_id}/applications": {
"get": {
"summary": "List applications where the given user or organization is a direct collaborator.\nIf no user or organization is given, this returns the applications the caller\nhas access to.\nSimilar to Get, this selects the fields given by the field mask.\nMore or less fields may be returned, depending on the rights of the caller.",
Expand Down Expand Up @@ -13960,6 +13927,44 @@
"tags": [
"UserBookmarkRegistry"
]
},
"post": {
"summary": "Create a bookmark for the given user.",
"operationId": "UserBookmarkRegistry_Create",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v3UserBookmark"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/googlerpcStatus"
}
}
},
"parameters": [
{
"name": "user_ids.user_id",
"description": "This ID shares namespace with organization IDs.",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v3UserBookmarkRegistryCreateBody"
}
}
],
"tags": [
"UserBookmarkRegistry"
]
}
},
"/users/{user_ids.user_id}/bookmarks/applications/{entity_ids.application_ids.application_id}": {
Expand Down Expand Up @@ -19396,6 +19401,11 @@
"type": "string",
"description": "Consumed airtime for the transmission of the uplink message. Calculated by Network Server using the raw payload size and the transmission settings."
},
"packet_error_rate": {
"type": "number",
"format": "float",
"description": "Packet error rate of the recent uplinks in the current session.\nCalculated by the Network Server. The value is defined in the [0, 1] interval."
},
"locations": {
"type": "object",
"additionalProperties": {
Expand Down Expand Up @@ -21008,17 +21018,6 @@
}
}
},
"v3CreateUserBookmarkRequest": {
"type": "object",
"properties": {
"user_ids": {
"$ref": "#/definitions/v3UserIdentifiers"
},
"entity_ids": {
"$ref": "#/definitions/v3EntityIdentifiers"
}
}
},
"v3CreateUserRequest": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -27269,6 +27268,23 @@
}
}
},
"v3UserBookmarkRegistryCreateBody": {
"type": "object",
"properties": {
"user_ids": {
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "Secondary identifier, which can only be used in specific requests."
}
}
},
"entity_ids": {
"$ref": "#/definitions/v3EntityIdentifiers"
}
}
},
"v3UserBookmarks": {
"type": "object",
"properties": {
Expand Down
6 changes: 5 additions & 1 deletion api/ttn/lorawan/v3/messages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ message ApplicationUplink {
// Consumed airtime for the transmission of the uplink message. Calculated by Network Server using the raw payload size and the transmission settings.
google.protobuf.Duration consumed_airtime = 13;

// Packet error rate of the recent uplinks in the current session.
// Calculated by the Network Server. The value is defined in the [0, 1] interval.
float packet_error_rate = 19;

// End device location metadata, set by the Application Server while handling the message.
map<string, Location> locations = 14;

Expand All @@ -255,7 +259,7 @@ message ApplicationUplink {
// Network identifiers, set by the Network Server that handles the message.
NetworkIdentifiers network_ids = 16;

// next: 19
// next: 20
}

message ApplicationUplinkNormalized {
Expand Down
2 changes: 1 addition & 1 deletion api/ttn/lorawan/v3/user_services.proto
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ service UserBookmarkRegistry {
// Create a bookmark for the given user.
rpc Create(CreateUserBookmarkRequest) returns (UserBookmark) {
option (google.api.http) = {
post: "/users/bookmarks"
post: "/users/{user_ids.user_id}/bookmarks"
body: "*"
};
}
Expand Down
30 changes: 15 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/TheThingsIndustries/protoc-gen-go-flags v1.2.0
github.com/TheThingsIndustries/protoc-gen-go-json v1.6.0
github.com/TheThingsNetwork/go-cayenne-lib v1.2.0
github.com/aws/aws-sdk-go v1.51.26
github.com/aws/aws-sdk-go v1.51.31
github.com/blang/semver v3.5.1+incompatible
github.com/blevesearch/bleve v1.0.14
github.com/bluele/gcache v0.0.2
Expand All @@ -36,7 +36,7 @@ require (
github.com/gotnospirit/messageformat v0.0.0-20221001023931-dfe49f1eb092
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1
github.com/hellofresh/health-go/v5 v5.5.3
github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef
Expand Down Expand Up @@ -74,15 +74,15 @@ require (
github.com/uptrace/bun/dialect/pgdialect v1.2.1
github.com/uptrace/bun/driver/pgdriver v1.2.1
github.com/vmihailenco/msgpack/v5 v5.4.1
go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.50.0
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.50.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.50.0
go.opentelemetry.io/otel v1.25.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.25.0
go.opentelemetry.io/otel/metric v1.25.0
go.opentelemetry.io/otel/sdk v1.25.0
go.opentelemetry.io/otel/trace v1.25.0
go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.51.0
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0
go.opentelemetry.io/otel v1.26.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.26.0
go.opentelemetry.io/otel/metric v1.26.0
go.opentelemetry.io/otel/sdk v1.26.0
go.opentelemetry.io/otel/trace v1.26.0
go.packetbroker.org/api/iam v1.8.2
go.packetbroker.org/api/iam/v2 v2.9.1
go.packetbroker.org/api/mapping/v2 v2.3.2
Expand All @@ -101,7 +101,7 @@ require (
golang.org/x/sync v0.7.0
google.golang.org/genproto v0.0.0-20240311173647-c811ad7063a7
google.golang.org/genproto/googleapis/api v0.0.0-20240311173647-c811ad7063a7
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be
google.golang.org/grpc v1.63.2
google.golang.org/protobuf v1.33.0
gopkg.in/mail.v2 v2.3.1
Expand Down Expand Up @@ -185,7 +185,7 @@ require (
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.2 // indirect
github.com/gotnospirit/makeplural v0.0.0-20180622080156-a5f48d94d976 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/huandu/xstrings v1.3.3 // indirect
Expand Down Expand Up @@ -240,8 +240,8 @@ require (
github.com/willf/bitset v1.1.10 // indirect
go.etcd.io/bbolt v1.3.5 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 // indirect
go.opentelemetry.io/proto/otlp v1.1.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect
go.opentelemetry.io/proto/otlp v1.2.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/image v0.14.0 // indirect
golang.org/x/sys v0.19.0 // indirect
Expand Down
Loading
Loading