Skip to content

Live notebook execution workflows, take ... whatever #567

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

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

validbeck
Copy link
Collaborator

Internal Notes for Reviewers

I keep saying I'm giving up but then I don't... anyway.

The LAST attempt gave me some interesting info in the logs. It did properly check against the correct base (staging) with the current commit aligning to the PR branch that was being merged in, but it still told me there was no difference in files:

Screenshot 2024-12-03 at 5 15 39 PM

Presumably because when the merge-main-into-staging.yaml workflow is complete, there ARE no changes in between staging and the commit being compared, because it's already been smushed in...

And so, I am trying to explicitly call the commit PRIOR to the most recent commit:

# See if site/notebooks/ has updates
# Checks against the previous commit to staging prior to the current push event
- name: Filter changed files
  if: ${{ steps.fetch_staging.outcome == 'success' }}
  uses: dorny/paths-filter@v2
  id: filter
  with:
    base: staging~1
    ref: ${{ github.sha }}
    filters: |
      notebooks:
        - 'site/notebooks/**'

I am hoping this will work. When I call git show HEAD~1 when I am on staging, I get the following info:

Screenshot 2024-12-04 at 11 21 49 AM

Which aligns with the last commit PRIOR to the last commit that was auto-merged in by the merge-main-into-staging.yaml workflow, so in theory the next time the workflows run it will retrieve the right commit to compare against. In theory. (It would help if I knew what I was doing.)

Screenshot 2024-12-04 at 11 25 19 AM

@validbeck validbeck added the internal Not to be externalized in the release notes label Dec 4, 2024
@validbeck validbeck self-assigned this Dec 4, 2024
@validbeck validbeck changed the title WIP Live notebook execution workflows, take ... whatever Dec 4, 2024
@validbeck validbeck requested a review from nrichers December 4, 2024 19:27
Copy link
Contributor

github-actions bot commented Dec 4, 2024

PR Summary

This pull request updates the GitHub Actions workflows for deploying documentation to both production and staging environments. The changes involve modifying the base reference used in the dorny/paths-filter action from prod to prod~1 in the deploy-docs-prod.yaml file and from staging to staging~1 in the deploy-docs-staging.yaml file. This adjustment ensures that the paths filter compares against the previous commit rather than the current branch head, which can be useful for detecting changes more accurately. Additionally, comments in the actions/checkout step have been updated for clarity, changing "Fetch all branches" to "Fetch all history".

Test Suggestions

  • Verify that the documentation deployment workflows trigger correctly when changes are made to the relevant files.
  • Test the paths filter to ensure it correctly identifies changes when comparing against the previous commit.
  • Check that the documentation is correctly deployed to both staging and production environments after the workflow runs.
  • Ensure that no unintended files trigger the deployment process.

Copy link
Contributor

github-actions bot commented Dec 4, 2024

A PR preview is available: Preview URL

Copy link
Collaborator

@nrichers nrichers left a comment

Choose a reason for hiding this comment

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

I'm kinda curious what specifying prod~1 as the base will do. My SWAG is that it will always trigger the workflow — it should — so you might want to make sure the filter for the notebooks works as expected.

Other than that, LGTM. 🚀

Copy link
Contributor

github-actions bot commented Dec 4, 2024

A PR preview is available: Preview URL

@validbeck validbeck merged commit a875ee7 into main Dec 4, 2024
3 checks passed
@validbeck validbeck deleted the beck/execution-workflows branch December 4, 2024 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Not to be externalized in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants