powerplatform-actions icon indicating copy to clipboard operation
powerplatform-actions copied to clipboard

Add assign-user functionality

Open paulbreuler opened this issue 3 years ago • 6 comments

Added initial functionality of assign-user to action repo.

NOTE:

  • PP-CLI-Wrapper version is bumped to "0.1.48" in this PR. Please reply if this needs to be changed.
  • NugetInstall now targets 1.14.x from daily build feed for Microsoft.PowerApps.CLI Windows and Linux variations.

paulbreuler avatar Apr 11 '22 20:04 paulbreuler

--team-id parameter was added to create-environment, this needs to be added in a separate PR to bring tests back to working order.

Test fail due to create-environment missing param team-id

src\actions\create-environment\index.ts(25,44): error TS2345: Argument of type '{ credentials: ClientCredentials | UsernamePassword; environmentName: HostParameterEntry; environmentType: HostParameterEntry; ... 4 more ...; domainName: HostParameterEntry; }' is not assignable to parameter of type 'CreateEnvironmentParameters'.

paulbreuler avatar Apr 12 '22 13:04 paulbreuler

--team-id parameter was added to create-environment, this needs to be added in a separate PR to bring tests back to working order.

Test fail due to create-environment missing param team-id

src\actions\create-environment\index.ts(25,44): error TS2345: Argument of type '{ credentials: ClientCredentials | UsernamePassword; environmentName: HostParameterEntry; environmentType: HostParameterEntry; ... 4 more ...; domainName: HostParameterEntry; }' is not assignable to parameter of type 'CreateEnvironmentParameters'.

fixed in PR #199

paulbreuler avatar Apr 12 '22 14:04 paulbreuler

couple questions/asks:

  • please add your new task to the rolling-instance-actions flow and dispatch a run with your branch (setting the "slow actions" parameter to "no"). Would be great to have this part of this PR to assert the action succeeds. (DONE)
  • add a separate commit to your PR that updates the /dist folder (and gulpfile.js to pull in a daily pac CLI nupkg) (DONE)
  • until we lift the feature flag on your new verb, this repo for the time being cannot consume pac CLI from public nuget, but instead needs to pull from the daily build internal nuget feed (DONE)
  • should we flag the whole action and its 'object-id' and 'role' inputs as "preview" since there's already future work in your backlog to allow either guids to be specified as friendly name. This will turn the existing 2 inputs into optional. Other option is for this PR to hold, but I'm not fond of holding back PRs.

Regarding the in-flight work the new change to take role name or ID has no impact on downstream work and is pending a merge after a final review. I can kick of a daily build and have it incorporated ASAP. I think in this particular case we should include the new work as the feature isn't terribly useful without being able to pass the role name.

paulbreuler avatar Apr 14 '22 13:04 paulbreuler

I think in this particular case we should include the new work as the feature isn't terribly useful without being able to pass the role name.

I was originally thinking/suggesting that for this new action, until it is complete (e.g. friendly names possible for for roles etc) to have the action and params show "Preview" or similar in their description texts, that way, if I'd ship it as a new release, it's clear its WIP until the pac CLI etc work is ready

The other option (the closes to a "feature flag" in pp-action) is to add the newly introduced action to the skippedActionYamls array in the gulpfile. This will avoid its action.yaml to be "discovered", so it won't get built into /dist. But that limits testability eg in the rolling build :-(

davidjenni avatar Apr 14 '22 15:04 davidjenni

  • should we flag the whole action and its 'object-id' and 'role' inputs as "preview" since there's already future work in your backlog to allow either guids to be specified as friendly name. This will turn the existing 2 inputs into optional. Other option is for this PR to hold, but I'm not fond of holding back PRs. (DONE)

Just look at those beautiful green check marks on those workflows 😊👀

Role name input has been added.

~~For object-id maybe we should flag it as the name may change when it begins accepting a string value as the user's principal name. Or change the name now... with the preview flag.~~

Action takes input as user and maps to object-id, which will be updated on the backend to accept UPN or object-id of AAD user to assign to target environment.

paulbreuler avatar Apr 15 '22 15:04 paulbreuler

Holding for update from PAC CLI with latest bits

paulbreuler avatar Jul 12 '22 18:07 paulbreuler

closed due to avoid need to work through churn... See new PR #234

paulbreuler avatar Aug 29 '22 18:08 paulbreuler