-
Notifications
You must be signed in to change notification settings - Fork 26
Compatibility the new automatic multicast discovery and plugin file isolation #60
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good on a first readthrough; I'll test more directly tomorrow.
Did you mean to make this PR into a feature branch?
brokers/unified/vscode/sidecar.go
Outdated
port := endpoint.TargetPort | ||
container.Ports = append(container.Ports, model.ExposedPort{ExposedPort: port}) | ||
if (! useLocalhost) { | ||
endpoint := generateTheiaSidecarEndpoint(rand) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation issues, please make sure all indentation is done via tabs.
Codecov Report
@@ Coverage Diff @@
## master #60 +/- ##
==========================================
+ Coverage 62.52% 65.47% +2.95%
==========================================
Files 6 6
Lines 555 559 +4
==========================================
+ Hits 347 366 +19
+ Misses 182 168 -14
+ Partials 26 25 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks David
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please set target branch to master; the target is a currently merged branch.
@@ -245,8 +245,9 @@ func extensionOrURL(extensionOrURL string) (extension string, URL string) { | |||
} | |||
} | |||
|
|||
func (b *brokerImpl) generatePluginArchiveName(plugin model.ChePlugin) string { | |||
return fmt.Sprintf("%s.%s.%s.%s", plugin.Publisher, plugin.Name, plugin.Version, b.rand.String(10)) | |||
func (b *brokerImpl) generatePluginArchiveName(plugin model.ChePlugin, archivePath string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This likely won't work on current master; archivePath
is generated and no longer resolves filename, and resolving filename from URL won't work for many URLs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah nevermind I see this commit also modifies how archivePath
is generated.
I worry that depending on URLs ending in the filename will cause problems -- e.g. https://marketplace.visualstudio.com/_apis/public/gallery/publishers/vscjava/vsextensions/vscode-java-debug/0.16.0/vspackage is a valid URL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fixed with commit ce4c699
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, pending switching base branch to master
utils/ioutil.go
Outdated
contentDispoFilename = path.Base(path.Clean("/" + contentDispoFilename)) | ||
if contentDispoFilename == "." || contentDispoFilename == "/" { | ||
contentDispoFilename = "" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a few comments about why the steps above are necessary? Having multiple cases where contentDispoFilename
is reset to the empty string is a little confusing. Some examples of cases being addressed would be useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I refactored a bit the code to make it clearer in commit 103113f
Can you tell if you think a comment is still necessary ?
after @amisevsk comment: #60 (comment) Signed-off-by: David Festal <dfestal@redhat.com>
Signed-off-by: David Festal <dfestal@redhat.com>
Signed-off-by: David Festal <dfestal@redhat.com>
Signed-off-by: David Festal <dfestal@redhat.com>
Signed-off-by: David Festal <dfestal@redhat.com>
Signed-off-by: David Festal <dfestal@redhat.com>
Signed-off-by: David Festal <dfestal@redhat.com>
Signed-off-by: David Festal <dfestal@redhat.com>
Signed-off-by: David Festal <dfestal@redhat.com>
... and use it to define the filename when downloading the Theia or VsCode extension archives Signed-off-by: David Festal <dfestal@redhat.com>
Signed-off-by: David Festal <dfestal@redhat.com>
after @amisevsk comment: #60 (comment) Signed-off-by: David Festal <dfestal@redhat.com>
This reverts commit ae4dc5b.
103113f
to
bc602f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What does this PR do?
This PR Implements the compatibility the new automatic multicast discovery and the isolation of plugin files (work done on
che-theia
by @benoitf in PR eclipse-che/che-theia#91What issues does this PR fix or reference?
This fixes issue redhat-developer/rh-che#1354 (also described in eclipse-che/che#13272 and eclipse-che/che#12395 (comment)
This also includes a fix for issue eclipse-che/che#13349
Was this PR tested ?
Yes, with upstream Che
nightly
docker image running on Minishift.Still want to test the che-in-che flow (Development and test of remote Theia plugins under Che-Theia)