Skip to content

fix(cssc): 31670352 Upgrade oras-py package to use new auth flow 2/n#41

Merged
cegraybl merged 3 commits into
feature/cssc_extfrom
cegaybl/cssc_31670352_empty_token_2
Apr 8, 2025
Merged

fix(cssc): 31670352 Upgrade oras-py package to use new auth flow 2/n#41
cegraybl merged 3 commits into
feature/cssc_extfrom
cegaybl/cssc_31670352_empty_token_2

Conversation

@cegraybl
Copy link
Copy Markdown

@cegraybl cegraybl commented Apr 1, 2025

This change is a continuation of the changes in PR 39
Updates the oras packages to 0.2.25 to use a more recent version of the package to avoid the "empty token" error when authenticating to the registry.

@cegraybl cegraybl requested review from Ruchii-27, Copilot and huanwu April 1, 2025 20:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR upgrades the oras package to version 0.2.25 to implement the new authentication flow and avoid the "empty token" error when authenticating to the registry. Key changes include updating the dependency in setup.py and modifying the artifact pull and login flow in _ociartifactoperations.py.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/acrcssc/setup.py Upgraded the oras dependency from 0.1.19 to 0.2.25
src/acrcssc/azext_acrcssc/helper/_ociartifactoperations.py Adjusted the artifact pull parameter and updated the client login
Comments suppressed due to low confidence (1)

src/acrcssc/azext_acrcssc/helper/_ociartifactoperations.py:87

  • Replacing 'stream=True' with 'overwrite=True' changes the behavior of oras_client.pull. Please confirm that this change is intentional and aligns with the new package's API.
overwrite=True

Comment thread src/acrcssc/azext_acrcssc/helper/_ociartifactoperations.py Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@cegraybl cegraybl requested a review from Copilot April 1, 2025 20:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR upgrades the oras package to version 0.2.25 to adopt the new authentication flow and avoid the "empty token" error, while updating related client invocations to support the new parameters.

  • Upgrades oras dependency in setup.py
  • Updates oras_client.pull to use overwrite=True instead of stream=True
  • Adds an auth_backend parameter and debug logging in the OrasClient initialization

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/acrcssc/setup.py Upgraded oras dependency version to support new auth flow
src/acrcssc/azext_acrcssc/helper/_ociartifactoperations.py Adjusted oras client parameters and added debug logging
Comments suppressed due to low confidence (2)

src/acrcssc/azext_acrcssc/helper/_ociartifactoperations.py:87

  • Replacing 'stream=True' with 'overwrite=True' in oras_client.pull alters the artifact retrieval behavior; please verify this change supports the intended functionality of the new auth flow.
overwrite=True

src/acrcssc/azext_acrcssc/helper/_ociartifactoperations.py:128

  • Ensure that introducing the auth_backend parameter with value 'token' to OrasClient is fully supported by the new oras version and does not disrupt other authentication mechanisms.
client = OrasClient(hostname=str.lower(registry.login_server), auth_backend="token")

Copy link
Copy Markdown

@Ruchii-27 Ruchii-27 left a comment

Choose a reason for hiding this comment

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

LGTM

@cegraybl cegraybl changed the title fix(cssc): 31670352 Upgrade opras-py package to use new auth flow 2/n fix(cssc): 31670352 Upgrade oras-py package to use new auth flow 2/n Apr 7, 2025
@cegraybl cegraybl merged commit aaf6b00 into feature/cssc_ext Apr 8, 2025
@cegraybl cegraybl deleted the cegaybl/cssc_31670352_empty_token_2 branch April 23, 2025 17:11
cegraybl added a commit that referenced this pull request Apr 23, 2025
…41)

This change is a continuation of the changes in [PR
39](#39)
Updates the `oras` packages to 0.2.25 to use a more recent version of
the package to avoid the "empty token" error when authenticating to the
registry.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
cegraybl added a commit that referenced this pull request Apr 24, 2025
…41)

This change is a continuation of the changes in [PR
39](#39)
Updates the `oras` packages to 0.2.25 to use a more recent version of
the package to avoid the "empty token" error when authenticating to the
registry.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
mabelegba pushed a commit that referenced this pull request Nov 25, 2025
* Upstream Merge

* Merge from workload-orchestration : Added Example in Description (#34)

* Merge from workload-orchestration : Fixed Example

* Fixed Example for SolutionTemplateVersion

* Made Changes for command-change CI fix'

* Reset Version 1.0.0b1

* Added Bulk and Diagnostics Back (#35)

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Added Bulk Solution Example (#36)

* Added Bulk and Diagnostics Back

* Changes

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Fixed Solution Template Linter Issue

* Added Integration Tests Framework for WorkloadOrchestration #37

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Added ServiceName  (#38)

* Added Tests

* Made Changes on ServiceName

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Added Full Target Solution Tests (#39)

* Added Tests

* Made Changes on ServiceName

* Nit Changes

* Made Changes for ContextLookup

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Added E2E workflow Tests (#40)

* Added Tests

* Made Changes on ServiceName

* Nit Changes

* Made Changes for ContextLookup

* Added complete workflow

* Add Licence

* Added License

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Added Readme (#41)

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Bulk Deployemnent LRO changes (#42)

* made changes

* Added change

* Added Changes in Test

* Added CLi Changes

* Added Setup

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Added Changes For Backward Compitablity (#43)

* Added Changes For Backward Compitablity

* Made changes

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Made changes (#44)

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Target Operations API refractoring  (#47)

* Changes I made

* Make changes

* Made chnages

* Make changes

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Stable API 2025-06-01 (#48)

* Made changes

* Made Changes

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Change in ID in Targets (#50)

* Made changes

* changes

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Remove Id and Name from Target Review  (#51)

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* final bulk (#52)

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Changes in ARG

* Added Linter Exception

* Added ITTests (#53)

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Standardize CLI (#54)

* Made Changes

* Made Changes

* Made changes

* Added Change

* Made changes

* Made changes

* Made changes

* Made Changes

---------

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Linter FIxes and Remove Preview

* Removed Resolved from CLI

* change in version

* made changes (#55)

Co-authored-by: Atharva Udapure <audapure@microsoft.com>

* Fixed history

---------

Co-authored-by: Atharva Udapure <audapure@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.

3 participants