Skip to content

Commit

Permalink
Comment out svc-bie-kafka workflows tied to inactive services (#3814)
Browse files Browse the repository at this point in the history
- Prevent unnecessary execution and dependency/security updates.
- Added comments with context and links to relevant documentation:
  - Disabling issue: #3802
  - BIE Docs: #3753
  • Loading branch information
gabezurita authored Dec 3, 2024
2 parents 9164fd1 + 97a81b3 commit a676c42
Show file tree
Hide file tree
Showing 11 changed files with 150 additions and 121 deletions.
32 changes: 20 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,24 @@ updates:
interval: "daily"
open-pull-requests-limit: 10

- package-ecosystem: "docker"
directory: "/mock/mock-bie-kafka"
target-branch: "develop"
schedule:
interval: "daily"
open-pull-requests-limit: 10
# NOTE: svc-bie-kafka workflows are tied to inactive services and commented out to prevent unnecessary execution and updates.
# Documentation:
# - Disabling issue: https://github.com/department-of-veterans-affairs/abd-vro/issues/3802
# - BIE Docs: https://github.com/department-of-veterans-affairs/abd-vro/issues/3753
# - package-ecosystem: "docker"
# directory: "/mock/mock-bie-kafka"
# target-branch: "develop"
# schedule:
# interval: "daily"
# open-pull-requests-limit: 10

- package-ecosystem: "docker"
directory: "/mock/mock-bie-schema-registry"
target-branch: "develop"
schedule:
interval: "daily"
open-pull-requests-limit: 10
# NOTE: svc-bie-kafka workflows are tied to inactive services and commented out to prevent unnecessary execution and updates.
# Documentation:
# - Disabling issue: https://github.com/department-of-veterans-affairs/abd-vro/issues/3802
# - BIE Docs: https://github.com/department-of-veterans-affairs/abd-vro/issues/3753
# - package-ecosystem: "docker"
# directory: "/mock/mock-bie-schema-registry"
# target-branch: "develop"
# schedule:
# interval: "daily"
# open-pull-requests-limit: 10
4 changes: 4 additions & 0 deletions .github/workflows/bie-kafka-end2end-test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# NOTE: svc-bie-kafka workflows are tied to inactive services and commented out to prevent unnecessary execution and updates.
# Documentation:
# - Disabling issue: https://github.com/department-of-veterans-affairs/abd-vro/issues/3802
# - BIE Docs: https://github.com/department-of-veterans-affairs/abd-vro/issues/3753
name: 'CI: BIE Kafka End-2-End Test'

on:
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/container-healthchecks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,21 @@ jobs:
run: |
source scripts/setenv.sh
export -p | sed 's/declare -x //'
COMPOSE_PROFILES="platform" ./gradlew :dockerComposeUp
- name: "Start containers: mocks and svc-*"
shell: bash
run: |
source scripts/setenv.sh
# Build and start Kafka mock required for svc-bie-kafka
./gradlew -p mocks :mock-bie-kafka:docker
COMPOSE_PROFILES="kafka" ./gradlew -p mocks :dockerComposeUp
COMPOSE_PROFILES="platform,svc" ./gradlew :dockerComposeUp
# NOTE: svc-bie-kafka workflows are tied to inactive services and commented out to prevent unnecessary execution and updates.
# Documentation:
# - Disabling issue: https://github.com/department-of-veterans-affairs/abd-vro/issues/3802
# - BIE Docs: https://github.com/department-of-veterans-affairs/abd-vro/issues/3753
# - name: "Start containers: mocks and svc-*"
# shell: bash
# run: |
# source scripts/setenv.sh
# # Build and start Kafka mock required for svc-bie-kafka
# ./gradlew -p mocks :mock-bie-kafka:docker
# COMPOSE_PROFILES="kafka" ./gradlew -p mocks :dockerComposeUp
# COMPOSE_PROFILES="platform,svc" ./gradlew :dockerComposeUp

- name: "Start containers: domain-cc"
shell: bash
run: |
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,14 @@ jobs:
uses: ./.github/workflows/svc-bip-api-integration-test.yml
secrets: inherit

svc-bie-kafka-end-to-end:
needs: nondraft-pr
uses: ./.github/workflows/bie-kafka-end2end-test.yml
secrets: inherit
# NOTE: svc-bie-kafka workflows are tied to inactive services and commented out to prevent unnecessary execution and updates.
# Documentation:
# - Disabling issue: https://github.com/department-of-veterans-affairs/abd-vro/issues/3802
# - BIE Docs: https://github.com/department-of-veterans-affairs/abd-vro/issues/3753
# svc-bie-kafka-end-to-end:
# needs: nondraft-pr
# uses: ./.github/workflows/bie-kafka-end2end-test.yml
# secrets: inherit

ee-ep-merge-end-to-end:
needs: nondraft-pr
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/delete-published-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
package:
- vro-db-init
- vro-svc-bgs-api
- vro-svc-bie-kafka
# - vro-svc-bie-kafka # See: https://github.com/department-of-veterans-affairs/abd-vro/issues/3802
- vro-cc-app
- vro-ee-max-cfi-app
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/secrel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ on:
- all
- cc-app
- svc-bgs-api
- svc-bie-kafka
# - svc-bie-kafka # See: https://github.com/department-of-veterans-affairs/abd-vro/issues/3802
- svc-bip-api
- ee-max-cfi-app
- ee-ep-merge-app
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/test-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@ jobs:
- name: "Run tests and checks"
# `check` runs all checks, including spectralLint, hadolint, and shellcheck
# NOTE: ./gradlew :svc-bie-kafka:check & ./gradlew :shared:lib-bie-kafka:check are disabled. See: https://github.com/department-of-veterans-affairs/abd-vro/issues/3802
run: |
echo "::group::Gradle check including test"
./gradlew :svc-bie-kafka:check
./gradlew :svc-bip-api:check
./gradlew :domain-xample:xample-shared:check
./gradlew :domain-xample:xample-api-controller:check
./gradlew :domain-xample:svc-xample-j:check
./gradlew :shared:lib-bie-kafka:check
./gradlew :shared:persistence-model:check
./gradlew :shared:lib-rabbitmq-connector:check
./gradlew :shared:lib-metrics:check
Expand Down Expand Up @@ -159,12 +158,13 @@ jobs:
with:
files: domain-ee/**

- name: "Get changed vro-streamlit files"
if: '! inputs.run_all_tests'
id: vro-streamlit-changed-files-specific
uses: tj-actions/changed-files@v45
with:
files: vro-streamlit/**
# NOTE: The vro-streamlit service is currently disabled because it is not actively used.
# - name: "Get changed vro-streamlit files"
# if: '! inputs.run_all_tests'
# id: vro-streamlit-changed-files-specific
# uses: tj-actions/changed-files@v45
# with:
# files: vro-streamlit/**

- name: "Install Python"
if: inputs.run_all_tests || steps.changed-files-specific.outputs.any_changed == 'true' || steps.ee-changed-files-specific.outputs.any_changed == 'true'
Expand All @@ -183,8 +183,8 @@ jobs:
run: |
./gradlew :domain-ee:test
- name: "Run VRO Streamlit tests"
if: inputs.run_all_tests || steps.vro-streamlit-changed-files-specific.outputs.any_changed == 'true'
run: |
./gradlew :vro-streamlit:check
# echo "skipping tests for now..."
# NOTE: The vro-streamlit service is currently disabled because it is not actively used.
# - name: "Run VRO Streamlit tests"
# if: inputs.run_all_tests || steps.vro-streamlit-changed-files-specific.outputs.any_changed == 'true'
# run: |
# ./gradlew :vro-streamlit:check
65 changes: 35 additions & 30 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,33 +158,38 @@ services:
depends_on:
<<: [ *svc-depends-on ]

svc-bie-kafka:
# Expose healthcheck port for end2end test
ports:
- "10301:10301"
profiles: [ "all","svc","kafka" ]
image: va/abd_vro-svc-bie-kafka:latest
<<: [ *common-sde-security, *common-security-opt ]
environment:
<<: [*rabbitmq-placeholder-vars, *postgres-vars, *common-vars]
BIE_KAFKA_PLACEHOLDERS_BROKERS: mock-bie-kafka:9092
BIE_KAFKA_PLACEHOLDERS_SCHEMA_REGISTRY: mock-bie-schema-registry:8081
BIE_KAFKA_KEYSTORE_INBASE64: ${BIE_KAFKA_KEYSTORE_INBASE64}
BIE_KAFKA_KEYSTORE_PASSWORD: ${BIE_KAFKA_KEYSTORE_PASSWORD}
BIE_KAFKA_TRUSTSTORE_INBASE64: ${BIE_KAFKA_TRUSTSTORE_INBASE64}
BIE_KAFKA_TRUSTSTORE_PASSWORD: ${BIE_KAFKA_TRUSTSTORE_PASSWORD}
networks:
- intranet
depends_on:
<<: [ *svc-depends-on ]

vro-streamlit:
profiles: ["all", "streamlit"]
image: va/abd_vro-vro-streamlit:latest
ports:
- "8501:8501"
environment:
<<: [*common-vars]
STREAMLIT_SERVER_PORT: 8501
networks:
- intranet
# NOTE: svc-bie-kafka workflows are tied to inactive services and commented out to prevent unnecessary execution and updates.
# Documentation:
# - Disabling issue: https://github.com/department-of-veterans-affairs/abd-vro/issues/3802
# - BIE Docs: https://github.com/department-of-veterans-affairs/abd-vro/issues/3753
# svc-bie-kafka:
# # Expose healthcheck port for end2end test
# ports:
# - "10301:10301"
# profiles: [ "all","svc","kafka" ]
# image: va/abd_vro-svc-bie-kafka:latest
# <<: [ *common-sde-security, *common-security-opt ]
# environment:
# <<: [*rabbitmq-placeholder-vars, *postgres-vars, *common-vars]
# BIE_KAFKA_PLACEHOLDERS_BROKERS: mock-bie-kafka:9092
# BIE_KAFKA_PLACEHOLDERS_SCHEMA_REGISTRY: mock-bie-schema-registry:8081
# BIE_KAFKA_KEYSTORE_INBASE64: ${BIE_KAFKA_KEYSTORE_INBASE64}
# BIE_KAFKA_KEYSTORE_PASSWORD: ${BIE_KAFKA_KEYSTORE_PASSWORD}
# BIE_KAFKA_TRUSTSTORE_INBASE64: ${BIE_KAFKA_TRUSTSTORE_INBASE64}
# BIE_KAFKA_TRUSTSTORE_PASSWORD: ${BIE_KAFKA_TRUSTSTORE_PASSWORD}
# networks:
# - intranet
# depends_on:
# <<: [ *svc-depends-on ]

# NOTE: The vro-streamlit service is currently disabled because it is not actively used.
# vro-streamlit:
# profiles: ["all", "streamlit"]
# image: va/abd_vro-vro-streamlit:latest
# ports:
# - "8501:8501"
# environment:
# <<: [*common-vars]
# STREAMLIT_SERVER_PORT: 8501
# networks:
# - intranet
98 changes: 51 additions & 47 deletions mocks/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,58 +29,62 @@ x-common-sde-security: &common-sde-security
services:
# Containers with the `mock-` prefix are used for development and testing.

mock-bie-kafka:
profiles: ["all","kafka"]
image: va/vro_mocks-mock-bie-kafka:latest
<<: [*common-sde-security, *common-security-opt]
# Port 9092 is for internal communication within the vro_intranet, and is needed for consuming/producing messages
# within the vro_intranet docker network. In order to produce/consume messages outside the vro_intranet network,
# the port 9094 is exposed for external communication with mock-bie-kafka from outside the vro_intranet. Advertised
# listeners are configured to consume messages on both ports.
ports:
- "9092:9092"
- "9094:9094"
environment:
<<: *common-vars
# For debugging
BITNAMI_DEBUG: 'true'
KAFKA_ADVERTISED_HOST_NAME: mock-bie-kafka
# Purpose of EXTERNAL port 9094: see https://github.com/bitnami/containers/blob/main/bitnami/kafka/README.md#accessing-apache-kafka-with-internal-and-external-clients
KAFKA_CFG_LISTENERS: INTERNAL://:9092,CONTROLLER://:9093,EXTERNAL://:9094
KAFKA_CFG_ADVERTISED_LISTENERS: INTERNAL://mock-bie-kafka:9092,EXTERNAL://localhost:9094
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: 'INTERNAL'
KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: 'true'
KAFKA_MESSAGE_MAX_BYTES: "1000000"
# NOTE: svc-bie-kafka workflows are tied to inactive services and commented out to prevent unnecessary execution and updates.
# Documentation:
# - Disabling issue: https://github.com/department-of-veterans-affairs/abd-vro/issues/3802
# - BIE Docs: https://github.com/department-of-veterans-affairs/abd-vro/issues/3753
# mock-bie-kafka:
# profiles: ["all","kafka"]
# image: va/vro_mocks-mock-bie-kafka:latest
# <<: [*common-sde-security, *common-security-opt]
# # Port 9092 is for internal communication within the vro_intranet, and is needed for consuming/producing messages
# # within the vro_intranet docker network. In order to produce/consume messages outside the vro_intranet network,
# # the port 9094 is exposed for external communication with mock-bie-kafka from outside the vro_intranet. Advertised
# # listeners are configured to consume messages on both ports.
# ports:
# - "9092:9092"
# - "9094:9094"
# environment:
# <<: *common-vars
# # For debugging
# BITNAMI_DEBUG: 'true'
# KAFKA_ADVERTISED_HOST_NAME: mock-bie-kafka
# # Purpose of EXTERNAL port 9094: see https://github.com/bitnami/containers/blob/main/bitnami/kafka/README.md#accessing-apache-kafka-with-internal-and-external-clients
# KAFKA_CFG_LISTENERS: INTERNAL://:9092,CONTROLLER://:9093,EXTERNAL://:9094
# KAFKA_CFG_ADVERTISED_LISTENERS: INTERNAL://mock-bie-kafka:9092,EXTERNAL://localhost:9094
# KAFKA_CFG_INTER_BROKER_LISTENER_NAME: 'INTERNAL'
# KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: 'true'
# KAFKA_MESSAGE_MAX_BYTES: "1000000"

# Kafka Kraft configurations
KAFKA_CFG_NODE_ID: 0
KAFKA_CFG_PROCESS_ROLES: controller,broker
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 0@mock-bie-kafka:9093
# # Kafka Kraft configurations
# KAFKA_CFG_NODE_ID: 0
# KAFKA_CFG_PROCESS_ROLES: controller,broker
# KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
# KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 0@mock-bie-kafka:9093

# https://github.com/bitnami/containers/blob/main/bitnami/kafka/README.md
# https://stackoverflow.com/a/72018409
# Caution: Empty string '' and "" don't work; however ' ' or " " does work
KAFKA_CFG_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM: " "
# # https://github.com/bitnami/containers/blob/main/bitnami/kafka/README.md
# # https://stackoverflow.com/a/72018409
# # Caution: Empty string '' and "" don't work; however ' ' or " " does work
# KAFKA_CFG_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM: " "

# For development without having to deal with connecting via SSL, use port 9092 or do the following.
# To disable SSL, uncomment the following and comment out the next SSL section
# ALLOW_PLAINTEXT_LISTENER: 'yes'
# KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT,PLAINTEXT:PLAINTEXT
# # For development without having to deal with connecting via SSL, use port 9092 or do the following.
# # To disable SSL, uncomment the following and comment out the next SSL section
# # ALLOW_PLAINTEXT_LISTENER: 'yes'
# # KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT,PLAINTEXT:PLAINTEXT

# Set up SSL -- see "Security" section of https://hub.docker.com/r/bitnami/kafka/
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT,EXTERNAL:SSL
KAFKA_CFG_SSL_CLIENT_AUTH: required
# PEM https://medium.com/analytics-vidhya/how-to-use-pem-certificates-with-apache-kafka-f3b444a00816
KAFKA_TLS_TYPE: JKS
KAFKA_CERTIFICATE_PASSWORD: mockKafka
# # Set up SSL -- see "Security" section of https://hub.docker.com/r/bitnami/kafka/
# KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT,EXTERNAL:SSL
# KAFKA_CFG_SSL_CLIENT_AUTH: required
# # PEM https://medium.com/analytics-vidhya/how-to-use-pem-certificates-with-apache-kafka-f3b444a00816
# KAFKA_TLS_TYPE: JKS
# KAFKA_CERTIFICATE_PASSWORD: mockKafka

volumes:
# scripts/setenv.sh creates jks files from env variables
- './mock-bie-kafka/kafka.keystore.jks:/opt/bitnami/kafka/config/certs/kafka.keystore.jks:ro'
- './mock-bie-kafka/kafka.truststore.jks:/opt/bitnami/kafka/config/certs/kafka.truststore.jks:ro'
networks:
- vro_intranet
# volumes:
# # scripts/setenv.sh creates jks files from env variables
# - './mock-bie-kafka/kafka.keystore.jks:/opt/bitnami/kafka/config/certs/kafka.keystore.jks:ro'
# - './mock-bie-kafka/kafka.truststore.jks:/opt/bitnami/kafka/config/certs/kafka.truststore.jks:ro'
# networks:
# - vro_intranet

mock-bip-claims-api:
profiles: ["all","bip"]
Expand Down
2 changes: 1 addition & 1 deletion mocks/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencyResolutionManagement {
rootProject.name = 'vro_mocks'

include ':mock-bgs-api'
include ':mock-bie-kafka'
// include ':mock-bie-kafka' # See: https://github.com/department-of-veterans-affairs/abd-vro/issues/3802
include ':mock-bie-schema-registry'
include ':mock-bip-shared'
include ':mock-bip-ce-api'
Expand Down
6 changes: 3 additions & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ include ':db-init'
include ':dev-tools'
include ':postgres'
include ':shared:persistence-model'
include ':shared:lib-bie-kafka'
// include ':shared:lib-bie-kafka' # See: https://github.com/department-of-veterans-affairs/abd-vro/issues/3802
include ':shared:lib-metrics'
include ':shared:lib-rabbitmq-connector'
include ':shared:lib-metrics'
include ':shared:lib-hoppy'
include ':svc-bgs-api'
include ':svc-bip-api'
include ':svc-bie-kafka'
include ':vro-streamlit'
// include ':svc-bie-kafka' # See: https://github.com/department-of-veterans-affairs/abd-vro/issues/3802
// include ':vro-streamlit' # See: https://github.com/department-of-veterans-affairs/abd-vro/pull/3814#discussion_r1867826060

include ':domain-xample:xample-api-controller'
include ':domain-xample:xample-shared'
Expand Down

0 comments on commit a676c42

Please sign in to comment.