PIPE-1084: remove org as stack parameter#609
Conversation
73602d4 to
f9bbfee
Compare
|
|
||
| // This is a special agent client: it can only be used to query the GET /token API. | ||
| // Meaning for this client to function, there isn't a need for a cluster id nor queue id. | ||
| func NewAgentTokenClient(token, endpoint string) (*AgentTokenClient, error) { |
There was a problem hiding this comment.
Should we combine this with AgentClient later on?
There was a problem hiding this comment.
That was my plan but AgentClient needs org, cluster to function. On a quick glance it doesn't seem quite obvious to me on how to combine these (nor on the benefit), so I kept them separate for now.
There was a problem hiding this comment.
Well, you showed that org is unnecessary. I'm thinking that the work AgentTokenClient does could be part of "AgentClient connection setup", so that NewAgentClient no longer needs the cluster ID as an arg. That leaves the queue parameter, which isn't needed for AgentTokenClient, but the arg could be passed an empty string for clients that don't need to get scheduled jobs, etc.
There was a problem hiding this comment.
I see what you mean now. I agree.
Orghas been an unused parameter in the stack but it's marked as required.This PR remove this params for good. There are various places in test setup needing it, a
AgentTokenClienthas been introduced so we can derive the Org from agent token.