Skip to content

dev rbi dsl is failing with the new version of job-iteration. #591

@charlescng

Description

@charlescng

dev rbi dsl is failing with the new version of job-iteration (1.8.0 -> 1.10.0).

/Users/charlesng/.gem/ruby/3.3.5/gems/job-iteration-1.10.0/lib/tapioca/dsl/compilers/job_iteration.rb:56:in `sort_by': ArgumentError: comparison of NilClass with 1 failed (Parallel::UndumpableException)
	from /Users/charlesng/.gem/ruby/3.3.5/gems/job-iteration-1.10.0/lib/tapioca/dsl/compilers/job_iteration.rb:56:in `sort_by!'
	from /Users/charlesng/.gem/ruby/3.3.5/gems/job-iteration-1.10.0/lib/tapioca/dsl/compilers/job_iteration.rb:56:in `block in decorate'
	from /Users/charlesng/.gem/ruby/3.3.5/gems/tapioca-0.16.5/lib/tapioca/rbi_ext/model.rb:40:in `block in create_class'

The Problem

The Tapioca DSL compiler was failing with "comparison of NilClass with Integer failed"
This occurred because the job used positional parameters, which created parameter types not included in the PARAM_TYPES_IN_ORDER array
When sorting parameters, index() returned nil for unknown types, causing the comparison error

Using positional arguments rather than named arguments appears to be a deliberate choice in GCP::BigQuery::SyncTablesChildJob
> the positional arguments are used to trigger the job because the JobIteration does not support custom named arguments

This seems like a regression?

Originally posted by @charlescng in https://github.com/Shopify/infra-central/issues/10455#issuecomment-2988865609

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions