Skip to content

Reject conflicting DNS flags#1559

Merged
katiewasnothere merged 1 commit into
apple:mainfrom
LeSingh1:reject-conflicting-dns-flags
May 15, 2026
Merged

Reject conflicting DNS flags#1559
katiewasnothere merged 1 commit into
apple:mainfrom
LeSingh1:reject-conflicting-dns-flags

Conversation

@LeSingh1
Copy link
Copy Markdown
Contributor

Summary

Rejects conflicting DNS configuration when --no-dns is supplied together with explicit DNS flags.

Motivation

--no-dns disables DNS configuration, while --dns, --dns-domain, --dns-option, and --dns-search explicitly request DNS configuration. Accepting both makes the command ambiguous.

Fixes #1536.

Testing

  • Added parser coverage for conflicting --no-dns usage with:
    • --dns
    • --dns-domain
    • --dns-option
    • --dns-search
  • Added parser coverage for valid standalone DNS flag usage.
  • Ran swift format.
  • Verified Sources/Services/ContainerAPIService/Client/Flags.swift parses with swift -frontend -parse.

Note: full swift build/test execution is blocked in my local environment by an unrelated dependency/toolchain header issue.

@katiewasnothere
Copy link
Copy Markdown
Contributor

Hi @LeSingh1 thank you for contributing! We require that commits be signed, please see https://github.com/apple/containerization/blob/main/CONTRIBUTING.md#pull-requests. Could you update the PR with your commit signed?

@LeSingh1 LeSingh1 force-pushed the reject-conflicting-dns-flags branch from 8d48cb8 to 5b43720 Compare May 15, 2026 06:02
@LeSingh1
Copy link
Copy Markdown
Contributor Author

Thanks! Updated the PR with a signed commit.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 15, 2026

Code Coverage

Tier Line Coverage
Unit 34.17%
Integration 20.19%
Combined 53.78%

@katiewasnothere katiewasnothere merged commit 64bd48b into apple:main May 15, 2026
3 checks passed
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.

[Bug]: --dns and --no-dns can be supplied together

2 participants