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

Add new setup-poetry action and fix nightly-release #212

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

austin-denoble
Copy link
Contributor

@austin-denoble austin-denoble commented Oct 4, 2023

Problem

nightly-release workflow is still failing after the previous "fix": #208.

This time it's due to make package failing on poetry build, because poetry wasn't setup properly in the workflow.
https://github.com/pinecone-io/pinecone-python-client/actions/runs/6399744230/job/17372332268

Run make package
poetry build
make: poetry: No such file or directory
make: *** [Makefile:22: package] Error 127
Error: Process completed with exit code 2.

While fixing this I noticed we're also not installing Poetry in the publish-to-pypi workflow, so calling poetry version and make commands there would fail. We need to make sure we're installing Poetry properly before using make in our workflows, as they call Poetry under the hood.

Solution

  • Add a new setup-poetry action that encapsulates the install + dependencies bits. I noticed we were doing this explicitly in several workflows and thought it called for an action.
  • Fix nightly-release worfklow: call the new action before calling make package.
  • Fix release-to-pypi worfklow: call the new action before calling poetry version, and make commands for publishing.
  • Clean up / use the action in testing worfklow.

Type of Change

  • Infrastructure change (CI configs, etc)

Test Plan

Validate PR workflows pass as expected. Merge and check nightly-release to make sure we're in good shape.

… by using the action, apply to other relevant workflows
@austin-denoble austin-denoble marked this pull request as ready for review October 4, 2023 06:00

- name: Set up Git
run: |
git config --global user.name "Pinecone CI"
git config --global user.email "[email protected]"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved this up, did a tiny bit of organizing steps in here.

Comment on lines -47 to -48
- name: Build Project
run: poetry build
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed, we're calling make package above which is essentially an alias for poetry build, don't think we need to call it again.

Copy link
Collaborator

@jhamon jhamon left a comment

Choose a reason for hiding this comment

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

Nice work 🚀

@austin-denoble austin-denoble merged commit 03da225 into main Oct 4, 2023
4 checks passed
@austin-denoble austin-denoble deleted the adenoble/fix-ci-workflow-issues branch October 4, 2023 17:16
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.

2 participants