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

feat: add property to configure the max allowed size for a request body #986

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

bobeal
Copy link
Member

@bobeal bobeal commented Aug 25, 2023

No description provided.

@bobeal bobeal self-assigned this Aug 25, 2023
@github-actions github-actions bot added the feature New feature or request label Aug 25, 2023
@bobeal bobeal added core Relates to core API temporal Relates to temporal API labels Aug 25, 2023
@github-actions
Copy link
Contributor

Test Results

  51 files  ±0    51 suites  ±0   2m 7s ⏱️ -33s
803 tests ±0  803 ✔️ ±0  0 💤 ±0  0 ±0 
842 runs  ±0  842 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 80a8778. ± Comparison against base commit 3b35cd6.

This pull request removes 83 and adds 14 tests. Note that renamed tests count towards both.

               "2020-03-25T08:33:17.965206Z"
               "urn:ngsi-ld:Beekeeper:1234",
               20,
               25,
            "instanceId":"urn:ngsi-ld:Instance:45678",
            "instanceId":"urn:ngsi-ld:In…
            "observedAt":"2020-03-25T08:33:17.965206Z",
            "sub": "sub"
            "type":"Property",
…
com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [10] attributeAndResultsMap={TemporalEntityAttribute(id=4a265ad4-b702-48d6-9361-081d0ff25a54, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#incoming, attributeType=Property, attributeValueType=STRING, datasetId=null, createdAt=2023-08-25T07:34:54.748828802Z, modifiedAt=null, payload=JsonByteArrayInput{{}})=[SimplifiedAttributeInstanceResult(temporalEntityAttribute=54bfc89a-bf6d-46d8-8403-29ea457732a0, value=Beehive_incoming_123, time=2020-03-25T08:29:17.965206Z), SimplifiedAttributeInstanceRe…, withTemporalValues=true, withAudit=false, expectation={
  "id" : "urn:ngsi-ld:BeeHive:TESTC",
  "type" : "BeeHive",
  "incoming" : {
    "type" : "Property",
    "values" : [ ["Beehive_incoming_123","2020-03-25T08:29:17.965206Z"], ["Beehive_incoming_124","2020-03-25T08:33:17.965206Z"] ]
  }
}

com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [11] attributeAndResultsMap={TemporalEntityAttribute(id=92b87008-6845-46a2-95bd-56eb0599ea75, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#incoming, attributeType=Relationship, attributeValueType=STRING, datasetId=urn:ngsi-ld:Dataset:45678, createdAt=2023-08-25T07:34:54.748828802Z, modifiedAt=null, payload=JsonByteArrayInput{{}})=[SimplifiedAttributeInstanceResult(temporalEntityAttribute=09f6f171-93a3-4774-af67-389e489fcf49, value=urn:ngsi-ld:Entity:1234, time=2020-03-25T08:29:17.965206Z), S…, withTemporalValues=true, withAudit=false, expectation={
  "id" : "urn:ngsi-ld:BeeHive:TESTC",
  "type" : "BeeHive",
  "incoming" : {
    "type" : "Relationship",
    "datasetId" : "urn:ngsi-ld:Dataset:45678",
    "objects" : [ ["urn:ngsi-ld:Entity:1234","2020-03-25T08:29:17.965206Z"], ["urn:ngsi-ld:Entity:5678","2020-03-25T08:33:17.965206Z"] ]
  }
}

com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [1] attributeAndResultsMap={TemporalEntityAttribute(id=3e435287-b1b2-48d9-a291-e0be54eb54be, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#incoming, attributeType=Property, attributeValueType=NUMBER, datasetId=null, createdAt=2023-08-25T07:34:54.748828802Z, modifiedAt=null, payload=JsonByteArrayInput{{}})=[FullAttributeInstanceResult(temporalEntityAttribute=ca6c78cd-a545-4b48-b229-5f117606d0d4, payload={"type":"Property","instanceId":"urn:ngsi-ld:Instance:45678","observedAt":"2020-03-25T08:2…, withTemporalValues=false, withAudit=false, expectation={
  "id" : "urn:ngsi-ld:BeeHive:TESTC",
  "type" : "BeeHive",
  "incoming" : [ {
    "type" : "Property",
    "value" : 550.0,
    "instanceId" : "urn:ngsi-ld:Instance:45678",
    "observedAt" : "2020-03-25T08:29:17.965206Z"
  }, {
    "type" : "Property",
    "value" : 650.0,
    "instanceId" : "urn:ngsi-ld:Instance:45679",
    "observedAt" : "2020-03-25T08:33:17.965206Z"
  } ]
}

com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [1] queryResult=[(EntityPayload(entityId=urn:ngsi-ld:BeeHive:TESTC, types=[https://ontology.eglobalmark.com/apic#BeeHive], createdAt=2023-08-25T07:34:54.679984716Z, modifiedAt=null, contexts=[https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/master/apic/jsonld-contexts/apic-compound.jsonld], payload=JsonByteArrayInput{{}}, specificAccessPolicy=null), {TemporalEntityAttribute(id=1a4e97a9-e6f6-4c56-967c-191e9d7cca31, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com…, withTemporalValues=false, withAudit=true, expectation=[
   {
      "id":"urn:ngsi-ld:BeeHive:TESTC",
      "type":"BeeHive",
      "incoming":[
         {
            "type":"Property",
            "value":20,
            "instanceId":"urn:ngsi-ld:Instance:45678",
            "observedAt":"2020-03-25T08:33:17.965206Z",
            "sub": "sub"
         }
      ]
   },
   {
      "id":"urn:ngsi-ld:BeeHive:TESTD",
      "type":"BeeHive",
      "outgoing":[
         {
            "type":"Property",
            "value":25,
            "instanceId":"urn:ngsi-ld:In…
com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [2] attributeAndResultsMap={TemporalEntityAttribute(id=ab6314ce-cf20-4325-b701-c9a0ff277f1c, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#incoming, attributeType=Relationship, attributeValueType=STRING, datasetId=null, createdAt=2023-08-25T07:34:54.748828802Z, modifiedAt=null, payload=JsonByteArrayInput{{}})=[FullAttributeInstanceResult(temporalEntityAttribute=f6a2509a-9184-46ee-aec3-3825bb056197, payload={"type":"Relationship","instanceId":"urn:ngsi-ld:Instance:45678","observedAt":"2020-03…, withTemporalValues=false, withAudit=false, expectation={
  "id" : "urn:ngsi-ld:BeeHive:TESTC",
  "type" : "BeeHive",
  "incoming" : [ {
    "type" : "Relationship",
    "object" : "urn:ngsi-ld:Entity:1234",
    "instanceId" : "urn:ngsi-ld:Instance:45678",
    "observedAt" : "2020-03-25T08:29:17.965206Z"
  }, {
    "type" : "Relationship",
    "object" : "urn:ngsi-ld:Entity:5678",
    "instanceId" : "urn:ngsi-ld:Instance:45679",
    "observedAt" : "2020-03-25T08:33:17.965206Z"
  } ]
}

com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [2] queryResult=[(EntityPayload(entityId=urn:ngsi-ld:BeeHive:TESTC, types=[https://ontology.eglobalmark.com/apic#BeeHive], createdAt=2023-08-25T07:34:54.679984716Z, modifiedAt=null, contexts=[https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/master/apic/jsonld-contexts/apic-compound.jsonld], payload=JsonByteArrayInput{{}}, specificAccessPolicy=null), {TemporalEntityAttribute(id=aa544697-9a2a-4cee-a2d4-d3e2cc1e3a4a, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com…, withTemporalValues=true, withAudit=false, expectation=[
   {
      "id":"urn:ngsi-ld:BeeHive:TESTC",
      "type":"BeeHive",
      "incoming": {
         "type":"Property",
         "values":[
            [
               20,
               "2020-03-25T08:33:17.965206Z"
            ]
         ]
      }
   },
   {
      "id":"urn:ngsi-ld:BeeHive:TESTD",
      "type":"BeeHive",
      "outgoing": {
         "type":"Property",
         "values":[
            [
               25,
               "2020-03-25T08:33:17.965206Z"
            ]
         ]
      }
   }
]

com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [3] attributeAndResultsMap={TemporalEntityAttribute(id=8a2d8105-4398-4507-8862-fa9a5f7dc8ca, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#incoming, attributeType=Property, attributeValueType=NUMBER, datasetId=urn:ngsi-ld:Dataset:01234, createdAt=2023-08-25T07:34:54.748828802Z, modifiedAt=null, payload=JsonByteArrayInput{{}})=[FullAttributeInstanceResult(temporalEntityAttribute=bd1bbbff-339f-4ede-8632-c1a9cc586657, payload={"type":"Property","datasetId":"urn:ngsi-ld:Dataset:01234","instanceI…, withTemporalValues=false, withAudit=false, expectation={
  "id" : "urn:ngsi-ld:BeeHive:TESTC",
  "type" : "BeeHive",
  "incoming" : [ {
    "type" : "Property",
    "datasetId" : "urn:ngsi-ld:Dataset:01234",
    "value" : 550.0,
    "instanceId" : "urn:ngsi-ld:Instance:01234",
    "observedAt" : "2020-03-25T08:29:17.965206Z"
  }, {
    "type" : "Property",
    "datasetId" : "urn:ngsi-ld:Dataset:01234",
    "value" : 650.0,
    "instanceId" : "urn:ngsi-ld:Instance:01235",
    "observedAt" : "2020-03-25T08:33:17.965206Z"
  }, {
    "type" : "Property",
    "data…
com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [3] queryResult=[(EntityPayload(entityId=urn:ngsi-ld:BeeHive:TESTC, types=[https://ontology.eglobalmark.com/apic#BeeHive], createdAt=2023-08-25T07:34:54.679984716Z, modifiedAt=null, contexts=[https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/master/apic/jsonld-contexts/apic-compound.jsonld], payload=JsonByteArrayInput{{}}, specificAccessPolicy=null), {TemporalEntityAttribute(id=2a38fd67-ca91-4314-bdeb-60fb73657a6d, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com…, withTemporalValues=true, withAudit=false, expectation=[
   {
      "id":"urn:ngsi-ld:BeeHive:TESTC",
      "type":"BeeHive",
      "incoming": {
         "type":"Property",
         "values":[
            [
               20,
               "2020-03-25T08:33:17.965206Z"
            ]
         ]
      },
      "managedBy": {
         "type": "Relationship",
         "objects": [
            [
               "urn:ngsi-ld:Beekeeper:1234",
               "2020-03-25T08:33:17.965206Z"
            ]
         ]
      }
   },
   {
      "id":"urn:ngsi-ld:BeeHive:TEST…
com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [4] attributeAndResultsMap={TemporalEntityAttribute(id=80bb3d45-d98c-4c80-ba57-16c262dfb3df, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#incoming, attributeType=Property, attributeValueType=STRING, datasetId=urn:ngsi-ld:Dataset:45678, createdAt=2023-08-25T07:34:54.748828802Z, modifiedAt=null, payload=JsonByteArrayInput{{}})=[FullAttributeInstanceResult(temporalEntityAttribute=0aabdd9d-f4f9-41d6-b23c-94f4dd6b7099, payload={"type":"Property","datasetId":"urn:ngsi-ld:Dataset:45678","instanceI…, withTemporalValues=false, withAudit=false, expectation={
  "id" : "urn:ngsi-ld:BeeHive:TESTC",
  "type" : "BeeHive",
  "incoming" : [ {
    "type" : "Property",
    "datasetId" : "urn:ngsi-ld:Dataset:45678",
    "value" : "Beehive_incoming_123",
    "instanceId" : "urn:ngsi-ld:Instance:45678",
    "observedAt" : "2020-03-25T08:29:17.965206Z"
  }, {
    "type" : "Property",
    "datasetId" : "urn:ngsi-ld:Dataset:45678",
    "value" : "Beehive_incoming_124",
    "instanceId" : "urn:ngsi-ld:Instance:45679",
    "observedAt" : "2020-03-25T08:33:17.965206Z"
  } ]
}

com.egm.stellio.search.service.TemporalEntityBuilderTests ‑ [5] attributeAndResultsMap={TemporalEntityAttribute(id=c7f0b25b-7411-499a-95e0-b0741cb52161, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#incoming, attributeType=Property, attributeValueType=STRING, datasetId=urn:ngsi-ld:Dataset:45678, createdAt=2023-08-25T07:34:54.748828802Z, modifiedAt=null, payload=JsonByteArrayInput{{}})=[FullAttributeInstanceResult(temporalEntityAttribute=8c3ca8be-e959-458d-ac12-61ad0e6e78fd, payload={"type":"Property","datasetId":"urn:ngsi-ld:Dataset:45678","instanceI…, withTemporalValues=false, withAudit=true, expectation={
  "id" : "urn:ngsi-ld:BeeHive:TESTC",
  "type" : "BeeHive",
  "incoming" : [ {
    "type" : "Property",
    "datasetId" : "urn:ngsi-ld:Dataset:45678",
    "value" : "Beehive_incoming_123",
    "instanceId" : "urn:ngsi-ld:Instance:45678",
    "observedAt" : "2020-03-25T08:29:17.965206Z",
    "sub": "sub1"
  }, {
    "type" : "Property",
    "datasetId" : "urn:ngsi-ld:Dataset:45678",
    "value" : "Beehive_incoming_124",
    "instanceId" : "urn:ngsi-ld:Instance:45679",
    "observedAt" : "2020-03-25T08:33:…
…

@sonarcloud
Copy link

sonarcloud bot commented Aug 25, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@bobeal bobeal merged commit baf1d61 into develop Aug 25, 2023
11 checks passed
@bobeal bobeal deleted the feature/configure-body-max-size branch August 25, 2023 07:41
@github-actions github-actions bot locked and limited conversation to collaborators Aug 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
core Relates to core API feature New feature or request temporal Relates to temporal API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant