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

[HOPSWORKS-1972] Featurestore connect using API key value #76

Merged
merged 3 commits into from
Aug 31, 2020
Merged

[HOPSWORKS-1972] Featurestore connect using API key value #76

merged 3 commits into from
Aug 31, 2020

Conversation

jimdowling
Copy link
Contributor

https://logicalclocks.atlassian.net/browse/HOPSWORKS-1972

Python API Tested against:
https://colab.research.google.com/drive/1ZrOZzBLS4E0ue85sfRwISj5FlL2YiPfV?usp=sharing

Java API - new unit Test added in TestHopsworksExternalClient.java that needs an external cluster (but the unit test does not fail if external cluster not available).

@jimdowling jimdowling requested a review from SirOibaf August 14, 2020 15:55
Copy link
Contributor

@moritzmeister moritzmeister left a comment

Choose a reason for hiding this comment

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

Looks good, there is one copy paste error and some style issues that need some changes.

Also I think the test is flawed. First of all it is taking quite a while to fail if one doesn't change the host to an existing cluster, and if it is unable to do the rest call it will raise an exception and won't get to the assertion.

@@ -53,6 +53,21 @@
.willReturn(success().body(HttpBodyConverter.json(credentials)))
));

@Test
public void testReadAPIKey() throws IOException, FeatureStoreException {
Copy link
Contributor

Choose a reason for hiding this comment

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

This test somehow takes 2 minutes for me, I haven't changed the host etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The options I see are:

  1. comment it out and leave the code there, so it can easily be tested again
  2. delete the code.

What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

We can leave it commented out, but I still believe the hc.getFeatureStore() will never return null but instead throw a exception if it can't get the feature store reference and hence the test will never get to the assert and always pass as the exception gets caught by the catch statement.

python/hsfs/connection.py Show resolved Hide resolved
python/hsfs/connection.py Outdated Show resolved Hide resolved
python/hsfs/connection.py Outdated Show resolved Hide resolved
python/hsfs/connection.py Outdated Show resolved Hide resolved
@moritzmeister
Copy link
Contributor

@jimdowling I don't see any new commits, did you push them?

@moritzmeister moritzmeister merged commit 96934b7 into logicalclocks:master Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants