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

enabling dynamo maven integration problem #376

Closed
krzyk opened this issue Oct 18, 2014 · 21 comments
Closed

enabling dynamo maven integration problem #376

krzyk opened this issue Oct 18, 2014 · 21 comments

Comments

@krzyk
Copy link
Contributor

krzyk commented Oct 18, 2014

When I enable a test in DyBaseITCase and run maven I get:

canAddCommand(dynamo.DyBaseITCase)  Time elapsed: 0.236 sec  <<< ERROR!
javax.validation.ConstraintViolationException: {javax.validation.constraints.NotNull.message}; {javax.validation.constraints.NotNull.message}
    at com.jcabi.aspects.aj.MethodValidator.validate(MethodValidator.java:181)
    at com.jcabi.aspects.aj.MethodValidator.beforeCtor(MethodValidator.java:116)
    at com.jcabi.dynamo.Credentials$Simple.<init>(Credentials.java:107)
    at dynamo.DyBaseITCase.region(DyBaseITCase.java:69)
    at dynamo.DyBaseITCase.canAddCommand(DyBaseITCase.java:55)

So it looks like it fails to create region for integration test (null problem).
I don't think it should complain before even creating DyBase.

@davvd
Copy link
Collaborator

davvd commented Oct 20, 2014

I'll ask someone to take care of this task soon

@davvd
Copy link
Collaborator

davvd commented Oct 20, 2014

thanks for reporting! I topped your account for 15 mins, transaction 46199261

@davvd
Copy link
Collaborator

davvd commented Oct 22, 2014

@rfqu this task is for you, keep these principles in mind, and don't hesitate to ask any technical questions

@davvd
Copy link
Collaborator

davvd commented Oct 22, 2014

@rfqu Task's budget is 30 mins (see this for explanation)

@davvd davvd added the @rfqu label Oct 22, 2014
@akaigoro
Copy link

Hello, I am a newcomer to this project. First, I'd like to be told how to reproduce the failure. I've already cloned this workspace, imported maven project into Eclipse, and run all the tests. No one test failed.

@krzyk
Copy link
Contributor Author

krzyk commented Oct 22, 2014

@rfqu You have to go to DyBaseITCase and remove @Ignore from the test.
Now run maven command:
mvn clean install -Pqulice and you should see and error.

to run IT tests you need maven to go into integration-test phase and run failsafe, maven command above doeas that together with other phases (compilation, normal unit tests etc.)

@akaigoro
Copy link

The reason the test fails is because following lines:

System.getProperty("dynamo.key"),
System.getProperty("dynamo.secret")

give nulls, because my machine is not configured to access DynamoDB. Is there any documentation to read about this?

@krzyk
Copy link
Contributor Author

krzyk commented Oct 22, 2014

@rfqu have a look at project that uses jcabi-dyname: https://github.com/yegor256/rultor/blob/master/src/test/java/com/rultor/dynamo/DyTalksITCase.java

I think that instead of System.getProperty it should use:

                    Manifests.read("Thindeck-DynamoKey"),
                    Manifests.read("Thindeck-DynamoSecret")

This gets the configuration from MANIFEST.MF file.

You shouldn't need real amazon data (key/secret) as the project has DynamoDBLocal in the integration tests (see http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tools.DynamoDBLocal.html) so everything should work locally without touching AWS.

@akaigoro
Copy link

@krzyk it works, but another error occured:
java.lang.IllegalStateException: java.io.IOException: com.amazonaws.services.dynamodbv2.model.ResourceNotFoundException: Cannot do operations on a non-existent table (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: ResourceNotFoundException; Request ID: 56802242-33b7-4430-9943-83bb6df5e81a)
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:889)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:485)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:257)
at com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient.invoke(AmazonDynamoDBClient.java:2908)
at com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient.describeTable(AmazonDynamoDBClient.java:795)
at com.jcabi.dynamo.AwsTable.keys_aroundBody8(AwsTable.java:157)
at com.jcabi.dynamo.AwsTable$AjcClosure9.run(AwsTable.java:1)
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
at com.jcabi.aspects.aj.MethodLogger.wrap(MethodLogger.java:208)
at com.jcabi.aspects.aj.MethodLogger.ajc$inlineAccessMethod$com_jcabi_aspects_aj_MethodLogger$com_jcabi_aspects_aj_MethodLogger$wrap(MethodLogger.java:1)
at com.jcabi.aspects.aj.MethodLogger.wrapClass(MethodLogger.java:136)
at com.jcabi.dynamo.AwsTable.keys_aroundBody10(AwsTable.java:154)
at com.jcabi.dynamo.AwsTable$AjcClosure11.run(AwsTable.java:1)
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
at com.jcabi.aspects.aj.MethodCacher$Tunnel.through(MethodCacher.java:282)
at com.jcabi.aspects.aj.MethodCacher.cache(MethodCacher.java:127)
at com.jcabi.dynamo.AwsTable.keys(AwsTable.java:154)
at com.jcabi.dynamo.AwsFrame.iterator_aroundBody0(AwsFrame.java:117)
at com.jcabi.dynamo.AwsFrame$AjcClosure1.run(AwsFrame.java:1)
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
at com.jcabi.aspects.aj.MethodLogger.wrap(MethodLogger.java:208)
at com.jcabi.aspects.aj.MethodLogger.ajc$inlineAccessMethod$com_jcabi_aspects_aj_MethodLogger$com_jcabi_aspects_aj_MethodLogger$wrap(MethodLogger.java:1)
at com.jcabi.aspects.aj.MethodLogger.wrapClass(MethodLogger.java:136)
at com.jcabi.dynamo.AwsFrame.iterator(AwsFrame.java:117)
at com.thindeck.dynamo.DyRepos.add(DyRepos.java:79)
at dynamo.DyBaseITCase.canAddCommand(DyBaseITCase.java:60)

It will take some time for me to understand what's going on.

@krzyk
Copy link
Contributor Author

krzyk commented Oct 23, 2014

@rfqu great, if you think this issue is a bigger task that will not fit in 30 mins then add @Ignore back to the test, remove the old @todo and ad a new one with problem description (here it would be adding of table definitions) and current issue id (look at other @todos in the project) and submit PR for review.

@akaigoro
Copy link

@krzyk I think this issue can be closed as solved (with your help), so @todo must remain "#321".

@krzyk
Copy link
Contributor Author

krzyk commented Oct 24, 2014

@rfqu No, you should remove the previous todo and create a new one and describe the new problem - this time it is more specific. I assume that you have made some changes to the code that made the new exception to show.

@akaigoro
Copy link

@krzyk previous (current) @todo does not concern the problem of this issue (ConstraintViolationException), it talks about required tables - exactly what the new problem is. The issue number, however, is wrong - instead of closed #321 it should point to #341.

@krzyk
Copy link
Contributor Author

krzyk commented Oct 24, 2014

@rfqu You are right, I forgot that this issue is from a bug report. To close this issue you would need to submit a PR with the changes that you made in the code that solve the issue from the report. Even if it was only changing to use Manifests.

@akaigoro
Copy link

PR created: #394

@krzyk
Copy link
Contributor Author

krzyk commented Oct 25, 2014

@rfqu Just a hint that travis build failed in this PR, take a look at the logs. You probably didn't run it with -Pqulice option.

@akaigoro
Copy link

@krzyk yes my fault. I updated the branch for pull request. Should I do anything with the pull request? Where can I see build logs?

@krzyk
Copy link
Contributor Author

krzyk commented Oct 25, 2014

@rfqu At the bottom of the pull request you can see a text containing "Travis" it will be either red or green and a link with "Details" is in the same line, there you can see the build logs.
The pull request now waits for assignment, then someone reviews it and tels rultor to merge it, after it is merged I can close the ticket, but the ones that create the ticket/issues don't see the pull requests so you have to ping them when it was merged.

@davvd
Copy link
Collaborator

davvd commented Nov 3, 2014

@rfqu the task is your hands for the last 12 days.. keep in mind that if it's not closed in the next 40 hours, it will be re-assigned to someone else, see No Obligations principle

@krzyk
Copy link
Contributor Author

krzyk commented Nov 3, 2014

@rfqu Just noticed that the PR was merged, so I'll close this task, thanks.
BTW. It is in your interest to notify issue created that the issue has been merged and closed.

@krzyk krzyk closed this as completed Nov 3, 2014
@davvd
Copy link
Collaborator

davvd commented Nov 4, 2014

@rfqu 30 mins sent to your balance (ID AP-4X119427YS124733H), many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants