-
Notifications
You must be signed in to change notification settings - Fork 21
Implemented instance type #712
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
base: dev
Are you sure you want to change the base?
Conversation
this.remoteEngineBuilder.buildAsync(remoteInstanceConfig, uploadDirectory, platform, sdkVersion, jobDirectory, buildDirectory, metricsWriter); | ||
} else { | ||
|
||
if (instanceType.equals(InstanceType.BUILDER_ONLY)) { |
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.
If instance marked as "BUILDER_ONLY" - skip request for sdk mappings and start building.
try { | ||
// sdk version was removed (dev or beta) | ||
buildEnvDescription = ExtenderUtil.getSdksForPlatform(platform, defoldSdkService.getPlatformSdkMappings(sdkVersion)); | ||
} catch(ExtenderException exc) { |
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.
Exception happened if we can't find sdk mappings for given hash.
LOGGER.info("Building engine on remote builder"); | ||
RemoteInstanceConfig remoteInstanceConfig = getRemoteBuilderConfig(buildEnvDescription[0], buildEnvDescription[1]); | ||
this.remoteEngineBuilder.buildAsync(remoteInstanceConfig, uploadDirectory, platform, sdkVersion, jobDirectory, buildDirectory, metricsWriter); | ||
} else if (instanceType.equals(InstanceType.MIXED)) { |
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.
If sdk mappings exist but there are no required sdk version defined and instance marked as "MIXED" - try build on current instance.
asyncBuilder.asyncBuildEngine(metricsWriter, platform, sdkVersion, jobDirectory, uploadDirectory, buildDirectory); | ||
} else { | ||
// no remote buidler was found and current instance can't build | ||
throw new NotSupportedException("Engine version unsupported. Please, update engine to the newer version."); |
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.
SDK mappings exists but no record for given sdk and version was found - throw error.
} else if (instanceType.equals(InstanceType.MIXED)) { | ||
asyncBuilder.asyncBuildEngine(metricsWriter, platform, sdkVersion, jobDirectory, uploadDirectory, buildDirectory); | ||
} else { | ||
// no remote buidler was found and current instance can't build |
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.
buidler -> builder
Now it's possible to configure instance type explicitly. Depends on instance type Extender define how to handle "non-existed sdk mapping" case.
Fixes #465
Fixes #720