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

Write to log file and add --upload-metadata to publish metadata files #836

Merged
merged 28 commits into from
Oct 24, 2023

Conversation

ghengeveld
Copy link
Member

@ghengeveld ghengeveld commented Oct 12, 2023

Fixes AP-3531, AP-2517

First of all, this updates our logging to write the CLI logs to a chromatic.log file besides printing to the terminal. The log file format is akin to what the logs look like in CI.

Secondly, this adds an option to upload a set of "metadata" files, which will be available as part of the published Storybook in the .chromatic directory. A directory index is provided:

Screenshot 2023-10-12 at 12 57 45
📦 Published PR as canary version: 7.5.0--canary.836.6619467092.0

✨ Test out this PR locally via:

npm install chromatic@7.5.0--canary.836.6619467092.0
# or 
yarn add chromatic@7.5.0--canary.836.6619467092.0

@ghengeveld ghengeveld requested review from tmeasday, JonathanKolnik, tevanoff and thafryer and removed request for tmeasday and JonathanKolnik October 12, 2023 10:59
@ghengeveld ghengeveld changed the title Introduce --upload-metadata to publish certain metadata files when the build finishes Write to log file and Introduce --upload-metadata to publish certain metadata files Oct 12, 2023
@ghengeveld ghengeveld changed the title Write to log file and Introduce --upload-metadata to publish certain metadata files Write to log file and Introduce --upload-metadata to publish metadata files Oct 12, 2023
@ghengeveld ghengeveld changed the title Write to log file and Introduce --upload-metadata to publish metadata files Write to log file and add --upload-metadata to publish metadata files Oct 12, 2023
Copy link
Contributor

@tevanoff tevanoff left a comment

Choose a reason for hiding this comment

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

Love this, this is great! However, you say:

these files will be public on a public Storybook.

That sounds like a deal breaker to me. Can we sync up on options for storing these more securely?

@ghengeveld
Copy link
Member Author

@tevanoff I opened a PR for the CDN to not allow public (non-member) access to these files.

@tmeasday
Copy link
Member

@ghengeveld perhaps change the PR description as this could unduly worry someone who reads this PR.

Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

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

LGTM, good stuff

node-src/index.ts Show resolved Hide resolved
@chromaui chromaui deleted a comment from linear bot Oct 20, 2023
@chromaui chromaui deleted a comment from linear bot Oct 20, 2023
@ghengeveld ghengeveld added minor Auto: Increment the minor version when merged release Auto: Create a `latest` release when merged labels Oct 23, 2023
@ghengeveld ghengeveld added this pull request to the merge queue Oct 23, 2023
@ghengeveld ghengeveld removed this pull request from the merge queue due to a manual request Oct 23, 2023
@ghengeveld ghengeveld added this pull request to the merge queue Oct 24, 2023
Merged via the queue into main with commit cf6b32b Oct 24, 2023
21 checks passed
@ghengeveld ghengeveld deleted the upload-metadata-files branch October 24, 2023 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Auto: Increment the minor version when merged release Auto: Create a `latest` release when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants