You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Migrating existing jobs to spaces enabled Concourse #1897
With #1765, we want the scheduler to operate on job combinations. After this change, the scheduler will no longer work with existing jobs. This is not ideal since we would like the change to be backward compatible and users be able to choose not to use spaces. We should have a migration that generates a default combination for every existing job.
Challenges
Job combinations are identified by a hash made up of their resource spaces, and to generate this hash we use a go library called hashstructure. Our current migration scheme only supports raw SQL and does not allow us to use hashstructure to generate the hashes.
Solutions
Support Go migrations - Use md5 for job combination hashes and write SQL to generate them
Write a SQL query that generates all job combinations
Challenges: decoding job config in SQL does not seem possible; no easy way to recursively find all resources in a config
Write Go migrations
Challenges: mattes/migrate only supports SQL migrations. We'd need to roll our own migration or patch mattes/migrate
We ended up migrating existing jobs to job combinations with combination set to null, and updated scheduler to populate combination with appropriate values.
Activity
mhuangpivotal commentedon Jan 9, 2018
We looked into a few different approaches:
Challenges: decoding job
configin SQL does not seem possible; no easy way to recursively find all resources in aconfigChallenges:
mattes/migrateonly supports SQL migrations. We'd need to roll our own migration or patchmattes/migrateWe ended up migrating existing jobs to job combinations with
combinationset to null, and updated scheduler to populatecombinationwith appropriate values.bump etree tsa handlers mux clockwork goxmldsig genproto grpc