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

create-kpt-functions does not work on M1 #2775

Open
fsommar opened this issue Feb 10, 2022 · 4 comments · Fixed by GoogleContainerTools/kpt-functions-catalog#870
Open

create-kpt-functions does not work on M1 #2775

fsommar opened this issue Feb 10, 2022 · 4 comments · Fixed by GoogleContainerTools/kpt-functions-catalog#870
Labels
area/fn-sdk Typescript SDK bug Something isn't working customer deep engagement p0 triaged Issue has been triaged by adding an `area/` label

Comments

@fsommar
Copy link
Contributor

fsommar commented Feb 10, 2022

Hi 👋 I wasn't sure whether to mark this as a bug or a feature request, but given the increasing prevalence of M1 I opted for bug.

Expected behavior

The npm module create-kpt-functions should be usable on macOS arm64 architecture.

Actual behavior

The npm module create-kpt-functions isn't usable on macOS arm64 architecture (M1) because the precompiled typegen binary is not available for darwin_arm64.

Information

https://storage.googleapis.com/kpt-functions/v0.17.0/typegen_darwin_amd64.tar.gz is available, https://storage.googleapis.com/kpt-functions/v0.17.0/typegen_darwin_arm64.tar.gz is not. This leads to the following output when trying to run npm install in a project that has "create-kpt-functions": "^0.19.0" as a dependency:

npm ERR! code 1
npm ERR! path [..]/node_modules/create-kpt-functions
npm ERR! command failed
npm ERR! command sh -c go-npm install
npm ERR! Installation is not supported for this architecture: arm64
npm ERR! Invalid inputs

Since we're only using it as a dev dependency I can at least run npm install after removing the dev dependency – but I'm still locked out of any workflows relying on the binary.

Steps to reproduce the behavior

  1. Use an M1 Mac
  2. Run npm install in a folder with this package.json:
    {
      "name": "test",
      "version": "1.0.0",
      "devDependencies": {
        "create-kpt-functions": "^0.19.0"
      }
    }
    
@fsommar fsommar added the bug Something isn't working label Feb 10, 2022
@fsommar fsommar changed the title create-kpt-functions does not compile on M1 create-kpt-functions does not work on M1 Feb 10, 2022
@droot droot added customer deep engagement area/fn-sdk Typescript SDK triaged Issue has been triaged by adding an `area/` label labels Feb 16, 2022
@droot
Copy link
Contributor

droot commented Feb 16, 2022

/cc @mengqiy @yuwenma

@mengqiy mengqiy assigned mengqiy and unassigned yuwenma May 17, 2022
@droot droot added the p0 label May 17, 2022
@mengqiy
Copy link
Contributor

mengqiy commented May 17, 2022

This is part of efforts in #2874

@mengqiy
Copy link
Contributor

mengqiy commented Jun 6, 2022

This issue requires us to release npm modules for arm64 in the SDK repo. I will try to figure out how to fix it.
@yuwenma Just FYI

@mengqiy
Copy link
Contributor

mengqiy commented Jun 6, 2022

I took a look at it.
We need to restore something we removed in GoogleContainerTools/kpt-functions-sdk#514. To be more concrete, we need to:

  • Restore the typegen related packages go/cmd/typegen and go/pkg/swagger. They should make typegen have its own module.
  • Restore the typegen release workflow release-typegen.yaml. Note that publish-bins.sh has been moved to ts/scripts/publish-bins.sh, so the last step needs to be updated.
  • Restore the build targets in go/Makefile and also add GOARCH=arm64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/fn-sdk Typescript SDK bug Something isn't working customer deep engagement p0 triaged Issue has been triaged by adding an `area/` label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants