Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Remove capitalized mongo tables - #2545

Merged
NateBrady23 merged 25 commits into
TechEmpower:masterfrom
knewmanTE:remove-capitalized-mongo-tables
Feb 7, 2017
Merged

NateBrady23 merged 25 commits into
TechEmpower:masterfrom
knewmanTE:remove-capitalized-mongo-tables

Conversation

@knewmanTE

Copy link
Copy Markdown
Contributor

For a long time now, we've had 4 MongoDB collections: world, World, fortune, and Fortune. This is causing me a lot of headache on #2536. However, the benefit of this is that #2536 made it very easy to determine which frameworks were using the uppercase World and Fortune collections because they would fail on their /update tests.

This PR removes the World and Fortune collections, leaving us with just world and fortune. It also updates what is hopefully all of the offending frameworks to use the lowercase version.

Issues/weirdness that I'm currently aware of:

  • C++/ffead-cpp: we are unable to change this at all because the implementation code is currently hosted on the contributor's repo. I'm honestly in favor of just removing the framework entirely and pinging the creator asking them to re-submit the framework with a local implementation so we can stay true to the open source nature of our project and prevent any changes that aren't approved by Pull Request.
  • C++/ulib-mongodb: on my personal Travis run, I was seeing the /update test PASS, but all other tests FAIL. But when I run ulib-mongodb on my local VM, they all PASS. Not really sure what the issue might be there.

@knewmanTE

Copy link
Copy Markdown
Contributor Author

My guess is that the ulib issue stems from these travis-specific lines, though it isn't clear why these are suddenly being problematic when they worked fine before and aren't throwing any errors for the other ulib tests.

@knewmanTE

Copy link
Copy Markdown
Contributor Author

So I did a bunch of test builds, and what I'm seeing is that ulib is only passing on Travis with the lowercase table names when I also install the uppercase tables, which leads me to believe that it is not respecting the capitalization of the table passed into it. However, this still doesn't explain why /update still works. 😓

@knewmanTE

Copy link
Copy Markdown
Contributor Author

@stefanocasazza do you have any idea why ulib's UMongoDBClient might be behaving this way when I try to it to use the lowercase world and fortune collections in favor of the World and Fortune collections?

@greenlaw110

Copy link
Copy Markdown
Contributor

@knewmanTE Java/act also need to do the same thing. Before I commit the change, should I also change the table name of mysql and postgresql cases?

@knewmanTE knewmanTE changed the title Remove capitalized mongo tables [WIP] Remove capitalized mongo tables Feb 2, 2017
@knewmanTE

Copy link
Copy Markdown
Contributor Author

@greenlaw110 as far as I know, if your MySQL and Postgres implementations are passing at the moment, then you shouldn't have to worry about changing those.

@stefanocasazza it looks like we're getting a segfault, which leads me to believe there might be something a little funky with the driver?

Also, I've figured out why /update passes when the others fail. See #2546 for more info.

@greenlaw110

Copy link
Copy Markdown
Contributor

@knewmanTE #2547 created for updating Java/act mongodb collection names

@knewmanTE

Copy link
Copy Markdown
Contributor Author

C++/ulib-mongodb passing on my local Travis!!!! Hoping this should be merge-able once the Travis run finishes.

@knewmanTE knewmanTE changed the title [WIP] Remove capitalized mongo tables Remove capitalized mongo tables Feb 3, 2017
@knewmanTE

Copy link
Copy Markdown
Contributor Author

Update on the currently broken tests:

  • C++/ffead-cpp: we can't change the source code, so I will just disable the Fortune tests until they are fixed.
  • Haskell/yesod: will hopefully be fixed in my most recent push.
  • Java/act: addressed in Java/act fix mongo update test #2553
  • Lua/octopus: not sure what the deal is. Tests are not using MongoDB and it's failing on master as well.
  • Perl/kelp: fixed MongoDB test in my recent push. Not sure why the base MySQL test is failing on Travis, as it's passing locally for me.
  • Python/tornado: fixed in my recent push.

Comment thread frameworks/Python/tornado/server_py3.py Outdated

async def get(self):
world = await db.World.find_one(randint(1, 10000))
world = await db.dorld.find_one(randint(1, 10000))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you meant to change it to "dorld" :)

@knewmanTE

Copy link
Copy Markdown
Contributor Author

Great! With @nbrady-techempower's dorld fix, I think the only remaining issue will be Lua/octopus.

@knewmanTE

Copy link
Copy Markdown
Contributor Author

@nbrady-techempower the only failing test in the most recent run is Lua/octopus. Are you cool merging this in with the caveat that #2557 is open?

@NateBrady23

Copy link
Copy Markdown
Member

Definitely. Octopus was failing before too. Awesome work!

@NateBrady23
NateBrady23 merged commit 189ca78 into TechEmpower:master Feb 7, 2017
zloster pushed a commit to zloster/FrameworkBenchmarks that referenced this pull request Mar 21, 2017
* remove capitalized dropwizard mongo tables

* hopefully remove capitalized ulib mongo tables

* remove capitalized vibed mongo tables

* remove capitalized redstone mongo tables

* remove capitalized start mongo tables

* remove capitalized stream mongo tables

* remove capitalized hot mongo tables

* remove capitalized undertow mongo tables

* remove capitalized express mongo tables

* remove creation of uppercase mongo collections

* testing removal of travis-specific code for ulib

* maybe a better test

* checking if capital table names throw the same ulib error

* another test [ci fw-only C++/ulib]

* more test [ci fw-only C++/ulib]

* re-removed the uppercase mongo tables [ci fw-only C++/ulib]

* temporarily disable response trimming [ci fw-only C++/ulib]

* add response trimming back in

* hopefully fixed Yesod

* fixed kelp

* fixed tornado

* temporarily disable ffead-cpp Mongo Fortune tests until they are fixed to use the lower case tables

* a whole new dorld.

* a whole new dorld.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants