{"action":"created","issue":{"url":"https://api.github.com/repos/concourse/concourse/issues/534","repository_url":"https://api.github.com/repos/concourse/concourse","labels_url":"https://api.github.com/repos/concourse/concourse/issues/534/labels{/name}","comments_url":"https://api.github.com/repos/concourse/concourse/issues/534/comments","events_url":"https://api.github.com/repos/concourse/concourse/issues/534/events","html_url":"https://github.com/concourse/concourse/issues/534","id":165446772,"number":534,"title":"New resource interface (+ add versioning)","user":{"login":"vito","id":1880,"avatar_url":"https://avatars.githubusercontent.com/u/1880?v=3","gravatar_id":"","url":"https://api.github.com/users/vito","html_url":"https://github.com/vito","followers_url":"https://api.github.com/users/vito/followers","following_url":"https://api.github.com/users/vito/following{/other_user}","gists_url":"https://api.github.com/users/vito/gists{/gist_id}","starred_url":"https://api.github.com/users/vito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vito/subscriptions","organizations_url":"https://api.github.com/users/vito/orgs","repos_url":"https://api.github.com/users/vito/repos","events_url":"https://api.github.com/users/vito/events{/privacy}","received_events_url":"https://api.github.com/users/vito/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/concourse/concourse/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/concourse/concourse/labels/scheduled","name":"scheduled","color":"f4f4f4"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":30,"created_at":"2016-07-13T23:47:54Z","updated_at":"2016-07-30T01:35:22Z","closed_at":null,"body":"## Proposed changes\r\n\r\nThese are probably going to happen:\r\n\r\n1. Rename `in` and `out` scripts to `get` and `put`. These are confusingly named something different because a long time ago jobs just had *in*puts and *out*puts.\r\n2. Change `get` to not emit the version. This was from when `in` didn't know what it was fetching until it was done. It should now be an error if it can't fetch the requested version.\r\n3. Add a `delete` action, which looks like `put` (can be given files and params to determine what to delete) but returns an array of versions that it deleted. This is to support bulk deletes, e.g. to garbage collect intermediate artifacts after a final build is shipped.\r\n4. Add a `version` script which prints the resource's API version. This will start at `1`. All current resources are assumed `0`, and for those we'll execute today's behavior.\r\n5. Remove the `source` and `destination` arguments passed to `get` and `put` - just make it the working directory.\r\n6. Give `check` an official scratch space, which is the current working directory. No real semantics change here, just consistency with `get` and `put`, and potential for future behavior like reusing the scratch space but not reusing `check` containers for extended periods.\r\n\r\n## Open questions\r\n\r\n### Should all metadata collection be moved to `check`?\r\n\r\nRight now, metadata is emitted by `in` and `out`. This means folks won't know any more information about their versions until each one is used.\r\n\r\nI think it's much cleaner to have all metadata come from one place. We could push this all into `check` so the metadata is known immediately, but there's an open question of whether fetching metadata will be prohibitively expensive to run for batches of versions in certain resources.\r\n\r\n### Should `put` instead return an array of versions (optionally with metadata)?\r\n\r\nSome resources, e.g. `git`, actually push many versions. Right now if you push 20 commits only the last one will be emitted, leaving holes in the version history. See https://github.com/concourse/concourse/issues/535\r\n\r\n* Are there other cases where a `put` technically creates multiple versions? If not technically, is this a desired feature (e.g. bulk upload/create)?\r\n* Is this too much overlap with `check`? Especially the metadata collection aspect. Should we have `put` return just the last version, so we know what to `get` after, and run `check` to detect the intermediate versions? This has its own risks - would that `check` use the same container? Is that a safe thing to do? Right now we make sure that each container is single-purpose. If not, is it even performant to run `check` on-demand like that? ~~Maybe the right answer is to just do nothing, run the `get` of the version, save neither, and let `check` pick it up naturally.~~ We have to do something for `passed` constraints to behave as expected - there has to be something tying each version to the build, so that it can work in combination with `version: every`. See https://github.com/concourse/concourse/issues/535\r\n\r\n### ~~Should we change how we pass the source/destination directory to resources?~~\r\n\r\n~~Right now `in` and `out` get both a request on `STDIN` and an argument telling them where to either fetch data into or pull data from. Should we move this from the argument to a request param, for consistency?~~\r\n\r\nResolved as points 5 and 6."},"comment":{"url":"https://api.github.com/repos/concourse/concourse/issues/comments/236331312","html_url":"https://github.com/concourse/concourse/issues/534#issuecomment-236331312","issue_url":"https://api.github.com/repos/concourse/concourse/issues/534","id":236331312,"user":{"login":"vito","id":1880,"avatar_url":"https://avatars.githubusercontent.com/u/1880?v=3","gravatar_id":"","url":"https://api.github.com/users/vito","html_url":"https://github.com/vito","followers_url":"https://api.github.com/users/vito/followers","following_url":"https://api.github.com/users/vito/following{/other_user}","gists_url":"https://api.github.com/users/vito/gists{/gist_id}","starred_url":"https://api.github.com/users/vito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vito/subscriptions","organizations_url":"https://api.github.com/users/vito/orgs","repos_url":"https://api.github.com/users/vito/repos","events_url":"https://api.github.com/users/vito/events{/privacy}","received_events_url":"https://api.github.com/users/vito/received_events","type":"User","site_admin":false},"created_at":"2016-07-30T01:35:22Z","updated_at":"2016-07-30T01:35:22Z","body":"This issue could also be doable with that generic feature: https://github.com/concourse/concourse/issues/210\r\n\r\nNow that we have version pinning on the `get` step, you could do something like:\r\n\r\n```yaml\r\n- get: valid-versions\r\n  trigger: true\r\n- aggregate:\r\n  - get: concourse\r\n    version: {load: version-set/concourse.json}\r\n  - get: garden-runc\r\n    version: {load: version-set/garden-runc.json}\r\n```"}}
{"actor":{"display_login":"vito"}}