"Purge workers cache" button on TaskInfo component#56
Conversation
|
You can add a set of credentials by copy/paste with the ill-named "Preferences" tool. |
| task: this.queue.task(this.props.status.taskId) | ||
| task: task, | ||
| selectedCacheNames: new Promise(function(resolve, reject) { | ||
| var resolved = Promise.resolve(task).then( |
There was a problem hiding this comment.
If I understand correctly, this is forcing a wait for the resolution of the task promise. I don't think that's necessary -- I believe load resolves any promises for you. So you could use
selectedCacheNames: task.then((t) => _.keys(self.getCacheNames(t)))There was a problem hiding this comment.
ah right ... need to remind myself i'm in ES6 context :)
|
I think this is the right design -- @jonasfj? |
|
@djmitche i used should i try to find another task to test or i need bigger scope for my clientId? |
| </label> | ||
| </li>; | ||
| })} | ||
| </ul> |
There was a problem hiding this comment.
I think it's better to make sub-component called PurgeCacheButton with the property cacheNames...
There was a problem hiding this comment.
Okay, you would need provisionerId and workerType as properties too...
|
It looks like Jonas fixed your permissions issue? |
|
Yeah, I fixed the scope issue... IMO can we just give purge-cache:* to releng, relops etc... So we don't have to use perma creds. |
|
Hold off on that until we namespace the workerTypes, and we can grant more specific scopes |
... also when action is done processing set executing state to original state
|
@djmitche permission was fixed and i could tested that purgeCache worked. one thing i discovered (as i was testing) is that once you open ConfirmAction dialog you need to reload the page to reuse the same button. i fixed this by resetting initial state when result from action comes back 967b53f |
|
|
…e-button "Purge workers cache" button on TaskInfo component

This is still WIP but I would need some feedback on the code since this is my first contribution.
Also any advise how I would test this would be more then welcome. Problem with testing is that I need to login with this credentials -> https://tools.taskcluster.net/auth/clients/#garbas
I went as far as manually creating
credentialsrecord in localStorage, but without luck (for now).