microsoft / moaw

Grab-and-go resources to help you learn new skills, with all the tools you need to create, host and share your own workshop
https://aka.ms/moaw
Creative Commons Attribution Share Alike 4.0 International
108 stars 83 forks source link

GitHub Copilot Java: Spring Boot Application failed unzip #133

Closed tsubakimoto closed 4 months ago

tsubakimoto commented 4 months ago

https://github.com/microsoft/moaw/blob/main/workshops/github-copilot-java/workshop.md#creating-a-spring-boot-application

Hi team. When I executed the following command, an error occurred and I could not proceed to the subsequent steps.

command

> mkdir sample; cd sample
> curl https://start.spring.io/starter.zip \
           -d dependencies=web,devtools \
           -d bootVersion=3.1.5 \
           -d type=maven-project \
           -d applicationName=CopilotSample \
           -d packageName=com.microsoft.sample \
           -d groupId=com.microsoft.sample \
           -d artifactId=CopilotSample \
           -o my-project.zip
> unzip my-project.zip

error

$ unzip my-project.zip
Archive:  my-project.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of my-project.zip or
        my-project.zip.zip, and cannot find my-project.zip.ZIP, period.

reason

my-project.zip is empty and version 3.1.5 is invalid.

$ curl https://start.spring.io/starter.zip \
           -d dependencies=web,devtools \
           -d bootVersion=3.1.5 \
           -d type=maven-project \
           -d applicationName=CopilotSample \
           -d packageName=com.microsoft.sample \
           -d groupId=com.microsoft.sample \
           -d artifactId=CopilotSample | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   373    0   194  100   179    293    270 --:--:-- --:--:-- --:--:--   564
{
  "timestamp": "2024-06-03T09:33:16.076+00:00",
  "status": 400,
  "error": "Bad Request",
  "message": "Invalid Spring Boot version '3.1.5', Spring Boot compatibility range is >=3.2.0",
  "path": "/starter.zip"
}
yoshioterada commented 4 months ago

Dear @tsubakimoto san

I hope this message finds you well. I would like to express my sincere gratitude for taking the time to report this issue despite your busy schedule.

Upon reviewing the version of Spring Boot, I have confirmed that the latest stable version currently available is 3.3.0. You can find this information at the following link: https://start.spring.io/

The correct command is as follows:

curl https://start.spring.io/starter.zip \
           -d dependencies=web,devtools \
           -d bootVersion=3.3.0 \
           -d type=maven-project \
           -d applicationName=CopilotSample \
           -d packageName=com.microsoft.sample \
           -d groupId=com.microsoft.sample \
           -d artifactId=CopilotSample \
           -d javaVersion=21 \
           -o my-project.zip

Based on this information, I will proceed with the necessary corrections. Thank you very much for pointing this out.

Your assistance is greatly appreciated. Best Regards. Yoshio

tsubakimoto commented 4 months ago

Thank you @yoshioterada san. I would like to try again the workshop you modified.

sinedied commented 4 months ago

:tada: This issue has been resolved in version 1.5.0 :tada:

The release is available on npm package (@latest dist-tag)

Your semantic-release bot :package::rocket: