Skip to content

Conversation

@wking
Copy link
Contributor

@wking wking commented Jun 3, 2018

This typo from 68eb128 (#686) was causing any annotations entries in hook JSON to be silently ignored.

This PR also fixes a number of other issues:

  • ReadDir was silently ignoring missing hook executables. Now it bubbles those up.
  • The hooks package didn't have any logging for the initial load (behind New(...)) or injection (behind Hooks(...)). Now it has logging.
  • The 1.0.0 Nvidia example was missing a version and appropriate escaping for backslashes (oci-nvidia-hook not working as expected with podman command #884). Now these are fixed.
  • One of the When.Match tests had a copy/pasted "both, and" name that should have been "both, or". Now it is "both, or".

wking added 5 commits June 3, 2018 11:54
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 <wking@tremily.us>
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 <wking@tremily.us>
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 <wking@tremily.us>
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 <wking@tremily.us>
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 <wking@tremily.us>
@mheon
Copy link
Member

mheon commented Jun 3, 2018

LGTM

@rhatdan
Copy link
Member

rhatdan commented Jun 4, 2018

@rh-atomic-bot r+

@rh-atomic-bot
Copy link
Collaborator

📌 Commit 6ded615 has been approved by rhatdan

@rh-atomic-bot
Copy link
Collaborator

⌛ Testing commit 6ded615 with merge 41a3f48...

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 <wking@tremily.us>

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 <wking@tremily.us>

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 <wking@tremily.us>

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 <wking@tremily.us>

Closes: #887
Approved by: rhatdan
@TomSweeneyRedHat
Copy link
Member

LGTM, but FAH28 tests look to be flaking.

@rh-atomic-bot
Copy link
Collaborator

☀️ Test successful - status-papr
Approved by: rhatdan
Pushing 41a3f48 to master...

@wking wking deleted the hooks-1.0.0-annotation-plural-and-other-fixups branch June 4, 2018 17:28
@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