Skip to content

models: output: Make EnvironmentVariable a frozen model#1651

Merged
derasdf merged 1 commit into
hermetoproject:mainfrom
eskultety:env-var-frozen
Jul 2, 2026
Merged

models: output: Make EnvironmentVariable a frozen model#1651
derasdf merged 1 commit into
hermetoproject:mainfrom
eskultety:env-var-frozen

Conversation

@eskultety

Copy link
Copy Markdown
Member

EnvironmentVariable instances are never mutated after construction. resolve_value() is a pure function returning a new string. Making the model frozen enforces this invariant and enables hashing, which allows using EnvironmentVariable in sets and as dict keys.

Reference: #1629 (comment)

EnvironmentVariable instances are never mutated after construction.
resolve_value() is a pure function returning a new string. Making
the model frozen enforces this invariant and enables hashing, which
allows using EnvironmentVariable in sets and as dict keys.

Reference: hermetoproject#1629 (comment)

Signed-off-by: Erik Skultety <eskultet@redhat.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the EnvironmentVariable Pydantic model in hermeto/core/models/output.py to be frozen (frozen=True), making its instances immutable. There are no review comments, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@derasdf derasdf added this pull request to the merge queue Jul 2, 2026
Merged via the queue into hermetoproject:main with commit 691d531 Jul 2, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants