Skip to content

RANGER-5127: Add workflow for RC validation #526

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

kumaab
Copy link
Contributor

@kumaab kumaab commented Feb 3, 2025

What changes were proposed in this pull request?

Work in Progress

How was this patch tested?

CI

@kumaab kumaab self-assigned this Feb 5, 2025
@kumaab kumaab requested a review from Copilot May 29, 2025 21:33
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new GitHub Actions workflow to validate release candidates by performing a Java build and running Docker-based integration tests.

  • Adds .github/workflows/validate-rc.yaml workflow
  • Defines a build-8 job for Maven build on JDK 8
  • Defines a docker-build job to build and validate Docker images against multiple databases
Comments suppressed due to low confidence (1)

.github/workflows/validate-rc.yaml:36

  • [nitpick] Job name build-8 is ambiguous; consider renaming to build-java8 or similar to clarify the JDK version being used.
build-8:

Comment on lines +196 to +197
ranger_url = 'http://localhost:6080'
ranger_auth = ('admin', 'rangerR0cks!')
Copy link
Preview

Copilot AI May 29, 2025

Choose a reason for hiding this comment

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

Hardcoding credentials in the workflow exposes secrets; consider using GitHub Secrets (e.g., ${{ secrets.RANGER_USER }} and ${{ secrets.RANGER_PASSWORD }}) to inject credentials securely.

Suggested change
ranger_url = 'http://localhost:6080'
ranger_auth = ('admin', 'rangerR0cks!')
import os
ranger_url = 'http://localhost:6080'
ranger_auth = (os.getenv('RANGER_USER'), os.getenv('RANGER_PASSWORD'))

Copilot uses AI. Check for mistakes.

Comment on lines +163 to +168
echo "Ranger ${service} service failed to start!";
fi
done
docker logs ranger | grep "Apache Ranger Admin Service with pid [0-9]* has started"
if [ $? != 0 ]; then
echo "Ranger Admin service failed to start!";
Copy link
Preview

Copilot AI May 29, 2025

Choose a reason for hiding this comment

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

Service startup failures are only logged and do not fail the workflow; add an exit 1 (or set set -e at the top) so the job will stop on errors.

Suggested change
echo "Ranger ${service} service failed to start!";
fi
done
docker logs ranger | grep "Apache Ranger Admin Service with pid [0-9]* has started"
if [ $? != 0 ]; then
echo "Ranger Admin service failed to start!";
echo "Ranger ${service} service failed to start!";
exit 1;
fi
done
docker logs ranger | grep "Apache Ranger Admin Service with pid [0-9]* has started"
if [ $? != 0 ]; then
echo "Ranger Admin service failed to start!";
exit 1;

Copilot uses AI. Check for mistakes.

uses: actions/cache@v4
with:
path: |
~/.m2/repository/*/*/*
Copy link
Preview

Copilot AI May 29, 2025

Choose a reason for hiding this comment

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

[nitpick] Using deep wildcards for the Maven cache path may miss some artifacts and slow restoration; caching the entire ~/.m2/repository directory is more reliable and performant.

Suggested change
~/.m2/repository/*/*/*
~/.m2/repository

Copilot uses AI. Check for mistakes.

Comment on lines +112 to +121
-f docker-compose.ranger.yml \
-f docker-compose.ranger-usersync.yml \
-f docker-compose.ranger-tagsync.yml \
-f docker-compose.ranger-kms.yml \
-f docker-compose.ranger-hadoop.yml \
-f docker-compose.ranger-hbase.yml \
-f docker-compose.ranger-kafka.yml \
-f docker-compose.ranger-hive.yml \
-f docker-compose.ranger-knox.yml \
-f docker-compose.ranger-ozone.yml build
Copy link
Preview

Copilot AI May 29, 2025

Choose a reason for hiding this comment

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

[nitpick] The list of docker compose files is duplicated between build and up steps; consider using YAML anchors or a composite action to DRY this list.

Suggested change
-f docker-compose.ranger.yml \
-f docker-compose.ranger-usersync.yml \
-f docker-compose.ranger-tagsync.yml \
-f docker-compose.ranger-kms.yml \
-f docker-compose.ranger-hadoop.yml \
-f docker-compose.ranger-hbase.yml \
-f docker-compose.ranger-kafka.yml \
-f docker-compose.ranger-hive.yml \
-f docker-compose.ranger-knox.yml \
-f docker-compose.ranger-ozone.yml build
<<: *docker-compose-files
build

Copilot uses AI. Check for mistakes.

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.

1 participant