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

Initial ModelsRepositoryClient #17180

Merged
merged 26 commits into from
Apr 23, 2021
Merged

Initial ModelsRepositoryClient #17180

merged 26 commits into from
Apr 23, 2021

Conversation

cartertinney
Copy link
Member

@cartertinney cartertinney commented Mar 9, 2021

Initial ModelsRepositoryClient

Unittests + some integration tests will be added after API review signoff

removed partial expanded fallback logic

Black formatting

Removed unnecessary comment

New structure, added nspkg

wip

removed nspkg

Refactored (again)

black formatting

Implementation
@check-enforcer
Copy link

check-enforcer bot commented Mar 9, 2021

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).

What if I am onboarding a new service?

Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment:
/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run python - [service] - ci

Updated README + removed unnecessary dependencies
@digimaun
Copy link
Member

Can we append at least you and me from the IoT D&D team as code owners for this project?

BuildTargetingString: $(BuildTargetingString)
ServiceDirectory: iot
EnvVars:
TEST_MODE: 'RunLiveNoRecord'
Copy link
Member

Choose a reason for hiding this comment

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

Normally we'd want to run recordings in the pipeline. The live tests happen locally and test recordings would be checked-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.

Recordings have not yet been generated due to a what appears to be a bug in the testing infrastructure. This will be changed once recordings can be generated.

"file:///myrepository/dtmi/com/somedomain/example/foodtdl-1.json",
id="Filesystem URI",
),
pytest.param(
Copy link
Member

@digimaun digimaun Apr 22, 2021

Choose a reason for hiding this comment

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

Would be good to add a test case for basic windows UNC path...as an example getting the model uri for "dtmi:com:example:Thermostat;1" in the repository location of "\\server\repository" should net the uri of "file://server/repository/dtmi/com/example/thermostat-1.json"

Copy link
Member Author

@cartertinney cartertinney Apr 22, 2021

Choose a reason for hiding this comment

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

The function .get_model_uri() has been scoped to require the base path to already be provided in URI format (as opposed to the ModelsRepositoryClient itself, which does support non-URI filepaths). If you wish to expand it's functionality to support absolute paths (including UNC path format) being converted to file URI, this would be an additional feature that can be added at a later date.

@scbedd
Copy link
Member

scbedd commented Apr 22, 2021

@cartertinney The failure for verifyChangeLog is just because there is no changelog. I recommend adding a bare one with content of:

# Release History

## 1.0.0b1 (Unreleased)

To unblock the check.

Prior to your actual release, you'll need to update the date, something like.

## 1.0.0b1 (2021-05-01)

* Initial Release
* Feature X/Y/Z supported

Or the like.

sdk/iot/ci.yml Outdated Show resolved Hide resolved
Copy link
Member

@digimaun digimaun left a comment

Choose a reason for hiding this comment

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

We have a number of follow up topics but I think we are at a solid baseline to build on.

Added yml infrastructure

Commented links to pass CI

removed artifact?

Basic integration tests (local only)

Added context manager support + integration tests

Integration tests

Added unittests

Black formatting

Infrastructure + py27 fixes

Removed unnecessary file

Addressed PR

updated readme

Added required fields to README

packaging adjustments

Added MANIFEST and updated version string

updated logging details

Version string updated to use b instead of rc

Addressing PR

DTDL -> model

added greater requirement specificity

remove duplicate pytest requirement from local dev_requirements.txt. update readme to correct match capitalization and add missing examples section.

Address PR comments

nspkg naming?

Linting fixes

More linting

Linter suppression + fixes

Fixed formatting line error that broke pylint

Addressing PR feedback
yml fixes

removed tests.yml from iot

CODEOWNERS change

restored original iot ci.yml
@scbedd
Copy link
Member

scbedd commented Apr 23, 2021

/check-enforcer override

@scbedd
Copy link
Member

scbedd commented Apr 23, 2021

Overriding check enforcer, this is the initial cut at the new SDK, and no build definition yet exists. @cartertinney will submit PRs to deal with any failures AFTER the build definition exists.

@scbedd scbedd merged commit 3d4527b into Azure:master Apr 23, 2021
iscai-msft added a commit to iscai-msft/azure-sdk-for-python that referenced this pull request Apr 23, 2021
…into azure_purview_catalog

* 'master' of https://github.com/Azure/azure-sdk-for-python:
  [Tables] hot fix for pipelines (Azure#18273)
  [Tables] Updates for apiview & sphinx docs (Azure#18134)
  override purview deps in shared reqs (Azure#18270)
  [Service Bus] fix deadletter sample + update README (Azure#18261)
  Update credential docstrings (Azure#18205)
  Refactor ImdsCredential to use ManagedIdentityClient (Azure#18120)
  [Key Vault] Target multiple API versions with tests (keys) (Azure#18149)
  Initial ModelsRepositoryClient (Azure#17180)
  [Communication]: Enabled Phone Number Search Test (Azure#18247)
  [Key Vault] Update default MHSM location for tests
  Update identity migration guide (Azure#18239)
  [AutoRelease] t2-managedservices-2021-04-22-08436(wave4) (Azure#18224)
  [AutoRelease] t2-hybridnetwork-2021-04-20-93742 (Azure#18169)
  Add Key Vault cert suppression (Azure#18245)
  update to aab1fb9 (Azure#18246)
  Enable retain runs. (Azure#18200)
  [formrecognizer] add testcases for labeled tables - fixed/variable rows (Azure#18214)
  Add caching support to verify-links (Azure#18231)
  add reading order for logging (Azure#18233)
  [purview] allow purview pylint failures (Azure#18237)
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