Skip to content

Address PR #30 review comments: add validations and shared token caching#31

Merged
Dion Gionet Mallet (dion-gionet) merged 4 commits intodevops/lookuppluginfrom
copilot/sub-pr-30
Jan 15, 2026
Merged

Address PR #30 review comments: add validations and shared token caching#31
Dion Gionet Mallet (dion-gionet) merged 4 commits intodevops/lookuppluginfrom
copilot/sub-pr-30

Conversation

Copy link
Copy Markdown

Copilot AI commented Jan 15, 2026

Addresses review feedback from PR #30 to improve error handling, reduce redundant authentication, and enhance code quality.

Changes

  • Unique entry validation: Added validate_unique_entry calls in get_vault_entry_from_path and get_vault_entry_from_type to prevent ambiguous matches when multiple entries share the same path/type

  • Module-level token caching: Converted instance-based token cache to module-level shared cache, allowing secret and secret_full lookup plugins to reuse authentication tokens across instances in the same playbook run

  • Entry validation: Added checks for missing entry_id and empty credential objects in get_credential, with improved error messages including server URL for debugging

  • Documentation: Split long field lists in secret.py across multiple lines, removed duplicate field documentation from notes section

Token Caching Example

Before (instance-level):

# Each lookup plugin instance authenticates separately
lookup('devolutions.dvls.secret', 'db-pass')          # Auth #1
lookup('devolutions.dvls.secret_full', 'api-key')    # Auth #2

After (module-level):

# Single authentication shared across all instances
lookup('devolutions.dvls.secret', 'db-pass')          # Auth #1
lookup('devolutions.dvls.secret_full', 'api-key')    # Reuses Auth #1

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 15, 2026 13:22
Co-authored-by: dion-gionet <29441318+dion-gionet@users.noreply.github.com>
Co-authored-by: dion-gionet <29441318+dion-gionet@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Jan 15, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • ci-files.testing.ansible.com
    • Triggering command: /home/REDACTED/.ansible/test/venv/sanity.ansible-doc/3.12/5c82a624/bin/python /home/REDACTED/.ansible/test/venv/sanity.ansible-doc/3.12/5c82a624/bin/python (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add lookup plugins for inline credential retrieval Address PR #30 review comments: add validations and shared token caching Jan 15, 2026
@dion-gionet Dion Gionet Mallet (dion-gionet) marked this pull request as ready for review January 15, 2026 15:08
Co-authored-by: dion-gionet <29441318+dion-gionet@users.noreply.github.com>
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