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

404 response from site:team:remove when removing yourself from a team #1803

Closed
sarahg opened this issue Dec 3, 2017 · 1 comment
Closed

Comments

@sarahg
Copy link

sarahg commented Dec 3, 2017

Expected behavior

When I remove myself from a site team using Terminus,
command returns: Status Code: 200
[notice] Removed a user from site team

Actual behavior

When I remove myself from a site team using Terminus,
command returns: [error] Client error: GET https://terminus.pantheon.io/api/sites/1e5155c6-e7de-479a-a5fd-4ea20735fcb8/workflows/07cfd02a-d84e-11e7-b3a6-42010a800117 resulted in a 404 Not Found response:
Not found.

However, the user is actually removed. 👍🏼

Debug:

⚡ terminus site:team:remove -vvv updog [email protected]
 [debug] Plugin Autoload: %dir is a Terminus source file.
 [debug] #### REQUEST ####
Headers: {"Content-type":"application\/json","User-Agent":"Terminus\/1.6.1 (php_version=7.1.11&script=bin\/terminus)","Authorization":"**HIDDEN**"}
URI: https://terminus.pantheon.io:443/api/site-names/updog
Method: GET
Body: null
 [debug] #### RESPONSE ####
Headers: {"Server":["nginx"],"Date":["Sun, 03 Dec 2017 17:33:51 GMT"],"Content-Type":["application\/json; charset=utf-8"],"Transfer-Encoding":["chunked"],"Connection":["keep-alive"],"X-Pantheon-Trace-Id":["207f33c0-d850-11e7-b855-1b4404e82e5b"],"X-Frame-Options":["deny"],"Access-Control-Allow-Methods":["GET"],"Access-Control-Allow-Headers":["Origin, Content-Type, Accept"],"Cache-Control":["private, max-age=0, no-cache, no-store"],"Pragma":["no-cache"],"Vary":["Accept-Encoding"],"Strict-Transport-Security":["max-age=31536000"]}
Data: {"id":"e2f3f618-f05d-4209-b1dd-d8fef88bc18d","name":"updog"}
Status Code: 200
 [debug] #### REQUEST ####
Headers: {"Content-type":"application\/json","User-Agent":"Terminus\/1.6.1 (php_version=7.1.11&script=bin\/terminus)","Authorization":"**HIDDEN**"}
URI: https://terminus.pantheon.io:443/api/sites/e2f3f618-f05d-4209-b1dd-d8fef88bc18d?site_state=true
Method: GET
Body: null
 [debug] #### RESPONSE ####
Headers: {"Server":["nginx"],"Date":["Sun, 03 Dec 2017 17:33:51 GMT"],"Content-Type":["application\/json"],"Content-Length":["3882"],"Connection":["keep-alive"],"X-Pantheon-Trace-Id":["20c98330-d850-11e7-ab35-63f8e44cd421"],"X-Frame-Options":["deny"],"Access-Control-Allow-Methods":["GET"],"Access-Control-Allow-Headers":["Origin, Content-Type, Accept"],"Cache-Control":["private, max-age=0, no-cache, no-store"],"Pragma":["no-cache"],"Vary":["Accept-Encoding"],"Strict-Transport-Security":["max-age=31536000"]}
Data: {"created":1512321690,"created_by_user_id":"cd8e4a41-6c7b-43c5-b302-326eaaf00bb0","framework":"wordpress","holder_id":"1ddfa1ab-a3d4-46bb-a874-10d652c29cff","holder_type":"user","last_code_push":{"timestamp":"2017-12-03T17:22:05","user_uuid":null},"name":"updog","owner":"1ddfa1ab-a3d4-46bb-a874-10d652c29cff","php_version":"55","preferred_zone":"us-central1","service_level":"free","upstream":{"repository_branch":"master","machine_name":"wordpress","product_id":"e8fe8550-1ab9-4964-8838-2b9abdccf4bf","url":"https:\/\/github.com\/pantheon-systems\/WordPress","label":"WordPress","organization_id":"","framework":"wordpress","branch":"master","repository_url":"https:\/\/github.com\/pantheon-systems\/WordPress","type":"core","id":"e8fe8550-1ab9-4964-8838-2b9abdccf4bf"},"label":"updog","id":"e2f3f618-f05d-4209-b1dd-d8fef88bc18d","holder":{"profile":{"invited_to":"b59dd35d-1ba4-4b6e-b904-966a58a834cd","experiments":{"welcome_video":"not_shown"},"full_name":"Sarah German","pullFromLive":false,"initial_identity_strategy":null,"invited_to_type":"organization","web_services_business":null,"verify":1,"registration_context":null,"role":"admin","job_function":"developer","firstname":"Sarah","lastname":"German","pda_campaign":"invite_to_team","copyCodeUpdatePhp":true,"invited_by":"08f71cb9-7dfc-4140-971b-a1ee24f3fe4f","initial_identity_name":null,"guilty_of_abuse":null,"seens":{"cms-installation":true,"global-cdn":true,"has_dismissed_upgrade_https":true,"skip-cms-installation":{"7f1fddcf-2d90-48dd-af7b-001c12f491ec":true,"da0ff8fb-64d5-497e-9ade-d6f0129f82e3":true,"70008ccc-e493-478a-87e8-7d438557a868":true,"e652e5a7-230d-a60e-80f0-193d340173aa":true,"d29edec2-eb9a-40e2-8519-3afe3b32c0d7":true,"f06c116b-89d0-4a69-b7da-ff4f32e49e87":true,"5ea4900e-2d78-4ca6-84e8-accfc730dda4":true,"8db96785-3a39-4684-a744-875d9d611d0c":true,"881837d3-0b40-4878-8c6f-909469680539":true,"9d16215f-763e-4350-bf5d-6e25c2ad9777":true,"77b9a877-f782-4ada-87fe-2de1a576191e":true,"7ac4a7dd-0a02-4953-87a5-efef2e11c68a":true,"cc384b36-934a-449e-b7d2-1f4111e1b851":true,"cc92078d-274f-4571-b9b3-35369916ab77":true,"511ed488-e12a-40b7-93ab-0ba0aa8dee53":true,"7120ee61-2988-4548-9ce0-a96b117f3574":true,"4b63240c-4a29-4d44-ae4b-ccac4a5a8fc6":true,"75aa820e-f932-4722-97e7-dc1706826d91":true}},"modified":1506352007,"maxdevsites":2,"organization":"Pantheon"},"id":"1ddfa1ab-a3d4-46bb-a874-10d652c29cff","email":"[email protected]"},"settings":{"allow_domains":false,"max_num_cdes":10,"stunnel":false,"min_backups":0,"owner":"1ddfa1ab-a3d4-46bb-a874-10d652c29cff","secure_runtime_access":false,"pingdom":0,"allow_indexserver":false,"created_by_user_id":"cd8e4a41-6c7b-43c5-b302-326eaaf00bb0","failover_appserver":0,"cacheserver":1,"support_plan":"regular_support","on_server_development":false,"drush_version":5,"label":"updog","appserver":1,"allow_read_slaves":false,"indexserver":1,"php_version":"55","php_channel":"stable","allow_cacheserver":false,"ssl_enabled":null,"current_num_domains":0,"service_level":"free","dedicated_ip":null,"dbserver":1,"framework":"wordpress","max_total_domains":0,"upstream":{"url":"https:\/\/github.com\/pantheon-systems\/WordPress","product_id":"e8fe8550-1ab9-4964-8838-2b9abdccf4bf","branch":"master"},"guilty_of_abuse":null,"preferred_zone":"us-central1","pingdom_chance":0,"holder_id":"1ddfa1ab-a3d4-46bb-a874-10d652c29cff","name":"updog","created":1512321690,"max_backups":0,"holder_type":"user","replica_verification_strategy":"pt-heartbeat","pingdom_manually_enabled":false,"last_code_push":{"timestamp":"2017-12-03T17:22:05","user_uuid":null}},"base_domain":null,"attributes":{"label":"updog","m3_ui":true},"add_ons":[]}
Status Code: 200
 [debug] #### REQUEST ####
Headers: {"Content-type":"application\/json","User-Agent":"Terminus\/1.6.1 (php_version=7.1.11&script=bin\/terminus)","Authorization":"**HIDDEN**"}
URI: https://terminus.pantheon.io:443/api/sites/e2f3f618-f05d-4209-b1dd-d8fef88bc18d/memberships/users?limit=100
Method: GET
Body: null
 [debug] #### RESPONSE ####
Headers: {"Server":["nginx"],"Date":["Sun, 03 Dec 2017 17:33:52 GMT"],"Content-Type":["application\/json; charset=utf-8"],"Transfer-Encoding":["chunked"],"Connection":["keep-alive"],"X-Pantheon-Trace-Id":["210db820-d850-11e7-9308-e39f481a20c1"],"X-Frame-Options":["deny"],"Access-Control-Allow-Methods":["GET"],"Access-Control-Allow-Headers":["Origin, Content-Type, Accept"],"Cache-Control":["private, max-age=0, no-cache, no-store"],"Pragma":["no-cache"],"Vary":["Accept-Encoding"],"Strict-Transport-Security":["max-age=31536000"]}
Data: [{"archived":false,"invited_by_id":"cd8e4a41-6c7b-43c5-b302-326eaaf00bb0","role":"team_member","id":"cd8e4a41-6c7b-43c5-b302-326eaaf00bb0","key":"e2f3f618-f05d-4209-b1dd-d8fef88bc18d","user_id":"cd8e4a41-6c7b-43c5-b302-326eaaf00bb0","site_id":"e2f3f618-f05d-4209-b1dd-d8fef88bc18d","user":{"profile":{"tracking_first_organization_invite":1463243807,"google_adwords_pushed_code_do_send":null,"devsites":1,"experiments":{},"full_name":"Sarah German","pullFromLive":true,"initial_identity_strategy":null,"invites_to_nonuser":7,"invites_sent":8,"tracking_first_ally_reg":1452019502,"tracking_first_code_push":1448761786,"invites_to_user":1,"registration_context":null,"role":"Developer","google_adwords_pushed_code_sent":1448935732,"tracking_first_workflow_in_live":1448822564,"tracking_first_team_invite":1460653117,"firstname":"Sarah","invites_to_site":7,"lastname":"German","copyCodeUpdatePhp":false,"phone":"612-325-8870","last-org-spinup":"1439ef14-9fed-428e-8943-902e36c763a9","tracking_first_site_create":1452015068,"initial_identity_name":null,"created_organization_name":"Sarah German","copyCodeClearCache":true,"guilty_of_abuse":null,"invites_to_org":1,"seens":{"skip-cms-installation":{"8883e341-e49d-4c84-958b-8685f263e5fb":true},"global-cdn":true,"terminus-1":true},"modified":1448757765,"maxdevsites":18,"organization":""},"verified":true,"id":"cd8e4a41-6c7b-43c5-b302-326eaaf00bb0","email":"[email protected]"}},{"archived":false,"invited_by_id":null,"role":"team_member","id":"1ddfa1ab-a3d4-46bb-a874-10d652c29cff","key":"e2f3f618-f05d-4209-b1dd-d8fef88bc18d","user_id":"1ddfa1ab-a3d4-46bb-a874-10d652c29cff","site_id":"e2f3f618-f05d-4209-b1dd-d8fef88bc18d","user":{"profile":{"invited_to":"b59dd35d-1ba4-4b6e-b904-966a58a834cd","experiments":{"welcome_video":"not_shown"},"full_name":"Sarah German","pullFromLive":false,"initial_identity_strategy":null,"invited_to_type":"organization","web_services_business":null,"verify":1,"registration_context":null,"role":"admin","job_function":"developer","firstname":"Sarah","lastname":"German","pda_campaign":"invite_to_team","copyCodeUpdatePhp":true,"invited_by":"08f71cb9-7dfc-4140-971b-a1ee24f3fe4f","initial_identity_name":null,"guilty_of_abuse":null,"seens":{"cms-installation":true,"global-cdn":true,"has_dismissed_upgrade_https":true,"skip-cms-installation":{"7f1fddcf-2d90-48dd-af7b-001c12f491ec":true,"da0ff8fb-64d5-497e-9ade-d6f0129f82e3":true,"70008ccc-e493-478a-87e8-7d438557a868":true,"e652e5a7-230d-a60e-80f0-193d340173aa":true,"d29edec2-eb9a-40e2-8519-3afe3b32c0d7":true,"f06c116b-89d0-4a69-b7da-ff4f32e49e87":true,"5ea4900e-2d78-4ca6-84e8-accfc730dda4":true,"8db96785-3a39-4684-a744-875d9d611d0c":true,"881837d3-0b40-4878-8c6f-909469680539":true,"9d16215f-763e-4350-bf5d-6e25c2ad9777":true,"77b9a877-f782-4ada-87fe-2de1a576191e":true,"7ac4a7dd-0a02-4953-87a5-efef2e11c68a":true,"cc384b36-934a-449e-b7d2-1f4111e1b851":true,"cc92078d-274f-4571-b9b3-35369916ab77":true,"511ed488-e12a-40b7-93ab-0ba0aa8dee53":true,"7120ee61-2988-4548-9ce0-a96b117f3574":true,"4b63240c-4a29-4d44-ae4b-ccac4a5a8fc6":true,"75aa820e-f932-4722-97e7-dc1706826d91":true}},"modified":1506352007,"maxdevsites":2,"organization":"Pantheon"},"verified":true,"id":"1ddfa1ab-a3d4-46bb-a874-10d652c29cff","email":"[email protected]"}}]
Status Code: 200
 [debug] #### REQUEST ####
Headers: {"Content-type":"application\/json","User-Agent":"Terminus\/1.6.1 (php_version=7.1.11&script=bin\/terminus)","Authorization":"**HIDDEN**"}
URI: https://terminus.pantheon.io:443/api/sites/e2f3f618-f05d-4209-b1dd-d8fef88bc18d/workflows
Method: POST
Body: {"type":"remove_site_user_membership","params":{"user_id":"cd8e4a41-6c7b-43c5-b302-326eaaf00bb0"}}
 [debug] #### RESPONSE ####
Headers: {"Server":["nginx"],"Date":["Sun, 03 Dec 2017 17:33:52 GMT"],"Content-Type":["application\/json; charset=utf-8"],"Transfer-Encoding":["chunked"],"Connection":["keep-alive"],"X-Pantheon-Trace-Id":["214ac120-d850-11e7-ab35-63f8e44cd421"],"X-Frame-Options":["deny"],"Access-Control-Allow-Methods":["GET"],"Access-Control-Allow-Headers":["Origin, Content-Type, Accept"],"Cache-Control":["private, max-age=0, no-cache, no-store"],"Pragma":["no-cache"],"Vary":["Accept-Encoding"]}
Data: {"final_task_id":"2153ef52-d850-11e7-aa26-42010a800058","finished_at":1512322432.752859,"params":{"user_id":"cd8e4a41-6c7b-43c5-b302-326eaaf00bb0"},"reason":"","result":"succeeded","role":"team_member","site_id":"e2f3f618-f05d-4209-b1dd-d8fef88bc18d","started_at":1512322432.6465,"task_ids":["2153ef52-d850-11e7-aa26-42010a800058"],"trace_id":"214ac120-d850-11e7-ab35-63f8e44cd421","type":"remove_site_user_membership","user_id":"cd8e4a41-6c7b-43c5-b302-326eaaf00bb0","waiting_for_task_id":null,"id":"2151a0d0-d850-11e7-aa26-42010a800058","key":"1512320400","environment_id":null,"keep_forever":false,"phase":"finished","queued_time":null,"run_time":0.10635900497436523,"created_at":1512322432.607048,"environment":null,"total_time":0.1458110809326172,"active_description":"Removed a user from site team","description":"Remove a user from the site team","step":1,"has_operation_log_output":false,"number_of_tasks":1,"trace_log_url":"https:\/\/app.logz.io\/#\/dashboard\/kibana?kibanaRoute=discover%3F_a%3D(query:(query_string:(analyze_wildcard:!t,query:%27trace_id:214ac120-d850-11e7-ab35-63f8e44cd421%27)))%26_g%3D(refreshInterval:(display:Off,pause:!f,value:0),time:(from:%272017-12-03T17:28:52.607048Z%27,mode:quick,to:%272017-12-03T17:38:52.752859Z%27))","user":{"user_id":"cd8e4a41-6c7b-43c5-b302-326eaaf00bb0","created_at":1437006027,"destination_organization_id":null,"is_registered":true,"created_organization_id":"1439ef14-9fed-428e-8943-902e36c763a9","password":"SCRUBBED","email":"[email protected]"},"user_email":"[email protected]","final_task":{"environment":null,"finished_at":1512322432.729604,"fn_name":"trigger_task","initialized_at":1512322432.646772,"params":{"site_id":"e2f3f618-f05d-4209-b1dd-d8fef88bc18d","task_type":"remove_site_user_membership","user_id":"cd8e4a41-6c7b-43c5-b302-326eaaf00bb0"},"queued_at":1512322432.651596,"responses":[{"code":204,"body":"","error_details":"","internal_reason":""}],"result":"succeeded","site_id":"e2f3f618-f05d-4209-b1dd-d8fef88bc18d","started_at":1512322432.651598,"trace_id":"214ac120-d850-11e7-ab35-63f8e44cd421","user_id":"cd8e4a41-6c7b-43c5-b302-326eaaf00bb0","workflow_id":"2151a0d0-d850-11e7-aa26-42010a800058","id":"2153ef52-d850-11e7-aa26-42010a800058","key":"1512320400","queued_time":1.9073486328125e-6,"host":null,"phase":"finished","created_at":1512322432.622165,"allow_concurrent":false,"run_time":0.07800602912902832,"total_time":0.10743904113769531,"reason":"","error_details":"","internal_reason":"","trace_log_url":"https:\/\/app.logz.io\/#\/dashboard\/kibana?kibanaRoute=discover%3F_a%3D(query:(query_string:(analyze_wildcard:!t,query:%27trace_id:214ac120-d850-11e7-ab35-63f8e44cd421%27)))%26_g%3D(refreshInterval:(display:Off,pause:!f,value:0),time:(from:%272017-12-03T17:28:52.622165Z%27,mode:quick,to:%272017-12-03T17:38:52.729604Z%27))","type":"remove_site_user_membership","build_url":null,"messages":{"2017-12-03T17:33:52.770599":{"message":"","level":"INFO"}}}}
Status Code: 202
 [debug] #### REQUEST ####
