Skip to content
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

Proposing the simple, open, concourse-webhook-resources which #87

Merged
merged 2 commits into from
Mar 14, 2024

Conversation

ardavanhashemzadeh
Copy link

may be used to fly pipelines using API calls.

Ardavan Hashemzadeh added 2 commits January 21, 2024 15:47
may be used to fly pipelines using API calls.

Signed-off-by: Ardavan Hashemzadeh <ardy.hash+mzadehgit@gmail.com>
git@github.com:ardavanhashemzadeh/concourse-resource-types.git

Signed-off-by: Ardavan Hashemzadeh <ardy.hash+mzadehgit@gmail.com>
@bgandon
Copy link
Contributor

bgandon commented Feb 6, 2024

Just saying, but:

  1. There is also no need to store the whole log of all passed triggers timestamps, because only the last timestamp is enough, since you're basically implementing a “black out” window of X seconds (X configured in source.limit) during which no trigger will generate any new version.
  2. There is no need for a Git backend to store the timestamp of the last trigger. Indeed, the storage trick used by the gstack/keyval-resource would be enough to store the last trigger timestamp and implement the “black out” window.

Maybe you should detail more your use-case requiring a Git repo as storage backend, or just implement a more lightweight approach.

The name “webook-resource” is surprising either. In fact, you don't implement any webhook endpoint, as you just benefit from the default one provided by Concourse. Your resource only brings a throttling feature. Thus I would suggest you call it the “throttling-resource”.

@ardavanhashemzadeh
Copy link
Author

Thanks for the feedback, git may be heavy handed if Concourse is already saving history. I'll cut the cruft and name it more appropriately.

@bgandon
Copy link
Contributor

bgandon commented Feb 6, 2024

Always happy to welcome new resource authors.

Well, it's no more heavy since the timestamp is already stored in the version history of the resource, and that's precisely the trick of the keyval-resource.

I would also suggest you document your resource, looking at other popular resources like “git-resource” or “registry-image” and set up a README.md that looks similar.

@taylorsilva taylorsilva merged commit c5d0e46 into concourse:master Mar 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants