Skip to content
This repository has been archived by the owner on Jan 20, 2023. It is now read-only.

Make broker preserve extensions for downloaded plugins #61

Closed
wants to merge 1 commit into from

Conversation

amisevsk
Copy link
Contributor

What does this PR do?

  • Add function DownloadPreserveFilename to ioutil
    • Attempts to use Content-Disposition header to determine filename
    • If unable, behaves as previous Download() function
    • Necessary for keeping file extensions (e.g. .theia for theia
      plugins)
  • Make broker add file extension, if available, to copied local plugins
    • This is necessary as files without .theia extension are not picked
      up as plugins at workspace runtime
  • Remove mentions of VS Code in logging when step can apply to Theia
    plugins as well
  • gofmt ran automatically on edited files so there are some formatting
    changes.

What issues does this PR fix or reference?

eclipse-che/che#13349

- Add function DownloadPreserveFilename to ioutil
  - Attempts to use Content-Disposition header to determine filename
  - If unable, behaves as previous Download() function
  - Necessary for keeping file extensions (e.g. .theia for theia
    plugins)
- Make broker add file extension, if available, to copied local plugins
  - This is necessary as files without .theia extension are not picked
    up as plugins at workspace runtime
- Remove mentions of VS Code in logging when step can apply to Theia
  plugins as well
- gofmt ran automatically on edited files so there are some formatting
  changes.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
@codecov
Copy link

codecov bot commented May 17, 2019

Codecov Report

Merging #61 into master will decrease coverage by 2.35%.
The diff coverage is 40%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #61      +/-   ##
==========================================
- Coverage   62.52%   60.17%   -2.36%     
==========================================
  Files           6        6              
  Lines         555      580      +25     
==========================================
+ Hits          347      349       +2     
- Misses        182      204      +22     
- Partials       26       27       +1
Impacted Files Coverage Δ
utils/ioutil.go 8.28% <0%> (-1.28%) ⬇️
brokers/unified/vscode/broker.go 74.29% <75%> (-0.47%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 23a7e2d...6b69c34. Read the comment docs.

@amisevsk
Copy link
Contributor Author

cc: @vitaliy-guliy

Built PR is available on dockerhub at amisevsk/che-unified-plugin-broker:dev

@amisevsk
Copy link
Contributor Author

Closing as it will be implemented as part of #60 (which makes other changes to VS Code/Theia plugin processing.

@amisevsk amisevsk closed this May 17, 2019
@amisevsk amisevsk deleted the plugin-extensions branch May 17, 2019 18:50
@amisevsk amisevsk restored the plugin-extensions branch May 17, 2019 18:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant