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

HPCC4J-578 Migrate existing jirabot logic to new Jira environment #692

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

jpmcmu
Copy link
Contributor

@jpmcmu jpmcmu commented Mar 12, 2024

  • Updated Jirabot to work with current Jira and new Cloud Jira

Signed-off-by: James McMullan [email protected]

Type of change:

  • This change is a bug fix (non-breaking change which fixes an issue).
  • This change is a new feature (non-breaking change which adds functionality).
  • This change is a breaking change (fix or feature that will cause existing behavior to change).

Checklist:

  • I have created a corresponding JIRA ticket for this submission
  • My code follows the code style of this project.
    • I have applied the Eclipse code-format template provided.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly, or...
    • I have created a JIRA ticket to update the documentation.
    • Any new interfaces or exported functions are appropriately commented.
  • I have read the HPCC Systems CONTRIBUTORS document (https://github.com/hpcc-systems/HPCC-Platform/wiki/Guide-for-contributors).
  • The change has been fully tested:
    • This change does not cause any existing JUnits to fail.
    • I have include JUnit coverage to test this change
    • I have performed system test and covered possible regressions and side effects.
  • I have given due consideration to all of the following potential concerns:
    • Scalability
    • Performance
    • Security
    • Thread-safety
    • Premature optimization
    • This change fixes the problem, not just the symptom

Testing:

@jpmcmu
Copy link
Contributor Author

jpmcmu commented Mar 12, 2024

@rpastrana please review

Copy link
Member

@rpastrana rpastrana left a comment

Choose a reason for hiding this comment

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

@jpmcmu looks fine, just one question. If the empty transition map case is handled appropriately, let's go ahead and squash


if transition != '':
if transition != None and transition != '':
Copy link
Member

Choose a reason for hiding this comment

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

it's hard to tell, how's the transaction == None or '' case handled?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If transition == None or '' that indicates we don't need to make any transitions.

Copy link
Member

Choose a reason for hiding this comment

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

I understand what the conditions mean, I asked how that case is handled.
if the new table is empty, does that issue get logged anywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah sorry I didn't understand your question. No, that issue wouldn't get logged anywhere, but if the table were empty or didn't have the specified status we would default to None. To your point it is probably a good idea to add a log message if we hit None, an empty string though should still be treated as a valid no-op

@jpmcmu
Copy link
Contributor Author

jpmcmu commented Mar 12, 2024

@rpastrana squashed

@jpmcmu
Copy link
Contributor Author

jpmcmu commented Mar 12, 2024

@rpastrana Added an additional error message for the transition == None case


issue = jira.issue(issue_name)
result = 'Jirabot Action Result:\n'

transitionMap = json.loads(os.environ['JIRA_ISSUE_TRANSITION_MAP'])
if not isinstance(transitionMap, dict):
Copy link
Member

Choose a reason for hiding this comment

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

This should be logged.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a log statement and squashed

- Updated Jirabot to work with current Jira and new Cloud Jira

Signed-off-by: James McMullan [email protected]
@rpastrana rpastrana merged commit 02ecaf0 into hpcc-systems:candidate-9.0.x Mar 13, 2024
6 checks passed
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