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

VH 1324 - Filter the versions returned from the initialization script #623

Conversation

DokurOmkar
Copy link
Contributor

@DokurOmkar DokurOmkar commented Jul 11, 2024

PR Details

Description

In this PR, updated the docker compose file to change the "LOCAL_IP" variable to "V2XHUB_IP" and updated the initialization script to remove the following from the returned versions:

  • Curly braces: ^{}
  • Properties found
  • Duplicate entries

Related Issue

Motivation and Context

How Has This Been Tested?

This has been tested by running the script locally. A screenshot is attached below after testing.
Screenshot from 2024-07-11 08-42-58

Types of changes

  • Defect fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that cause existing functionality to change)

Checklist:

  • I have added any new packages to the sonar-scanner.properties file
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
    V2XHUB Contributing Guide
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link

sonarcloud bot commented Jul 11, 2024

@@ -23,9 +23,12 @@ latest_version=$(echo "$release_info" | grep -o '"tag_name": *"[^"]*"' | cut -d
# Fetching all tags from Git repository
tags=$(git ls-remote --tags https://github.com/usdot-fhwa-OPS/V2X-Hub.git | awk -F/ '{print $3}' | sort -V)
Copy link
Contributor

@paulbourelly999 paulbourelly999 Jul 11, 2024

Choose a reason for hiding this comment

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

On issue I am realizing right now is that getting tags may return tags that are not associated with any release. Maybe we should considered install gh' as part of this script and using the output of gh release list` which looks like this
image
This ensures all provided options are actual releases, does not included any duplicates and includes information about release date and most recent release. What do you think. Only additional edit that may be necessary is to make sure the prompt for selecting a release indicates that you use the tag name.

Copy link
Contributor Author

@DokurOmkar DokurOmkar Jul 11, 2024

Choose a reason for hiding this comment

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

As using "gh" would require an additional step of installing it. As part of this bug, we can work on removing the unwanted characters and add a follow up story to make an enhancement.

In the follow up story, we can add a logic to check if gh installed or not and add installation commands within this script.

Copy link
Contributor

@paulbourelly999 paulbourelly999 left a comment

Choose a reason for hiding this comment

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

Possible enhancement

@paulbourelly999 paulbourelly999 merged commit 6f17eec into develop Jul 11, 2024
3 checks passed
@paulbourelly999 paulbourelly999 deleted the vh-1324_clean_up_versions_from_the_initialization_script branch July 11, 2024 18:57
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