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

Implement compatMode raw JSON output and fix tls_verify init on pull() #495

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

D3vil0p3r
Copy link
Contributor

@D3vil0p3r D3vil0p3r commented Jan 7, 2025

Fix #492

Added compatMode param to pull() function. Default as True in order to give a detailed progress JSON output by default like:

...
{'status': 'Pulling fs layer', 'progressDetail': {}, 'id': 'ef3afbc03436'}
{'status': 'Downloading', 'progressDetail': {'current': 1862903, 'total': 37308955}, 'progress': '[==>                                                ]  1.863MB/37.31MB', 'id': '1546de61b6c3'}
{'status': 'Download complete', 'progressDetail': {}, 'id': 'fa424c11eb04'}
{'status': 'Pulling fs layer', 'progressDetail': {}, 'id': '3d3d38ab8766'}
{'status': 'Downloading', 'progressDetail': {'current': 1441042, 'total': 3248294}, 'progress': '[======================>                            ]  1.441MB/3.248MB', 'id': 'ef3afbc03436'}
...

while compatMode=False still keeps the one-field stream JSON output:

{'stream': 'Copying blob sha256:30babffc8f090f7c78c263b9a1b683b34ca5f73da74911ffe942d4d8225dca57\n'}

This approach differs from the already present progress_bar=True because does not show the "fancy" progress bar but a raw detailed progressing JSON output, useful for devs want to manipulate pull output.

Furthermore, the PR fixes tls_verify initialization in pull() because, according to its description, its Default should be True, but it was actually as None.

@D3vil0p3r D3vil0p3r changed the title Implemented compatMode raw JSON output and fix tls_verify init on pull() Implement compatMode raw JSON output and fix tls_verify init on pull() Jan 7, 2025
@D3vil0p3r D3vil0p3r force-pushed the patch-2 branch 3 times, most recently from 445f654 to 706411d Compare January 7, 2025 20:58
@D3vil0p3r D3vil0p3r marked this pull request as draft January 7, 2025 20:59
@D3vil0p3r D3vil0p3r marked this pull request as ready for review January 7, 2025 21:02
@D3vil0p3r D3vil0p3r marked this pull request as draft January 7, 2025 21:17
@D3vil0p3r D3vil0p3r marked this pull request as ready for review January 7, 2025 21:18
@D3vil0p3r
Copy link
Contributor Author

/retest

Copy link
Contributor

openshift-ci bot commented Jan 7, 2025

@D3vil0p3r: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Signed-off-by: D3vil0p3r <vozaanthony@gmail.com>
@D3vil0p3r
Copy link
Contributor Author

@rhatdan I hope you are well. When you have free time, could you please give a quick check? "Test on Fedora" is failing because it cannot find the Alpine image, so, looking on its logs, I think it is an error not related to the PR.

@rhatdan
Copy link
Member

rhatdan commented Jan 8, 2025

Thanks @D3vil0p3r
LGTM
/approve
@jwhonce @umohnani8 PTAL

Copy link
Contributor

openshift-ci bot commented Jan 8, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: D3vil0p3r, rhatdan
Once this PR has been reviewed and has the lgtm label, please assign inknos for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@umohnani8
Copy link
Member

Changes LGTM
Just wondering if changing the default value of tlsVerify would cause current workloads to break. I agree that the default should be fixed, but need to ensure we don't break existing environments. @jwhonce wdyt?

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.

[BUG] pull() progress_bar=True does not work show JSON output as intended for compact mode
3 participants