Skip to content

package sync - KeyError: 'should_upload' #509

Closed

Description

Activity

  1. self-assigned this
    on Nov 9, 2022
  2. changed the title [-]⚠️ CI failed ⚠️[/-] [+]package sync - KeyError: 'should_upload'[/+] on Nov 9, 2022
  3. ntabris commented on Nov 9, 2022

    @ntabris
    Member

    still investigating, I think the endpoint is returning 500's because there are multiple matching records

  4. ntabris commented on Nov 9, 2022

    @ntabris
    Member

    two records with same keys:

    5147 distributed-2022.10.2+26.g97178d64-py3-none-any.whl 5512d565b3bd9ee0f8a6f4c6b1e819ff software-environments/dask-engineering/distributed-2022.10.2+26.g97178d64-py3-none-any.whl

    deleted on manually, remaining record is https://cloud.coiled.io/admin/declarative/packagefilemodel/680/change/

    I suspect it's a race condition on get_or_create, supposedly this is atomic if your DB/model is configured correctly but I wouldn't be surprised if ours isn't.

  5. ntabris commented on Nov 9, 2022

    @ntabris
    Member

    query I used:

    select * from (
    select account_id, file_name, md5, object_key, count(*) n_records
    from declarative_packagefilemodel
    group by account_id, file_name, md5, object_key
    ) a
    where n_records > 1
  6. ntabris commented on Nov 9, 2022

    @ntabris
    Member

    re-ran tests and they're passing now so should be good for now, I've opened issue on platform side to fix race condition that caused this

  7. jrbourbeau commented on Nov 9, 2022

    @jrbourbeau
    Contributor

    Thanks for handling this @ntabris!

  8. ntabris commented on Nov 10, 2022

    @ntabris
    Member

    deleted duplicate record matching software-environments/dask-engineering/distributed-2022.10.2+28.g9c6904df-py3-none-any.whl which should resolve for now, hopefully we'll get more permanent fix soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions