RunestoneInteractive / RunestoneServer

Interactive books for computer science and mathematics
http://runestoneinteractive.org
Other
576 stars 505 forks source link

Improve docker-tools for `build --single` #2049

Closed bjones1 closed 1 year ago

bjones1 commented 1 year ago

This implements ideas in #2048. Not much testing yet.

Fix:

Docs:

bjones1 commented 1 year ago

@bnmnetp. OK works for me after testing. Test failures may be OK; the tests need to be re-run.

bnmnetp commented 1 year ago

Tests are failing to start -- missing the runestone_test db !! What would cause that?

bnmnetp commented 1 year ago

tracking back a little further it is trying to run rsmanage but

from rsmanage import cli
runestoneserver-runestone-1  | ImportError: cannot import name 'cli' from 'rsmanage'
bnmnetp commented 1 year ago

This is so weird, I can't even find anyplace in our code where we try to import cli from rsmanage. Running the tests locally on my dev build and all is fine, so it seems to be something in the setup for the tests.

Any ideas???

bjones1 commented 1 year ago

I'm guessing this is something new/broken with Poetry 1.4.0. In rsmanage/setup.py, we have:

    entry_points="""
        [console_scripts]
        rsmanage=rsmanage:cli
    """,

which is probably where the import of cli comes from. I'll test and see what happens.

bjones1 commented 1 year ago

OK, testing a fix now...

bnmnetp commented 1 year ago

looks like it somehow lost the docker-tools test command...

bnmnetp commented 1 year ago

I'm seeing this message:

print("Note: this must be an initial install; additional commands missing.")

So something is going wrong with the import from docker_tools_misc

bnmnetp commented 1 year ago

Some real backward incompatibility in poetry 1.4? I see it was just released on the 2/27. I had rebuilt locally a few days before. Looking at the changelog I didn't see see anything to indicate such major changes.

Looking at recent issues on github for poetry it seems there are a few that might be related...

Do you think we should maybe stick with poetry 1.3.2 for a while?

bnmnetp commented 1 year ago

I had all of the tests passing as long as I used -- --skip_w3_validate

Now I see that my fixes are on my python 3.10 branch. If you think it is better to stick with 1.4.0 then maybe we should merge this and I can merge my 3.10 branch because that has more test fixes...

bjones1 commented 1 year ago

That makes sense to me -- these fixes remove a lot of Poetry bug fix/workaround stuff, so I think it's a good step forward. Let's merge this, then you merge your 3.10 branch. Hopefully, that will get us back to all tests passing again!

bjones1 commented 1 year ago

Do you want to merge this, or shall I?

bnmnetp commented 1 year ago

I'm on it.