Skip to content

Fix ProcessContainer environment block sort lint - #1387

Merged
Gudge (MGudgin) merged 1 commit into
mainfrom
user/gudge/fix-env-block-sort-clippy
Oct 7, 2026
Merged

Gudge (MGudgin) merged 1 commit into
mainfrom
user/gudge/fix-env-block-sort-clippy

Conversation

@MGudgin

@MGudgin Gudge (MGudgin) commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

This PR fixes the workspace Clippy lint in ProcessContainer environment-block
serialization. It replaces the redundant comparator with sort_by_key while
preserving stable, case-insensitive key ordering.

Details

  • Sort by the existing uppercase key without a custom comparator.
  • Pin the ordering of keys that differ only by case in a regression test.

Tests

  • cargo fmt --manifest-path .\src\Cargo.toml --all -- --check — passed.
  • cargo test --manifest-path .\src\Cargo.toml -p process_container_common --quiet — passed (318 tests; 1 ignored).
  • cargo clippy --manifest-path .\src\Cargo.toml --workspace --all-targets -- -D warnings — passed.
Microsoft Reviewers: Open in CodeFlow

Copilot AI balanced review requested due to automatic review settings October 5, 2026 13:49
@MGudgin
Gudge (MGudgin) requested a review from a team as a code owner October 5, 2026 13:49
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused change preserves existing behavior and is adequately tested.

Review effort: Balanced
Findings: None

What changed in this PR

Fixes the ProcessContainer Clippy lint while preserving stable, case-insensitive environment-variable ordering.

Changes:

  • Replaces the redundant comparator with sort_by_key.
  • Adds regression coverage for case-equivalent keys.
File Description
src/​backends/​process_container/​common/​src/​appcontainer_runner.rs Updates environment sorting and adds regression coverage.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This PR replaces the redundant environment-block sort comparator with
sort_by_key while preserving case-insensitive key ordering and stable
handling of equal keys.

Details

* Use sort_by_key for the existing uppercase environment-variable key.
* Test that keys differing only by case retain their original order.

Tests

* cargo fmt --manifest-path .\src\Cargo.toml --all -- --check: passed.
* cargo test --manifest-path .\src\Cargo.toml -p
  process_container_common --quiet: passed (318 tests; 1 ignored).
* cargo clippy --manifest-path .\src\Cargo.toml --workspace
  --all-targets -- -D warnings: passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ff6d3538-5272-492f-aba0-5f7ef9feda2f
Generated-with: gpt-6-sol
@MGudgin
Gudge (MGudgin) force-pushed the user/gudge/fix-env-block-sort-clippy branch from 90905ac to 602238b Compare October 7, 2026 15:40
Copilot AI balanced review requested due to automatic review settings October 7, 2026 15:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused change preserves existing semantics and adds appropriate regression coverage.

0 open findings

🧠 Review effort: Balanced

@MGudgin
Gudge (MGudgin) merged commit 3bd4e52 into main Oct 7, 2026
31 checks passed
@MGudgin
Gudge (MGudgin) deleted the user/gudge/fix-env-block-sort-clippy branch October 7, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants