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

generate step #80

Closed
wants to merge 1 commit into from
Closed

Conversation

dave-gray101
Copy link

  • Adds a new generate step that runs buf generate
    • Not ran by default, available for users to use in multi-step github pipelines
  • Ran npm audit fix and picked up one minor dependency update
  • Note build script doesn't seem to be compatible with Node v23.2, downgraded to v23.1 to build index.js

@CLAassistant
Copy link

CLAassistant commented Nov 16, 2024

CLA assistant check
All committers have signed the CLA.

@emcfarlane
Copy link
Collaborator

Hi @dave-gray101 thanks for putting the PR together. We investigated this behavior in a previous PR which looked at checking the generated code didn't affect the committed. Maybe we could open an issue to discuss the use cases? There are some edge cases which made us hold off on completing this feature. The main one is that buf generate relies on the local environment for plugins which means it not usually safe to run unless it's opted in.

As a workaround for now you can run buf generate after the setup and linting phase with custom run actions:

  - uses: bufbuild/buf-action@v1
    with:
      token: ${{ secrets.BUF_TOKEN }}
  # Custom steps can invoke buf directly.
  - run: buf generate
  - run: [[ -z "$(git status --porcelain --untracked-files=all)" ]]

@emcfarlane
Copy link
Collaborator

Will close for now, please see the workaround above or open a discussion/issue. Thanks

@emcfarlane emcfarlane closed this Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants