-
Notifications
You must be signed in to change notification settings - Fork 867
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
Added support to configure the agent against deployment pool #1230
Conversation
{ | ||
CheckConnection(); | ||
return _taskAgentClient.GetAgentPoolsAsync(agentPoolName); | ||
return _taskAgentClient.GetAgentPoolsAsync(agentPoolName, poolType: poolType); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why don't we just change the server to return both pool type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currently we dont have any consumer which requires all type of pool. I would like to keep it tightly bound with type.
Few questions.
|
@TingluoHuang
So far we had support for #1. With Machine sharing feature we are lighting up support for #2. Both the experiences will co-exist
|
string agentType = command.DeploymentGroup | ||
? Constants.Agent.AgentConfigurationProvider.DeploymentAgentConfiguration | ||
: Constants.Agent.AgentConfigurationProvider.BuildReleasesAgentConfiguration; | ||
string agentType = Constants.Agent.AgentConfigurationProvider.BuildReleasesAgentConfiguration; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string agentType;
if()
{agentType = xxx}
elseif()
{agentType = xxx}
else
{agentType = xxx}
|
||
public override async Task GetPoolId(AgentSettings agentSettings, CommandSettings command) | ||
{ | ||
int poolId = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we need this?
agentSettings.PoolId = agentPool.Id; | ||
} | ||
|
||
Trace.Info($"PoolId for deployment pool '{poolName}' is '{poolId}'."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
poolid is always 0...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
@@ -54,7 +54,7 @@ public void GetServerUrl(AgentSettings agentSettings, CommandSettings command) | |||
agentSettings.ServerUrl = command.GetUrl(); | |||
} | |||
|
|||
public async Task GetPoolId(AgentSettings agentSettings, CommandSettings command) | |||
public virtual async Task GetPoolId(AgentSettings agentSettings, CommandSettings command) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this method looks weird.
can you just do GetPoolIdAsync() inline, like what you had in the overwrite one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetPoolIdAsync() is a private method only called by one method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will have only one method GetPoolId(). will remove GetPoolIdAsync
@chshrikh I created an |
@chshrikh please check the last comment i had, looks good overall. |
if user provide the new flag --deploymentpool, user will be able to configure the agent against deployment pool