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

fix(temporal): prefix timescale functions (when called from non default tenant) #1122

Merged
merged 1 commit into from
Mar 29, 2024

Conversation

bobeal
Copy link
Member

@bobeal bobeal commented Mar 29, 2024

No description provided.

@bobeal bobeal added fix Something isn't working temporal Relates to temporal API labels Mar 29, 2024
@bobeal bobeal self-assigned this Mar 29, 2024
@bobeal bobeal changed the title fix: prefix timescale functions (when called from non default tenant) fix(temporal): prefix timescale functions (when called from non default tenant) Mar 29, 2024
Copy link
Contributor

Test Results

 56 files  ±0   56 suites  ±0   1m 19s ⏱️ -3s
928 tests ±0  928 ✅ ±0  0 💤 ±0  0 ❌ ±0 
967 runs  ±0  967 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 69fb9d1. ± Comparison against base commit 89ecf75.

This pull request removes 103 and adds 17 tests. Note that renamed tests count towards both.
                         …, withTemporalValues=true, withAudit=false, expectation={
                      "@type": "@json",
                    "@value": "/A/B"
                    "@value": "/C/D"
                    "@value": 20
                    "…
                    {
                  "@type": "https://uri.etsi.org/ngsi-ld/DateTime",
                  "@value": "2020-03-25T08:29:17.965206Z"
                  "@value": "2020-03-25T08:33:17.965206Z"
…
com.egm.stellio.search.util.TemporalEntityBuilderTests ‑ [10] scopeHistory=[], attributeAndResultsMap={TemporalEntityAttribute(id=bf122e9a-0c1a-427d-a010-338351cfc858, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#incoming, attributeType=Property, attributeValueType=STRING, datasetId=null, createdAt=2024-03-29T12:39:51.058260943Z, modifiedAt=null, payload=JsonByteArrayInput{{}})=[SimplifiedAttributeInstanceResult(temporalEntityAttribute=c23aa91d-05ed-47d4-a719-3c8495e0b6b5, value=Beehive_incoming_123, time=2020-03-25T08:29:17.965206Z), SimplifiedAttributeInstanceRe…, withTemporalValues=true, withAudit=false, expectation={
  "@id": "urn:ngsi-ld:BeeHive:TESTC",
  "@type": [
    "https://ontology.eglobalmark.com/apic#BeeHive"
  ],
  "https://ontology.eglobalmark.com/apic#incoming": [
    {
      "@type": [
        "https://uri.etsi.org/ngsi-ld/Property"
      ],
      "https://uri.etsi.org/ngsi-ld/hasValues": [
        {
          "@list": [
            {
              "@list": [
                {
                  "@value": "Beehive_incoming_123"
                },
                {
                  "@value": "2020-03-25T0…
com.egm.stellio.search.util.TemporalEntityBuilderTests ‑ [11] scopeHistory=[], attributeAndResultsMap={TemporalEntityAttribute(id=1448de25-e41f-45ff-9556-d6357b3fbbe1, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#incoming, attributeType=Relationship, attributeValueType=STRING, datasetId=urn:ngsi-ld:Dataset:45678, createdAt=2024-03-29T12:39:51.058260943Z, modifiedAt=null, payload=JsonByteArrayInput{{}})=[SimplifiedAttributeInstanceResult(temporalEntityAttribute=33e3d853-80f7-42b2-938b-9c5fff5a0097, 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": [
    "https://ontology.eglobalmark.com/apic#BeeHive"
  ],
  "https://ontology.eglobalmark.com/apic#incoming": [
    {
      "@type": [
        "https://uri.etsi.org/ngsi-ld/Relationship"
      ],
      "https://uri.etsi.org/ngsi-ld/datasetId": [
        {
          "@id": "urn:ngsi-ld:Dataset:45678"
        }
      ],
      "https://uri.etsi.org/ngsi-ld/hasObjects": [
        {
          "@list": [
            {
              "@list": [
                {
…
com.egm.stellio.search.util.TemporalEntityBuilderTests ‑ [12] scopeHistory=[SimplifiedScopeInstanceResult(entityId=urn:ngsi-ld:BeeHive:TESTC, scopes=[/A/B, /C/D], time=2020-03-25T08:29:17.965206Z), SimplifiedScopeInstanceResult(entityId=urn:ngsi-ld:BeeHive:TESTC, scopes=[/C/D], time=2020-03-25T09:29:17.965206Z)], attributeAndResultsMap={}, withTemporalValues=true, withAudit=false, expectation={
  "@id": "urn:ngsi-ld:BeeHive:TESTC",
  "@type": [
    "https://ontology.eglobalmark.com/apic#BeeHive"
  ],
  "https://uri.etsi.org/ngsi-ld/scope": {
    "@type": [
      "https://uri.etsi.org/ngsi-ld/Property"
    ],
    "https://uri.etsi.org/ngsi-ld/hasValues": [
      {
        "@list": [
          {
            "@list": [
              {
                "@list": [
                  {
                    "@value": "/A/B"
                  },
                  {
                    "@value": "/C/D"
   …
com.egm.stellio.search.util.TemporalEntityBuilderTests ‑ [13] scopeHistory=[FullScopeInstanceResult(entityId=urn:ngsi-ld:BeeHive:TESTC, scopes=[/A/B, /C/D], time=2020-03-25T08:29:17.965206Z, timeproperty=modifiedAt, sub=null), FullScopeInstanceResult(entityId=urn:ngsi-ld:BeeHive:TESTC, scopes=[/C/D], time=2020-03-25T09:29:17.965206Z, timeproperty=modifiedAt, sub=null)], attributeAndResultsMap={}, withTemporalValues=false, withAudit=false, expectation={
  "@id": "urn:ngsi-ld:BeeHive:TESTC",
  "@type": [
    "https://ontology.eglobalmark.com/apic#BeeHive"
  ],
  "https://uri.etsi.org/ngsi-ld/scope": [
    {
      "@type": [
        "https://uri.etsi.org/ngsi-ld/Property"
      ],
      "https://uri.etsi.org/ngsi-ld/hasValue": [
        {
          "@value": "/A/B"
        },
        {
          "@value": "/C/D"
        }
      ],
      "https://uri.etsi.org/ngsi-ld/modifiedAt": [
        {
          "@type": "https://uri.etsi.org/ngsi-ld/DateTime",
     …
com.egm.stellio.search.util.TemporalEntityBuilderTests ‑ [14] scopeHistory=[], attributeAndResultsMap={TemporalEntityAttribute(id=c987d33b-4dd8-44fd-be8c-e30e1c51f89b, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#luminosity, attributeType=JsonProperty, attributeValueType=JSON, datasetId=null, createdAt=2024-03-29T12:39:51.058260943Z, modifiedAt=null, payload=JsonByteArrayInput{{ "id": "123", "stringValue": "value", "nullValue": null }})=[SimplifiedAttributeInstanceResult(temporalEntityAttribute=ff47a3d2-99e6-4ff1-9b4d-d233e03f393a, value=
                         …, withTemporalValues=true, withAudit=false, expectation={
  "@id": "urn:ngsi-ld:BeeHive:TESTC",
  "@type": [
    "https://ontology.eglobalmark.com/apic#BeeHive"
  ],
  "https://ontology.eglobalmark.com/apic#luminosity": [
    {
      "@type": [
        "https://uri.etsi.org/ngsi-ld/JsonProperty"
      ],
      "https://uri.etsi.org/ngsi-ld/jsons": [
        {
          "@list": [
            {
              "@list": [
                {
                  "https://uri.etsi.org/ngsi-ld/hasJSON": [
                    {
                      "@type": "@json",
     …
com.egm.stellio.search.util.TemporalEntityBuilderTests ‑ [1] entityTemporalResults=[EntityTemporalResult(entityPayload=EntityPayload(entityId=urn:ngsi-ld:BeeHive:TESTC, types=[https://ontology.eglobalmark.com/apic#BeeHive], scopes=null, createdAt=2024-03-29T12:39:51.047673776Z, modifiedAt=null, payload=JsonByteArrayInput{{}}, specificAccessPolicy=null), scopeHistory=[], teaInstancesResult={TemporalEntityAttribute(id=379f3ee4-6b0c-4fe6-8255-9ccdaa7bc5b1, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#incoming, attributeType=Property, attributeValue…, withTemporalValues=false, withAudit=true, expectation=[
   {
      "@id": "urn:ngsi-ld:BeeHive:TESTC",
      "@type": [
         "https://ontology.eglobalmark.com/apic#BeeHive"
      ],
      "https://ontology.eglobalmark.com/apic#incoming": [
         {
            "@type": [
               "https://uri.etsi.org/ngsi-ld/Property"
            ],
            "https://uri.etsi.org/ngsi-ld/observedAt": [
               {
                  "@type": "https://uri.etsi.org/ngsi-ld/DateTime",
                  "@value": "2020-03-25T08:33:17.965206Z"
               }
…
com.egm.stellio.search.util.TemporalEntityBuilderTests ‑ [1] scopeHistory=[], attributeAndResultsMap={TemporalEntityAttribute(id=10fefbc8-6fd7-43f5-bc14-752db0ab5753, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#incoming, attributeType=Property, attributeValueType=NUMBER, datasetId=null, createdAt=2024-03-29T12:39:51.058260943Z, modifiedAt=null, payload=JsonByteArrayInput{{}})=[FullAttributeInstanceResult(temporalEntityAttribute=a4e01a9e-327f-4a57-88d8-c28c50273959, payload={"@type":["https://uri.etsi.org/ngsi-ld/Property"],"https://uri.etsi.org/ngsi-ld/observedA…, withTemporalValues=false, withAudit=false, expectation={
  "@id": "urn:ngsi-ld:BeeHive:TESTC",
  "@type": [
    "https://ontology.eglobalmark.com/apic#BeeHive"
  ],
  "https://ontology.eglobalmark.com/apic#incoming": [
    {
      "@type": [
        "https://uri.etsi.org/ngsi-ld/Property"
      ],
      "https://uri.etsi.org/ngsi-ld/observedAt": [
        {
          "@type": "https://uri.etsi.org/ngsi-ld/DateTime",
          "@value": "2020-03-25T08:29:17.965206Z"
        }
      ],
      "https://uri.etsi.org/ngsi-ld/instanceId": [
        {
          "@id":…
com.egm.stellio.search.util.TemporalEntityBuilderTests ‑ [2] entityTemporalResults=[EntityTemporalResult(entityPayload=EntityPayload(entityId=urn:ngsi-ld:BeeHive:TESTC, types=[https://ontology.eglobalmark.com/apic#BeeHive], scopes=null, createdAt=2024-03-29T12:39:51.047673776Z, modifiedAt=null, payload=JsonByteArrayInput{{}}, specificAccessPolicy=null), scopeHistory=[], teaInstancesResult={TemporalEntityAttribute(id=69044167-daab-41f1-be39-ae4682d93a38, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#incoming, attributeType=Property, attributeValue…, withTemporalValues=true, withAudit=false, expectation=[
  {
    "@id": "urn:ngsi-ld:BeeHive:TESTC",
    "@type": [
      "https://ontology.eglobalmark.com/apic#BeeHive"
    ],
    "https://ontology.eglobalmark.com/apic#incoming": [
      {
        "@type": [
          "https://uri.etsi.org/ngsi-ld/Property"
        ],
        "https://uri.etsi.org/ngsi-ld/hasValues": [
          {
            "@list": [
              {
                "@list": [
                  {
                    "@value": 20
                  },
                  {
                    "…
com.egm.stellio.search.util.TemporalEntityBuilderTests ‑ [2] scopeHistory=[], attributeAndResultsMap={TemporalEntityAttribute(id=64cd53df-7f75-407c-ae51-5d9ac47fdee8, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#incoming, attributeType=Relationship, attributeValueType=STRING, datasetId=null, createdAt=2024-03-29T12:39:51.058260943Z, modifiedAt=null, payload=JsonByteArrayInput{{}})=[FullAttributeInstanceResult(temporalEntityAttribute=4da65c31-cb2c-4f38-829e-b93effe33bb0, payload={"@type":["https://uri.etsi.org/ngsi-ld/Relationship"],"https://uri.etsi.org/ngsi-ld/o…, withTemporalValues=false, withAudit=false, expectation={
  "@id": "urn:ngsi-ld:BeeHive:TESTC",
  "@type": [
    "https://ontology.eglobalmark.com/apic#BeeHive"
  ],
  "https://ontology.eglobalmark.com/apic#incoming": [
    {
      "@type": [
        "https://uri.etsi.org/ngsi-ld/Relationship"
      ],
      "https://uri.etsi.org/ngsi-ld/observedAt": [
        {
          "@type": "https://uri.etsi.org/ngsi-ld/DateTime",
          "@value": "2020-03-25T08:29:17.965206Z"
        }
      ],
      "https://uri.etsi.org/ngsi-ld/instanceId": [
        {
          "@…
com.egm.stellio.search.util.TemporalEntityBuilderTests ‑ [3] entityTemporalResults=[EntityTemporalResult(entityPayload=EntityPayload(entityId=urn:ngsi-ld:BeeHive:TESTC, types=[https://ontology.eglobalmark.com/apic#BeeHive], scopes=null, createdAt=2024-03-29T12:39:51.047673776Z, modifiedAt=null, payload=JsonByteArrayInput{{}}, specificAccessPolicy=null), scopeHistory=[], teaInstancesResult={TemporalEntityAttribute(id=27022e19-0c81-4fcc-ae01-aadfbd693810, entityId=urn:ngsi-ld:BeeHive:TESTC, attributeName=https://ontology.eglobalmark.com/apic#incoming, attributeType=Property, attributeValue…, withTemporalValues=true, withAudit=false, expectation=[
  {
    "@id": "urn:ngsi-ld:BeeHive:TESTC",
    "@type": [
      "https://ontology.eglobalmark.com/apic#BeeHive"
    ],
    "https://ontology.eglobalmark.com/apic#incoming": [
      {
        "@type": [
          "https://uri.etsi.org/ngsi-ld/Property"
        ],
        "https://uri.etsi.org/ngsi-ld/hasValues": [
          {
            "@list": [
              {
                "@list": [
                  {
                    "@value": 20
                  },
                  {
                    "…
…

Copy link

@bobeal bobeal merged commit 2a02a7c into develop Mar 29, 2024
11 checks passed
@bobeal bobeal deleted the fix/prefix-timescale-functions-for-tenants branch March 29, 2024 12:45
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fix Something isn't working temporal Relates to temporal API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant