New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Time resource shouldn't share version history #2908
Comments
After lots of discussion, we have decided to change the database schema in a few different ways than originally intended. For this current version, we will no longer be using the We will then save the boolean value into the A ToDOO:
|
The feature was implemented with the |
Here's how it works now:
TODO:
|
@clarafu and I chatted about moving uniqueness down to the versions table rather than on the resource config. This would make it easier to feature-flag this (#3013) without causing an increase in check containers (caused by everyone having unique resource configs). We initially proposed just adding a We didn't have this problem when the uniqueness was on Maybe we need that join table after all? 🤔 Then the resource would just point to its entry in the join table, and versions would point back to it.
|
idk |
The join table kind of scares me because we would need a guarantee that there's only one |
Would we need the null values for each global resource config? Could we check that table before defaulting to global versions for a given resource config? |
@topherbullock Yeah, the thinking was that each resource config would have an entry with Not sure what you mean by defaulting to global versions |
Looks like this could be done with partial indexes. I think something like this would work: CREATE UNIQUE INDEX resource_version_ownership_global
ON resource_version_ownership (resource_config_id)
WHERE resource_id IS NULL;
CREATE UNIQUE INDEX resource_version_ownership_resource_id
ON resource_version_ownership (resource_config_id, resource_id)
WHERE resource_id IS NOT NULL; |
A summary of where this issue is going now is that we will be adding a join table named
This join table will allow the creation of resource configs to be directly dependent on a pipeline resource. The population of this table will happen when we Resource types versioning will also be affected because we currently save custom resource type's version history (since we treat resource types the same as resources in terms of them both having a resource config and resource config versions). But it does not make much sense to have resource types be able to have unique version history (it would be a very weird situation like this?
) but since users can't even see (or probably don't even know that resource types have its own version history), we will just have resource types to always default to shared. Todo list:
|
My considered view is that (Disclaimer: Based on just passing by, I don't have deep context etc etc) |
@jchesterpivotal I think as long as the schema ensures that combinations of values ( assuming We embrace I'm satisfied so long as that |
What challenge are you facing?
With #2386 we identified that the
time
resource would be adversely affected by a shared history, because it'll fire off a ton of builds at once if everyone configures the same interval.What would make this better?
In concourse/rfcs#1 we're planning to make this feature (shared history) opt-out, by allowing the resource's
info
script to include some configuration that disables it.We don't want to do all of concourse/rfcs#1 just yet, so for now let's just hack in some way for v1 resources to opt-out.
Implementation note discussed with @clarafu: this could work by generating a random hash for resources that have opted-out and using it to generate a unique resource config for the resource. This would allow everything else to just keep working as-is (versions remain tied to resource configs, and we'll just have different resource configs).
The text was updated successfully, but these errors were encountered: