pantheon-deprecated / terminus-deprecated

Deprecated CLI for Pantheon. Do not install. Current project:
https://github.com/pantheon-systems/cli
82 stars 24 forks source link

Option 'nocache' not effective on `porg-sites` #183

Closed jbutkus closed 10 years ago

jbutkus commented 10 years ago

Sample script with it's output showing how to replicate the issue. Organization UUID hidden intentionally.

$ ( for suuid in $( drush porg-sites HERE_IS_ORGANIZATION_UUID --nocache | awk '/bundle-/{print $NF}' ); do drush psite-delete $uuid --json --nocache -y; done ) 2>&1 | tee psite-delete.log
No site found for UUID 'b59a4cdb-557c-4d47-928f-0ec0bfb5f972'.       [error]
Are you sure you want to delete  (b59a4cdb-557c-4d47-928f-0ec0bfb5f972)? (y/n): y
Request failed: 500                                                  [failed]
Unable to delete site, try again?                                    [error]
No site found for UUID 'b59a4cdb-557c-4d47-928f-0ec0bfb5f972'.       [error]
Are you sure you want to delete  (b59a4cdb-557c-4d47-928f-0ec0bfb5f972)? (y/n): y
Request failed: 500                                                  [failed]
Unable to delete site, try again?                                    [error]

How can we refresh cache in this case? As we have reported a trouble with Pantheon One Dashboard not deleting multiple sites at once, and thus tried to achieve the result using Drush.

mikevanwinkle commented 10 years ago

Sorry so you tried to delete the sites in the Dashboard but that didn't work ... then you tried in drush and got the above errors? Just trying to clarify. Have you tried again this morning?

jbutkus commented 10 years ago

@mikevanwinkle - no, we haven't tried in Dashboard this morning. We would preffer to be able to use Drush command line. And yes, these are the errors experienced when running Drush command.

I have tried Dashboard right now (hard-refreshing before, to void cache). The UI is still the same - when I have multiple sites I can't see the submit button on the modal. If I modify it using HTML inspector to hide these elements before clicking submit - i don't see any changes afterwards, as when I reload the page the sites are still there.

But that's hardly relevant in this context. I am more concerned that Drush doesn't delete these sites. As you see - I use one Drush call to get a list of the sites, and another one to delete them in the loop. But second call doesn't see the sites returned by the first command.

mikevanwinkle commented 10 years ago

@jbutkus ok, thanks for the clarification, let me see if I can reproduce. Stay tuned.

mikevanwinkle commented 10 years ago

So I was not able to reproduce. Here's the script I ran which I would have expected to result in the same error, but since it did not I'm wondering if this was anomalous situation. I believe there have been some issues recently with dashboards not being up-to-date with actually code changes. I suspect this may have been related.

for uuid in $( drush porg-sites ORGANIZATION_ID  | awk '{print $3}'); do drush psite-delete $uuid -y --json --nocache; done
Are you sure you want to delete mikesorgtest (410ffb17-23c8-41df-b253-12cba544a916)? (y/n): y
Site deleted. 
mikevanwinkle commented 10 years ago

I'm going to close this because I'm confident if there is an issue, it'll be a platform dashboard issue and not an issue with terminus. But thanks again for reporting.

joshkoenig commented 10 years ago

Confirmed - there isn't actually a true terminus-side cache.

It looks like the --nocache flag doesn't belong in there and is erroneously listed in the helptext. However, it's possible we need to tune things up as we push the envelope on the API side with organizations with 1000s of sites.