Rename SettingsLayer::image_layers to environment_images

The method iterates EnvironmentImageLayer configs, but out of context
"image layers" reads as Docker image layers — a bad collision in
exactly the domain where it appears. Name it for what it yields.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Scott Werner 2026-08-11 16:19:15 -04:00
parent c921994393
commit ffca5c3424
4 changed files with 6 additions and 6 deletions

View file

@ -586,7 +586,7 @@ fn resolve_dockerfiles(
config_path: &ManifestPath,
files: &HashMap<ManifestPath, String>,
) -> Result<()> {
for image in layer.image_layers_mut() {
for image in layer.environment_images_mut() {
resolve_dockerfile(image, config_path, files)?;
}
Ok(())

View file

@ -325,7 +325,7 @@ impl<'a> WorkflowBundler<'a> {
.parent()
.unwrap_or_else(|| Path::new("."));
for image in layer.image_layers() {
for image in layer.environment_images() {
self.collect_environment_dockerfile(files, base_dir, config_path, image)?;
}
Ok(())

View file

@ -127,7 +127,7 @@ fn validate_config(version: &WorkflowVersion) -> Result<(), WorkflowVersionError
}
}
for image in layer.image_layers() {
for image in layer.environment_images() {
validate_dockerfile(version, &config_path, image)?;
}
Ok(())

View file

@ -110,7 +110,7 @@ impl SettingsLayer {
/// layer". The dockerfile walkers (run compilation, manifest bundling,
/// workflow-version validation) all iterate through here so a new
/// image-bearing location only needs to be added once.
pub fn image_layers(&self) -> impl Iterator<Item = &EnvironmentImageLayer> {
pub fn environment_images(&self) -> impl Iterator<Item = &EnvironmentImageLayer> {
self.environments
.values()
.filter_map(|environment| environment.image.as_ref())
@ -122,8 +122,8 @@ impl SettingsLayer {
)
}
/// Mutable variant of [`Self::image_layers`].
pub fn image_layers_mut(&mut self) -> impl Iterator<Item = &mut EnvironmentImageLayer> {
/// Mutable variant of [`Self::environment_images`].
pub fn environment_images_mut(&mut self) -> impl Iterator<Item = &mut EnvironmentImageLayer> {
self.environments
.values_mut()
.filter_map(|environment| environment.image.as_mut())