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 for HPCC4J BareMetal GitHub Action Py Issue #678

Closed
wants to merge 4 commits into from

Conversation

error9098x
Copy link

@error9098x error9098x commented Jan 30, 2024

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:

There appears to be an issue with the baremetal-regression-suite.yml GitHub workflow; it's breaking due to a Python-related problem as mentioned in this JIRA Ticket

The Problem seems to be lying here:
previousVersion = [latestVersion[0], latestVersion[1], latestVersion[2] - 2]

A subtraction operation is attempted on the third element of the latestVersion list.
However, latestVersion = getLatestBranchVersion(branch_name) returns the latest version as string (e.g., '9.6.0'), which is why we're encountering an error.

To resolve the issue, I modified the workflow so that it converts the 3rd string element into an integer:
previousVersion = [latestVersion[0], latestVersion[1], int(latestVersion[2]) - 2]

Here is the print statements with outputs:
print(f"Latest version: {latestVersion}, type of third element: {type(latestVersion[2])}") # Outputs: Latest version: 9.6.0, type of third element: <class 'str'> print(f"{latestVersion[0]}, {latestVersion[1]}, {int(latestVersion[2]} - 2") # Outputs: 9, ., 6 previousVersion = [latestVersion[0], latestVersion[1], int(latestVersion[2]) - 2] print(f"{previousVersion}") # Outputs: ['9', '.', 4]

UPDATE:
I updated the previous edit to fix the issue in install latest version

Please let me know if any additional changes are needed.

@error9098x error9098x changed the title Fix for HPCC4J BareMetall GitHub Action Py Issue Fix for HPCC4J BareMetal GitHub Action Py Issue Jan 31, 2024
@rpastrana rpastrana requested a review from jpmcmu January 31, 2024 22:20
@jpmcmu
Copy link
Contributor

jpmcmu commented Feb 1, 2024

@error9098x Thank you for the pull request! However, we ended up correcting the issue in a different portion of the code, so this is no longer needed, but please do not hesitate to create PRs in the future.

@jpmcmu jpmcmu closed this Feb 1, 2024
@error9098x
Copy link
Author

@jpmcmu Thanks for letting me know this, sure, I am looking forward to contribute more.

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