Skip to content

Command Support#617

Open
jtnelson wants to merge 13 commits intodevelopfrom
feature/command-support
Open

Command Support#617
jtnelson wants to merge 13 commits intodevelopfrom
feature/command-support

Conversation

@jtnelson
Copy link
Member

No description provided.

Copy link
Member Author

@jtnelson jtnelson left a comment

Choose a reason for hiding this comment

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

This comments on this PR need to be addressed


@Override
public CommandGroup prepare() {
return new DefaultCommandGroup();
Copy link
Member Author

Choose a reason for hiding this comment

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

why is this not calling invoke()?


@Override
public boolean inTransaction() {
return invoke("inTransaction").with();
Copy link
Member Author

Choose a reason for hiding this comment

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

why was this added? Why does the public API need a method to know if its in a transaction? What necessitated this?

*
* @return {@code true} if a transaction is active
*/
public abstract boolean inTransaction();
Copy link
Member Author

Choose a reason for hiding this comment

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

why was this added?

@Override
public List<Object> submit(List<Command> commands) {
return execute(() -> {
List<TCommand> tcommands = commands.stream().map(Command::toThrift)
Copy link
Member Author

Choose a reason for hiding this comment

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

We need to be consistent with where java <-> thrift stuff happens. We have Language and JavaThriftBridge the latter of which says it eventually wants to replace others. So this process os translating TCommands, etc at least needs to go in that class

@Override
public List<Object> submit(String ccl) {
return execute(() -> {
List<TCommandVerb> verbs = extractVerbs(ccl);
Copy link
Member Author

Choose a reason for hiding this comment

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

Rename it to extractVerbsIfNecessary() and rename other methods similarly

// an attempt was made to bind the variables to different values in a
// previous evaluation.
// NOTE: These must always be set before evaluating
// a line just in case an attempt was made to bind the
Copy link
Member Author

Choose a reason for hiding this comment

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

Why did you change the line lengths. That is unecessary

// syntax.
// GH-463: Define each accessible Concourse API
// method as a Closure directly within Groovy to
// ensure that they can be called with short syntax.
Copy link
Member Author

Choose a reason for hiding this comment

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

Why did you change the line lengths...

@@ -27,6 +27,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
Copy link
Member Author

Choose a reason for hiding this comment

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

Overall the diffs in this file are too big. You did not implement this as surgically as you should. You are repeating things like timing. You need to rethink how you can surgically inject the handling for raw CCL while preserving the old behaviour as a fallback. The Diff should not be this large and should not repeat things


/**
* A script that parses the concourse.thrift IDL file and generates
* a Java interface with Concourse-style method names (overloaded
Copy link
Member Author

Choose a reason for hiding this comment

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

Line lengths should go up to 80-83 chars

@@ -238,7 +238,8 @@ abstract class StatefulConcourseService {
++pos;
}
if(sb.length() > 1) {
sb.setLength(sb.length() - 2);
sb.delete(sb.length() - 2,
Copy link
Member Author

Choose a reason for hiding this comment

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

why was this reformatted?

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.

1 participant