https://prefect.io logo
Title
c

Chris Hatton

05/26/2022, 5:26 PM
Hey all ... I'm getting an error saying
prefect.exceptions.ClientError: [{'path': ['create_project'], 'message': 'Uniqueness violation.', 'extensions': {'code': 'INTERNAL_SERVER_ERROR'}}]
when I try to REcreate a project with the same name in
backend cloud
.... Is this a known issue? Does anyone know of a workaround? (Details in thread)
To recreate it:
prefect backend cloud
prefect create project foo
prefect delete project foo
prefect create project foo
...
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/prefect/client/client.py", line 1063, in create_project
    res = self.graphql(
  File "/usr/local/lib/python3.9/site-packages/prefect/client/client.py", line 473, in graphql
    raise ClientError(result["errors"])
prefect.exceptions.ClientError: [{'path': ['create_project'], 'message': 'Uniqueness violation.', 'extensions': {'code': 'INTERNAL_SERVER_ERROR'}}]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/prefect", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/prefect/cli/create.py", line 71, in project
    Client().create_project(project_name=name, project_description=description)
  File "/usr/local/lib/python3.9/site-packages/prefect/client/client.py", line 1083, in create_project
    return res.data.project[0].id
  File "box/box_list.py", line 68, in box.box_list.BoxList.__getitem__
IndexError: list index out of range
Note: I tried through the UI as well. It does not work either, although it seems to pretend it did.
k

Kevin Kho

05/26/2022, 5:39 PM
Projects are soft deletions so they are hidden from the UI because they take a while. They are marked for deletion and then eventually happen like 15 minutes later? It will work if you try it later. Deleting a project just has many steps. Could you mvoe the traceback to the thread when you get a chance?
c

Chris Hatton

05/26/2022, 5:57 PM
Thanks. Ok, I'll try a little later. Can you clarify what you mean by "Could you mvoe the traceback to the thread" ... ?
k

Kevin Kho

05/26/2022, 5:58 PM
The error, if you could move it to this chat thread to keep the main channel more clean
1
c

Chris Hatton

05/26/2022, 8:06 PM
"Eventually happen" seems to have taken at least 3 hours. I guess I'll pause until tomorrow
k

Kevin Kho

05/26/2022, 8:08 PM
Did that project have a lot of flows or flow runs? It’s dependent on how many deleted need to cascade
c

Chris Hatton

05/26/2022, 8:22 PM
No. One of them had no runs at all.
k

Kevin Kho

05/26/2022, 8:25 PM
Ok i’ll leave a note for the team to check why this may be taking so long
c

Chris Hatton

05/26/2022, 8:27 PM
I can recreate the issue with a simple
prefect create project foo
prefect delete project foo
prefect create project foo
Not trying to nag, I just wanted to let you that this did not resolve over night. I'd be happy to report an issue or a bug if you have a system or link to do so.
k

Kevin Kho

05/27/2022, 3:58 PM
Ok I got no response but I suspect something in our deletion service is broken. I’m gonna escalate this. Thanks for letting me know!
@Chris Hatton our deletion service is currently off but if you DM me your tenant id and project we can delete it for you
It’s undergoing a refactor