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

notice when app engine java components aren't installed #206

Closed
wants to merge 19 commits into from
Closed

Conversation

elharo
Copy link
Contributor

@elharo elharo commented Sep 7, 2016

@@ -59,6 +59,7 @@
private static final String DEV_APPSERVER_PY = "bin/dev_appserver.py";
private static final String JAVA_APPENGINE_SDK_PATH =
"platform/google_appengine/google/appengine/tools/java/lib";
private static final String JAVA_COMPONENTS_PATH = "platform/gcd/.appengine";
Copy link
Member

@meltsufin meltsufin Sep 7, 2016

Choose a reason for hiding this comment

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

Is it sufficient to just check for the existence of JAVA_APPENGINE_SDK_PATH?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, that seems to exist regardless

Copy link
Member

Choose a reason for hiding this comment

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

We should probably check with the Cloud SDK team to see what they recommend using.

Copy link
Contributor

Choose a reason for hiding this comment

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

Would executing and parsing a gcloud components list be overkill?

Copy link
Member

Choose a reason for hiding this comment

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

@markpell, @znewman01 can you comment on this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We want to know whether or not the user ran:

gcloud components install app-engine-java

We've seen multiple user reports that trace back to not having done this.
This directory appears to be added/removed when the user installs/removes the component.

Copy link
Member

@briandealwis briandealwis Sep 7, 2016

Choose a reason for hiding this comment

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

FWIW: although my installation is out of date, I did have app-engine-java, but just updated and I don't have anything in platform/gcd.

Copy link
Member

Choose a reason for hiding this comment

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

Since what we're actually using is the appengine-tools-api.jar, we should probably just check for its existence.

Copy link

Choose a reason for hiding this comment

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

So again, this is just checking for the wrong thing. That directory is for the legacy datastore emulator which has nothing to do with Java or any Java components.

How far are we from having the requiring staging code as separate artifacts on maven central? I don't think it's appropriate for the plugin to be grabbing individual jars from the SDK as this is not a public interface.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ludoch who would know when staging is going to make it to maven central.

To summarize what's being discussed:

For component detection we should be calling gcloud components list and not digging into the cloud SDK packaged files.

The staging question is not related to this CL but we are working on moving as many deps as possible away from using Cloud SDK paths.

@elharo
Copy link
Contributor Author

elharo commented Sep 7, 2016

$ gcloud components list --format='value(state)' --filter=id:app-engine-java

Your current Cloud SDK version is: 124.0.0
The latest available version is: 125.0.0

name=Not Installed

@briandealwis
Copy link
Member

$ gcloud components list --format='value(state)' --filter=id:app-engine-java

Your current Cloud SDK version is: 119.0.0
The latest available version is: 125.0.0

name=Update Available

Hmm, I should update.

@etanshaul
Copy link
Contributor

I think you'd want to set --format=json

@@ -262,6 +268,10 @@ public void validate() throws AppEngineException {
"Validation Error: Java Tools jar location '"
+ JAR_LOCATIONS.get(JAVA_TOOLS_JAR) + "' is not a file.");
}
if (!Files.isDirectory(getJavaAppEngineComponentsPath())) {
Copy link
Contributor

Choose a reason for hiding this comment

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

my concern about having this here is that we can support deploy without needing the java components installed. A client should be able to get configure gcloud and do a deployment without install the components,

Copy link
Member

Choose a reason for hiding this comment

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

Right, this only applies to Standard and Compat deployments, not pure Flex.

@elharo
Copy link
Contributor Author

elharo commented Sep 7, 2016

$ gcloud components list --format='json' --filter=id:app-engine-java

Your current Cloud SDK version is: 124.0.0
The latest available version is: 125.0.0

[
{
"current_version_string": null,
"id": "app-engine-java",
"is_configuration": false,
"is_hidden": false,
"latest_version_string": "1.9.42",
"name": "gcloud app Java Extensions",
"size": 142219489,
"state": {
"name": "Not Installed"
}
}
]

It really shouldn't be saying

Your current Cloud SDK version is: 124.0.0
The latest available version is: 125.0.0

@znewman01
Copy link

It's only printing that to STDERR; it's very easy to ignore.

On Wed, Sep 7, 2016 at 6:35 PM, Elliotte Rusty Harold <
[email protected]> wrote:

$ gcloud components list --format='json' --filter=id:app-engine-java

Your current Cloud SDK version is: 124.0.0
The latest available version is: 125.0.0

[
{
"current_version_string": null,
"id": "app-engine-java",
"is_configuration": false,
"is_hidden": false,
"latest_version_string": "1.9.42",
"name": "gcloud app Java Extensions",
"size": 142219489,
"state": {
"name": "Not Installed"
}
}
]

It really shouldn't be saying

Your current Cloud SDK version is: 124.0.0
The latest available version is: 125.0.0


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#206 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA1VgZViWTpb33--gZgqPCvRJvDjYvUAks5qnzwjgaJpZM4J3QGM
.

@elharo elharo closed this Sep 8, 2016
@patflynn
Copy link
Contributor

patflynn commented Sep 8, 2016

@elharo are we closing this to start over?

@elharo
Copy link
Contributor Author

elharo commented Sep 8, 2016

Yes, the version that calls gcloud components shares very little with this branch.

@elharo
Copy link
Contributor Author

elharo commented Sep 12, 2016

reopening since we may do this

@elharo elharo reopened this Sep 12, 2016
@elharo elharo closed this Sep 12, 2016
@loosebazooka loosebazooka deleted the i165B branch April 4, 2017 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide more specific error when missing app-engine-java gcloud component
8 participants