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

Remove net461 target from internal packages #128

Merged

Conversation

Xtansia
Copy link
Collaborator

@Xtansia Xtansia commented Dec 21, 2022

Description

Remove the net461 target from internal packages and update a couple dependencies which have CVEs. The client itself does not depend on these and is unaffected by the CVEs.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Any downsides to this?

@Xtansia
Copy link
Collaborator Author

Xtansia commented Jan 3, 2023

Any downsides to this?

@dblock As these are purely internal packages and unpublished, so this doesn't break any published API, and net461 target on these packages was unused internally.

The main driving factor here is being able to keep dependencies up to date #125

@Xtansia Xtansia merged commit e76fc2e into opensearch-project:main Jan 4, 2023
@Xtansia Xtansia deleted the fix/remove-net461-internal-pkg branch January 4, 2023 00:04
davidalpert added a commit to davidalpert/opensearch-net that referenced this pull request Jul 17, 2023
Further investigation shows that a TermQuery with an empty
string value is expected to be 'conditionless' in this
codebase and the TermQuery implementation includes a
.Verbatim() method to allow the client to serialize
the query clause even though it evaluates to
conditionless

this allows me to create a query like this

    GET /index/_search
    {
      "query": {
        "bool": {
          "must": [
            {"exists": { "field": "last_name"}}
          ],
          "must_not": [
            {"term": {"last_name.keyword": {"value": ""}}}
          ]
        }
      }
    }

using the following syntax

    client.Search<SampleDomainObject>(s => s
      .Query(q => q
        .Bool(b => b
          .Must(m => m.Exists(e => e.Field("last_name")))
          .MustNot(m => m.Term(t => t.Verbatim().Field("last_name.keyword").Value(string.Empty)))
        )
      )
      .Index("index")
      .Source(sfd => null)
    );

thus resolving that opensearch-projectGH-281 is not a bug and is working as designed.

Signed-off-by: David Alpert <david@spinthemoose.com>
davidalpert added a commit to davidalpert/opensearch-net that referenced this pull request Jul 17, 2023
Further investigation shows that a TermQuery with an empty
string value is expected to be 'conditionless' in this
codebase and the TermQuery implementation includes a
.Verbatim() method to allow the client to serialize
the query clause even though it evaluates to
conditionless

this allows me to create a query like this

    GET /index/_search
    {
      "query": {
        "bool": {
          "must": [
            {"exists": { "field": "last_name"}}
          ],
          "must_not": [
            {"term": {"last_name.keyword": {"value": ""}}}
          ]
        }
      }
    }

using the following syntax

    client.Search<SampleDomainObject>(s => s
      .Query(q => q
        .Bool(b => b
          .Must(m => m.Exists(e => e.Field("last_name")))
          .MustNot(m => m.Term(t => t.Verbatim().Field("last_name.keyword").Value(string.Empty)))
        )
      )
      .Index("index")
      .Source(sfd => null)
    );

thus resolving that opensearch-projectGH-281 is not a bug and is working as designed.

Signed-off-by: David Alpert <david@spinthemoose.com>
davidalpert added a commit to davidalpert/opensearch-net that referenced this pull request Jul 20, 2023
Further investigation shows that a TermQuery with an empty
string value is expected to be 'conditionless' in this
codebase and the TermQuery implementation includes a
.Verbatim() method to allow the client to serialize
the query clause even though it evaluates to
conditionless

this allows me to create a query like this

    GET /index/_search
    {
      "query": {
        "bool": {
          "must": [
            {"exists": { "field": "last_name"}}
          ],
          "must_not": [
            {"term": {"last_name.keyword": {"value": ""}}}
          ]
        }
      }
    }

using the following syntax

    client.Search<SampleDomainObject>(s => s
      .Query(q => q
        .Bool(b => b
          .Must(m => m.Exists(e => e.Field("last_name")))
          .MustNot(m => m.Term(t => t.Verbatim().Field("last_name.keyword").Value(string.Empty)))
        )
      )
      .Index("index")
      .Source(sfd => null)
    );

thus resolving that opensearch-projectGH-281 is not a bug and is working as designed.

Signed-off-by: David Alpert <david@spinthemoose.com>
Xtansia pushed a commit that referenced this pull request Aug 14, 2023
… ignored as "conditionless" (#283)

* test: reproduce GH-281 TermQuery with Value of empty string serializes as <null>

Signed-off-by: David Alpert <david@spinthemoose.com>

* test: demonstrate GH-128 is a feature, not a bug

Further investigation shows that a TermQuery with an empty
string value is expected to be 'conditionless' in this
codebase and the TermQuery implementation includes a
.Verbatim() method to allow the client to serialize
the query clause even though it evaluates to
conditionless

this allows me to create a query like this

    GET /index/_search
    {
      "query": {
        "bool": {
          "must": [
            {"exists": { "field": "last_name"}}
          ],
          "must_not": [
            {"term": {"last_name.keyword": {"value": ""}}}
          ]
        }
      }
    }

using the following syntax

    client.Search<SampleDomainObject>(s => s
      .Query(q => q
        .Bool(b => b
          .Must(m => m.Exists(e => e.Field("last_name")))
          .MustNot(m => m.Term(t => t.Verbatim().Field("last_name.keyword").Value(string.Empty)))
        )
      )
      .Index("index")
      .Source(sfd => null)
    );

thus resolving that GH-281 is not a bug and is working as designed.

Signed-off-by: David Alpert <david@spinthemoose.com>

* refactor: address PR feedback

GH-281

Signed-off-by: David Alpert <david@spinthemoose.com>

* docs: update USAGE.md with an example of IsVerbatim/Verbatim()

GH-281

Signed-off-by: David Alpert <david@spinthemoose.com>

---------

Signed-off-by: David Alpert <david@spinthemoose.com>
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.

3 participants