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

Release v0.15.0 #3320

Merged
merged 47 commits into from
Dec 13, 2024
Merged

Release v0.15.0 #3320

merged 47 commits into from
Dec 13, 2024

Conversation

fredcarle
Copy link
Collaborator

Release branch as of e1502c5

Release tasks completed:

  • ran go mod tidy (sanity check)
  • ran make docs (sanity check)
  • bump BSL license parameters (Version and Date)
  • update changelog
  • Made sure that the Playground can build (sanity check)

Only need to review the last commit :)

shahzadlone and others added 30 commits October 21, 2024 11:37
## Relevant issue(s)
Resolves #3076 

## Description
- Fix the `getNodes` bug
- Fix the temporary duplications in some actions
- Remove the `getNodesCollection`
✅ This PR was created by combining the following PRs:
#3167 bot: Bump @typescript-eslint/eslint-plugin from 8.8.1 to 8.10.0 in
/playground
#3166 bot: Bump eslint-plugin-react-refresh from 0.4.12 to 0.4.13 in
/playground
#3164 bot: Bump vite from 5.4.8 to 5.4.9 in /playground
#3163 bot: Bump eslint from 9.12.0 to 9.13.0 in /playground

⚠️ The following PRs were resolved manually due to merge conflicts:
#3165 bot: Bump @typescript-eslint/parser from 8.8.1 to 8.10.0 in
/playground

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Shahzad Lone <[email protected]>
## Relevant issue(s)
Resolves #3103 

## Description
- Fix the BadRequest in the acp handlers to now be panics
- Make the panics documented under `must` functions
- Add the linter to avoid increasing of undocumented panics
- Ignore linter in existing files outside cli and http (this should
either be resolved gradually over time or in a single PR, regardless
would prefer to not block this PR because of them)
## Relevant issue(s)

Resolves #3169

## Description

This PR freezes the goreleaser version to avoid `latest` changes related
bugs. At the same time we update the `amd64` build paths to what
goreleaser `2.3.2` supports.
## Relevant issue(s)

Resolves #3159

## Description

This PR fixes an issue where replicator params that are not modifiable
were exposed to the client API.

## Tasks

- [x] I made sure the code is well commented, particularly
hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed
accordingly.
- [x] I made sure the pull request title adheres to the conventional
commit style (the subset used in the project can be found in
[tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)).
- [x] I made sure to discuss its limitations such as threats to
validity, vulnerability to mistake and misuse, robustness to
invalidation of assumptions, resource requirements, ...

## How has this been tested?

Existing integration tests.

Specify the platform(s) on which this was tested:
- *(modify the list accordingly*)
- MacOS
## Relevant issue(s)

Resolves #3160

## Description

This PR fixes an issue where aliases on top level aggregates would cause
a panic.

## Tasks

- [x] I made sure the code is well commented, particularly
hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed
accordingly.
- [x] I made sure the pull request title adheres to the conventional
commit style (the subset used in the project can be found in
[tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)).
- [x] I made sure to discuss its limitations such as threats to
validity, vulnerability to mistake and misuse, robustness to
invalidation of assumptions, resource requirements, ...

## How has this been tested?

Added integration tests.

Specify the platform(s) on which this was tested:
- MacOS
## Relevant issue(s)

Resolves #2908

## Description

Assign an identity to the node upon startup.
## Relevant issue(s)

Resolves #3177 

## Description

This PR adds the Authorization header to the CORS list of allowed
headers. This bug what flagged from a partner trying to use
authorization from a browser app.
## Relevant issue(s)

Resolves #3172

## Description

Allows soft-referencing of Cids in tests.

When encountering an unpleasant change-detector problem in
#3173 I realised we had no
need to reference Cids based on index, and we really only ever cared
that they were valid, and either not the same as another cid, or the
same.

This change allows us to soft-reference them without ever really caring
about where they came from. This allows us to give them descriptive ids,
and avoids having to have the test framework from having to fetch them
independently from the DB - something that raises questions over whether
we are testing the test framework or the production code, especially in
the change detector.

The system can be extended to other types fairly easily. 

## How has this been tested?

I had a fairly long play around giving it bad ids in tests to make sure
it would actually fail when appropriate.
✅ This PR was created by combining the following PRs:
#3187 bot: Bump vite from 5.4.9 to 5.4.10 in /playground
#3186 bot: Bump @types/react from 18.3.11 to 18.3.12 in /playground
#3185 bot: Bump eslint-plugin-react-refresh from 0.4.13 to 0.4.14 in
/playground
#3182 bot: Bump github.com/ipfs/boxo from 0.24.0 to 0.24.2
#3181 bot: Bump github.com/zalando/go-keyring from 0.2.5 to 0.2.6
#3184 bot: Bump @typescript-eslint/parser from 8.10.0 to 8.11.0 in
/playground
#3183 bot: Bump @typescript-eslint/eslint-plugin from 8.10.0 to 8.11.0
in /playground
#3180 bot: Bump github.com/lestrrat-go/jwx/v2 from 2.1.1 to 2.1.2

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Fred Carle <[email protected]>
## Relevant issue(s)

Resolves #3191

## Description

Removes various items of indirection from the merkle/crdt and core/crdt
packages that was making the code quite a lot harder to follow than it
need to be.
## Relevant issue(s)

Resolves #3197

## Description

Extracts core/keys.go to multiple files.
✅ This PR was created by combining the following PRs:
#3205 bot: Bump @typescript-eslint/parser from 8.11.0 to 8.12.2 in
/playground
#3204 bot: Bump eslint from 9.13.0 to 9.14.0 in /playground
#3202 bot: Bump github.com/multiformats/go-multiaddr from 0.13.0 to
0.14.0

⚠️ The following PRs were resolved manually due to merge conflicts:
#3203 bot: Bump @typescript-eslint/eslint-plugin from 8.11.0 to 8.12.2
in /playground

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Shahzad Lone <[email protected]>
## Relevant issue(s)

Resolves #3199

## Description

Simplifies merkle/crdt code via a handful of small changes.
## Relevant issue(s)

Resolves #3194

## Description

This PR adds alias targeting in filters. 

**Aggregate targets are not included in this PR as they require more
changes.**

## Tasks

- [x] I made sure the code is well commented, particularly
hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed
accordingly.
- [x] I made sure the pull request title adheres to the conventional
commit style (the subset used in the project can be found in
[tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)).
- [x] I made sure to discuss its limitations such as threats to
validity, vulnerability to mistake and misuse, robustness to
invalidation of assumptions, resource requirements, ...

## How has this been tested?

Added and updated integration tests.

Specify the platform(s) on which this was tested:
- MacOS
## Relevant issue(s)

Resolves #3209

## Description

Simplifies core.Spans a little bit, before removing some old hacky code
allowing a nicer way of handling headstore keys within the
planner/fetcher system.
## Relevant issue(s)

Resolves #2893

This change adds ACP to pubsub KMS.

A new event `MergeComplete` was introduced in order to make it
correspond to `MergeCompleteName`. This is necessary to notify listeners
that the merge was executed on decrypted blocks.

Upon granting access to a document via `AddDocActorRelationship` we
publish not `Update` event so that the actors that being given access to
can now request a document anew.

In testing framework `WaitForSync` is extended to allow specifying
documents that should be received in decrypted state.
## Relevant issue(s)

Resolves #3038

## Description

Adds support for branchable collections.

Does not add support for syncing the collection level commits via the
P2P system (broken out, lots of people working in the space, significant
changes required, I'm not so familiar with that part of the code so will
take longer). This does mean that the somewhat surprising (to me at
least) implementation of `Collection.Merge` is currently untested.

Commits are queriable via the `commits` GQL queries.

Time travel queries do not work due to an existing bug:
#3214 - once that bug is
fixed I expect there to be some more work (definitely testing) in order
to get it to work with branchable collections.

This is a breaking change due to the moving/namespacing of the existing
document headstore keys.
## Relevant issue(s)

Resolves #3233

## Description

Skip test `TestQuerySimpleWithCid` when detecting changes as the change
detector does not support asserting panics.

Note: The CI wont pass until *after* this is merged to develop, so
someone will need to change the requiredness of the job so that this can
merge.
## Relevant issue(s)

Resolves #3196

## Description

This PR adds alias targeting to query orderings.

**Aggregate targets are not included in this PR as they require more
changes.**

## Tasks

- [x] I made sure the code is well commented, particularly
hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed
accordingly.
- [x] I made sure the pull request title adheres to the conventional
commit style (the subset used in the project can be found in
[tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)).
- [x] I made sure to discuss its limitations such as threats to
validity, vulnerability to mistake and misuse, robustness to
invalidation of assumptions, resource requirements, ...

## How has this been tested?

Added integration tests.

Specify the platform(s) on which this was tested:
- MacOS
✅ This PR was created by combining the following PRs:
#3229 bot: Bump github.com/bits-and-blooms/bitset from 1.14.3 to 1.15.0
#3228 bot: Bump go.opentelemetry.io/otel/metric from 1.31.0 to 1.32.0
#3225 bot: Bump @typescript-eslint/parser from 8.12.2 to 8.13.0 in
/playground

⚠️ The following PRs were resolved manually due to merge conflicts:
#3227 bot: Bump go.opentelemetry.io/otel/sdk/metric from 1.31.0 to
1.32.0
#3224 bot: Bump graphiql from 3.7.1 to 3.7.2 in /playground
#3223 bot: Bump swagger-ui-react from 5.17.14 to 5.18.2 in /playground
#3222 bot: Bump @typescript-eslint/eslint-plugin from 8.12.2 to 8.13.0
in /playground
#3221 bot: Bump vite from 5.4.10 to 5.4.11 in /playground

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Shahzad Lone <[email protected]>
## Relevant issue(s)

Resolves #2460

## Description

Using the HTTP endpoint, it was possible to create a collection index,
with each field being either descending or ascending. This was possible
because one of the parameters was a boolean field called "Descending."
However, this functionality was not present in the CLI equivalent.

This feature adds support for creating descending fields.

For example, the following sorts name in ascending order, because
ascension is the default

`defradb client index create -c User --fields name`

The following sorts it in descending order:

`defradb client index create -c User --fields name:DESC`

And the following sorts multiple fields, in different combinations of
descending and ascending order:

`defradb client index create -c User --fields name:ASC,score:DESC`

## Tasks

- [x] I made sure the code is well commented, particularly
hard-to-understand areas.
- [x] I made sure the pull request title adheres to the conventional
commit style

## How has this been tested?

Specify the platform(s) on which this was tested:
- Windows
## Relevant issue(s)

Resolves #3208

## Description

All node-related fields are moved into a separate `nodeState` struct so
now we don't need to maintain all slices and node indexes and it's also
easier to reason about a node's state.
## Relevant issue(s)

Resolves #3240 

## Description

This PR fixes a flaky test where the modification of the cypher text was
supposed to cause it to fail decryption. The modification turned out to
sometime be the same as the actual cypher text.
## Relevant issue(s)

Resolves #3212 

## Description

Handles the syncing of collection commits over P2P.
## Relevant issue(s)

Resolves #3214

## Description

Adds support for cid-only time travel queries.

Also removes some dead code.
## Relevant issue(s)

Resolves #3257

## Description

Add support for branchable collection time-traveling.

Also fixes the docID param which was misbehaving (see commit `Create
document with actual docID not user provided value`).
## Relevant issue(s)

Resolves #3242 

## Description

This PR solves the situation where deleted documents in the immediate
next collection by ID were returned on a full collection query. The
reason for this behaviour was due to the fetcher start method redefining
the spans based on wanting deleted docs or not and was defining an end
key that might have been "prefix-ended" based on a shorter prefix (i.e.
collection instead of instance type). ~~The solution was to always
redefine the end key as the prefix end of the start key.~~

To fix this we removed the concept of spans and replaced it with a list
of prefixes. This results in the fetcher being asked, for example, for
all docs in collection 1 with a prefix of `/data/1` instead of a span
from `/data/1` to `/data/2`. Furthermore, when the fetcher checks if it
need to get deleted docs or non-deleted docs, the resulting prefix
becomes `/data/1/< v or d >` instead of the span from `/data/1/< v or d
>` to `/data/2/< v or d >` (the span is wrong).

The first commit documents the bug with an integration test.
## Relevant issue(s)

Resolves #3236

## Description

Small PR - adds `https://` to the Discord link to prevent GitHub from
interpreting it as an internal repository link.

## Tasks

- [x] I made sure the code is well commented, particularly
hard-to-understand areas.
- [ ] I made sure the repository-held documentation is changed
accordingly.
- [ ] I made sure the pull request title adheres to the conventional
commit style (the subset used in the project can be found in
[tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)).
- [ ] I made sure to discuss its limitations such as threats to
validity, vulnerability to mistake and misuse, robustness to
invalidation of assumptions, resource requirements, ...

## How has this been tested?

(*replace*) Describe the tests performed to verify the changes. Provide
instructions to reproduce them.

Specify the platform(s) on which this was tested:
- *(modify the list accordingly*)
- Arch Linux
- Debian Linux
- MacOS
- Windows

Signed-off-by: Emmanuel Ferdman <[email protected]>
## Relevant issue(s)

Resolves #3264

## Description

Introduces a common interface for JSON values that would allow later to
do better processing of json objects.
ChrisBQu and others added 17 commits November 22, 2024 12:19
## Relevant issue(s)

Resolves #2458

## Description

There was a bug in the Playground's OpenAPI tool. This tool would list
the URL of the endpoints as localhost instead of 127.0.0.1 (which is
what the startup Defradb message shows.) The result was that attempting
to execute one of the queries returned a CORS error.

This was a one-liner fix. I adjusted openapi.go to use
`http://127.0.0.1:9181/api/v0` as a string literal for the URL, instead
of `http://localhost:9181/api/v0`

## Tasks

- [x] I made sure the code is well commented, particularly
hard-to-understand areas.
- [x] I made sure the pull request title adheres to the conventional
commit style (the subset used in the project can be found in nts,

## How has this been tested?

The platform(s) on which this was tested:
- Windows
## Relevant issue(s)

Resolves #3266 

## Description
- Remove the overwriting
- Improve logging
✅ This PR was created by combining the following PRs:
#3272 bot: Bump @typescript-eslint/eslint-plugin from 8.14.0 to 8.15.0
in /playground
#3271 bot: Bump typescript from 5.6.3 to 5.7.2 in /playground
#3261 bot: Bump cosmossdk.io/math from 1.3.0 to 1.4.0
#3251 bot: Bump github.com/ipfs/boxo from 0.24.2 to 0.24.3
#3250 bot: Bump github.com/libp2p/go-libp2p-kad-dht from 0.27.0 to
0.28.1
#3249 bot: Bump golang.org/x/crypto from 0.28.0 to 0.29.0

⚠️ The following PRs were resolved manually due to merge conflicts:
#3270 bot: Bump @typescript-eslint/parser from 8.14.0 to 8.15.0 in
/playground
#3248 bot: Bump eslint from 9.14.0 to 9.15.0 in /playground

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Shahzad Lone <[email protected]>
## Relevant issue(s)
Resolves #3255 

## Description
- Can target all actors using `"*"` to add or delete acp relationships.
- All explicitly added relationships are unaffected upon revocation
using `"*"` (they will keep access).

### For Reviewers
- Commit by commit review should be easier.
- [x] todo: Pushing the crashing gql tests fix once
#3267 is merged

## Tasks

- [x] I made sure the code is well commented, particularly
hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed
accordingly.
- [x] I made sure the pull request title adheres to the conventional
commit style (the subset used in the project can be found in
[tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)).
- [x] I made sure to discuss its limitations such as threats to
validity, vulnerability to mistake and misuse, robustness to
invalidation of assumptions, resource requirements, ...

## How has this been tested?
- Integration tests

Specify the platform(s) on which this was tested:
- Manjaro WSL2
## Relevant issue(s)

Resolves #3269 

## Description

This is a change to update a broken link in the README.
This changes the target URI to point to an extant page in the docs.
FROM:

https://docs.source.network/references/query-specification/query-language-overview
TO:

https://docs.source.network/defradb/references/query-specification/query-language-overview

NO CODE CHANGES

## Tasks

- [NA] I made sure the code is well commented, particularly
hard-to-understand areas.
- [X] I made sure the repository-held documentation is changed
accordingly.
- [X] I made sure the pull request title adheres to the conventional
commit style (the subset used in the project can be found in
[tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)).
- [NA] I made sure to discuss its limitations such as threats to
validity, vulnerability to mistake and misuse, robustness to
invalidation of assumptions, resource requirements, ...

## How has this been tested?

I manually followed the old link and the new link. Old was a broken
link. New is a proposed correct link.

Specify the platform(s) on which this was tested:
- MacOS
✅ This PR was created by combining the following PRs:
#3287 bot: Bump github.com/bits-and-blooms/bitset from 1.15.0 to 1.17.0
#3286 bot: Bump github.com/stretchr/testify from 1.9.0 to 1.10.0
#3285 bot: Bump github.com/lestrrat-go/jwx/v2 from 2.1.2 to 2.1.3
#3284 bot: Bump vite from 5.4.11 to 6.0.2 in /playground
#3283 bot: Bump eslint-plugin-react-refresh from 0.4.14 to 0.4.15 in
/playground
#3282 bot: Bump @vitejs/plugin-react-swc from 3.7.1 to 3.7.2 in
/playground

⚠️ The following PRs were resolved manually due to merge conflicts:
#3281 bot: Bump eslint from 9.15.0 to 9.16.0 in /playground

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Shahzad Lone <[email protected]>
## Relevant issue(s)

Resolves #3239
Resolves #2820

## Description

This PR enables ordering by aggregated fields by using an alias to
target them. This was mostly implemented in a previous PR, so the
changes here are tests to verify that it works.

## Tasks

- [x] I made sure the code is well commented, particularly
hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed
accordingly.
- [x] I made sure the pull request title adheres to the conventional
commit style (the subset used in the project can be found in
[tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)).
- [x] I made sure to discuss its limitations such as threats to
validity, vulnerability to mistake and misuse, robustness to
invalidation of assumptions, resource requirements, ...

## How has this been tested?

Added integration tests.

Specify the platform(s) on which this was tested:
- MacOS
## Relevant issue(s)

Resolves #3195

## Description

This PR enables aggregate alias targeting in filters.

Blocked by #3253

## Tasks

- [x] I made sure the code is well commented, particularly
hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed
accordingly.
- [x] I made sure the pull request title adheres to the conventional
commit style (the subset used in the project can be found in
[tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)).
- [x] I made sure to discuss its limitations such as threats to
validity, vulnerability to mistake and misuse, robustness to
invalidation of assumptions, resource requirements, ...

## How has this been tested?

Added and updated integration tests.

Specify the platform(s) on which this was tested:
- MacOS
## Relevant issue(s)

Resolves #3153

## Description

I have made it so that operationName and variables are supported by HTTP
GET requests. I did this by modifying the `ExecRequest` function inside
`http/handler_store.go` such that `operationName` and `variables`
parameters are extracted if they are present.

I added two new tests to `http/handler_store_test.go` which test this
functionality. See:

`TestExecRequest_WithValidQuery_HttpGet_WithOperationName_OmitsErrors`
and
`TestExecRequest_HttpGet_WithVariables_OmitsErrors`

## Tasks

- [x] I made sure the code is well commented, particularly
hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed
accordingly.
- [x] I made sure the pull request title adheres to the conventional
commit style (the subset used in the project can be found in
[tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)).

## How has this been tested?

The platform(s) on which this was tested:
- Windows
## Relevant issue(s)
Resolves #3276 

## Description
- Fix the bug where a request without an identity still wouldn't be able
to access a document even if there was a "*" relationship

## Tasks
- [x] I made sure the code is well commented, particularly
hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed
accordingly.
- [x] I made sure the pull request title adheres to the conventional
commit style (the subset used in the project can be found in
[tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)).
- [x] I made sure to discuss its limitations such as threats to
validity, vulnerability to mistake and misuse, robustness to
invalidation of assumptions, resource requirements, ...

## How has this been tested?
- Added tests

Specify the platform(s) on which this was tested:
- WSL2 (Manjaro)
✅ This PR was created by combining the following PRs:
#3290 bot: Bump eslint-plugin-react-refresh from 0.4.15 to 0.4.16 in
/playground
#3289 bot: Bump github.com/quic-go/quic-go from 0.48.1 to 0.48.2

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Shahzad Lone <[email protected]>
✅ This PR was created by combining the following PRs:
#3305 bot: Bump eslint-plugin-react-hooks from 5.0.0 to 5.1.0 in
/playground
#3304 bot: Bump vite from 6.0.2 to 6.0.3 in /playground
#3303 bot: Bump @typescript-eslint/parser from 8.16.0 to 8.17.0 in
/playground
#3301 bot: Bump github.com/bits-and-blooms/bitset from 1.17.0 to 1.18.0
#3300 bot: Bump golang.org/x/crypto from 0.29.0 to 0.30.0
#3297 bot: Bump google.golang.org/grpc from 1.67.1 to 1.68.1

⚠️ The following PRs were resolved manually due to merge conflicts:
#3302 bot: Bump @typescript-eslint/eslint-plugin from 8.16.0 to 8.17.0
in /playground

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Shahzad Lone <[email protected]>
## Relevant issue(s)

Resolves #2459

## Description

On the OpenAPI tool of the playground, the Index POST tab contained an
example body that was incorrect. It listed ID as a field which could be
set, which was untrue (this value is automatically generated, and trying
to pass one in throws an error.) To adjust this, I have created a new
description structure called `IndexCreateRequestDescription` which is
meant to be used for this type of HTTP request. To go alongside this
change, a new schema type, `indexCreateRequestSchema` was also created.

## Tasks

- [x] I made sure the code is well commented, particularly
hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed
accordingly.
- [x] I made sure the pull request title adheres to the conventional
commit style (the subset used in the project can be found in
[tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)).


## How has this been tested?

The platform(s) on which this was tested:
- Windows
## Relevant issue(s)

Resolves #3140

## Description

The issue was that if a purge request was made when the database was not
in development mode, it would fail, and an error would be output on the
node side of things. However, on the client side nothing indicated that
the process had failed. Whether the purge was successful, or it failed,
there would be no output.

I have created a new variable in the http package called `IsDevMode`,
which is checked in the `http/handler_extras.go/Purge` function. If dev
mode is enabled then `htttp.StatusOK` is written to the response header.
If it is not enabled, then `http.StatusBadRequest` is written to the
header instead, with a message indicating what happened.

## Tasks

- [x] I made sure the code is well commented, particularly
hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed
accordingly.
- [x] I made sure the pull request title adheres to the conventional
commit style (the subset used in the project can be found in
[tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)).
- [x] I made sure to discuss its limitations such as threats to
validity, vulnerability to mistake and misuse, robustness to
invalidation of assumptions, resource requirements, ...

## How has this been tested?

The platform(s) on which this was tested:
- Windows
✅ This PR was created by combining the following PRs:
#3310 bot: Bump @typescript-eslint/eslint-plugin from 8.17.0 to 8.18.0
in /playground

⚠️ The following PR was resolved manually due to merge conflicts:
#3309 bot: Bump @typescript-eslint/parser from 8.17.0 to 8.18.0 in
/playground

This PR was reverted and removed from this merge:
- #3311 bot: Bump github.com/bits-and-blooms/bitset from 1.18.0 to
1.19.0

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Shahzad Lone <[email protected]>
## Relevant issue(s)

Resolves #3313

## Description

This PR fixes an issue where aggregate filters would only return one
result when the first result did not match.

## Tasks

- [x] I made sure the code is well commented, particularly
hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed
accordingly.
- [x] I made sure the pull request title adheres to the conventional
commit style (the subset used in the project can be found in
[tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)).
- [x] I made sure to discuss its limitations such as threats to
validity, vulnerability to mistake and misuse, robustness to
invalidation of assumptions, resource requirements, ...

## How has this been tested?

Added integration tests.

Specify the platform(s) on which this was tested:
- MacOS
@fredcarle fredcarle added the release Related to release cycle label Dec 13, 2024
@fredcarle fredcarle added this to the DefraDB v0.15 milestone Dec 13, 2024
@fredcarle fredcarle requested a review from a team December 13, 2024 21:35
@fredcarle fredcarle self-assigned this Dec 13, 2024
Copy link
Member

@nasdf nasdf left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

Attention: Patch coverage is 82.84855% with 513 lines in your changes missing coverage. Please review.

Project coverage is 78.10%. Comparing base (47d38a8) to head (fecc50f).
Report is 48 commits behind head on master.

Files with missing lines Patch % Lines
cli/start.go 1.23% 80 Missing ⚠️
internal/keys/datastore_doc.go 76.44% 35 Missing and 6 partials ⚠️
internal/keys/headstore_doc.go 61.29% 22 Missing and 2 partials ⚠️
internal/keys/headstore_collection.go 57.41% 20 Missing and 3 partials ⚠️
internal/db/collection_retriever.go 47.50% 14 Missing and 7 partials ⚠️
acp/identity/raw_identity.go 53.85% 12 Missing ⚠️
internal/db/collection.go 79.25% 10 Missing and 1 partial ⚠️
internal/keys/systemstore_collection_root.go 69.44% 8 Missing and 3 partials ⚠️
http/handler_store.go 81.13% 8 Missing and 2 partials ⚠️
internal/db/db.go 72.22% 7 Missing and 3 partials ⚠️
... and 70 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3320      +/-   ##
==========================================
- Coverage   78.10%   78.10%   -0.00%     
==========================================
  Files         354      382      +28     
  Lines       34660    35448     +788     
==========================================
+ Hits        27071    27685     +614     
- Misses       5972     6126     +154     
- Partials     1617     1637      +20     
Flag Coverage Δ
all-tests 78.10% <82.85%> (-<0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
acp/acp_local.go 98.05% <100.00%> (+0.33%) ⬆️
acp/acp_source_hub.go 73.49% <100.00%> (+2.07%) ⬆️
acp/identity/context.go 100.00% <100.00%> (ø)
acp/identity/generate.go 50.00% <100.00%> (-12.50%) ⬇️
cli/acp_relationship_add.go 100.00% <100.00%> (ø)
cli/acp_relationship_delete.go 100.00% <100.00%> (ø)
cli/cli.go 100.00% <100.00%> (ø)
cli/p2p_info.go 100.00% <100.00%> (ø)
cli/p2p_replicator_delete.go 88.89% <100.00%> (ø)
cli/p2p_replicator_set.go 88.89% <100.00%> (ø)
... and 156 more

... and 12 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 47d38a8...fecc50f. Read the comment docs.

@fredcarle fredcarle merged commit 6da615e into master Dec 13, 2024
43 of 44 checks passed
@fredcarle fredcarle deleted the release/0.15.0 branch December 13, 2024 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release Related to release cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants