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

Sm/parking orbit #490

Merged
merged 105 commits into from
Jun 15, 2022
Merged

Sm/parking orbit #490

merged 105 commits into from
Jun 15, 2022

Conversation

mshanemc
Copy link
Contributor

@mshanemc mshanemc commented May 19, 2022

requires forcedotcom/sfdx-core#586 , forcedotcom/source-tracking#164 and forcedotcom/source-deploy-retrieve#595

What does this PR do?

primary: parking orbit
secondary features/changes

  • source:delete will tell users that it's running "checkonly" if that's specified
  • remove -a from source:status examples (flag had been removed, examples still had it)
  • minor json output changes: true/false are now boolean (instead of "true"/"false"] and line numbers are numbers!
  • source:retrieve without anything specified to retrieve will throw an error

What issues does this PR fix or reference?

@W-10743859@

Testing

you'll need the branches for each of the 3 PRs at the top of this PR

  1. link core into SDR
  2. link core and SDR into STL
  3. link core, SDR, and STL into plugin-source

Shipping

  1. release core
  2. bump core in SDR and release
  3. bump core and SDR in STL and release
  4. bump core, SDR, and STL in plugin-source and release

mshanemc and others added 30 commits March 21, 2022 17:28
.circleci/config.yml Outdated Show resolved Hide resolved
@iowillhoit
Copy link
Contributor

iowillhoit commented Jun 14, 2022

QA NOTES

force:source:convert

  • force:source:convert
    🟢 Converts to metadata format
    🟢 Converted metadata is exactly the same (used git diff)
    🟢 JSON output matches

  • force:source:convert -r foo
    🟢 Throws error on non-existing source path
    🟢 JSON error matches

  • force:source:convert -d foo/bar
    🟢 Allows you to set destination dir
    🟢 Allows you to pass nested directories
    🟢 JSON output matches

  • force:source:convert -m CustomObject,Prompt
    🟢 Lets you specify objects to convert
    🟢 Converted metadata is exactly the same
    🟢 JSON output matches

  • force:source:convert -n "foo"
    🟢 Lets you specify a package name ( in package.xml)
    🟢 JSON output matches

  • force:source:convert -x package.xml

    Used package.xml generated from force:source:convert -m CustomObject,Prompt

    🟢 Lets you specify manifest that contains types to convert
    🟢 Converted metadata is exactly the same
    🟢 JSON output matches

force:source:deploy

  • force:source:deploy -p force-app
    🟢 Deploys source from path 🎉
    🔴 JSON differences: booleans are now typeof Boolean (used to be strings)
-  "changed": "false", // old
+  "changed": false, // new
  • force:source:deploy -m ApexClass
    🟢 Able to deploy specified metadata
    🔴 Stdout Type column undefined on error - Repro: Run this command on a fresh Dreamhouse, it will fail because other source is not pushed yet. The Type column is undefined instead of Error
    🔴 JSON differences: Similar to above, numbers are now typeof Number (used to be strings)
-  "lineNumber": "17", // old
+  "lineNumber": 17, // new
  • force:source:deploy --manifest package.xml
    🟢 Deploys from manifest
    🟡 JSON ok (similar type issues)

  • force:source:deploy -p force-app -w 0
    🟢 Able to do an "async" deploy
    🟢 JSON output matches

  • force:source:deploy -p force-app -l RunLocalTests
    🟢 Runs local tests

  • force:source:deploy -p force-app -l RunLocalTests --checkonly
    🟢 Able to validate the deploy would have worked
    🟢 Returns deploy id

  • force:source:deploy -q 0Af1700002TVijhCAD
    🟢 Able to run a quick deploy of previously validated deploy
    🟡 stdout does not mention that this was successful (JSON does). Should I be able to run a deploy:report on this? I get a Metadata API request failed: INVALID_CROSS_REFERENCE_KEY: invalid cross reference id error

  • force:source:deploy --manifest package.xml --postdestructivechanges destructiveChanges.xml
    🟢 Was able to perform a "postdestructivechange"

  • force:source:deploy --manifest package.xml --predestructivechanges destructiveChanges.xml
    🟢 Was able to preform a "predestructivechange"

force:source:delete

  • force:source:delete -m prompt:PropertyExplorer --json
    🟢 Able to delete single metadata type
    🟡 JSON ok (type issues)
  • force:source:delete -m permissionset:dreamhouse -c
    🟢 Able to run check only delete
    🟡 stdout does not make it clear this is just a check

force:source:deploy:cancel

  • force:source:deploy:cancel -i 0AfP000001RQCLNKA5 -u [email protected]
    🟢 Able to cancel deploy
    🟢 JSON output matches

force:source:deploy:report

  • force:source:deploy:report -i 0AfP000001RQBZuKAP -u [email protected]
    🟢 Able to get status of deploy
    🟢 Able to use id from JSON to get report

force:source:retrieve

  • force:source:retrieve
    🟡 Running this on its own (no flags) gives a confusing error: force:source:retrieve: Cannot set properties of undefined (setting 'sourceApiVersion')
  • force:source:retrieve -p force-app
    🟢 Source retrieved
    🟢 JSON output matches
  • force:source:retrieve -p force-app/main/default/objects/,force-app/main/default/prompts
    🟢 Able to specify types via path
  • force:source:retrieve -m Prompt:Property --json
    🟢 Was able to retrieve specific metadata type
    🟡 Unrelated to PR: If you use a lowercase "p" on Property it will fail but the JSON response shows it was successful
  • force:source:retrieve -x package.xml
    🟢 Able to retrieve from manifest
    🟢 Able to retrieve from manifest type subset (force:source:retrieve -x package.xml)
    🟢 JSON output matches
  • force:source:retrieve -x package.xml --tracksource
    🟢 Retrieve with source tracked
    🟢 Throws error for conflicts
    🟢 JSON output matches
    🟢 JSON conflict error matches
  • force:source:retrieve -x package.xml --tracksource -f
    🟢 Able to force conflict overwrite
    🟢 JSON output matches

🟢 force:source:ignored:list

  • force:source:ignored:list
    🟢 Lists ignored files
    🟢 JSON output matches
  • force:source:ignored:list -p force-app/main/default/aura
    🟢 Lets you specify a directory
    🟢 JSON output matches

force:source:manifest:create

  • force:source:manifest:create --sourcepath force-app
    🟢 Builds package.xml from source
    🟢 JSON output matches
  • force:source:manifest:create --fromorg [email protected]
    🟡 Seeing package.xml variation accross multiple identical runs...
    • Create a new org from Dreamhouse
    • Run force:source:manifest:create --fromorg [email protected]
    • git commit the package.xml
    • Run the create command again
    • Run git diff
    • Run create and diff multiple times, small changes occur also every time.
  • force:source:manifest:create --sourcepath force-app -n package.foo
    🟢 Allows you to name the package
    🟢 JSON output matches
  • force:source:manifest:create -t destroy --sourcepath force-app
    🟢 Can set manifest type
    🟢 Manifest output is identical
    🟢 JSON output matches
  • force:source:manifest:create -m ApexClass,CompactLayout
    🟢 Can specify metadata types
    🟢 JSON output matches

force:source:open

  • force:source:open -f force-app/main/default/flexipages/Property_Record_Page.flexipage-meta.xml
    🟢 Takes you to the correct page in lightning app builder
    🟢 Opening an unsupported page takes you to your orgs homepage

force:source:pull

  • force:source:pull
    🟢 Pulls source as expected
    🟢 stdout matches
    🟢 Shows error when conflicts exist
    🟢 Conflict JSON matches
  • force:source:pull -f
    🟢 Force pull works
    🟢 JSON output matches
  • force:source:pull -w 5
    🟢 can pass wait flag

force:source:push

  • force:source:push
    🟢 pushes successfully
    🟢 Correct stdout and JSON for "push not needed"
    🟢 Correct stdout and JSON for conflict
  • force:source:push -f
    🟢 succesful force push
    🟢 JSON output matches
  • force:source:push --quiet
    🟡 Quiet flag pushes but json is printed with "pushedSource": []? (not parking orbit related)

force:source:status

  • force:source:status
    🟢 stdout matches
    🟢 JSON output matches
    🟢 Shows conflicts as expected
    🟢 Shows local and remote changes
    🟡 Examples show -a flag but that flag does not exist??
  • force:source:status --local
    🟢 Shows local changes
    🟢 JSON output matches
  • force:source:status --remote
    🟢 Shows remote changes
    🟢 JSON output matches

force:source:tracking:clear

🟢 Clears tracking
🟢 JSON output matches
🟢 No prompt flag works

force:source:tracking:reset

🟢 Resets tracking
🟢 JSON output matches
🟢 No prompt flag works

Copy link
Contributor

@iowillhoit iowillhoit left a comment

Choose a reason for hiding this comment

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

See QA notes

@iowillhoit
Copy link
Contributor

QA UPDATE

Resolved

  • force:source:status
    🟢 Resolved: Examples show -a flag but that flag does not exist??
  • force:source:deploy -m ApexClass
    🟢 Resolved: Stdout Type column undefined on error - Repro: Run this command on a fresh Dreamhouse, it will fail because other source is not pushed yet. The Type column is undefined instead of Error
  • force:source:delete -m permissionset:dreamhouse -c
    🟢 Resolved: stdout does not make it clear this is just a check
  • force:source:retrieve
    🟢 Resolved: Running this on its own (no flags) gives a confusing error: force:source:retrieve: Cannot set properties of undefined (setting 'sourceApiVersion')
  • force:source:deploy -q 0Af1700002TVijhCAD
    🟢 stdout does not mention that this was successful (JSON does)

Deferred or WAD

  • force:source:deploy -p force-app
    🟢 Deferred: JSON differences: booleans are now typeof Boolean (used to be strings)
    • We are accepting the type casting changes
  • force:source:deploy -m ApexClass
    🟢 Deferred: JSON differences: Similar to above, numbers are now typeof Number (used to be strings)
    • We are accepting the type casting changes
  • force:source:deploy --manifest package.xml
    🟢 Deferred: JSON ok (similar type issues)
    • We are accepting the type casting changes
  • force:source:delete -m prompt:PropertyExplorer --json
    🟢 Deferred: JSON ok (type issues)
    • We are accepting the type casting changes
  • force:source:retrieve -m Prompt:Property --json
    🟢 WAD: Unrelated to PR: If you use a lowercase "p" on Property it will fail but the JSON response shows it was successful
    • Metadata API does not complain when you ask for types that do not exist
  • force:source:push --quiet
    🟢 WAD: Quiet flag pushes but json is printed with "pushedSource": []? (not parking orbit related)
    • People were having their node buffer or CI logs overflow with --json successes, quiet omits those
  • force:source:manifest:create --fromorg [email protected]
    🟢 Deferred: Seeing package.xml variation accross multiple identical runs...
    • This is part of SDR, we are investigating

@iowillhoit iowillhoit merged commit d8bdd0e into main Jun 15, 2022
@iowillhoit iowillhoit deleted the sm/parking-orbit branch June 15, 2022 21:08
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.

4 participants