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

Fixed windows download #178

Merged
merged 16 commits into from
May 14, 2021
Merged

Conversation

ahcorde
Copy link
Contributor

@ahcorde ahcorde commented Mar 30, 2021

Signed-off-by: ahcorde ahcorde@gmail.com

🦟 Bug fix

This PR will allow to download model and world on Windows. I checked the functionality with the executable download in the example folder.

Should I retarget this a different ign-fuel-tools version ?

Summary

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge

@ahcorde ahcorde requested a review from nkoenig as a code owner March 30, 2021 16:21
@github-actions github-actions bot added the 🏢 edifice Ignition Edifice label Mar 30, 2021
@codecov
Copy link

codecov bot commented Mar 30, 2021

Codecov Report

Merging #178 (1dce04b) into ign-fuel-tools4 (4c9b3c7) will increase coverage by 0.32%.
The diff coverage is 100.00%.

❗ Current head 1dce04b differs from pull request most recent head 407515a. Consider uploading reports for the commit 407515a to get more accurate results
Impacted file tree graph

@@                 Coverage Diff                 @@
##           ign-fuel-tools4     #178      +/-   ##
===================================================
+ Coverage            78.07%   78.40%   +0.32%     
===================================================
  Files                   19       19              
  Lines                 2636     2676      +40     
===================================================
+ Hits                  2058     2098      +40     
  Misses                 578      578              
Impacted Files Coverage Δ
src/CollectionIdentifier.cc 96.66% <100.00%> (+0.51%) ⬆️
src/FuelClient.cc 72.64% <100.00%> (+0.49%) ⬆️
src/Interface.cc 92.10% <100.00%> (+3.64%) ⬆️
src/LocalCache.cc 79.58% <100.00%> (ø)
src/ModelIdentifier.cc 92.69% <100.00%> (+0.34%) ⬆️

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 4c9b3c7...407515a. Read the comment docs.

@chapulina
Copy link
Contributor

Should I retarget this a different ign-fuel-tools version ?

It would be nice to fix it since Citadel, and we can merge forward.


Are there any tests that are currently skipped on Windows that we can enable with this PR?

grep -r "IGN_UTILS_TEST" .
./src/ign_TEST.cc:TEST(CmdLine, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Versions))
./src/ign_TEST.cc:TEST(CmdLine, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Help))
./src/ign_TEST.cc:TEST(CmdLine, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(ListFail))
./src/ign_TEST.cc:    IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(ModelListConfigServerUgly))
./src/ign_TEST.cc:    IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(ModelListCustomServerPretty))
./src/ign_TEST.cc:TEST(CmdLine, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(WorldListConfigServerUgly))
./src/ign_TEST.cc:    IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(WorldListCustomServerPretty))
./src/LocalCache_TEST.cc:TEST_F(LocalCacheTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(AllModels))
./src/LocalCache_TEST.cc:TEST_F(LocalCacheTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(MatchingModels))
./src/LocalCache_TEST.cc:TEST_F(LocalCacheTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(MatchingModel))
./src/LocalCache_TEST.cc:TEST_F(LocalCacheTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(AllWorlds))
./src/LocalCache_TEST.cc:TEST_F(LocalCacheTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(MatchingWorlds))
./src/LocalCache_TEST.cc:TEST_F(LocalCacheTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(MatchingWorld))
./src/Interface_TEST.cc:TEST(Interface, IGN_UTILS_TEST_DISABLED_ON_WIN32(FetchResources))
./src/FuelClient_TEST.cc.orig:TEST_F(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(DownloadModel))
./src/FuelClient_TEST.cc.orig:TEST_F(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(CachedModel))
./src/FuelClient_TEST.cc.orig:TEST_F(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(DownloadWorld))
./src/FuelClient_TEST.cc.orig:TEST_F(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(CachedWorld))
./src/FuelClient_TEST.cc.orig:TEST_F(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(Models))
./src/FuelClient_TEST.cc.orig:TEST_F(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(Worlds))
./src/ign_src_TEST.cc.orig:TEST(CmdLine, IGN_UTILS_TEST_DISABLED_ON_WIN32(ModelListConfigServerUgly))
./src/ign_src_TEST.cc.orig:TEST(CmdLine, IGN_UTILS_TEST_DISABLED_ON_WIN32(ModelListConfigServerPretty))
./src/ign_src_TEST.cc.orig:TEST(CmdLine, IGN_UTILS_TEST_DISABLED_ON_WIN32(
./src/ign_src_TEST.cc.orig:TEST(CmdLine, IGN_UTILS_TEST_DISABLED_ON_WIN32(ModelDownloadUnversioned))
./src/ign_src_TEST.cc.orig:TEST(CmdLine, IGN_UTILS_TEST_DISABLED_ON_WIN32(DownloadConfigCache))
./src/ign_src_TEST.cc.orig:TEST(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(
./src/ign_src_TEST.cc.orig:TEST(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(
./src/ign_src_TEST.cc.orig:TEST(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(
./src/ign_src_TEST.cc.orig:TEST(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(
./src/ign_src_TEST.cc.orig:TEST_P(DownloadCollectionTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(AllItems))
./src/ign_src_TEST.cc.orig:TEST_P(DownloadCollectionTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(Models))
./src/ign_src_TEST.cc.orig:TEST_P(DownloadCollectionTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(Worlds))
./src/FuelClient_TEST.cc:TEST_F(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(DownloadModel))
./src/FuelClient_TEST.cc:TEST_F(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(CachedModel))
./src/FuelClient_TEST.cc:TEST_F(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(DownloadWorld))
./src/FuelClient_TEST.cc:TEST_F(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(CachedWorld))
./src/FuelClient_TEST.cc:TEST_F(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(Models))
./src/FuelClient_TEST.cc:TEST_F(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(Worlds))
./src/ign_src_TEST.cc:TEST(CmdLine, IGN_UTILS_TEST_DISABLED_ON_WIN32(ModelListConfigServerUgly))
./src/ign_src_TEST.cc:TEST(CmdLine, IGN_UTILS_TEST_DISABLED_ON_WIN32(ModelListConfigServerPretty))
./src/ign_src_TEST.cc:TEST(CmdLine, IGN_UTILS_TEST_DISABLED_ON_WIN32(
./src/ign_src_TEST.cc:TEST(CmdLine, IGN_UTILS_TEST_DISABLED_ON_WIN32(ModelDownloadUnversioned))
./src/ign_src_TEST.cc:TEST(CmdLine, IGN_UTILS_TEST_DISABLED_ON_WIN32(DownloadConfigCache))
./src/ign_src_TEST.cc:TEST(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(
./src/ign_src_TEST.cc:TEST(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(
./src/ign_src_TEST.cc:TEST(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(
./src/ign_src_TEST.cc:TEST(FuelClientTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(
./src/ign_src_TEST.cc:TEST_P(DownloadCollectionTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(AllItems))
./src/ign_src_TEST.cc:TEST_P(DownloadCollectionTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(Models))
./src/ign_src_TEST.cc:TEST_P(DownloadCollectionTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(Worlds))

@chapulina chapulina added the Windows Windows support label Mar 30, 2021
@ahcorde
Copy link
Contributor Author

ahcorde commented Mar 31, 2021

I fixed the Interface_TEST

But I have a problem with the following folder localhost:8000. Windows doesn't allow to create directories with the following characters. /, \, :, *, ?, ", <, > and |.

@chapulina should we remove this symbol ? o replace it for other one ?

@chapulina
Copy link
Contributor

problem with the following folder localhost:8000

Ohh I see, how about we substitute the symbol when creating the folder just on Windows? So we keep backwards compatibility for Unix.

@chapulina chapulina changed the base branch from main to ign-fuel-tools6 April 1, 2021 20:40
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

Verified that download is working on Windows now 👍 I'll leave it up to you if you want to fix the test or leave that to a future PR.

ahcorde added 3 commits April 9, 2021 10:47
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
@ahcorde ahcorde force-pushed the ahcorde/fix/windows_download branch from 69c3f31 to 3b7e3d8 Compare April 9, 2021 08:50
@ahcorde ahcorde changed the base branch from ign-fuel-tools6 to ign-fuel-tools4 April 9, 2021 08:50
@ahcorde
Copy link
Contributor Author

ahcorde commented Apr 9, 2021

I retargeted this to ign-fuel-tools4 which is Citadel, there is one more test that I have fixed in main, the Helper_TEST. I will include the changes once the changes are forward ported

ahcorde added 2 commits April 9, 2021 10:55
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
@ahcorde
Copy link
Contributor Author

ahcorde commented Apr 9, 2021

This PR depends on gazebosim/gz-common#197

Signed-off-by: ahcorde <ahcorde@gmail.com>
@ahcorde
Copy link
Contributor Author

ahcorde commented Apr 12, 2021

@osrf-jenkins retest this please

ahcorde added 2 commits April 13, 2021 09:18
Signed-off-by: Alejandro Hernández <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
@ahcorde
Copy link
Contributor Author

ahcorde commented Apr 13, 2021

I'm getting on the buildfarm this error:

9: libcurl: (1) Protocol "https" not supported or disabled in libcurl

But I was able to install this properly on my local machine. I know there is an open issue here about this #105.

any thought @j-rivero ?

@ahcorde
Copy link
Contributor Author

ahcorde commented Apr 13, 2021

@j-rivero I can't see openssl installed on Windows

@ahcorde
Copy link
Contributor Author

ahcorde commented Apr 13, 2021

@osrf-jenkins retest this please

@ahcorde
Copy link
Contributor Author

ahcorde commented Apr 13, 2021

ou yeah CI is green! @chapulina do you mind to have a look ?

@chapulina
Copy link
Contributor

This seems like an infra problem on the Windows build CC @j-rivero

[22.859s]   -- 	Missing dependency [Protobuf] (Components: all)

@ahcorde
Copy link
Contributor Author

ahcorde commented May 4, 2021

@osrf-jenkins retest this please

Signed-off-by: ahcorde <ahcorde@gmail.com>
@mjcarroll
Copy link
Contributor

@osrf-jenkins retest this please

@ahcorde
Copy link
Contributor Author

ahcorde commented May 11, 2021

This seems like an infra problem on the Windows build CC @j-rivero

[22.859s]   -- 	Missing dependency [Protobuf] (Components: all)

friendly ping @j-rivero

@ahcorde
Copy link
Contributor Author

ahcorde commented May 12, 2021

@mjcarroll this build shows that Windows is also green

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

I verified that this works with ign-gazebo's resource spawner on Linux. I just have some nitpicks.

src/ClientConfig_TEST.cc Outdated Show resolved Hide resolved
@@ -986,6 +986,14 @@ bool FuelClient::ParseWorldFileUrl(const common::URI &_fileUrl,
return false;
}

std::vector<std::string> tokens = ignition::common::split(file, "/");
std::string fileTemp;
for (auto s : tokens)
Copy link
Contributor

Choose a reason for hiding this comment

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

I see you resolved the conversation but didn't apply the change. Not sure if you think it's not needed or overlooked it?

src/ModelIdentifier_TEST.cc Show resolved Hide resolved
src/Zip.cc Outdated Show resolved Hide resolved
src/Zip.cc Outdated Show resolved Hide resolved
ahcorde added 2 commits May 14, 2021 13:00
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
@ahcorde
Copy link
Contributor Author

ahcorde commented May 14, 2021

Retriggering again Windows build, this PR gazebo-tooling/release-tools#463 on release-tools should fix the issue.

@ahcorde
Copy link
Contributor Author

ahcorde commented May 14, 2021

@osrf-jenkins retest this please

@ahcorde ahcorde merged commit 8674ed8 into ign-fuel-tools4 May 14, 2021
@ahcorde ahcorde deleted the ahcorde/fix/windows_download branch May 14, 2021 12:44
@chapulina chapulina removed the needs upstream release Blocked by a release of an upstream library label May 14, 2021
chapulina added a commit that referenced this pull request Aug 13, 2021
* Owner upload (#179)

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Louise Poubel <louise@openrobotics.org>

* Fixed windows download (#178)

* Fixed donwload on Windows

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Fixed interface_TEST

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Improved windows support

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Make linters happy

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Make linters happy

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Improved

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Fixed test on Windows

Signed-off-by: Alejandro Hernández <ahcorde@gmail.com>

* Fixed test

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Fix some nits

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Improved Windows support

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Fixed test on Linux

Signed-off-by: ahcorde <ahcorde@gmail.com>

* make linters happy

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Fixed windows tests

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Fixed tests

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Added feddback

Signed-off-by: ahcorde <ahcorde@gmail.com>

* make linters happy

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Remove tools/code_check and update codecov (#187)

Signed-off-by: Louise Poubel <louise@openrobotics.org>

* added fuel update command (#185)

* added fuel update command

Signed-off-by: Tomas Lorente <jtlorente@ekumenlabs.com>

* fixed header

Signed-off-by: Tomas Lorente <jtlorente@ekumenlabs.com>

* fixed build

Signed-off-by: Tomas Lorente <jtlorente@ekumenlabs.com>

* updated docs

Signed-off-by: Tomas Lorente <jtlorente@ekumenlabs.com>

* added header

Signed-off-by: Tomas Lorente <jtlorente@ekumenlabs.com>

* fix

Signed-off-by: Tomas Lorente <jtlorente@ekumenlabs.com>

* nit2

Signed-off-by: Tomas Lorente <jtlorente@ekumenlabs.com>

* Style, and headers

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fixed world download

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Removed debug

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix tests

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Fix windows

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>

* 🎈 4.4.0 (#190)

Signed-off-by: Louise Poubel <louise@openrobotics.org>

* Detect ign instead of using cmake module to check for ignition-tools (#191)

Signed-off-by: Louise Poubel <louise@openrobotics.org>

Co-authored-by: Nate Koenig <nkoenig@users.noreply.github.com>
Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Louise Poubel <louise@openrobotics.org>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Co-authored-by: Jose Tomas Lorente <jtlorente@ekumenlabs.com>
Co-authored-by: Jose Luis Rivero <jrivero@osrfoundation.org>
@osrf-triage
Copy link

This pull request has been mentioned on Gazebo Community. There might be relevant details there:

https://community.gazebosim.org/t/new-ignition-releases-2022-01-10/1228/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏰 citadel Ignition Citadel Windows Windows support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants