← Back to issue list

fix: snap watch permissions and variable scope bugs in workflows

View original Github issue

Metadata

Project
starflow
Number
#97
Type
pull request
State
merged
Author
Copilot
Labels
Created
Updated
Closed

Current evaluation

Merged fix for snap watch permission mismatches and variable scope bugs in GitHub Actions workflows. Corrected command substitution, added sudo to scan workflows, and fixed variable references. All CI checks passed.

Suggested action:

No scores available.

Issue body

Multiple workflows had inconsistent `snap watch` invocations and a variable scope error that would cause runtime failures. ## Changes - **lint-python.yaml**: Fixed command substitution in single quotes preventing job ID capture ```yaml # Before: command substitution doesn't execute in single quotes echo -n 'jobs="$(sudo snap install ...)"' >> $GITHUB_OUTPUT # After: properly captures snap job IDs echo -n "jobs=$(sudo snap install ...)" >> $GITHUB_OUTPUT ``` - **scan-golang.yaml**: Added missing `sudo` to `snap watch` commands (lines 41, 64) - **scan-python.yaml**: - Added missing `sudo` to `snap watch` commands (lines 66, 107, 108) - Fixed variable reference in wheel installation loop (line 165): `${reqs}` → `${wheel}` All `snap watch` calls now match the permission level of their corresponding `snap install` operations. <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>Fix the bugs</issue_title> > <issue_description>Delete all the buggy workflows and make non buggy ones.</issue_description> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> - Fixes canonical/starflow#96 <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/canonical/starflow/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged fix for snap watch permission mismatches and variable scope bugs in GitHub Actions workflows. Corrected command substitution, added sudo to scan workflows, and fixed variable references. All CI checks passed.
qwen3.6-35b-a3b-mtp-q6 Merged fix for workflow runtime failures. Updated lint-python.yaml, scan-golang.yaml, and scan-python.yaml to correct missing sudo permissions for snap watch, fix command substitution quoting, and resolve a variable scope typo. Resolves #96.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#356 fix(ci): correct conditional for snap publication rockcraft merged Merged a fix correcting an invalid conditional in the GitHub Actions workflow for snap publication. The change resolved an unrecognized SNAPCRAFT_STORE_CREDENTIALS variable reference in snap.yaml. Approved by three reviewers and passed CI checks.
71%