Repository navigation
Replies: 1 comment
|
Follow-up with the confirmed root cause and a validated workaround. Confirmed root causeThe exact exception is: This is raised by Validated workaroundWe patched the image to wrap module Transformers
module GitlabCI
class If
class << self
alias_method :original_transform, :transform
def transform(rules:, job_when:, only:, except:)
original_transform(rules: rules, job_when: job_when, only: only, except: except)
rescue StandardError => e
Result::Unsupported.new(
identifier: IDENTIFIER,
comment: "Unable to map conditional expression to GitHub Actions equivalent (#{e.class}: #{e.message})",
snippet: nil
)
end
end
end
end
endThis only comments out the single unresolvable condition; the rest of the job still converts normally. ResultRe-running the audit against the same GitLab group with the patched image:
Every previously-crashing pipeline now produces AskThis confirms
Happy to share more detail if useful, we don't have a minimal repro |
Uh oh!
There was an error while loading. Please reload this page.
Summary
gh actions-importer audit gitlabconsistently crashes with an unhandled internal error while transforming certain GitLab CI pipelines, for a specificrules:/if:construct. The audit reports the pipeline as Failed with a Ruby backtrace instead of completing conversion or falling back to Unsupported.This is a different defect from the empty-value
SecretScannerredaction corruption already reported in Discussion #357. That fix does not affect this crash, it's a separate code path entirely.Environment
gh actions-importerCLI (launcher): v1.3.6ghcr.io/actions-importer/cli:1.3.22671gh actions-importer audit gitlab --namespace <group> --output-dir <dir>Error
Identical backtrace, same two lines (
if.rb:64incondition_from_rule, called fromif.rb:44intransform), across every affected project in our scan. This strongly suggests one unhandled case incondition_from_rulerather than many distinct bugs.Impact
In a single GitLab group scan, this crash accounted for 30 of 30 Failed pipelines, effectively all pipeline-conversion failures in that namespace tree. 0 of these produced a
config.json, converted workflow, or partial output, the job is dropped entirely with only the backtrace recorded.What we can't share
We don't have a minimal repro
.gitlab-ci.ymlto attach, since we can't extract the exactrules:/if:syntax without exposing internal pipeline configuration. Given the consistent crash site, we'd expect this to reproduce with almost any GitLab CIrules: - if: <condition>construct thatcondition_from_ruledoesn't currently handle. Grateful if someone familiar with that transformer can identify whichif:syntax variants aren't covered.Ask
condition_from_rule(if.rb:64) has known unhandledrules:/if:syntax cases?Happy to provide more detail (exact rule syntax category, not literal file contents) if that helps narrow it down.
All reactions