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

Improve messages for tasks/jobs #897

Merged
merged 5 commits into from Apr 14, 2018
Merged

Improve messages for tasks/jobs #897

merged 5 commits into from Apr 14, 2018

Conversation

nthomas-redhat
Copy link
Contributor

itendrl-bug-id: /issues/834

@codecov
Copy link

codecov bot commented Apr 7, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@8219b87). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #897   +/-   ##
=========================================
  Coverage          ?   69.87%           
=========================================
  Files             ?       86           
  Lines             ?     3363           
  Branches          ?      424           
=========================================
  Hits              ?     2350           
  Misses            ?      953           
  Partials          ?       60
Impacted Files Coverage Δ
...s/cluster/atoms/check_cluster_nodes_up/__init__.py 76.47% <ø> (ø)
...ows/expand_cluster_with_detected_peers/__init__.py 14.66% <ø> (ø)
...endrl/commons/flows/import_cluster/gluster_help.py 84.28% <ø> (ø)
...cluster/atoms/stop_monitoring_services/__init__.py 95.34% <ø> (ø)
...luster/atoms/delete_monitoring_details/__init__.py 71.42% <ø> (ø)
...luster/atoms/stop_integration_services/__init__.py 95.34% <ø> (ø)
...cts/service/atoms/check_service_status/__init__.py 100% <ø> (ø)
tendrl/commons/flows/utils.py 20.18% <ø> (ø)
...s/objects/cluster/atoms/import_cluster/__init__.py 18.05% <ø> (ø)
...cts/cluster/atoms/configure_monitoring/__init__.py 26.78% <ø> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8219b87...88596f5. Read the comment docs.

@@ -164,7 +164,7 @@ def run(self):
NS.publisher_id,
{"message": "Please wait while Tendrl imports ("
"job_id: %s) newly expanded "
"%s storage nodes %s" % (
"%s storage nodes in cluster %s" % (
_job_id,
sds_pkg_name,
integration_id)},
Copy link
Contributor

Choose a reason for hiding this comment

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

please use cluster.short_name or cluster.integration_id in all messages

rather, just write a function cluster.to_str which will return either cluster.short_name or cluster.integration_id

@@ -15,7 +15,7 @@ def expand_gluster(parameters):
logger.log(
"info",
NS.publisher_id,
{"message": "Setting up gluster nodes %s" %
{"message": "Setting up gluster nodes for cluster %s" %
parameters['TendrlContext.integration_id']},
Copy link
Contributor

Choose a reason for hiding this comment

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

please use cluster.short_name or cluster.integration_id in all messages

{"message": "Expanded Gluster Cluster %s."
" New nodes are: %s" % (
{"message": "Expanded Gluster Cluster %s"
" with nodes %s" % (
parameters['TendrlContext.integration_id'],
Copy link
Contributor

Choose a reason for hiding this comment

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

please use cluster.short_name or cluster.integration_id in all messages

"to cluster %s" % (
"message": "ImportCluster %s (jobID: %s) : "
"importing host %s" % (
integration_id,
Copy link
Contributor

Choose a reason for hiding this comment

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

please use cluster.short_name or cluster.integration_id in all messages

Signed-off-by: Nishanth Thomas <nthomas@redhat.com>
Signed-off-by: Nishanth Thomas <nthomas@redhat.com>
Signed-off-by: Nishanth Thomas <nthomas@redhat.com>
@nthomas-redhat
Copy link
Contributor Author

@shtripat , @r0h4n , pls take a look

@@ -90,7 +90,7 @@ def process_job(job):
# "failed" (the parent job of these jobs will also be
# marked as "failed")
if "tendrl/monitor" in NS.node_context.tags and \
_timeout == "yes":
_timeout == "yes":
Copy link
Member

Choose a reason for hiding this comment

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

Do we need these spaces? I feel no.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was to resolve the pep8 issue

Copy link
Member

Choose a reason for hiding this comment

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

Ack

"imported %s" % (node_list, integration_id)},
{"message": "ImportCluster %s waiting for hosts %s "
"to be "
"imported" % (_cluster.short_name, node_list)},
Copy link
Member

Choose a reason for hiding this comment

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

This line also should be aligned with previous one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Signed-off-by: Nishanth Thomas <nthomas@redhat.com>
@shtripat
Copy link
Member

LGTM

{"message": "Running Flow %s" %
job.payload['run']},
{"message": "Running %s" %
job.payload['run'].rpartition('.')[2]},
Copy link
Contributor

@r0h4n r0h4n Apr 14, 2018

Choose a reason for hiding this comment

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

please use simple python code, what is the guarantee of rpartition and index 2 being always present? This code is going to fail as soon as we add one more layer of heirarchy to "NS.tendrl.flows.ImportCluster"

job.payload['run'].split(".")[-1]

@r0h4n r0h4n merged commit eeb1030 into Tendrl:master Apr 14, 2018
@r0h4n r0h4n added this to the Milestone 5 (2018) milestone Apr 19, 2018
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.

None yet

3 participants