Skip to content

Conversation

@chidozieononiwu
Copy link
Member

@chidozieononiwu chidozieononiwu commented Dec 8, 2021

  • Add logic for retrieving package infro from DevOps feed
  • Add yml pipeline for Verify Readme Run

@chidozieononiwu chidozieononiwu requested a review from a team as a code owner December 8, 2021 01:02
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@chidozieononiwu chidozieononiwu force-pushed the AddArtifactFeedPackageLogic branch from 4b35a03 to a0fbebb Compare December 8, 2021 21:08
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@check-enforcer-staging
Copy link

This pull request is protected by Check Enforcer.

What is Check Enforcer?

Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass.

Why am I getting this message?

You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged.

What should I do now?

If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@@ -0,0 +1,17 @@
parameters:
ScanPath: $(Build.SourcesDirectory)
Copy link
Member

Choose a reason for hiding this comment

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

This looks unrelated.

$Base64EncodedAuthToken
)

$uri = "https://feeds.dev.azure.com/$Organization/$Project/_apis/packaging/Feeds/$FeedId/packages?api-version=$ApiVersion&includeAllVersions=$IncludeAllVersions"
Copy link
Member

Choose a reason for hiding this comment

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

Did you see my other feedback in your .NET PR? If we can avoid it lets not try pulling all the package versions when we can just use the package version min and max to get the package we want.

Copy link
Contributor

Choose a reason for hiding this comment

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

Or could you default to latest one if no feed version passed in?

Copy link
Member Author

Choose a reason for hiding this comment

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

The challenge is to find the latest alpha version in the feed. Since sometime other versions other than alpha is listed as the latest thats why I need to retrieve all the abvailable versions.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can alternatively get all versions for the specific package, but I will have to call the api numerous times.

Copy link
Member

Choose a reason for hiding this comment

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

@chidozieononiwu I'd like to better understand why my suggestion at Azure/azure-sdk-for-net#25503 (comment) doesn't work before we move forward with this new API.

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried it and it is very unreliable. I installes some packages and fails to install other which are clearly present in the feed. I can not say why these failures occur.

Copy link
Member

Choose a reason for hiding this comment

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

I just posted some updates to that code in your other PR. Please give that a try.

Also I would like us to avoid taking a dependency on the devops api directly as I'd prefer we use general nuget feed apis so we could move to another nuget feed, l like nuget if we needed to.

param (
[string]$DocWardenVersion = "0.7.1",

[string]$DocWardenVersion = "0.7.2",
Copy link
Member

Choose a reason for hiding this comment

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

I assume we should either just default the version either here or in the yml but not both.

$Project="public",
[Parameter(Mandatory = $true)]
$FeedId,
$ApiVersion="6.1-preview.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we use preview version by default?

Copy link
Member Author

Choose a reason for hiding this comment

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

No particular reason. It apears to be the latest release.

-Headers (Get-DevOpsApiHeaders -Base64EncodedToken $Base64EncodedAuthToken) `
-MaximumRetryCount 3

return $packages.value
Copy link
Contributor

Choose a reason for hiding this comment

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

I am curious what we returned here. Could you add some comments and example?

Copy link
Member Author

@chidozieononiwu chidozieononiwu Dec 8, 2021

Choose a reason for hiding this comment

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

The api returns an object like @{count, value}

@chidozieononiwu chidozieononiwu changed the title Add logic for retrieving package infro from DevOps feed Updates to DevOps APi and Verify ReadMe Dec 8, 2021
@chidozieononiwu
Copy link
Member Author

Closing this infavour of #2417

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