Skip to content

Conversation

@cameronwaterman
Copy link

What does this Pull Request accomplish?

Push subtree to public repo

Why should this Pull Request be merged?

https://ni.visualstudio.com/DevCentral/_wiki/wikis/AppCentral.wiki/18625/Building-Finals-21.0-?anchor=pull-openapi-document-subtree-from-github

What testing has been done?

N/A

juno-jin-ni and others added 30 commits April 19, 2021 14:33
Add BasicAuth to all APIs without it (niauth, niuser, and niapp)
Add properties
# Justification
when a system was connected for the first time, the minion updated broadcast contains all 3 properties (connected, grains, sysapi) as properties which got updated, but the strategy for new clients did not have the case where all 3 were changed.

# Testing
Tested in the product.

# Checklist
- [X] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Added check for all system properties updated
# Justification
https://dev.azure.com/ni/DevCentral/_wiki/wikis/AppCentral.wiki/18625/Building-Finals-21.0-?anchor=pull-openapi-document-subtree-from-github

# Implementation
Pull OpenAPI docs from GitHub subrepo
git subrepo pull (merge) --force systemlink-openapi-documents/subtree

# Testing
N/A

# Checklist
~~- [ ] I tested changes to product code in product~~
~~- [ ] I considered updates to the wiki~~
~~- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product~~
… old python clients to sta...

# Justification
The OpenAPI description of contains an wrong
`operationId: getChannelPropertiesCount`
at the
  `/v1/files/{fileId}/groups:`
that should be named getGroups according to getChannels later on.
In the generated python client stubs the method is called getChannelPropertiesCount but returns the groups.

# Implementation
Duplicate the entry and make a redirect to make sure python scripts using the old operationId do not break.
Pick a path name that makes sure this entry is just there because of compatibility.
  `/v0/files/{fileId}/groups:`

# Related BUG

This is a proposed fix for the bug 1355793 allowing old python clients to stay stable with the generated stub.

# Decision

Because we do not believe that users are out there we just fix the OperationId

Related work items: #1355793
# Justification

#1379368

The Swagger documentation for tag history was missing the following routes:
* nitaghistorian/v2/storage
* nitaghistorian/v2/tags/insert-values
* nitaghistorian/v2/tags/delete-values-by-range
* nitaghistorian/v2/tags/flush-values
  * We do not want to document flush-values because it's a no-op in the new service. It was necessary in the old service for performance reasons.
* nitaghistorian/v2/tags/update-metadata
  * We do not want to document update-metadata because it only updates the copy of the metadata held by tag historian and causes tag historian to get out of sync with the tag service.

# Implementation
Added documentation.

# Testing
I imported the yml file into insomnia and tested the requests.

# Checklist
- [x] I tested changes to product code in product
- [x] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Related work items: #1379368
# Justification
Add the assets/{assetId}/file route description in yml, as described in the spec:
https://ni.visualstudio.com/DevCentral/_git/Skyline/pullrequest/147696

# Testing
Online editor.

# Checklist
- [ ] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Add route to link files to an asset
# Justification
Task 1438372: Update swagger doccumentation to include fileIds in create and update models.

# Implementation
Added fileIds property on Base Asset Model

# Testing

# Checklist
- [ ] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Add fileIds on yml

Related work items: #1438372
…VED state

# Justification
#1402374

# Implementation
Updated models on update-assets route to include the new REMOVED state for asset presence.  Models in the AssetService have already been posted for review here:  !153662

# Testing
Verified YAML on swagger editor.

# Checklist
- [ ] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Related work items: #1402374
# Justification

Added support for exporting notebooks as HTML or PDF and excluding code input cells from the export.

#1411711
#1411744

# Implementation
HTML export is implemented via the `HTMLExporter` of `nbconvert` and works out of the box. PDF export is implemented via the `WebPDFExporter` of `nbconvert` for which we extended the Python package with pyppeteer and chromium in [this PR](https://dev.azure.com/ni/DevCentral/_git/Skyline/commit/0f17c51a7e580093009c81f037ab29d000e675ae?refName=refs%2Fheads%2Fmaster).

Because we updated the `nbconvert` dependency, I also had to update `papermill` and change the implementation of the `NINBExecEngine`. Because of this [breaking change](https://github.com/nteract/papermill/pull/472/files), the previous used `PapermillExecutePreprocessor` is no longer available. I re-implemented the logic to inject environment variables by using the new `PapermillNotebookClient`.

# Testing
Build the service locally and deployed it to a SystemLink Server installation. I verified that notebooks can be executed and the SystemLink specific environment variables are still injected. I also verified that notebooks can be exported as HTML and PDF, with or without excluding the code input cells.

I will add ATS tests for this in another PR.

# Checklist
- [x] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Related work items: #1411711, #1411744, #1446393
# Justification
The workspace support in LabVIEW File API requires backend support. Files of a certain workspace should be queryable.
The following four cases are supported:
- no workspace given => search everything
- (*) => search everything
- ws_id => search in that workspace
- ws_id,ws_id => search in those workspaces

# Implementation
Add workspace as query parameter and filter for workspace if set and not equal (*).

# Testing
Manual testing for *, one workspace, multiple workspaces
Implement unit tests

Related work items: #1449042
# Justification
https://ni.visualstudio.com/DevCentral/_workitems/edit/1469322/

# Implementation
![image.png](https://ni.visualstudio.com/94b22d7b-ad7b-4f5e-88f0-867910f91c94/_apis/git/repositories/8159353b-4403-4eed-9a32-0c2ee30abe3d/pullRequests/164847/attachments/image.png)
![image (2).png](https://ni.visualstudio.com/94b22d7b-ad7b-4f5e-88f0-867910f91c94/_apis/git/repositories/8159353b-4403-4eed-9a32-0c2ee30abe3d/pullRequests/164847/attachments/image%20%282%29.png)

# Testing
I testes on swagger online editor.

# Checklist
- [ ] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Add unlink route to swagger

Related work items: #1469322
…space membership backend changes

# Justification

#1475922

# Implementation
Updated documentation

# Checklist
- [ ] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Related work items: #1475922
# Justification
The OpenAPI document we use to generate the python API with Swagger contains a broken response definition for /v2/tags/query-history.

# Implementation
The values object was moved from the root level of the schema, into the properties object. This matches the [HTTP API](https://demo.systemlink.io/niapis/?urls.primaryName=Tag%20Historian%20Service#/history/QueryHistory) expected response.

# Testing
Generated a new python client with https://editor.swagger.io/ and confirmed that I could access the values property after making a query-history response.

# Checklist
- [x] I tested changes to product code in product
- [-] I considered updates to the wiki
- [-] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Move values field under properties

Related work items: #1472381
# Justification
When adding the workspace supported recently, I had increased the operation version of listFiles from  3 to 4 initially. Later I decided to keep that version and add a queryFiles operation explicitly. Started of with the version number 2 to make a distinction between implementations with and without workspace support. But I forgot to change the description in the yml file.
# Justification
We're about to add this support to the LV API and without increasing the version number, we're not able to tell if force is supported by the backend. This enables us to check for support and print a meaningful error message.

'Force' has just recently been added and wasn't release yet.
…naries

Added example for accessing values under dictionaries like grains using casts.
# Justification
Earlier in the release I updated the asset-summary route to return more data and avoid multiple calls for asset counts.
I forgot to update the swagger then, doing it now.
…from GitHub

# Justification
Building finals

# Implementation
git subrepo pull (merge) systemlink-openapi-documents/subtree

# Testing
N/A

# Checklist
- [ ] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

git subrepo pull (merge) systemlink-openapi-documents/subtree

subrepo:
  subdir:   "systemlink-openapi-documents/subtree"
  merged:   "93d1106e04"
upstream:
  origin:   "https://github.com/ni/systemlink-OpenAPI-documents.git"
  branch:   "master"
  commit:   "4b4b2fbdae"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"
# Justification

#1517179

# Implementation
Update example in swagger doc

# Testing
Verified new example works correctly with Test Monitor 21.1

# Checklist
- [x] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Related work items: #1517179
# Justification

#1501327
#1501323
#1501326

# Implementation
- Updated yml doc to contain the SupportsSelfTest and SupportsReset flags; added it on the base model as we need it for query, create and update models

# Testing
- Validated generated models

# Checklist
- [ ] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Updated yml with SupportsSelfTest and SupportsReset

Related work items: #1540577, #1540580, #1540581
Update link for Dynamic LINQ

Signed-off-by: Cristian Hotea <cristian.hotea@ni.com>

Related work items: #1516420
…ysmgmt swagger

# Justification
python messagebus build is failing because of the colon in the swagger documentation.
https://ni.visualstudio.com/DevCentral/_build/results?buildId=1171520&view=logs&j=be401f01-b837-5415-8329-3a5843e0e4ec&t=c1454a81-d3b3-583d-7abf-f8091ec6b8e7&l=2151

Fix build that auto-generates python clients from sysmgmt swagger
Fixing pipeline:
```
Caused by: org.yaml.snakeyaml.scanner.ScannerException: mapping values are not allowed here
 in 'string', line 1438, column 124:
     ... tax. More info can be found here: https://dynamic-linq.net
                                         ^

```

`:` followed by space is a reserved string in YAML (used to denote <key>: <property>)
# Justification

#1573106
#1576958

# Implementation
Based on comments from Ryan on the two bugs, I am updating the documentation to remove options that are listed as valid but are actually unsupported. The first bug has a corresponding code change that is tracked separately.

# Testing
Will verify that swagger docs list this change after submission.

# Checklist
- [ ] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product

Related work items: #1573106, #1576958
… seems to be breaking the build

# Justification
Reverting a previous PR of mine that is breaking the build while I figure out the proper fix.

Seeing errors like this: https://ni.visualstudio.com/DevCentral/_build/results?buildId=1234775&view=results

# Implementation
Revert a commit

# Testing
N/A

# Checklist
- [ ] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product
siddhukrs and others added 13 commits January 10, 2022 17:50
…er documentation

# Justification

#1573106
#1576958

# Implementation
In a previous attempt, I tried to fix these bugs by listing the supported values as an in-lined enum. However, that broke some codegen-ed data types and also the public facing python API. Since that would very likely break client code, I resorted to just updating the documentation to specifically list the supported orderby fields.

# Testing
Since this PR is just plain-text changes now, it shouldn't break a build anywhere. I verified that the changes look correct by copying the yaml file contents over to a swagger doc viewer.

You can view it yourself by pasting the contents of the modified file [here](https://editor.swagger.io/).

# Checklist
- [X] I tested changes to product code in product
- [X] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added Jenna Jaco as a reviewer and attached screenshots of the strings in the product
# Justification
I told Sid that you can sort results by `product` in v2. I was wrong. This PR addresses that.

# Implementation
Remove Product from the list of supported result orderBy fields.

# Testing
It is simple.

# Checklist
- [ ] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [x] If this PR affects user-visible strings, I added the relevant tech writer as a reviewer and attached screenshots of the strings in the product
# Justification
The services that use the file model and display file information in tabular form would greatly benefit from having a field that keeps track of modifications in order to update only when needed.

# Implementation
Added the 'lastUpdatedTimestamp' field that gets updated whenever a file is changed.
Added a new migration that changes the field from 0001-01-01T00:00:00 to current time - before the migration all files have  lastUpdatedTimestamp as 0001-01-01T00:00:00

# Testing
Modified the existing tests and checked for correct update time.
Manually validated with build and tested on local machine.
- After the modifications in the service all the files have the new field and because of the migration the field is populated with the time of the migration.
- When adding a new file lastUpdatedTimestamp is the same as created date
- When a property is modified lastUpdatedTimestamp  gets updated

# Checklist
- [X] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added the relevant tech writer as a reviewer and attached screenshots of the strings in the product

add lastUpdatedTimestamp field to files

Related work items: #1604121
…r programName and status for TestResultRequestObject

# Justification
While I was experimenting with the REST APIs for TestMonitor, I realized that the `programName` and `status` objects are required. This wasn't clear in the documentation.

# Implementation
This updates the documentation to show that `programName` and `status` are required.

# Testing
N/A

# Checklist
- [ ] I tested changes to product code in product
- [x] I considered updates to the wiki
- [x] If this PR affects user-visible strings, I added the relevant tech writer as a reviewer and attached screenshots of the strings in the product
# Justification
Pulling latest changes from GitHub as part of building finals process: https://dev.azure.com/ni/DevCentral/_wiki/wikis/AppCentral.wiki/18625/Building-Finals-21.0-?anchor=pull-openapi-document-subtree-from-github

# Implementation
Followed instructions in readme: https://ni.visualstudio.com/DevCentral/_git/Skyline?path=%2Fsystemlink-openapi-documents%2FREADME.md&_a=preview&anchor=pulling-changes-from-github

# Testing
None

# Checklist
- [ ] I tested changes to product code in product
- [x] I considered updates to the wiki
- [x] If this PR affects user-visible strings, I added the relevant tech writer as a reviewer and attached screenshots of the strings in the product

git subrepo commit (merge) systemlink-openapi-documents/subtree

subrepo:
  subdir:   "systemlink-openapi-documents/subtree"
  merged:   "e6f0b5b32a"
upstream:
  origin:   "https://github.com/ni/systemlink-OpenAPI-documents.git"
  branch:   "master"
  commit:   "41157faab1"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"
…vice Open API definitions.

# Justification

#1613675

# Implementation
Add fields to the definition files.

# Testing
I verified that everything rendered correctly in an install.

# Checklist
- [x] I tested changes to product code in product
- [x] I considered updates to the wiki
- [ ] ~~If this PR affects user-visible strings, I added the relevant tech writer as a reviewer and attached screenshots of the strings in the product~~

Add contact and description details to the User service definitions.

Related work items: #1613675
…ds out of alarm-transition in the alarm-service

# Justification

#1622791

# Implementation
There are two locations where alarm transition (`#/definitions/AlarmTransition`) is referenced in the Alarms Service swagger doc. These are:
1. As a reference in `AlarmInstance`
2. In the request body of `v1/instances`

In both of these locations, `notificationStrategyIds` does not belong in the transition's value. They should instead be in the top-level `AlarmInstance` object and the request body of `v1/instances`

# Testing
Manually tested in the following ways (corresponding to the two references listed above):
1. Confirmed that `/v1/instances/{instanceId}` returns `notificationStrategyIds` as part of the top-level object and not nested within the `transitions` property.
2. Confirmed that creating an instance with `notificationStrategyIds` set as part of the top-level of the request object results in an alarm being created which, when queried for, returns the `notificationStrategyIds` that were set. This fails when `notificationStrategyIds` is nested inside the `transition` property (no `notificationStrategyIds` are returned).

# Checklist
- [x] I tested changes to product code in product
~~- [ ] I considered updates to the wiki~~
~~- [ ] If this PR affects user-visible strings, I added the relevant tech writer as a reviewer and attached screenshots of the strings in the product~~

Related work items: #1622791
…ocumentation

# Justification
Cleanup a re-brand issue.

Found while fixing: #1613675

# Implementation
Updated string.

# Testing
I spot checked in product.

# Checklist
- [x] I tested changes to product code in product
- [x] I considered updates to the wiki
- [ ] ~~If this PR affects user-visible strings, I added the relevant tech writer as a reviewer and attached screenshots of the strings in the product~~
…oute

# Justification

#1632322

# Implementation
We've enabled Dynamic LINQ filtering when requesting CSV reports for assets through the query-assets route. The changes have been made with this PR: !223432. Please make sure you read the description of that review for more context on the updated behavior. This has been agreed by the PO.

# Testing
N/A

# Checklist
- [ ] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added the relevant tech writer as a reviewer and attached screenshots of the strings in the product

Updated documentation in Swagger for query-assets route

Related work items: #1632322
…format

# Kind of Change
- [x] Simple cherry pick (no manual conflict resolution)
- [ ] Cherry pick (with manual conflict resolution)
- [ ] Not a cherry pick; direct change into release

# Commit
TODO: If a cherry pick, link to the original commit, otherwise delete this section.

!228957

Related work items: #1638925
…Swagger documentation

# Kind of Change
- [x] Simple cherry pick (no manual conflict resolution)
- [ ] Cherry pick (with manual conflict resolution)
- [ ] Not a cherry pick; direct change into release

Merged PR 239386: Resolve spelling mistake in Swagger documentation

# Justification
Bug 1725471: Typo in Asset Performance Management API Swagger documentation

# Implementation
 conatining -> containing

# Testing
TODO: Detail the testing done to ensure this submission meets requirements. Include automated/manual test additions or modifications, testing done on a local build, and additional testing not covered by automatic pull request validation.

# Checklist
- [ ] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added the relevant tech writer as a reviewer and attached screenshots of the strings in the product

Resolve spelling mistake

Related work items: #1725471

Cherry-picked from commit `edd1ef17`.

Related work items: #1725471
# Kind of Change
- [x] Simple cherry pick (no manual conflict resolution)
- [ ] Cherry pick (with manual conflict resolution)
- [ ] Not a cherry pick; direct change into release

# Commit
[830de12224dff755d9fa451a7fbb7c0bef69e9d7](https://ni.visualstudio.com/DevCentral/_git/Skyline/commit/830de12224dff755d9fa451a7fbb7c0bef69e9d7)

# Justification
#1724543

# Implementation
Fixed indentation of example lines in the .yml.

# Testing
Generated the docs on editor.swagger.io and saw that the correct structure was reflected in the example.

# Checklist
- [ ] I tested changes to product code in product
- [ ] I considered updates to the wiki
- [ ] If this PR affects user-visible strings, I added the relevant tech writer as a reviewer and attached screenshots of the strings in the product

Fixing TestResultQueryObject example.

Cherry picked from !244366

Related work items: #1724543
…onse for create/update results

# Kind of Change
- [ ] Simple cherry pick (no manual conflict resolution)
- [x] Cherry pick (with manual conflict resolution)
- [ ] Not a cherry pick; direct change into release

# Details
The change in master included some test files for SLE: https://ni.visualstudio.com/DevCentral/_git/Skyline/commit/58a39cd59e739bc805d7706e8269d7697ebc5163?refName=refs/heads/users/cspangle/separate-update-partial-response&path=/TestMonitorService/Tests/TestMonitor.Integration.Tests/Component/Skyline/TestMonitor/Http/V2

Those files are not included in this PR. All other changes are identical to the master PR.

# Commit
Cherry-picked from https://ni.visualstudio.com/DevCentral/_git/Skyline/commit/58a39cd59e739bc805d7706e8269d7697ebc5163?refName=refs/heads/users/cspangle/separate-update-partial-response

Related work items: #1757137
@pvallone
Copy link
Contributor

It's a little spooky that the PR for 21.3 never got merged. I assume this contains all of those changes as well, but just thought I'd mention that in case we need to adjust.

@cameronwaterman
Copy link
Author

It's a little spooky that the PR for 21.3 never got merged. I assume this contains all of those changes as well, but just thought I'd mention that in case we need to adjust.

That is odd - I'm assuming it was just an oversight. Since Max approved that PR, I'll shoot him a message to verify.

@cameronwaterman cameronwaterman merged commit 42d1435 into master Jan 11, 2022
@cameronwaterman cameronwaterman deleted the users/cameronwaterman/export-openapi-for-21-5 branch January 11, 2022 17:53
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.