Class ChangeInvestigatorGlobalConfiguration
java.lang.Object
hudson.model.Descriptor<GlobalConfiguration>
jenkins.model.GlobalConfiguration
io.jenkins.plugins.changeinvestigator.config.ChangeInvestigatorGlobalConfiguration
- All Implemented Interfaces:
ExtensionPoint,Describable<GlobalConfiguration>,Saveable,Loadable,OnMaster
Administrator-controlled, instance-wide settings for AI-assisted regression analysis.
Deterministic evidence collection (the "OBSERVED EVIDENCE" section of an investigation)
never depends on any setting here; these settings only affect the optional "AI ASSESSMENT"
section.
Which AI provider is used, and that provider's own settings (endpoint, deployment,
region, credential, ...), live on providerConfig - one of the
AiProviderConfig subclasses selected from the "AI Provider" dropdown. Settings that
apply identically regardless of provider - temperature, timeout, max log context characters -
stay here as global "Advanced settings" rather than being duplicated onto every provider.
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.SelfNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final doublestatic final intFields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanconfigure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) Binding the whole form calls every@DataBoundSetter, each of which would otherwisesave()on its own -BulkChangedefers all of those into the singlesave()thatbc.commit()performs, so submitting this form persists once instead of once per changed field.Delegates to the selected provider's own lightweight validation call - seeAiProviderConfig.testConnection(com.fasterxml.jackson.databind.ObjectMapper, int).get()intdoubleintbooleanprotected ObjectMigrates a pre-multi-providerconfig.xml(flatbaseUrl/model/credentialsIdfields directly on this class) into an equivalentOpenAiCompatibleProviderConfig- the closest match to what those flat fields always meant: an arbitrary OpenAI-compatible endpoint.voidsetAiEnabled(boolean aiEnabled) voidsetMaxLogContextChars(int maxLogContextChars) voidsetProviderConfig(AiProviderConfig providerConfig) voidsetTemperature(double temperature) voidsetTimeoutSeconds(int timeoutSeconds) Methods inherited from class jenkins.model.GlobalConfiguration
all, configure, getDescriptor, getGlobalConfigPageMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Field Details
-
DEFAULT_MAX_LOG_CONTEXT_CHARS
public static final int DEFAULT_MAX_LOG_CONTEXT_CHARS- See Also:
-
DEFAULT_TIMEOUT_SECONDS
public static final int DEFAULT_TIMEOUT_SECONDS- See Also:
-
DEFAULT_TEMPERATURE
public static final double DEFAULT_TEMPERATURE- See Also:
-
-
Constructor Details
-
ChangeInvestigatorGlobalConfiguration
public ChangeInvestigatorGlobalConfiguration()
-
-
Method Details
-
get
-
readResolve
Migrates a pre-multi-providerconfig.xml(flatbaseUrl/model/credentialsIdfields directly on this class) into an equivalentOpenAiCompatibleProviderConfig- the closest match to what those flat fields always meant: an arbitrary OpenAI-compatible endpoint. Runs on load, before any AI call could possibly be triggered, and makes no network call itself. The migrated credential ID is carried over unchanged - the secret it points to lives in the Jenkins Credentials store either way and is never touched by this migration. -
configure
public boolean configure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) throws Descriptor.FormException Binding the whole form calls every@DataBoundSetter, each of which would otherwisesave()on its own -BulkChangedefers all of those into the singlesave()thatbc.commit()performs, so submitting this form persists once instead of once per changed field. Individual setter calls made outside form binding (script console, init scripts) are unaffected and still save immediately, since they run with noBulkChangein scope.- Overrides:
configurein classGlobalConfiguration- Throws:
Descriptor.FormException
-
isAiEnabled
public boolean isAiEnabled() -
setAiEnabled
@DataBoundSetter public void setAiEnabled(boolean aiEnabled) -
getProviderConfig
-
setProviderConfig
-
getMaxLogContextChars
public int getMaxLogContextChars() -
setMaxLogContextChars
@DataBoundSetter public void setMaxLogContextChars(int maxLogContextChars) -
getTimeoutSeconds
public int getTimeoutSeconds() -
setTimeoutSeconds
@DataBoundSetter public void setTimeoutSeconds(int timeoutSeconds) -
getTemperature
public double getTemperature() -
setTemperature
@DataBoundSetter public void setTemperature(double temperature) -
doTestConnection
Delegates to the selected provider's own lightweight validation call - seeAiProviderConfig.testConnection(com.fasterxml.jackson.databind.ObjectMapper, int). Never sends any real build evidence, only a fixed instruction-only exchange, regardless of which provider is selected.
-