Skip to content

Conversation

@JeyJeyGao
Copy link
Contributor

@JeyJeyGao JeyJeyGao commented Jan 21, 2025

Fix:

  • For text output, renamed io.cncf.notary.signingAgent to signing agent to be consistent with the JSON output signingAgent.
  • For json output, rendered timestamp in RFC 3339 with nanoseconds. Timestamp RFC 3161 can have a fraction-of-second time value.

Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
@codecov
Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.30%. Comparing base (61bef0f) to head (08a71fb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1156   +/-   ##
=======================================
  Coverage   73.30%   73.30%           
=======================================
  Files          53       53           
  Lines        3240     3240           
=======================================
  Hits         2375     2375           
  Misses        671      671           
  Partials      194      194           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JeyJeyGao JeyJeyGao marked this pull request as draft January 21, 2025 02:39
Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
@JeyJeyGao JeyJeyGao marked this pull request as ready for review January 21, 2025 02:49
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

LGTM

@JeyJeyGao JeyJeyGao changed the title docs: update inspect command spec docs: fix inspect command spec Jan 21, 2025
Copy link
Contributor

@yizha1 yizha1 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@FeynmanZhou FeynmanZhou left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@vaninrao10 vaninrao10 left a comment

Choose a reason for hiding this comment

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

LGTM

@JeyJeyGao JeyJeyGao merged commit 19b44cf into notaryproject:main Jan 22, 2025
7 checks passed
@JeyJeyGao JeyJeyGao deleted the docs/inspect_spec branch January 22, 2025 10:06
JeyJeyGao added a commit that referenced this pull request Feb 7, 2025
Depends on spec change: #1156 

Refactor:
- Extract output formatting logic from the inspect command layer to an
isolated display handler layer for processing rendering.
- Add `json` and `tree` inspect handlers.

Fix:
- For `tree` output, make the key names with multiple words separated by
space characters rather than capitalizing the words, which is defined in
the [inspect command
spec](https://github.com/notaryproject/notation/blob/v1.2.0/specs/commandline/inspect.md#inspect-signatures-on-the-supplied-oci-artifact-identified-by-the-digest).
- For `json` output, default to rendering time in RFC3339 with
nanoseconds (Notation expiry, signing time and certificate expiry are
accurate to 1 second. Timestamp [RFC
3161](https://www.rfc-editor.org/rfc/rfc3161#section-2.4.2) can have
fraction-of-second time value).

E2E Test:
- inspect signature with timestamp, signature expiry and user metadata
(text, json)
- inspect signatures with invalid timestamp (test, json)
- inspect with `-o` shorthand.

Resolves part of #1151

---------

Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
7h3-3mp7y-m4n pushed a commit to 7h3-3mp7y-m4n/notation that referenced this pull request Mar 29, 2025
Fix:
- For `text` output, renamed `io.cncf.notary.signingAgent` to `signing
agent` to be consistent with the JSON output `signingAgent`.
- For `json` output, rendered timestamp in RFC 3339 with nanoseconds.
Timestamp [RFC
3161](https://www.rfc-editor.org/rfc/rfc3161#section-2.4.2) can have a
fraction-of-second time value.

---------

Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
7h3-3mp7y-m4n pushed a commit to 7h3-3mp7y-m4n/notation that referenced this pull request Mar 29, 2025
…aryproject#1150)

Depends on spec change: notaryproject#1156 

Refactor:
- Extract output formatting logic from the inspect command layer to an
isolated display handler layer for processing rendering.
- Add `json` and `tree` inspect handlers.

Fix:
- For `tree` output, make the key names with multiple words separated by
space characters rather than capitalizing the words, which is defined in
the [inspect command
spec](https://github.com/notaryproject/notation/blob/v1.2.0/specs/commandline/inspect.md#inspect-signatures-on-the-supplied-oci-artifact-identified-by-the-digest).
- For `json` output, default to rendering time in RFC3339 with
nanoseconds (Notation expiry, signing time and certificate expiry are
accurate to 1 second. Timestamp [RFC
3161](https://www.rfc-editor.org/rfc/rfc3161#section-2.4.2) can have
fraction-of-second time value).

E2E Test:
- inspect signature with timestamp, signature expiry and user metadata
(text, json)
- inspect signatures with invalid timestamp (test, json)
- inspect with `-o` shorthand.

Resolves part of notaryproject#1151

---------

Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
FeynmanZhou pushed a commit to FeynmanZhou/notation that referenced this pull request May 15, 2025
Fix:
- For `text` output, renamed `io.cncf.notary.signingAgent` to `signing
agent` to be consistent with the JSON output `signingAgent`.
- For `json` output, rendered timestamp in RFC 3339 with nanoseconds.
Timestamp [RFC
3161](https://www.rfc-editor.org/rfc/rfc3161#section-2.4.2) can have a
fraction-of-second time value.

---------

Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
FeynmanZhou pushed a commit to FeynmanZhou/notation that referenced this pull request May 15, 2025
…aryproject#1150)

Depends on spec change: notaryproject#1156 

Refactor:
- Extract output formatting logic from the inspect command layer to an
isolated display handler layer for processing rendering.
- Add `json` and `tree` inspect handlers.

Fix:
- For `tree` output, make the key names with multiple words separated by
space characters rather than capitalizing the words, which is defined in
the [inspect command
spec](https://github.com/notaryproject/notation/blob/v1.2.0/specs/commandline/inspect.md#inspect-signatures-on-the-supplied-oci-artifact-identified-by-the-digest).
- For `json` output, default to rendering time in RFC3339 with
nanoseconds (Notation expiry, signing time and certificate expiry are
accurate to 1 second. Timestamp [RFC
3161](https://www.rfc-editor.org/rfc/rfc3161#section-2.4.2) can have
fraction-of-second time value).

E2E Test:
- inspect signature with timestamp, signature expiry and user metadata
(text, json)
- inspect signatures with invalid timestamp (test, json)
- inspect with `-o` shorthand.

Resolves part of notaryproject#1151

---------

Signed-off-by: Junjie Gao <junjiegao@microsoft.com>
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.

5 participants