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: don't throw when 15 char job ID not in cache #884

Merged
merged 8 commits into from
Jan 30, 2024

Conversation

shetzel
Copy link
Contributor

@shetzel shetzel commented Jan 20, 2024

What does this PR do?

When a 15 character deploy ID is provided to the quick deploy command, and that job is not in the cache for this CLI, the command will now still continue using the 15 character ID as long as there is a target org found.

What issues does this PR fix or reference?

@W-14800653@

@shetzel shetzel requested a review from a team as a code owner January 20, 2024 00:29
@mshanemc
Copy link
Contributor

QA:

✅ deploy with 18 char job-id
✅ deploy with 15-char job-id
✅ deploy via --use-most-recent
✅ validate, delete the job from the cache, and pass in orgId with 18 char job-id
❌ validate, delete the job from the cache, and pass in orgId with 15 char job-id

I've got a fix to make quick work, but I think I'd prefer a broader fix for DeployCache to help it handle the 15/18 char stuff better since so many commands are using it.

@@ -80,7 +80,7 @@ export default class DeployMetadataCancel extends SfCommand<DeployResultJson> {
if (!this.jsonEnabled()) formatter.display();
return formatter.getJson();
} else {
const wait = flags.wait ?? Duration.minutes(deployOpts.wait);
const wait = flags.wait ?? Duration.minutes(deployOpts.wait ?? 33);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we update the command help for cancel, report, and resume to note the 33 minute default?

@shetzel
Copy link
Contributor Author

shetzel commented Jan 30, 2024

QA:
✅ validate --async, then report with 15 char
✅ validate --async, then report with 18 char
✅ validate --async, then resume with 15 char
✅ validate --async, then resume with 18 char
✅ validate --async, then cancel with 15 char
✅ validate --async, then cancel with 18 char
✅ quick deploy with 15 char
✅ quick deploy --use-most-recent
✅ quick deploy with 18 char
✅ quick deploy with 15 char, no cache
✅ quick deploy with 18 char, no cache
✅ quick deploy with 15 char, no cache, no org --> errors with "No target org found in cache, from a flag, or in the environment."
✅ quick deploy with 18 char, no cache, no org --> errors with "No target org found in cache, from a flag, or in the environment."
✅ quick deploy with 15 char, no org, with cache --> uses cache and deploys
✅ quick deploy with 18 char, no org, with cache --> uses cache and deploys

@shetzel shetzel merged commit 2570ec4 into main Jan 30, 2024
38 checks passed
@shetzel shetzel deleted the sh/support-15-char-quick-deploy branch January 30, 2024 18:34
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