Skip to content

pkg/hooks: Version the hook structure and add 1.0.0 hooks #686

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

Closed
wants to merge 5 commits into from

Conversation

wking
Copy link
Contributor

@wking wking commented Apr 27, 2018

This shifts the matching logic out of libpod/container_internal and into the hook package, where we can reuse it after vendoring into CRI-O (as @rhatdan suggested here). It also adds unit tests with almost-complete coverage. Now libpod is even more isolated from the hook internals, which makes it fairly straightforward to bump the hook config file to 1.0.0. I've dubbed the old format 0.1.0, although it doesn't specify an explicit version. Motivation for some of my changes with 1.0.0:

  • Add an explicit version field. This will make any future JSON structure migrations more straightforward by avoiding the need for version-guessing heuristics.

  • Collect the matching properties in a new When sub-structure. This makes the root Hook structure easier to understand, because you don't have to read over all the matching properties when wrapping your head around Hook.

  • Replace the old hook and arguments with a direct embedding of the runtime-spec's hook structure. This provides access to additional upstream properties (args[0], env, and timeout) and avoids the complication of a libpod-specific analog structure.

  • Add a when.always property. You can usually accomplish this effect in another way (e.g. when.commands = [".*"]), but having a boolean explicitly for this use-case makes for easier reading and writing.

  • Replace the previous annotations array with an annotations map. The 0.1.0 approach matched only the values regardless of key, and that seems unreliable.

  • Replace cmds with when.commands, because while there are a few ways to abbreviate “commands”, there's only one way to write it out in full ;). This gives folks one less thing to remember when writing hook JSON.

I've also added doc-compat support for the various pluralizations of the 0.1.0 properties. Previously, the docs and code were not in agreement (e.g. doc stages vs. code stage). More on this particular facet in cri-o/cri-o#1235.

And I've updated the docs to point out that the annotations being matched are the OCI config annotations. This differs from CRI-O, where the annotations used are the Kubernetes-supplied annotations. For example, io.kubernetes.cri-o.Volumes is part of CRI-O's runtime config annotations, but not part of the Kubernetes-supplied annotations CRI-O uses for matching hooks.

The Monitor method supports the CRI-O use-case. podman doesn't need it directly, but CRI-O will need it when we vendor this package there.

The WIP in the subject is because I'm not sure what the has-bind-mounts logic should look like, although I think the current len(c.config.Spec.Mounts) > 0 is not quite what we want.

@rh-atomic-bot
Copy link
Collaborator

Can one of the admins verify this patch?
I understand the following commands:

  • bot, add author to whitelist
  • bot, test pull request
  • bot, test pull request once

@mheon
Copy link
Member

mheon commented Apr 27, 2018

bot, add author to whitelist

@wking wking force-pushed the upstream-hook-schema branch from cb463e4 to 1fef007 Compare April 27, 2018 18:47
case "poststop":
config.Hooks.Poststop = append(config.Hooks.Poststop, hook.Hook)
default:
panic(fmt.Sprintf("unknown stage %q", stage))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be a return err. Panic would bring cri-o down.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, should probably have an ErrUnknownStage and return errors.Wrapf(ErrUnknownStage, "invalid stage %q", stage) or similar

Copy link
Contributor Author

@wking wking Apr 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be a return err. Panic would bring cri-o down.

This should be impossible, because we validate stages after reading them off the disk. The Manager hook information is private, so I'm not aware of a way to get around the post-read validation and inject a buggy hook. So I don't think the panic is an issue, but I'll push an update anyway. There could always be bugs I've missed ;).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, should probably have an ErrUnknownStage and return errors.Wrapf(ErrUnknownStage, "invalid stage %q", stage) or similar

Somehow I missed this comment earlier. I've updated this line since to return an error, but have not defined an ErrUnknownStage. Do you expect callers to want to switch on that vs. other error conditions? I'm having trouble imagining when you'd want different handling than for, say, invalid-regexp errors.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't see this being hit often at all (and given your earlier comment on validation elsewhere, I'm content to believe that), there's no real point to having a specific error -- if we didn't have such validation, I think it would be helpful to have an identifier for a potentially common error

}
reader, ok := Readers[ver.Version]
if !ok {
return nil, fmt.Errorf("unrecognized hook version: %q", ver.Version)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do existing hooks have a version? I don't think so, we would need to warn and set the version to 1.0.

Copy link
Contributor Author

@wking wking Apr 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do existing hooks have a version? I don't think so, we would need to warn and set the version to 1.0.

I'm retroactively declaring them to be 0.1.0, see the initial comment in this PR, these docs, and this code.

@rhatdan
Copy link
Member

rhatdan commented Apr 27, 2018

@baude @mheon PTAL

@wking wking force-pushed the upstream-hook-schema branch 3 times, most recently from a6d1c12 to 7227d93 Compare April 27, 2018 19:16
@baude
Copy link
Member

baude commented Apr 27, 2018

LGTM, needs gofmt ... remember to sign all the commits ...

@baude
Copy link
Member

baude commented Apr 27, 2018

also agree on the error handling

}
}
return nil
hasBindMounts := false // FIXME: what do we want here? https://github.com/projectatomic/libpod/pull/155#pullrequestreview-116002429
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can probably be len(c.config.Spec.Mounts) > 0... It's not 1:1 with actual bind mounts, but it's the closest we can get inside libpod

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can probably be len(c.config.Spec.Mounts) > 0... It's not 1:1 with actual bind mounts, but it's the closest we can get inside libpod

We can always adjust the libpod API to be more precise. However, you're suggesting we just keep the current logic, so I expect we should punt any libpod API changes to follow-up work if we address this issue at all.

Can you recommend wording for the the docs explaining the difference, so we document the behavior to avoid surprising users?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On further examination, we do add several mounts unconditionally to the spec by default, so my change compiles into an unconditional true, avoiding the actual intent of the hook...

Given this, I think it's safest right now to keep your unconditional false and document that hasBindMounts hooks are not currently implemented. We could add a boolean to config indicating that user-added bind mounts are present for the purpose of informing the hooks at a later date.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this, I think it's safest right now to keep your unconditional false and document that hasBindMounts hooks are not currently implemented.

Done and pushed as 51fb6c48.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oci-umount relies on this. So it would be better if you unconditionally return true, until it is fixed. I would rather always run the hook and take the penalty rather then face problems with leaked mount points. But we need to fix this quickly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we need to fix this quickly.

It's probably better if @mheon or someone else familiar with the config flow files a separate PR to update libpod to handle this correctly. I'll rebase this on top once that lands.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wking Sure, should be simple enough. I'll see about getting one in on Monday.

@wking wking force-pushed the upstream-hook-schema branch 2 times, most recently from 25a1627 to 51fb6c4 Compare April 27, 2018 20:53
@wking
Copy link
Contributor Author

wking commented Apr 27, 2018

Should it be an error to call podman without the configured hook directory? Currently the tests fail with:

Running: /usr/bin/podman --root /tmp/podman_test502773819/crio --runroot /tmp/podman_test502773819/crio-run --runtime /usr/bin/runc --conmon /usr/libexec/crio/conmon --cni-config-dir /etc/cni/net.d --storage-driver=vfs run -it -v /tmp/podman_test502773819/socket:/h registry.fedoraproject.org/fedora-minimal:latest bash -c trap "echo FOO >> /h/fifo " 8; echo READY >> /h/fifo; while :; do sleep 0.25; done
error setting up OCI Hooks: open /usr/share/containers/oci/hooks.d: no such file or directory

I can use IsNotExist to make that particular error (vs., for example, an EPERM) non-fatal. But is that the expected interface? If called podman with an explicit --hooks-dir-path=/some/typoed/directory, I'd expect an error.

Should we keep the error fatal in libpod, remove podman's default, and just skip hooks entirely unless --hooks-dir-path is explicitly set? I think that would be the cleanest long-term approach, although we'd need a migration period to shift existing implicit-hooks users over to the new approach. We could handle that in podman though, and immediately transition libpod over to requiring the hook directory passed in via WithHooksDir be readable by the time we need the hooks.

@mheon
Copy link
Member

mheon commented Apr 27, 2018

@wking I think that if the default hooks directory does not exist, it should not be fatal. But if a directory was explicitly set and does not exist, that should be an error. I'd add a check to make sure the path we give to WithHooksDir() in options.go exists, and make a nonexistant directory within the actual hooks package nonfatal.

@wking wking force-pushed the upstream-hook-schema branch from 51fb6c4 to acc35ed Compare April 27, 2018 21:55
@wking
Copy link
Contributor Author

wking commented Apr 27, 2018

I think that if the default hooks directory does not exist, it should not be fatal. But if a directory was explicitly set and does not exist, that should be an error.

Ok, so:

  • “error if the caller explicitly provided an invalid directory”. I'm on board with that.
  • “do not error if someone calls podman without specifying a directory but no hook directory exists”. I'm on board with that.

Do you have a position on “migrate away from the current default hook directory and require callers who need hooks to set the default directory explicitly”? I'm in weakly favor of that, but for now I'll assume you want to keep the existing default.

I'd add a check to make sure the path we give to WithHooksDir() in options.go exists…

Do we need to bother there? A check at that point would be racy vs. checking at invocation time. If we want “directory was explicitly set and does not exist” to be fatal (and we seem to agree that we do), then I'd rather enforce that check in the hooks package (as I do in this PR), and make the failed-race behavior too strict instead of making it too permissive.

… and make a nonexistant directory within the actual hooks package nonfatal.

I think we want to keep this fatal because of the above race. I've pushed acc35edc0 with one potential implementation for the above criteria that makes the failed-race behavior too strict.

@mheon
Copy link
Member

mheon commented Apr 27, 2018

