Skip to content

fix(extensions): fix gitignore template and bump version#38614

Merged
michael-s-molina merged 1 commit intoapache:masterfrom
villebro:villebro/ext-cli-gitignore
Mar 13, 2026
Merged

fix(extensions): fix gitignore template and bump version#38614
michael-s-molina merged 1 commit intoapache:masterfrom
villebro:villebro/ext-cli-gitignore

Conversation

@villebro
Copy link
Member

@villebro villebro commented Mar 13, 2026

User description

SUMMARY

Currently the .gitignore.j2 template was being ignored by the Python builder, likely due to security constraints (makes sense). I felt it's a better idea to just remove the leading dot from the template file than go messing about with the security configs (the generated file keeps the leading dot, ofc). Since we already have a test that ensures the creation of .gitignore, no tests needed to be updated.

TESTING INSTRUCTIONS

  1. Run python -m build, unpack the generated source bundle and verify that gitignore.j2 is included in the bundle
  2. Scaffold a new extension and verify that it completes successfully
  3. Verify that <publisher>/<name>/.gitignore actually gets created. Note: it's hidden by default! so you need do do ls -a or similar

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

CodeAnt-AI Description

Include gitignore template in packaged CLI and generate .gitignore when scaffolding; bump CLI version

What Changed

  • The extension scaffolder now reads a packaged gitignore template and writes a .gitignore file into the new extension directory so generated projects include a proper .gitignore
  • The scaffolded .gitignore contains standard ignore rules for Node modules, build outputs, Python artifacts, IDE files, OS files, logs, and environment files
  • The CLI package version advanced from 0.1.0rc1 to 0.1.0rc2

Impact

✅ Scaffolded extensions include .gitignore
✅ New projects start with common ignore patterns (Node, Python, IDE, OS, env, logs)
✅ Packaged CLI contains the gitignore template for reliable scaffolding

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Mar 13, 2026

Code Review Agent Run #9ad6f4

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: e7671c6..e7671c6
    • superset-extensions-cli/pyproject.toml
    • superset-extensions-cli/src/superset_extensions_cli/cli.py
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@dosubot dosubot bot added the plugins label Mar 13, 2026
@codeant-ai-for-open-source codeant-ai-for-open-source bot added the size:M This PR changes 30-99 lines, ignoring generated files label Mar 13, 2026
@codeant-ai-for-open-source
Copy link
Contributor

Sequence Diagram

This PR fixes extension scaffolding by renaming the template file so it is included in package builds, while keeping the generated output as .gitignore. The flow now reliably packages gitignore.j2 and uses it during init.

sequenceDiagram
    participant Developer
    participant BuildSystem
    participant TemplateFiles
    participant CLI
    participant NewExtension

    Developer->>BuildSystem: Build extensions cli package
    BuildSystem->>TemplateFiles: Include gitignore.j2 in source bundle
    Developer->>CLI: Run extension init
    CLI->>TemplateFiles: Load and render gitignore.j2
    CLI->>NewExtension: Write .gitignore file
    CLI-->>Developer: Extension scaffold created successfully
Loading

Generated by CodeAnt AI

@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.19%. Comparing base (d4f1f8d) to head (e7671c6).
⚠️ Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #38614      +/-   ##
==========================================
+ Coverage   65.01%   65.19%   +0.17%     
==========================================
  Files        1817     1822       +5     
  Lines       72318    72839     +521     
  Branches    23032    23032              
==========================================
+ Hits        47016    47484     +468     
- Misses      25302    25355      +53     
Flag Coverage Δ
superset-extensions-cli 89.82% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

Thanks @villebro! I'll update the PyPI package when cutting Superset 6.1.0 RC2 as we might have other fixes before then.

@michael-s-molina michael-s-molina merged commit f538326 into apache:master Mar 13, 2026
83 of 84 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in Superset Extensions Mar 13, 2026
@michael-s-molina michael-s-molina moved this from In Progress to Done in Superset 6.1.0 Release Bugs Mar 13, 2026
michael-s-molina pushed a commit that referenced this pull request Mar 17, 2026
@michael-s-molina michael-s-molina moved this from Done to Cherried in Superset 6.1.0 Release Bugs Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugins size:M This PR changes 30-99 lines, ignoring generated files size/XS

Projects

Development

Successfully merging this pull request may close these issues.

6.1.0rc1 - superset-extensions-cli is does not find .gitignore.j2 in init

3 participants