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

feature/982: added option to execute after deploy #986

Merged

Conversation

phjulia
Copy link
Collaborator

@phjulia phjulia commented Jun 8, 2023

PR details

What changes did you make? (Give an overview)

Added possibility to execute query after deploy

Is there anything you'd like reviewers to focus on?

...

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • N/A test scripts updated
  • Wiki updated (via [TASK] Documentation for 5.2 #1007)

@phjulia phjulia linked an issue Jun 8, 2023 that may be closed by this pull request
@github-actions github-actions bot added the enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story" label Jun 8, 2023
lib/index.js Outdated Show resolved Hide resolved
@phjulia phjulia changed the base branch from main to develop June 8, 2023 08:39
@phjulia phjulia requested a review from JoernBerkefeld June 8, 2023 08:39
@JoernBerkefeld
Copy link
Contributor

Where did you save the Text for the Wiki update? We can only publish the Wiki update when the feature was released :)

@phjulia
Copy link
Collaborator Author

phjulia commented Jun 8, 2023

Where did you save the Text for the Wiki update? We can only publish the Wiki update when the feature was released :)

for this one I didn't add it yet, it's not ready yet :-) I have some questions that I left as comments

Here is the documentation:

deploy
Command: mcdev deploy [business unit] [metadata type] [metadata key] [--fromRetrieve] [--refresh] [--changeKeyValue=yourNewKey] [--changeKeyField=otherFieldInJson] [--execute]

Alias: mcdev d

Deploys metadata to the specified Business Unit. Example:

mcdev deploy MyProject/DEV
Only metadata that you copied into the deploy directory will be deployed. Please keep in mind that the folder structure needs to be similar to what the retrieve command creates in the retrieve folder, including the credentials and Business Unit name.

Similarly to mcdev retrieve you can also use the interactive mode to select credential and/or Business Unit.

deploy and execute:

This is a special combination that will execute a query after creating or updating it on the server.

mcdev deploy --execute
mcdev deploy MyProject/DEV query "key1,key2" --execute
mcdev deploy MyProject/DEV query "key1" --fromRetrieve --execute

lib/cli.js Outdated Show resolved Hide resolved
lib/Deployer.js Outdated Show resolved Hide resolved
lib/Deployer.js Outdated Show resolved Hide resolved
lib/Deployer.js Outdated Show resolved Hide resolved
lib/Deployer.js Outdated Show resolved Hide resolved
lib/metadataTypes/MetadataType.js Outdated Show resolved Hide resolved
lib/metadataTypes/MetadataType.js Outdated Show resolved Hide resolved
lib/metadataTypes/MetadataType.js Outdated Show resolved Hide resolved
lib/metadataTypes/Query.js Show resolved Hide resolved
lib/metadataTypes/Query.js Show resolved Hide resolved
@JoernBerkefeld
Copy link
Contributor

JoernBerkefeld commented Jun 12, 2023

Please fix the error Screenshot_20230612_143700_GitHub.jpg

@github-actions
Copy link

github-actions bot commented Jun 12, 2023

Coverage Report

Commit:fc53c6d
Base: develop@eb23409

Type Base This PR
Total Statements Coverage  46.07%  46.09%  (+0.02%)
Total Branches Coverage  36.91%  36.94%  (+0.03%)
Total Functions Coverage  53.03%  53.09%  (+0.06%)
Total Lines Coverage  45.99%  46.01%  (+0.02%)
Details (changed files):
File Statements Branches Functions Lines

@JoernBerkefeld
Copy link
Contributor

Coverage Report

Commit:0e6dccd
Base: develop@f6640a1

Type Base This PR
Total Statements Coverage  46.04%  46.05%  (+0.01%)
Total Branches Coverage  36.98%  36.99%  (+0.01%)
Total Functions Coverage  52.89%  52.95%  (+0.06%)
Total Lines Coverage  45.96%  45.96%  (+0%)
Details (changed files):
File Statements Branches Functions Lines
lib/cli.js  0%  0%  0%  0%
lib/index.js  43.85%  39.71%  52%  43.85%
lib/metadataTypes/Query.js  86.95%  68.75%  95.45%  87.64%

This needs a new test added to the query test class :)

@phjulia phjulia self-assigned this Jun 18, 2023
@phjulia
Copy link
Collaborator Author

phjulia commented Jun 23, 2023

Coverage Report

Commit:0e6dccd
Base: develop@f6640a1
Type
Base
This PR
Total Statements Coverage
 46.04%

 46.05%  (+0.01%)
Total Branches Coverage
 36.98%

 36.99%  (+0.01%)
Total Functions Coverage
 52.89%

 52.95%  (+0.06%)
Total Lines Coverage
 45.96%

 45.96%  (+0%)

Details (changed files):
File
Statements
Branches
Functions
Lines

lib/cli.js
 0%
 0%
 0%
 0%

lib/index.js
 43.85%
 39.71%
 52%
 43.85%

lib/metadataTypes/Query.js
 86.95%
 68.75%
 95.45%
 87.64%

This needs a new test added to the query test class :)

@JoernBerkefeld Not sure how can I test if the query actually executed? I added a test that only checks that no errors occurred, is that OK? Deploy should always return true or false regardless if queries were started or not.

lib/cli.js Outdated Show resolved Hide resolved
@JoernBerkefeld JoernBerkefeld changed the title 982-feature/added option to execute after deploy feature/982: added option to execute after deploy Jun 29, 2023
@JoernBerkefeld JoernBerkefeld added this to the 5.2.0 milestone Jun 29, 2023
@JoernBerkefeld JoernBerkefeld merged commit d77fbc2 into develop Jun 29, 2023
@JoernBerkefeld JoernBerkefeld deleted the feature/982-feature-add-execute-option-to-deploy-method branch June 29, 2023 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] add --execute option to deploy method
2 participants