You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "zsy056 (via GitHub)" <gi...@apache.org> on 2025/11/13 07:25:18 UTC

[PR] Refresh msvc2017 Dockerfile and add windows workflow [thrift]

zsy056 opened a new pull request, #3233:
URL: https://github.com/apache/thrift/pull/3233

   <!-- Explain the changes in the pull request below: -->
     
   Refresh msvc2017 Dockerfile and add windows workflow
   
   <!-- We recommend you review the checklist/tips before submitting a pull request. -->
   
   - [ ] Did you create an [Apache Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket?  ([Request account here](https://selfserve.apache.org/jira-account.html), not required for trivial changes)
   - [ ] If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
   - [x] Did you squash your changes to a single commit?  (not required, but preferred)
   - [x] Did you do your best to avoid breaking changes?  If one was needed, did you label the Jira ticket with "Breaking-Change"?
   - [ ] If your change does not involve any code, include `[skip ci]` anywhere in the commit message to free up build resources.
   
   <!--
     The Contributing Guide at:
     https://github.com/apache/thrift/blob/master/CONTRIBUTING.md
     has more details and tips for committing properly.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refresh msvc2017 Dockerfile and add windows workflow [thrift]

Posted by "zsy056 (via GitHub)" <gi...@apache.org>.
zsy056 commented on PR #3233:
URL: https://github.com/apache/thrift/pull/3233#issuecomment-3534718239

   workflow failed as expected, I think the failed python test is being fixed in https://github.com/apache/thrift/pull/3231
   
   ```
    Executing individual test scripts with various generated code directories
    Directories to be tested: gen-py-default, gen-py-slots, gen-py-oldstyle, gen-py-no_utf8strings, gen-py-dynamic, gen-py-dynamicslots, gen-py-enum, gen-py-type_hints
    Scripts to be tested: FastbinaryTest.py, TestFrozen.py, TestRenderedDoubleConstants.py, TSimpleJSONProtocolTest.py, SerializationTest.py, TestEof.py, TestSyntax.py, TestSocket.py, TestTypes.py
   ----------------
   Traceback (most recent call last):
     File "C:\thrift\test\py\RunClientServer.py", line 334, in <module>
       sys.exit(main())
                ~~~~^^
     File "C:\thrift\test\py\RunClientServer.py", line 313, in main
       runScriptTest(options.libdir, options.gen_base, genpydir, script)
       ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "C:\thrift\test\py\RunClientServer.py", line 93, in runScriptTest
       env = setup_pypath(libdir, os.path.join(genbase, genpydir))
     File "C:\thrift\test\py\RunClientServer.py", line 86, in setup_pypath
       env['PYTHONPATH'] = os.pathsep.join(dirs)
                           ~~~~~~~~~~~~~~~^^^^^^
   TypeError: sequence item 0: expected str instance, NoneType found
   <end of output>
   Test time =   0.20 sec
   ----------------------------------------------------------
   Test Failed.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refresh msvc2017 Dockerfile and add windows workflow [thrift]

Posted by "CJCombrink (via GitHub)" <gi...@apache.org>.
CJCombrink commented on PR #3233:
URL: https://github.com/apache/thrift/pull/3233#issuecomment-3540068952

   > The part I like about using docker is that it publishes a thrift-build image that can help folks get started with a ready-to-use environment. 
   
   Sure it does have some benefit and it builds on top of what is already existing. _Although I am not sure who is brave enough to do local docker based development on Windows_ :P 
   
   Just regarding the approach: I opted to use conan as a package manager instead of building dependencies manually. I think conan is more inclined to keep dependencies building and up to data compared to trying to maintain basically the same logic here. Conan also provides some pre-build packages that can speed up the build. 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refresh msvc2017 Dockerfile and add windows workflow [thrift]

Posted by "CJCombrink (via GitHub)" <gi...@apache.org>.
CJCombrink commented on PR #3233:
URL: https://github.com/apache/thrift/pull/3233#issuecomment-3526070615

   FYI: I am also looking at a Windows Action but taking a bit of a different approach: https://github.com/CJCombrink/thrift/pull/7


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refresh msvc2017 Dockerfile and add windows workflow [thrift]

Posted by "zsy056 (via GitHub)" <gi...@apache.org>.
zsy056 commented on PR #3233:
URL: https://github.com/apache/thrift/pull/3233#issuecomment-3529070072

   > FYI: I am also looking at a Windows Action but taking a bit of a different approach: [CJCombrink#7](https://github.com/CJCombrink/thrift/pull/7)
   
   Cool! Your workflow runs much faster :D. The part I like about using docker is that it publishes a thrift-build image that can help folks get started with a ready-to-use environment. Maybe I can rename the workflow to something like msvc.yml.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refresh msvc2017 Dockerfile and add windows workflow [thrift]

Posted by "CJCombrink (via GitHub)" <gi...@apache.org>.
CJCombrink commented on code in PR #3233:
URL: https://github.com/apache/thrift/pull/3233#discussion_r2532769620


##########
build/docker/msvc2017/Dockerfile:
##########
@@ -22,29 +22,29 @@ SHELL ["cmd", "/S", "/C"]
 ADD https://aka.ms/vs/15/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe
 RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
     --installPath C:\BuildTools `
-    --all `
-    --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 `
-    --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 `
-    --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 `
-    --remove Microsoft.VisualStudio.Component.Windows81SDK `
+    --add Microsoft.VisualStudio.Workload.VCTools `
+    --add Microsoft.VisualStudio.Component.Windows10SDK.19041 `
  || IF "%ERRORLEVEL%"=="3010" EXIT 0
 RUN DEL C:\TEMP\vs_buildtools.exe
 
 # Install CMake
-ADD https://github.com/Kitware/CMake/releases/download/v3.13.4/cmake-3.13.4-win64-x64.msi C:\TEMP\cmake.msi
+ADD https://github.com/Kitware/CMake/releases/download/v4.1.2/cmake-4.1.2-windows-x86_64.msi C:\TEMP\cmake.msi
 RUN msiexec.exe /i C:\TEMP\cmake.msi /qn && `
     SETX PATH "%PATH%;C:\Program Files\CMake\bin" && `
     DEL C:\TEMP\cmake.msi
 
 # Install boost (for the thrift runtime library build)
-ADD https://boost.teeks99.com/bin/1.69.0/boost_1_69_0-msvc-14.1-64.exe C:\TEMP\boost.exe
-RUN C:\TEMP\boost.exe /DIR="C:\Libraries\boost_1_69_0" /SILENT && `
-    DEL C:\TEMP\boost.exe
+ADD https://boost.teeks99.com/bin/1.88.0/boost_1_88_0-msvc-14.1-64.exe C:\TEMP\boost.exe

Review Comment:
   I can only recommend adding [--checksum](https://docs.docker.com/reference/dockerfile/#add---checksum) checking either to the ADD or do it manually to add some layer of protection and verification. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refresh msvc2017 Dockerfile and add windows workflow [thrift]

Posted by "zsy056 (via GitHub)" <gi...@apache.org>.
zsy056 commented on code in PR #3233:
URL: https://github.com/apache/thrift/pull/3233#discussion_r2561374797


##########
build/docker/msvc2017/Dockerfile:
##########
@@ -22,29 +22,29 @@ SHELL ["cmd", "/S", "/C"]
 ADD https://aka.ms/vs/15/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe
 RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
     --installPath C:\BuildTools `
-    --all `
-    --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 `
-    --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 `
-    --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 `
-    --remove Microsoft.VisualStudio.Component.Windows81SDK `
+    --add Microsoft.VisualStudio.Workload.VCTools `
+    --add Microsoft.VisualStudio.Component.Windows10SDK.19041 `
  || IF "%ERRORLEVEL%"=="3010" EXIT 0
 RUN DEL C:\TEMP\vs_buildtools.exe
 
 # Install CMake
-ADD https://github.com/Kitware/CMake/releases/download/v3.13.4/cmake-3.13.4-win64-x64.msi C:\TEMP\cmake.msi
+ADD https://github.com/Kitware/CMake/releases/download/v4.1.2/cmake-4.1.2-windows-x86_64.msi C:\TEMP\cmake.msi
 RUN msiexec.exe /i C:\TEMP\cmake.msi /qn && `
     SETX PATH "%PATH%;C:\Program Files\CMake\bin" && `
     DEL C:\TEMP\cmake.msi
 
 # Install boost (for the thrift runtime library build)
-ADD https://boost.teeks99.com/bin/1.69.0/boost_1_69_0-msvc-14.1-64.exe C:\TEMP\boost.exe
-RUN C:\TEMP\boost.exe /DIR="C:\Libraries\boost_1_69_0" /SILENT && `
-    DEL C:\TEMP\boost.exe
+ADD https://boost.teeks99.com/bin/1.88.0/boost_1_88_0-msvc-14.1-64.exe C:\TEMP\boost.exe

Review Comment:
   Thanks! I have added the checksum checking.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refresh msvc2017 Dockerfile and add windows workflow [thrift]

Posted by "Jens-G (via GitHub)" <gi...@apache.org>.
Jens-G commented on PR #3233:
URL: https://github.com/apache/thrift/pull/3233#issuecomment-3534430596

   > > does that include net10?
   
   > I don't think so, I can try to add the support.
   
   I'm not so sure if this is really needed, sorry. Not sure what I had in mind when I asked that question.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refresh msvc2017 Dockerfile and add windows workflow [thrift]

Posted by "Jens-G (via GitHub)" <gi...@apache.org>.
Jens-G commented on PR #3233:
URL: https://github.com/apache/thrift/pull/3233#issuecomment-3529688706

   does that include net10?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refresh msvc2017 Dockerfile and add windows workflow [thrift]

Posted by "zsy056 (via GitHub)" <gi...@apache.org>.
zsy056 commented on PR #3233:
URL: https://github.com/apache/thrift/pull/3233#issuecomment-3540194080

   > > The part I like about using docker is that it publishes a thrift-build image that can help folks get started with a ready-to-use environment.
   > 
   > Sure it does have some benefit and it builds on top of what is already existing. _Although I am not sure who is brave enough to do local docker based development on Windows_ :P
   > 
   > Just regarding the approach: I opted to use conan as a package manager instead of building dependencies manually. I think conan is more inclined to keep dependencies building and up to data compared to trying to maintain basically the same logic here. Conan also provides some pre-build packages that can speed up the build.
   
   I totally agree using Conan or vcpkg would be much better. I can switch the build script to use Conan after your change got merged.
   
   Just curious, what is wrong about local docker based development on Windows? 🤣 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refresh msvc2017 Dockerfile and add windows workflow [thrift]

Posted by "Jens-G (via GitHub)" <gi...@apache.org>.
Jens-G merged PR #3233:
URL: https://github.com/apache/thrift/pull/3233


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refresh msvc2017 Dockerfile and add windows workflow [thrift]

Posted by "Jens-G (via GitHub)" <gi...@apache.org>.
Jens-G commented on PR #3233:
URL: https://github.com/apache/thrift/pull/3233#issuecomment-3639280878

   > publishes a thrift-build image
   
   Except that we may not publish it. https://www.apache.org/legal/release-policy.html#release-definition


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refresh msvc2017 Dockerfile and add windows workflow [thrift]

Posted by "zsy056 (via GitHub)" <gi...@apache.org>.
zsy056 commented on PR #3233:
URL: https://github.com/apache/thrift/pull/3233#issuecomment-3529789293

   > does that include net10?
   
   I don't think so, I can try to add the support.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org