Skip to content

wip - #233

Closed
richm wants to merge 1 commit into
mainfrom
test-ansible-lint
Closed

wip#233
richm wants to merge 1 commit into
mainfrom
test-ansible-lint

Conversation

@richm

@richm richm commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Enhancement:

Reason:

Result:

Issue Tracker Tickets (Jira or BZ if any):

Summary by Sourcery

CI:

  • List the generated Ansible collection directory and its meta subdirectory in the ansible-lint workflow to aid debugging.

@richm
richm requested a review from ueno as a code owner February 4, 2026 19:47
@sourcery-ai

sourcery-ai Bot commented Feb 4, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds debug directory listings to the ansible-lint GitHub Actions workflow to inspect the generated Ansible collection directory before cleanup.

Flow diagram for updated ansible-lint GitHub Actions job

flowchart TD
    A[Checkout repository] --> B[Set up Python and dependencies]
    B --> C[Run tox with TOXENV=collection
lsr_ci_runtox]
    C --> D[Set coll_dir to .tox/ansible_collections
LSR_ROLE2COLL_NAMESPACE/LSR_ROLE2COLL_NAME]
    D --> E[New: List contents of coll_dir
ls -alrtF coll_dir]
    E --> F[New: List contents of coll_dir/meta
ls -alrtF coll_dir/meta]
    F --> G[Cleanup generated collection and
ansible-plugin-scan
rm -rf coll_dir/.ansible .tox/ansible-plugin-scan]
    G --> H[Run ansible-lint action expecting .git directory]
Loading

File-Level Changes

Change Details Files
Add directory listing steps to aid debugging of the generated Ansible collection during the ansible-lint workflow run.
  • Run ls -alrtF on the generated collection directory after collection conversion
  • Run ls -alrtF on the meta subdirectory of the generated collection directory after collection conversion but before cleanup
.github/workflows/ansible-lint.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai 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.

Hey - I've found 1 issue, and left some high level feedback:

  • If these ls -alrtF commands are intended only for debugging CI issues, consider guarding them behind a flag or removing them before merge to avoid noisy workflow logs.
  • Please update the PR title and description from the placeholder values to clearly describe the change and its purpose so future readers understand why this workflow tweak was made.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- If these `ls -alrtF` commands are intended only for debugging CI issues, consider guarding them behind a flag or removing them before merge to avoid noisy workflow logs.
- Please update the PR title and description from the placeholder values to clearly describe the change and its purpose so future readers understand why this workflow tweak was made.

## Individual Comments

### Comment 1
<location> `.github/workflows/ansible-lint.yml:46-47` </location>
<code_context>
           set -euxo pipefail
           TOXENV=collection lsr_ci_runtox
           coll_dir=".tox/ansible_collections/$LSR_ROLE2COLL_NAMESPACE/$LSR_ROLE2COLL_NAME"
+          ls -alrtF "$coll_dir"
+          ls -alrtF "$coll_dir"/meta
           # cleanup after collection conversion
           rm -rf "$coll_dir/.ansible" .tox/ansible-plugin-scan
</code_context>

<issue_to_address>
**🚨 suggestion (security):** Consider limiting or gating the verbose directory listings to avoid noisy logs and potential leakage of path details.

These `ls -alrtF` calls will add a lot of noise to CI logs and may expose environment-specific filesystem details. If this is mainly for debugging, consider guarding them with a flag (e.g., a `DEBUG` env var) or using a narrower listing like `ls "$coll_dir"/meta/meta.*` so logs stay focused while still giving you the needed diagnostics.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +46 to +47
ls -alrtF "$coll_dir"
ls -alrtF "$coll_dir"/meta

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚨 suggestion (security): Consider limiting or gating the verbose directory listings to avoid noisy logs and potential leakage of path details.

These ls -alrtF calls will add a lot of noise to CI logs and may expose environment-specific filesystem details. If this is mainly for debugging, consider guarding them with a flag (e.g., a DEBUG env var) or using a narrower listing like ls "$coll_dir"/meta/meta.* so logs stay focused while still giving you the needed diagnostics.

@richm richm closed this Feb 4, 2026
@richm
richm deleted the test-ansible-lint branch February 4, 2026 19:50
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.

1 participant