Headers: {"Content-type":"application\/json","User-Agent":"Terminus\/1.6.1 (php_version=7.1.11&script=bin\/terminus)","Authorization":"**HIDDEN**"}
URI: https://terminus.pantheon.io:443/api/sites/e2f3f618-f05d-4209-b1dd-d8fef88bc18d/workflows/2151a0d0-d850-11e7-aa26-42010a800058
Method: GET
Body: null
 [error]  Client error: `GET https://terminus.pantheon.io/api/sites/e2f3f618-f05d-4209-b1dd-d8fef88bc18d/workflows/2151a0d0-d850-11e7-aa26-42010a800058` resulted in a `404 Not Found` response:
Not found.

Steps to reproduce the behavior

  1. Add yourself to a site team.
  2. Use Terminus to remove yourself: terminus site:team:remove -vvv <sitename> <[email protected]>

The error does not come up if you're removing someone else.

Self-info:

⚡ terminus self:info
 ------------------------- -------------------------------------------------------------------------------------------------
  PHP binary                /usr/local/Cellar/php71/7.1.11_22/bin/php
  PHP version               7.1.11
  php.ini used              /usr/local/etc/php/7.1/php.ini
  Terminus project config
  Terminus root dir         /Users/sarahgerman/vendor/pantheon-systems/terminus
  Terminus version          1.6.1
  Operating system          Darwin Kernel Version 16.7.0: Wed Oct  4 00:17:00 PDT 2017; root:xnu-3789.71.6~1/RELEASE_X86_64
 ------------------------- -------------------------------------------------------------------------------------------------
@TeslaDethray
Copy link
Contributor

Fixed in #1914

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

No branches or pull requests

2 participants