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

Break up private functions & search menu bugfix #152

Merged
merged 73 commits into from
Jan 29, 2025

Conversation

jworkmanjc
Copy link
Contributor

@jworkmanjc jworkmanjc commented Jan 13, 2025

Issues

  • CUT-4101 - Break up the private functions
  • CUT-4541 - Search menu Re-Registration

What does this solve?

  • Breaking up all the functions defined in the start-migration.ps1 file into private and public functions
  • Update the build process into a single function/ file build.ps1
  • Build a new template file used to generate the EXE
  • Resolves an issue where migrated user accounts no longer can access the search menu
  • Adds an additional option to select a different MTP organization after initially selecting one in the selection form.
  • Update the selection form to validate and prevent migrations where local users without a valid SID exist

Is there anything particularly tricky?

How should this be tested?

Additional tests have been written to validate the changes to the selection form. There are three manual test files to check in this release. A number of items have changed in this release we need to validate those changes with the manual test files:

  • Tests/manualTests/ProgressForm.feature - these tests validate the expected behavior of the progress form (during migration)
  • Tests/manualTests/SelectionForm.feature - these tests validate that the migrateProfile button can be selected given various input (the selection form UI)
  • Tests/manualTests/uwp.feature - these tests validate that the uwp app functions as expected post-migration

Screenshots

@jworkmanjc jworkmanjc added ADMU ADMU Module Release patch Patch version release labels Jan 13, 2025
@jworkmanjc jworkmanjc marked this pull request as ready for review January 27, 2025 16:18
@jworkmanjc jworkmanjc requested a review from a team as a code owner January 27, 2025 16:18
@jworkmanjc jworkmanjc changed the base branch from master to v2.7.11 January 28, 2025 19:13
@kmaranionjc kmaranionjc self-requested a review January 28, 2025 20:57
Given The selection form is opened
And a domain (local AD or EntraID) user has logged into the device
When a domain profile is selected
And a JumpCloud username text "" is specified in the text box
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
And a JumpCloud username text "" is specified in the text box
And a null/blank JumpCloud username in the text box

@kmaranionjc kmaranionjc self-requested a review January 29, 2025 04:28
Copy link
Contributor

@kmaranionjc kmaranionjc left a comment

Choose a reason for hiding this comment

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

  • Invalid API key, migrate button still gets enabled
image - Too much empty space with the MTP form window image

@jworkmanjc
Copy link
Contributor Author

jworkmanjc commented Jan 29, 2025

  • Invalid API key, migrate button still gets enabled

image - Too much empty space with the MTP form window image

Screenshot 2025-01-29 at 12 33 38 PM should be resolved in [cc8907b](https://github.com/TheJumpCloud/jumpcloud-ADMU/commit/cc8907b0d1117e046be500fad11c6c48c98f171a)

Copy link
Contributor

@kmaranionjc kmaranionjc left a comment

Choose a reason for hiding this comment

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

Awesome work organizing the functions and files. Forms and code looks good on my end

@gweinjc gweinjc self-requested a review January 29, 2025 22:58
Copy link
Contributor

@gweinjc gweinjc left a comment

Choose a reason for hiding this comment

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

Everything tested good on my end. Nice job, everything looks great!

@jworkmanjc jworkmanjc merged commit 1a4eabd into v2.7.11 Jan 29, 2025
jworkmanjc added a commit that referenced this pull request Jan 30, 2025
* Break up private functions & search menu bugfix (#152)

* copied functions into new directory

* Move Start Migration

* remove functions from start-migration

* move form

* Changes for Form

* move progress form

* process by owner changes

* progress forms changes

* Assets file for forms

* Get-ImageFromB64

* Function Names

* rename Build-Exe

* 2.7.11 version + build module functions

* change patch for new-admuTemplate

* pester tests

* CI changes for functions location

* functions tests

* update several variable names in test /ci

* paths for tests

* update Build tests

* Update VS Settings

* paths for tests

* Get-SID replace

* migration tests paths

* migration tests paths

* remove start-jcadmu.ps1 file

* escape $pid

* write out log content

* skip tests and validate log location in build runner

* not tail log lines

* Write-ToLog shouldn't terminate when writing an error

* order in error messages

* skip functions tests + why are we using silentlyContinue?

* can't skip functions tests

* write-error should be write-warnings until final throw message

* tail and validate local users

* version of artifact action

* add param to build [skip ci]

* write out additional debugging

* CUT-4541 - reinstall search/ start appx for all devices (not just windows 10)

* fixed migration tests by importing the module instead of calling start migration (which no longer contains any private functions)

* variable names and logging changes

* set systemKey in migration tests

* Variable names

* form elements, update to xaml form for MTP selection

* manual tests for uwp + selection form

* mtp selection form background + size

* form changes for selecting another MTP org, manual tests

* Form changes, test-button function updated to test various cases in helper functions

* automate tests for selection form Test-MigrationButton

* test the selection form in ci

* mock names

* Only show option to change ORG is MTP admin is returned

* CUT-4589 Test for selection form on non-valid SID users

* change placeholder text in progress form

* update form to declare form elements before submission

* Add focus controls to prevent checking the name each time a character is pressed (team to discuss)

* CUT-4589 Test-LocalUsername fix

* resolve changes with Get-MtpOrganization tests

* skip migration tests

* manual tests + changes to form, no default password

* updates for local-username tests

* test local username changes

* build date

* update start-migration for Get-MtpOrganization changes

* Update form changes/ test-localUsername

* remove throw in Test-LocalUserName, some devices might not have a user profile to validate like CI

* variable name

* update test-localUsernames after user is created

* temp password should show valid when first viewing the selection form

* incorrectly defined manual test

* show error for username matching hostname

* space in mtp selection

* comment out tests mocking for CI
jworkmanjc added a commit that referenced this pull request Jan 30, 2025
* Break up private functions & search menu bugfix (#152)

* copied functions into new directory

* Move Start Migration

* remove functions from start-migration

* move form

* Changes for Form

* move progress form

* process by owner changes

* progress forms changes

* Assets file for forms

* Get-ImageFromB64

* Function Names

* rename Build-Exe

* 2.7.11 version + build module functions

* change patch for new-admuTemplate

* pester tests

* CI changes for functions location

* functions tests

* update several variable names in test /ci

* paths for tests

* update Build tests

* Update VS Settings

* paths for tests

* Get-SID replace

* migration tests paths

* migration tests paths

* remove start-jcadmu.ps1 file

* escape $pid

* write out log content

* skip tests and validate log location in build runner

* not tail log lines

* Write-ToLog shouldn't terminate when writing an error

* order in error messages

* skip functions tests + why are we using silentlyContinue?

* can't skip functions tests

* write-error should be write-warnings until final throw message

* tail and validate local users

* version of artifact action

* add param to build [skip ci]

* write out additional debugging

* CUT-4541 - reinstall search/ start appx for all devices (not just windows 10)

* fixed migration tests by importing the module instead of calling start migration (which no longer contains any private functions)

* variable names and logging changes

* set systemKey in migration tests

* Variable names

* form elements, update to xaml form for MTP selection

* manual tests for uwp + selection form

* mtp selection form background + size

* form changes for selecting another MTP org, manual tests

* Form changes, test-button function updated to test various cases in helper functions

* automate tests for selection form Test-MigrationButton

* test the selection form in ci

* mock names

* Only show option to change ORG is MTP admin is returned

* CUT-4589 Test for selection form on non-valid SID users

* change placeholder text in progress form

* update form to declare form elements before submission

* Add focus controls to prevent checking the name each time a character is pressed (team to discuss)

* CUT-4589 Test-LocalUsername fix

* resolve changes with Get-MtpOrganization tests

* skip migration tests

* manual tests + changes to form, no default password

* updates for local-username tests

* test local username changes

* build date

* update start-migration for Get-MtpOrganization changes

* Update form changes/ test-localUsername

* remove throw in Test-LocalUserName, some devices might not have a user profile to validate like CI

* variable name

* update test-localUsernames after user is created

* temp password should show valid when first viewing the selection form

* incorrectly defined manual test

* show error for username matching hostname

* space in mtp selection

* comment out tests mocking for CI

* update build to run in PS5.1 environments

* build admu exe on windows hosts only

* 5.1 build exe on windows hosts

* update build tests now that we've moved the locations of all the function files

* release from PSD1 version if manual release

* re-validate exe file versions

* Test exe in build tests

* use artifact files for exe tests

* exe location
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADMU ADMU Module Release patch Patch version release
Development

Successfully merging this pull request may close these issues.

3 participants