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

fix: deploys don't require a project #619

Merged
merged 14 commits into from
May 17, 2023
Merged

Conversation

mshanemc
Copy link
Contributor

@mshanemc mshanemc commented May 15, 2023

What does this PR do?

side effects

  • moves the deploy stash up to the global level. This is "internals" but users might notice if they try to report/resume/quick something they initially started before updating their CLI.

@@ -213,7 +173,7 @@ export default class RetrieveMetadata extends SfCommand<RetrieveResultJson> {
const formatter = flags['target-metadata-dir']
? new MetadataRetrieveResultFormatter(result, {
'target-metadata-dir': flags['target-metadata-dir'],
'zip-file-name': zipFileName,
'zip-file-name': flags['zip-file-name'] ?? DEFAULT_ZIP_FILE_NAME,
Copy link
Contributor

Choose a reason for hiding this comment

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

why remove the zipFileName var? duplicating this on L193

Copy link
Contributor

Choose a reason for hiding this comment

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

could pass it into buildRetrieveOptions too?

@@ -140,6 +140,13 @@ describe('end-to-end-test for tracking with an org (single packageDir)', () => {
expect(response?.toDeploy).to.be.an.instanceof(Array).with.lengthOf(0);
});

it('sf deploy no local changes is not an error', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

sweet

@WillieRuemmele
Copy link
Contributor

✅ : resumes deploy in progress from cache
✅ :

➜  dreamhouse-lwc git:(main) ✗  hub:(DevHub) scratch:([email protected])
 ➜  sfdx project deploy start 
No changes to deploy
➜  dreamhouse-lwc git:(main) ✗  hub:(DevHub) scratch:([email protected])
 ➜  echo $?                      
0

✅ : convert source to mdapi, cd ../ and deploy

➜  scratches 
 ➜  sfdx project deploy start --metadata-dir dreamhouse-lwc/testing -o [email protected]
*** Deploying with SOAP ***
Deploy ID: 0Af7g00001VEccDCAT
Status: Succeeded | ████████████████████████████████████████ | 101/101 Components

❓ : we should improve this output, I'm not sure what's happening

➜  scratches 
 ➜  sfdx project retrieve start --target-metadata-dir dreamhouse-lwc/outputtest --zip-file-name retrieve  -o [email protected] --metadata ApexClass --wait 30
Preparing retrieve request...
Preparing retrieve request... done

it exited with 1
--waitdoesn't do anything? the command might be invalid to begin with, but still we should be able to understand

❌ : retrieve via package names

 ➜  sfdx project retrieve start --target-org DevHub --package-name 'Trailhead Playground'                    
Preparing retrieve request...
Preparing retrieve request... done

^ exits 1

with PDR released version

 ➜  sfdx project retrieve start --target-org DevHub --package-name 'Trailhead Playground'
Error (1): This command can only be used on orgs that have source tracking enabled, such as sandboxes and scratch orgs.
Preparing retrieve request... done

✅ : requirement for source tracked org removed

@WillieRuemmele
Copy link
Contributor

✅ : retrieves with --metadata outside of project
✅ : retrieves package from org without source tracking

@WillieRuemmele WillieRuemmele merged commit 81393a1 into main May 17, 2023
@WillieRuemmele WillieRuemmele deleted the sm/projectless-deploys branch May 17, 2023 15:18
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.

2 participants