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

Emit warning #942

Merged
merged 5 commits into from
Aug 8, 2024
Merged

Emit warning #942

merged 5 commits into from
Aug 8, 2024

Conversation

narekhovhannisyan
Copy link
Member

Types of changes

  • Enhancement (project structure, spelling, grammar, formatting)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

A description of the changes proposed in the Pull Request

  • Added warning if pipeline doesn't have any phases.

@@ -77,6 +78,10 @@ const computeNode = async (node: Node, params: ComputeParams): Promise<any> => {
inputStorage = mergeDefaults(inputStorage, defaults);
const pipelineCopy = structuredClone(pipeline) || {};

if (Object.keys(pipelineCopy).length === 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

the Object.keys(pipelineCopy).length has [ '0' ] if there isn't compute, observe or regroup in the manifest. You can test manifests/examples/builtins/sum/success.yml
by commenting compute and fixing the tabulation

Copy link
Contributor

@manushak manushak left a comment

Choose a reason for hiding this comment

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

the waning doesn't appear, more in the review comment

Co-authored-by: Manushak Keramyan <[email protected]>
Signed-off-by: Narek Hovhannisyan <[email protected]>
@narekhovhannisyan
Copy link
Member Author

@manushak I'm unable to reproduce that case, can you please provide more background on it?
sum/success yaml runs smooth with commented pipeline

@narekhovhannisyan narekhovhannisyan merged commit ce87cca into main Aug 8, 2024
2 checks passed
@narekhovhannisyan narekhovhannisyan deleted the emit-warning branch August 8, 2024 16:27
This was referenced Aug 8, 2024
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.

Emit a warning if the manifest file is not suitable for phased execution
3 participants