Skip to content

[code-infra] Make Argos upload script reusable #45883

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
Apr 15, 2025
Merged

Conversation

Janpot
Copy link
Member

@Janpot Janpot commented Apr 11, 2025

Remove the pigment logic form argos push script, just generate the screenshots in the same screenshots dir as core, it's the same outcome. (which was not ideal in the first place because it may overwrite but ok, will be fixed once pigment regression tests are moved to the pigment project)

Make the folder for argos push script configurable so we can reuse it more easily

@Janpot Janpot added the scope: code-infra Specific to the core-infra product label Apr 11, 2025
@mui-bot
Copy link

mui-bot commented Apr 11, 2025

Netlify deploy preview

https://deploy-preview-45883--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against aa86069

@Janpot Janpot changed the title [code-infra] Fix argos upload script [code-infra] make Argos upload script reusable Apr 11, 2025
@Janpot Janpot marked this pull request as ready for review April 11, 2025 11:31
@Janpot Janpot requested review from brijeshb42 and a team April 11, 2025 11:32
@@ -79,7 +79,7 @@
"test:regressions-pigment-css:run": "nx run nx_test_regressions_pigment_css_run",
"test:regressions-pigment-css:server": "pnpm --filter @app/pigment-css-vite-app run preview --port 5001",
"test:unit": "nx run nx_test_unit",
"test:argos": "node ./scripts/pushArgos.mjs",
"test:argos": "node ./scripts/pushArgos.mjs test/regressions/screenshots/chrome",
Copy link
Member

Choose a reason for hiding this comment

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

WDYT about making this the default argument?
I imagine that most if not all repos/projects will use the same path. 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't really mind adding a default, but test/regressions/screenshots/chrome, while currently being in use, feels a bit nonsensical to me.

Copy link
Member

Choose a reason for hiding this comment

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

I suggested it only because the migration would be seamless. 🙈
But yeah, I agree, we could omit the chrome part, since we do not create screenshots on other browsers anyway... 🤷

Copy link
Member Author

Choose a reason for hiding this comment

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

The original CLI that we wrap also uses a positional argument with no default. imo it makes most sense to not let this script make assumptions about the rest of the repo, it feels leaky.

Copy link
Member

Choose a reason for hiding this comment

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

Sure, I have no objections to this approach as well. 👍
It will be cleaner long term. 👌
We just need to remember that this is a breaking change that will need adjustment when @mui/monorepo is bumped. ℹ️

@Janpot Janpot changed the title [code-infra] make Argos upload script reusable [code-infra] make Argos upload script **reusable** Apr 11, 2025
@Janpot Janpot changed the title [code-infra] make Argos upload script **reusable** [code-infra] make Argos upload script reusable Apr 11, 2025
@oliviertassinari oliviertassinari changed the title [code-infra] make Argos upload script reusable [code-infra] Make Argos upload script reusable Apr 15, 2025
@Janpot Janpot merged commit 28f03fa into mui:master Apr 15, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: code-infra Specific to the core-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants