Skip to content

Commit

Permalink
Fixed sc-2159 and sc-2158
Browse files Browse the repository at this point in the history
  • Loading branch information
jthind committed Dec 13, 2022
1 parent 7c69994 commit 560b882
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/Enterspeed.Cli/Commands/Deploy/ExtractCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,15 @@ public async Task<int> InvokeAsync(InvocationContext context)

private void ExtractSchema(GetMappingSchemaResponse schemaResponse)
{
_deploymentPlanFileService.UpdateDeploymentPlan(schemaResponse.ViewHandle, schemaResponse.Version.Id.Version);

if (_schemaFileService.SchemaValid(schemaResponse.Version.Data, schemaResponse.ViewHandle))
{
_deploymentPlanFileService.UpdateDeploymentPlan(schemaResponse.ViewHandle, schemaResponse.Version.Id.Version);
_logger.LogInformation($"Successfully extracted {schemaResponse.ViewHandle} and added it to the deployment plan");
}
else
{
_logger.LogWarning($"Use schema deploy for {schemaResponse.ViewHandle}, to update deploymentplan with versions on disk");
_logger.LogWarning($"Schema on disk did not match deployed version. Use schema deploy for {schemaResponse.ViewHandle}, to update deploymentplan with versions on disk");
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/Enterspeed.Cli/Commands/Tenant/SetActiveTenantCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class SetActiveTenantCommand : Command
{
public SetActiveTenantCommand() : base(name: "set", "Set the active tenant")
{
AddArgument(new Argument<string>("id", "Id of the tenant") { });
AddArgument(new Argument<string>("id", "Id of the tenant") { Arity = ArgumentArity.ExactlyOne });
}

public new class Handler : BaseCommandHandler, ICommandHandler
Expand All @@ -37,7 +37,7 @@ public Task<int> InvokeAsync(InvocationContext context)
}
var tenants = tenantIds.Select(TenantId.Parse);

var activeTenant = tenants.FirstOrDefault(x => x.TenantGuid == Id);
var activeTenant = tenants.FirstOrDefault(x => x.IdValue == Id);
if (activeTenant == null)
{
_logger.LogError("Could not find tenant");
Expand Down
2 changes: 1 addition & 1 deletion src/Enterspeed.Cli/Enterspeed.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<Company>Enterspeed</Company>
<Version>1.0.0-preview</Version>
<Version>1.0.0-preview3</Version>

<PublishSingleFile>true</PublishSingleFile>

Expand Down

0 comments on commit 560b882

Please sign in to comment.