Skip to content

Bug: Different capacity numbers #71

@peterdudfield

Description

@peterdudfield

make doctor output

(Im not sure what this is)

Verification

  • I have searched the existing issues to ensure this bug has not already been reported.
  • I have run make init locally.
  • I have been able to reproduce this bug locally.

What were you trying to do (and why)?

  • I did not make init as working with PVLive consumer

Update the capacity for a gsp location.

Python logs save this

grpclib.exceptions.GRPCError: (<Status.INVALID_ARGUMENT: 3>, 'Invalid location source. Ensure metadata is NULL or a non-empty JSON object.', None)
You might want to install geopandas

Serve logs say this

�[2Kdata-platform  | 
{
    "level": "error",
    "grpc.method": "/ocf.dp.DataPlatformDataService/UpdateLocationCapacity",
    "error": "ERROR: duplicate key value violates unique constraint \"sources_history_pkey\" (SQLSTATE 23505)",
    "time": "2025-11-13T17:25:31Z",
    "message": "querier.CreateSourceEntry({GeometryUuid:019a7231-3570-7568-b1d8-00af5edefc7d SourceTypeID:1 Capacity:1429 CapacityUnitPrefixFactor:3 CapacityLimitSip:<nil> ValidFromUtc:{Time:2025-11-13 17:00:00 +0000 UTC InfinityModifier:finite Valid:true} Metadata:[123 34 103 115 112 95 105 100 34 58 32 51 52 50 125]})"

What happened (including relevant commands, logs etc)?

Tried to update the capacity of location, but cants

What did you expect to happen?

No updated capacity was needed

Step-by-step reproduction instructions (optional).

  1. Update the capacity to 1398373
  2. Read the new capacity as 1398000. This is what it is saved as in the database
  3. Then next time PVLive consumer runs, it tried to update the capacity again, it cant due to unqieu primary keys.

Note if we run 3. after 30 mins it is ok.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions