Skip to content

ci(small): fix: correctly pass NEXT_PUBLIC_USE_NATIVE_TABLE in deploy workflow#9425

Merged
arii merged 2 commits intoleaderfrom
fix-deploy-env-vars-7479947283824317552
Mar 3, 2026
Merged

ci(small): fix: correctly pass NEXT_PUBLIC_USE_NATIVE_TABLE in deploy workflow#9425
arii merged 2 commits intoleaderfrom
fix-deploy-env-vars-7479947283824317552

Conversation

@arii
Copy link
Copy Markdown
Owner

@arii arii commented Feb 26, 2026

Description

Updated deploy.yml to correctly source NEXT_PUBLIC_USE_NATIVE_TABLE from GitHub repository variables (vars) instead of env, ensured it is available during the build step for Next.js inlining, and fixed a syntax error in the .env.production generation step.

Fixes #9424

Change Type: 🐛 Bug fix (non-breaking change fixing an issue)

Related Issues

Closes #9424

Original PR Body

Updated deploy.yml to correctly source NEXT_PUBLIC_USE_NATIVE_TABLE from GitHub repository variables (vars) instead of env, ensured it is available during the build step for Next.js inlining, and fixed a syntax error in the .env.production generation step.

Fixes #9424


PR created automatically by Jules for task 7479947283824317552 started by @arii

Co-authored-by: arii <342438+arii@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions github-actions Bot changed the title fix: correctly pass NEXT_PUBLIC_USE_NATIVE_TABLE in deploy workflow ci(small): fix: correctly pass NEXT_PUBLIC_USE_NATIVE_TABLE in deploy workflow Feb 26, 2026
@arii
Copy link
Copy Markdown
Owner Author

arii commented Feb 26, 2026

🤖 AI Technical Audit

Code Review: PR #9425 - Fix NEXT_PUBLIC_USE_NATIVE_TABLE in Deploy Workflow

This is a critical fix for the deployment pipeline, ensuring that frontend feature flags are correctly baked into the build artifacts and that the runtime environment configuration is syntactically valid.

⚠️ ANTI-AI-SLOP DIRECTIVES

  1. OVERLY VERBOSE COMMENTS: None detected. The changes are purely configuration updates within YAML.
  2. OVER-ENGINEERING: None. The solution is direct and uses standard GitHub Actions contexts (vars).
  3. DUPLICATE HOOKS/TYPES: N/A.
  4. CODE RATIO: The PR is small (net +1 line, modified 1 line). No deletion opportunities exist within this diff context.
  5. STALE FEATURES: The PR effectively removes the incorrect usage of env.NEXT_PUBLIC_USE_NATIVE_TABLE (which likely evaluated to nothing or caused a syntax error) in favor of the repository variable.

File-by-File Analysis

.github/workflows/deploy.yml

1. Build Environment Injection

+          NEXT_PUBLIC_USE_NATIVE_TABLE: ${{ vars.NEXT_PUBLIC_USE_NATIVE_TABLE }}

Assessment: ✅ Correct.
Next.js replaces NEXT_PUBLIC_ variables at build time (inlining them into the JavaScript bundle). Without adding this to the env block of the build job/step, the React code running on the client would see undefined for this variable, regardless of what is set at runtime.

2. .env Generation Fix

-          NEXT_PUBLIC_USE_NATIVE_TABLE=${{ env.NEXT_PUBLIC_USE_NATIVE_TABLE }}"
+          NEXT_PUBLIC_USE_NATIVE_TABLE=${{ vars.NEXT_PUBLIC_USE_NATIVE_TABLE }}

Assessment: ✅ Correct.

  • Syntax Fix: The removal of the trailing " prevents a malformed line in the generated .env file (e.g., VAR=value").
  • Source Fix: Switching from env to vars aligns with where the configuration is stored (GitHub Repository Variables). Using env context here would have likely failed if the variable wasn't defined in the workflow's top-level env.

Architectural Impact

This change ensures that feature flagging logic relying on NEXT_PUBLIC_USE_NATIVE_TABLE works consistently across the Build and Runtime phases. It prevents a class of bugs where the local environment works (due to .env.local) but production fails because the variable wasn't inlined during the CI build.

Best Practices

  • CI/CD: Moving configuration from hardcoded workflow files to GitHub Variables (vars context) is a best practice, separating configuration from pipeline logic.
  • Security: Since this is a public flag (not a secret), using vars is appropriate.

Review automatically published via RepoAuditor.

@arii arii added ci fix workflow not reviewed The review could not be performed or completed successfully. and removed workflow not reviewed The review could not be performed or completed successfully. labels Feb 26, 2026
@arii arii force-pushed the fix-deploy-env-vars-7479947283824317552 branch from 1fb2d95 to 8781e29 Compare March 3, 2026 03:26
@arii arii marked this pull request as ready for review March 3, 2026 03:27
@arii arii enabled auto-merge (squash) March 3, 2026 03:27
@arii arii merged commit 52608ec into leader Mar 3, 2026
22 checks passed
@arii arii deleted the fix-deploy-env-vars-7479947283824317552 branch March 3, 2026 03:34
@arii arii added not reviewed The review could not be performed or completed successfully. and removed not reviewed The review could not be performed or completed successfully. labels Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci fix not reviewed The review could not be performed or completed successfully.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NEXT_PUBLIC_USE_NATIVE_TABLE

1 participant