@wking I like enforcing restrictions in WithHooksDir() (and the other With...() functions) because they're the logical border of libpod and Podman, and act as part of libpod's public API. As such, when we move over to CRI-O (hopefully beginning soon, I'm finishing some of the last work on that front), we'll retain the benefits of the validation there.

I think the checks you added seem reasonable, though they should probably be moved into WithHooksDir(). This way, we validate the hooks directory once as it is passed into libpod and again when we actually use it, avoiding races (and incurring overhead, but I'm OK with an extra stat call as we start up). I would like to see a check in the hooks themselves to make the directory not existing not fatal only if the directory is the default contained in the hooks package (so we can guarantee that, on an unconfigured system with no default directory, we can still run Podman without errors).

@wking
Copy link
Contributor Author

wking commented Apr 27, 2018

I think the checks you added seem reasonable, though they should probably be moved into WithHooksDir().

I've kicked this around a bit, but can't get an API I'm comfortable with. We can't just have WithHooksDir return a RuntimeOption that returns an error when the directory is missing (like I'm doing here), because NewRuntime doesn't provide a way to continue subsequent processing after a RuntimeOption returns an error. So any error returned from WithHooksDir's RuntimeOption has to be fatal.

You could do something like:

func WithHooksDir(hooksDir string, dirNotExistFatal bool) RuntimeOption

to make the returned error conditional, but then there's no way for the caller to know if the directory was successfully added or not (e.g. if it wanted to pass a warning up the call chain).

Are we really settled on the NewRuntime(options) approach? If we shifted the With… setters into runtime methods:

runtime, err := libpod.NewRuntime()
…

err = runtime.SetHooksDir(c.GlobalString("hooks-dir-path"))
if err != nil && (c.GlobalIsSet("hooks-dir-path") || !os.IsNotExist(err)) {
  return nil, err
}

err = runtime.Finalize()
return runtime, err

callers would have much more flexibility about handling setter errors.

This way, we validate the hooks directory once as it is passed into libpod and again when we actually use it, avoiding races…

You'd still have the race I have in acc35edc0f, where the directory is stat-able at runtime-creation-time but no longer in existence by the time we actually try and load the hooks, with callers who did not set --hooks-dir-path getting the does-not-exist there when they shouldn't. That's the “too strict” behavior, and I'm ok with it. If you wanted to avoid the race, you'd have to pass down a “considers non-existant-hook-dir fatal” boolean or similar into libpod, while we're currently just passing in a hook-dir path.

On the other hand, the WithHooksDir(hooksDir string, dirNotExistFatal bool) signature I mention above would be one way to get the information you'd need to pass down, and it could set both rt.config.HooksDir (like it already does) and a new rt.config.DirNotExistFatal. Then we could text in WithHooksDir or not, as you like, and then test again with the appropriate fatal-ness at hook-load time.

I would like to see a check in the hooks themselves to make the directory not existing not fatal only if the directory is the default contained in the hooks package (so we can guarantee that, on an unconfigured system with no default directory, we can still run Podman without errors).

I'm currently very happy with pkg/hooks not consuming its directory constants at all. Things like CRI-O's “if the user set a non-default hook dir, drop the usual override directory” seem needlessly brittle to bake into the hooks library itself. By not baking in a DefaultDir condition, we avoid issues for folks who want to support, say, unprivileged users who read hooks from a per-user directory. Or for callers who have different opinions about where hooks should go by default. If you really need to avoid the race, then I'd much prefer passing a HooksNewErrorFatal or similar config down through libpod, which you could consume like:

manager, err := hooks.New(ctx, []string{c.runtime.config.HooksDir})
if err != nil {
  if c.runtime.config.HooksNewErrorFatal {  // or something that only softens the directory-does-not-exist case
    return err
  }
  logrus.Warn(err)
}

@mheon
Copy link
Member

mheon commented Apr 27, 2018

I'm fine with the error from WithHooksDir being fatal - explicitly setting hooks to a directory that doesn't exist sounds like an error. If we actually want to clear them, a separate function (WithNoHooks() or similar) sounds more reasonable to me than accepting "" as a way to clear the hooks.

Your second suggestion, passing down an error, sounds fine, though I think we'd be better off just passing through an error from os.Stat() so we can use the built-in os.IsNotExist() function to check if we actually had a fatal init error, or the directory we're using as hooks doesn't exist (probably just a logged warning)

@wking wking force-pushed the upstream-hook-schema branch from 9586dc7 to b22924c Compare April 28, 2018 18:38
@wking wking force-pushed the upstream-hook-schema branch from b22924c to 859cb3c Compare April 28, 2018 18:41
@wking wking force-pushed the upstream-hook-schema branch from 859cb3c to 9394b2f Compare April 28, 2018 18:51
@wking
Copy link
Contributor Author

wking commented Apr 28, 2018

If we actually want to clear them, a separate function (WithNoHooks() or similar) sounds more reasonable to me than accepting "" as a way to clear the hooks.

WithHooks(hooksDir *string, …) with nil to clear would be explicit enough for me if we wanted to have empty-string values mean the current directory. I'm also fine documenting empty-string values as clearing if we want. A WithNoHooks() is nice and explicit, but then callers have to switch between the two functions and switch based on their own *string or bool/string pair. Anyhow, for now I've pushed 9394b2f1 to have WithHooks error on empty strings, and we can sort out the clearing API later.

Your second suggestion, passing down an error, sounds fine, though I think we'd be better off just passing through an error from os.Stat() so we can use the built-in os.IsNotExist() function to check if we actually had a fatal init error, or the directory we're using as hooks doesn't exist (probably just a logged warning)

A Stat call would be racy. When hooks.New is called with a non-existent directory, it's the ioutil.ReadDir that would return the not-exist error, since that's the only operation we need to perform on the directory. 9394b2f1 adds a new HooksDirNotExistFatal libpod config setting and sets it via:

func WithHooksDir(hooksDir string, dirNotExistFatal bool) RuntimeOption

That allows us to avoid the os.Stat/ioutil.ReadDir race by pushing the warn/error switch down into libpod. Does that look good to you?

@mheon
Copy link
Member

mheon commented Apr 28, 2018

@wking That implementation looks like a good compromise. We preserve checking at the public bounds of Libpod, and we have a way of ensuring that a non-existant hooks dir is nonfatal.

I'll do one more look over on monday, but I think my concerns are addressed now. Thanks @wking

rh-atomic-bot pushed a commit that referenced this pull request May 11, 2018
If a .json file existed when we called ioutil.ReadDir but that file
has been removed by the time we get around to calling Read on it,
silently ignore the file.  Iterating through all the files in the
directory shouldn't take particularly long, so this is an unlikely
corner case.  And when it happens, silently ignoring the file gives
the same outcome as you'd have gotten if the parallel remove had
happened slightly earlier before the ioutil.ReadDir call.

Signed-off-by: W. Trevor King <[email protected]>

Closes: #686
Approved by: mheon
rh-atomic-bot pushed a commit that referenced this pull request May 11, 2018
And add an argument to WithHooksDir to set it.

If the hook dir doesn't exist, the new hooks package considers that a
fatal error.  When a podman caller sets
--hooks-dir-path=/some/typoed/directory, a fatal error is more helpful
than silently not loading any hooks.  However, callers who call podman
without setting --hooks-dir-path may not need hooks at all.  We don't
want to pester those callers with not-exist errors.  With this commit,
we:

* Assume the caller knows what they're doing if they set
  --hooks-dir-path and set HooksDirNotExistFatal.

* If the caller does not explicitly set --hooks-dir-path, assume they
  won't mind if the hook directory is missing and set
  HooksDirNotExistFatal false.

We also considered checking for the directory's existence in the code
calling WithHooksDir or from within WithHooksDir, but checks there
would race with the underlying ioutil.ReadDir in the hooks package.
By pushing the warn/error decision down into libpod's implementation,
we avoid a racy "do we expect this to work once libpod gets to it?"
pre-check.

I've also added a check to error if WithHooksDir is called with an
empty-string argument, because we haven't defined the semantics of
that (is it clearing a previous value?  Is it effectively the same as
the current directory?).  I agree with Matthew that a separate
WithNoHooks, or a *string argument to WithHooks, or some such would be
a better API for clearing previous values [1].  But for now, I'm just
erroring out to fail early for callers who might otherwise be
surprised that libpod ignores empty-string HooksDir.

[1]: #686 (comment)

Signed-off-by: W. Trevor King <[email protected]>

Closes: #686
Approved by: mheon
rh-atomic-bot pushed a commit that referenced this pull request May 11, 2018
We also considered ordering with sort.Strings, but Matthew rejected
that because it uses a byte-by-byte UTF-8 comparison [1] which would
fail many language-specific conventions [2].

There's some more discussion of the localeToLanguage mapping in [3].
Currently language.Parse does not handle either 'C' or 'POSIX',
returning:

  und, language: tag is not well-formed

for both.

[1]: #686 (comment)
[2]: https://en.wikipedia.org/wiki/Alphabetical_order#Language-specific_conventions
[3]: golang/go#25340

Signed-off-by: W. Trevor King <[email protected]>

Closes: #686
Approved by: mheon
rh-atomic-bot pushed a commit that referenced this pull request May 11, 2018
Following the vndr docs [1]:

  $ go get -u github.com/LK4D4/vndr
  $ vndr golang.org/x/text
  $ git add -A vendor/golang.org/x/text

The targeted 'git add' was because we seem to have versioned some test
files (e.g. vendor/github.com/varlink/go/varlink/varlink_test.go in
8493dba (Initial varlink implementation, 2018-03-26, #627).  I don't
know why, possibly an old vndr version?  But either way, I'm punting
that particular issue to a separate branch.

[1]: https://github.com/LK4D4/vndr/blob/1fc68ee0c852556a9ed53cbde16247033f104111/README.md

Signed-off-by: W. Trevor King <[email protected]>

Closes: #686
Approved by: mheon
@rh-atomic-bot
Copy link
Collaborator

☀️ Test successful - status-papr
Approved by: mheon
Pushing c8208a8 to master...

@wking wking deleted the upstream-hook-schema branch May 11, 2018 17:05
wking added a commit to wking/libpod that referenced this pull request May 20, 2018
We've had this functionality since 68eb128 (pkg/hooks: Version the
hook structure and add 1.0.0 hooks, 2018-04-27, containers#686), but didn't have
any user-facing docs for it.

Signed-off-by: W. Trevor King <[email protected]>
rh-atomic-bot pushed a commit that referenced this pull request May 21, 2018
We've had this functionality since 68eb128 (pkg/hooks: Version the
hook structure and add 1.0.0 hooks, 2018-04-27, #686), but didn't have
any user-facing docs for it.

Signed-off-by: W. Trevor King <[email protected]>

Closes: #811
Approved by: mheon
wking added a commit to wking/libpod that referenced this pull request Jun 3, 2018
The continue here is from 5676597 (hooks/read: Ignore IsNotExist for
JSON files in ReadDir, 2018-04-27, containers#686), where it was intended to
silently ignore missing JSON files.  However, the old logic was also
silently ignoring not-exist errors from the os.Stat(hook.Hook.Path)
from 68eb128 (pkg/hooks: Version the hook structure and add 1.0.0
hooks, 2018-04-27, containers#686).  This commit adjusts the check so JSON
not-exist errors continue to be silently ignored while hook executable
not-exist errors become fatal.

Signed-off-by: W. Trevor King <[email protected]>
wking added a commit to wking/libpod that referenced this pull request Jun 3, 2018
This typo from 68eb128 (pkg/hooks: Version the hook structure and add
1.0.0 hooks, 2018-04-27, containers#686) was causing any 'annotations' entries
in hook JSON to be silently ignored.

Signed-off-by: W. Trevor King <[email protected]>
wking added a commit to wking/libpod that referenced this pull request Jun 3, 2018
The typo is a copy/paste error from 68eb128 (pkg/hooks: Version the
hook structure and add 1.0.0 hooks, 2018-04-27, containers#686).

Signed-off-by: W. Trevor King <[email protected]>
wking added a commit to wking/libpod that referenced this pull request Jun 3, 2018
Reported by Gary Edwards [1].  Both typos are originally from 68eb128
(pkg/hooks: Version the hook structure and add 1.0.0 hooks,
2018-04-27, containers#686).

[1]: containers#884 (comment)

Signed-off-by: W. Trevor King <[email protected]>
wking added a commit to wking/libpod that referenced this pull request Jun 3, 2018
We've had logrus logging in the monitor code since it landed in
68eb128 (pkg/hooks: Version the hook structure and add 1.0.0 hooks,
2018-04-27, containers#686).  This commit adds similar logging to the initial
hook.New() and Manager.Hooks() calls to make it easier to see if those
are working as expected.

Signed-off-by: W. Trevor King <[email protected]>
rh-atomic-bot pushed a commit that referenced this pull request Jun 4, 2018
The continue here is from 5676597 (hooks/read: Ignore IsNotExist for
JSON files in ReadDir, 2018-04-27, #686), where it was intended to
silently ignore missing JSON files.  However, the old logic was also
silently ignoring not-exist errors from the os.Stat(hook.Hook.Path)
from 68eb128 (pkg/hooks: Version the hook structure and add 1.0.0
hooks, 2018-04-27, #686).  This commit adjusts the check so JSON
not-exist errors continue to be silently ignored while hook executable
not-exist errors become fatal.

Signed-off-by: W. Trevor King <[email protected]>

Closes: #887
Approved by: rhatdan
rh-atomic-bot pushed a commit that referenced this pull request Jun 4, 2018
This typo from 68eb128 (pkg/hooks: Version the hook structure and add
1.0.0 hooks, 2018-04-27, #686) was causing any 'annotations' entries
in hook JSON to be silently ignored.

Signed-off-by: W. Trevor King <[email protected]>

Closes: #887
Approved by: rhatdan
rh-atomic-bot pushed a commit that referenced this pull request Jun 4, 2018
The typo is a copy/paste error from 68eb128 (pkg/hooks: Version the
hook structure and add 1.0.0 hooks, 2018-04-27, #686).

Signed-off-by: W. Trevor King <[email protected]>

Closes: #887
Approved by: rhatdan
rh-atomic-bot pushed a commit that referenced this pull request Jun 4, 2018
Reported by Gary Edwards [1].  Both typos are originally from 68eb128
(pkg/hooks: Version the hook structure and add 1.0.0 hooks,
2018-04-27, #686).

[1]: #884 (comment)

Signed-off-by: W. Trevor King <[email protected]>

Closes: #887
Approved by: rhatdan
rh-atomic-bot pushed a commit that referenced this pull request Jun 4, 2018
We've had logrus logging in the monitor code since it landed in
68eb128 (pkg/hooks: Version the hook structure and add 1.0.0 hooks,
2018-04-27, #686).  This commit adds similar logging to the initial
hook.New() and Manager.Hooks() calls to make it easier to see if those
are working as expected.

Signed-off-by: W. Trevor King <[email protected]>

Closes: #887
Approved by: rhatdan
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 27, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants