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

[BUG] - api_get_specification is broken #761

Closed
nkaretnikov opened this issue Feb 6, 2024 · 3 comments
Closed

[BUG] - api_get_specification is broken #761

nkaretnikov opened this issue Feb 6, 2024 · 3 comments
Assignees

Comments

@nkaretnikov
Copy link
Contributor

nkaretnikov commented Feb 6, 2024

Describe the bug

The api_get_specification HTTP endpoint seems to be completely broken. There are two bugs here:

Bug 1:

            task, solve_id = conda_store.register_solve(db, specification)
            task.wait()

The task here can be a str sometimes, which causes a ValueError. I think it needs to be wrapped into AsyncResult here.

Bug 2:

        return {"solve": solve.packages}

There's no .packages in Solve anymore. This was introduced when the DB schema was refactored, way before I was even part of the project. The new proper name is package_builds.

Expected behavior

The endpoint returns some data instead of raising an error.

How to Reproduce the problem?

Just call the endpoint. Some tests call it as well, which is how I noticed, but maybe those tests expect status codes 500 or 400, so they all pass. Those tests need to be looked at.

Output

This is printed to the terminal:

'str' object has no attribute 'wait'

Versions and dependencies used.

Current main (988445b).

Anything else?

No response

@nkaretnikov nkaretnikov added the type: bug 🐛 Something isn't working label Feb 6, 2024
@nkaretnikov nkaretnikov self-assigned this Feb 6, 2024
@nkaretnikov nkaretnikov added this to the challenges: Round 2 🚀 milestone Feb 6, 2024
@trallard trallard moved this from New 🚦 to TODO 📬 in conda-store 🐍 Feb 20, 2024
@nkaretnikov nkaretnikov removed this from the challenges: Round 2 🚀 milestone Feb 21, 2024
@trallard trallard added the needs: investigation 🔎 Someone in the team needs to look into this issue before scoping label Oct 16, 2024
@trallard
Copy link
Collaborator

@peytondmurray can you check if this is still an issue?

@peytondmurray peytondmurray moved this from TODO 📬 to In Progress 🏗 in conda-store 🐍 Oct 19, 2024
@peytondmurray
Copy link
Contributor

A quick search of the tests doesn't show any that directly send a GET to /api/v1/specification/, every one of them is a POST. But sending a GET to /api/v1/specification/ indeed raises an error, and I get a 500 response from the server:

Image

@peytondmurray peytondmurray removed the needs: investigation 🔎 Someone in the team needs to look into this issue before scoping label Oct 19, 2024
@peytondmurray peytondmurray moved this from In Progress 🏗 to TODO 📬 in conda-store 🐍 Oct 19, 2024
@peytondmurray
Copy link
Contributor

Closing in favor of #615, should be fixed by #913.

@github-project-automation github-project-automation bot moved this from TODO 📬 to Done 💪🏾 in conda-store 🐍 Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants