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

Attempt to build the components storybook only when its source files … #5600

Merged
merged 4 commits into from
Jan 19, 2024

Conversation

stevepiercy
Copy link
Collaborator

…change

Copy link

netlify bot commented Jan 4, 2024

Deploy Preview for volto canceled.

Name Link
🔨 Latest commit 9e46b1e
🔍 Latest deploy log https://app.netlify.com/sites/volto/deploys/6596a47a7256f50008c467c6

Copy link

netlify bot commented Jan 4, 2024

Deploy Preview for plone-components canceled.

Name Link
🔨 Latest commit 9e46b1e
🔍 Latest deploy log https://app.netlify.com/sites/plone-components/deploys/6596a47bca705900081b960d

@stevepiercy stevepiercy self-assigned this Jan 4, 2024
@stevepiercy stevepiercy requested a review from sneridagh January 4, 2024 12:29
@stevepiercy
Copy link
Collaborator Author

@sneridagh this one is now ready and working, and I reverted its other PR to clean up the change log history. Note that the Netlify build for volto/components gets cancelled when there are no changes to files in its src directory.

@stevepiercy stevepiercy requested a review from davisagli January 14, 2024 01:25
@sneridagh sneridagh merged commit 30bfda3 into main Jan 19, 2024
64 checks passed
@sneridagh sneridagh deleted the build-volto-components-storybook-only-on-change branch January 19, 2024 12:34
sneridagh added a commit that referenced this pull request Jan 21, 2024
* main: (39 commits)
  Attempt to build the components storybook only when its source files … (#5600)
  Added Storybook to Netlify build to allow relative links from documentation (#5599)
  Fix multilingual redirector (#5628) (#5665)
  Update ref from install-from-packages to create-project (#5654)
  Pin Vale to 2.30.0 to allow build of documentation until we can upgrade to v3.x (#5656)
  Temporarily pin `sphinxcontrib-*help` dependencies so docs can build (#5655)
  Merge the StyleWrapper styles with the draggable props from b-D&D (#5652)
  Fix order of preference in addons-registry for the theme (#5649)
  Unify variables in Makefile (#5637)
  Links references view cypress tests (#5111)
  Unify start command, trigger `build:deps` command too (#5633)
  Release generate-volto 9.0.0-alpha.3
  Release @plone/types 1.0.0-alpha.2
  Improve Blocks typings. Refactor `volto-coresandbox` to TS. (#5624)
  i18n polishing (#5542)
  Release @plone/scripts 3.2.1
  Fix @plone/scripts for 17 and below (#5613)
  Release @plone/scripts 3.2.0
  Enhance `ColorPickerWidget` (#5585)
  edit recurrence button is aligned properly (#5590)
  ...
@sneridagh
Copy link
Member

@stevepiercy it seems that it does not deploy to production (main) since we merged this. Any idea what could be happening? For the PR deploys works well (the filter) but it never deploys in main :(

@stevepiercy
Copy link
Collaborator Author

@sneridagh I'm not clear what you mean. AFAIK, we never deployed the components Storybook to production, only the Volto Storybook. The components Storybook still builds on Netlify at https://plone-components.netlify.app.

@sneridagh
Copy link
Member

@stevepiercy sure, "production" Netlify. It never deployed again (last time was March).

@stevepiercy
Copy link
Collaborator Author

OK, last successful "production" build was on Mar 23, 2024.

https://app.netlify.com/sites/plone-components/deploys/65fff4105c8b5800088b8299

This was the last commit to yield a successful build.

8063f11

I don't yet see what changed right after that to prevent a successful build.

@stevepiercy
Copy link
Collaborator Author

I just manually triggered a deploy. Can you check if you see the expected changes?

It should only build on changes in packages/components/src, if I read the config correctly. See:

https://app.netlify.com/sites/plone-components/configuration/deploys#continuous-deployment

I looked back in the history, and ever since Mar 23, 2024, Netlify builds have been cancelled, either because there are no changes in the components storybook or something else I have not yet identified. Can you point me to the first commit after Mar 23, 2024, to main where there are changes to files that should have triggered the deploy? Then we can figure out what went wrong.

@stevepiercy
Copy link
Collaborator Author

I think this should have built, but was cancelled. I don't know why.

https://app.netlify.com/sites/plone-components/deploys/664b27cd9235660008f4ca86

12:37:13 AM: git clone --filter=blob:none https://github.com/plone/volto
12:37:14 AM: Preparing Git Reference refs/heads/main
12:37:16 AM: Custom publish path detected. Proceeding with the specified path: 'packages/components/storybook-static'
12:37:16 AM: Custom ignore command detected. Proceeding with the specified command: 'git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ./src/'
12:37:17 AM: Failed during stage 'checking build content for changes': Canceled build due to no content change
12:37:17 AM: manpath: warning: $PATH not set
12:37:17 AM: User-specified ignore command returned exit code 0. Returning early from build.

@stevepiercy
Copy link
Collaborator Author

I commented out the ignore command and force pushed to main to test.

That works. That implies that we probably had the path for doing a diff wrong all along, but were relying on the root ./src of the repo before we switched to the monorepo. In fact that's right about when we switched to monorepo, moving ./src into packages/volto/src/, so there were no more changes to detect.

I'll submit a PR to fix the Netlify ignore command so we can get it in the change log. However we can't test it until we have a change in its src files, even if it is a trivial space or line break.

@stevepiercy
Copy link
Collaborator Author

@sneridagh PR: #6410

@sneridagh
Copy link
Member

@stevepiercy thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants