Skip to content

Studio: Display spinner when the site is being pulled#672

Merged
ivan-ottinger merged 7 commits into
trunkfrom
add/spinner-when-site-is-pulling
Nov 21, 2024
Merged

Studio: Display spinner when the site is being pulled#672
ivan-ottinger merged 7 commits into
trunkfrom
add/spinner-when-site-is-pulling

Conversation

@ivan-ottinger
Copy link
Copy Markdown
Contributor

@ivan-ottinger ivan-ottinger commented Nov 19, 2024

Related issues

Proposed Changes

  • display spinner when the site is being pulled, use Syncing tooltip
  • add tooltip messages for other cases where the spinner is displayed:
    • Adding - when a new site is being added
    • Importing - when an exported site is being imported
    • Loading - fallback tooltip message

Markup on 2024-11-19 at 17:37:43

Testing Instructions

  1. Check out the PR and build the app with STUDIO_SITE_SYNC=true npm start.
  2. Open the Sync tab.
  3. Connect a WP.com site to Studio.
  4. Pull the site from WP.com.
  5. Observe the spinner by the site in the sidebar.

Testing other tooltip messages:

  1. Go through the process of adding a new site and observe the Adding tooltip when the site is being added.
  2. Import an exported site and observe the Importing tooltip as the site is being imported.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@ivan-ottinger ivan-ottinger self-assigned this Nov 19, 2024
@ivan-ottinger ivan-ottinger requested a review from a team November 19, 2024 16:50
Copy link
Copy Markdown
Contributor

@katinthehatsite katinthehatsite left a comment

Choose a reason for hiding this comment

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

The functionality looks good to me and works as expected 👍
Nice work!

I noticed that some unit tests failed and tried re-retriggering them. They might pass but otherwise, would need to be adjusted before merging.

@ivan-ottinger
Copy link
Copy Markdown
Contributor Author

Thank you for your review and testing, Kat.

I noticed that some unit tests failed and tried re-retriggering them. They might pass but otherwise, would need to be adjusted before merging.

Oh, yeah, I missed running unit tests before asking for review yesterday evening. Sorry about that. I have now fixed the unit tests in 123890c (and subsequent lint fix 5f32895).

We are also waiting for feedback from Matt and Lucas now (https://github.com/Automattic/dotcom-forge/issues/9897#issuecomment-2487994378), so more changes may come in.

I will share another comment here once the PR is ready for another review round.

@ivan-ottinger
Copy link
Copy Markdown
Contributor Author

This PR is ready for another review round.

Copy link
Copy Markdown
Contributor

@wojtekn wojtekn left a comment

Choose a reason for hiding this comment

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

Works well, and the code change looks good. I left one note regarding code readability.

Comment thread src/components/site-menu.tsx Outdated
@ivan-ottinger ivan-ottinger merged commit e45332e into trunk Nov 21, 2024
@ivan-ottinger ivan-ottinger deleted the add/spinner-when-site-is-pulling branch November 21, 2024 10:33
ivan-ottinger added a commit that referenced this pull request May 13, 2026
## Related issues

Reverts #3363. Restoring this once the upstream fix lands in the
[`wordpress-mobile/release-toolkit`](https://github.com/wordpress-mobile/release-toolkit)
plugin.

## How AI was used in this PR

AI-assisted: diagnosed the post-merge failure from the Buildkite log,
identified the gap in the fastlane plugin's platform allowlist, and
drafted this revert. Author reviewed.

## Why we're reverting

After #3363 merged, the next trunk build's `Distribute Dev Builds` step
([Buildkite
#16073](https://buildkite.com/automattic/studio/builds/16073)) failed
with:

```
Error setting value 'Linux - x64' for option 'platform'
You passed invalid parameters to 'upload_build_to_apps_cdn'.
Platform must be one of: Android, iOS, Mac - Silicon, Mac - Intel, Mac - Any,
Windows - x86, Windows - x64, Windows - ARM64,
Microsoft Store - x86, Microsoft Store - x64, Microsoft Store - ARM64
```

The `upload_build_to_apps_cdn` fastlane action (from the
[`wordpress-mobile/release-toolkit`](https://github.com/wordpress-mobile/release-toolkit)
gem, pinned at `~> 14.2`) has a **client-side** allowlist baked into its
`VALID_PLATFORMS` constant
(`lib/fastlane/plugin/wpmreleasetoolkit/actions/common/upload_build_to_apps_cdn.rb:31-43`).
That list doesn't include `'Linux - x64'` or `'Linux - ARM64'`, so the
action rejects our call before it ever reaches WPCOM.

The WPCOM-side allowlist updates (the enum + extension MIME types) are
landed and correct — they handle the *server-side* validation. But the
*client-side* validation in the fastlane plugin is a separate codebase
that also needs to be updated. We missed that gap before merging.

Impact while #3363 was on trunk:
- Mac and Windows dev builds **did** upload to AppsCDN (they iterate
first in the loop).
- Linux upload raised, terminating the loop before the
`buildkite_annotate` summary fired.
- The `Distribute Dev Builds` step shows red despite Mac/Windows being
in CDN — confusing for anyone watching trunk.
- Every subsequent trunk merge would hit the same failure, blocking the
visible distribution annotation indefinitely.

Reverting restores the clean Mac/Windows distribution flow until the
plugin gap is fixed upstream.

## Proposed Changes

Reverts the two-file change from #3363:
- `.buildkite/pipeline.yml`: drops `dev-linux` from `Distribute Dev
Builds`'s `depends_on` and removes the `*.deb` artifact download.
- `fastlane/Fastfile`: removes the `linux_deb_path` helper, the
`release_tag.nil?` block adding Linux entries to `update_builds`, and
the related comment.

## Next steps after this lands

1. Open a PR against
[`wordpress-mobile/release-toolkit`](https://github.com/wordpress-mobile/release-toolkit)
adding `'Linux - x64'` and `'Linux - ARM64'` to `VALID_PLATFORMS` in
`upload_build_to_apps_cdn.rb`. Precedent: their PR #672 added
`'Microsoft Store - x64'` and `'Windows - x64'` to the same array.
2. Wait for the plugin's next gem release.
3. Bump the `Gemfile` to that version.
4. Re-apply #3363's changes (cherry-pick or fresh PR).
5. Re-verify on the next trunk distribute.

## Testing Instructions

1. Open the next trunk build after this merges.
2. Confirm `Distribute Dev Builds` step succeeds and the
`buildkite_annotate` summary lists Mac and Windows (and only those) in
the "🔗 Build available for ..." message.

## Pre-merge Checklist

- [ ] Have you checked for TypeScript, React or other console errors?
- [x] Trunk's `Distribute Dev Builds` step succeeds again after this
lands.
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.

3 participants