Skip to content

Conversation

@mrlunchbox777
Copy link
Owner

@mrlunchbox777 mrlunchbox777 commented Jun 28, 2024

Thanks for contributing!

Background

To pass the semanic-prs check, ensure you prefix your title with one of the .types in semanic.yml, followed by a : , e.g. feature: My PR

IssueWhat issue are you resolving with this PR? Please provide the number or link. _NOTE:_ If you don't have an issue for this work, please create one before creating this PR.

Response: #180

DescriptionPlease describe how this PR is addressing the issue and/or why it is being addressed this way.

Response: This PR updates pipes and checks for CHANGELOG and version bumps as well as getting non-test coverage up to 100%

Steps to Reproduce and TestPlease give us a step-by-step guide to reproduce the bug. A link to the steps in the issue is enough.

Response:

  1. All of the workflows should pass
  2. make coverage should show 100% on everything except fake factory
  3. Creating a new test pr with changes, but not updating version should fail the version check
  4. Creating a new test pr with changes, but not updating CHANGELOG should fail the CHANGELOG check

Required Checkboxes

All of these checkboxes are required for PR's to be considered.

PR Checks

  • I answered all of the background questions
  • I have added sensible labels to the associated issue and this PR
  • I have added/updated tests for all added/modified code, and all tests are passing
  • I have added documentation, as appropriate, including CHANGELOG and version updates as needed

Code of Conduct

By submitting this PR, you agree to follow our Code of Conduct

  • I agree to follow this project's Code of Conduct

@mrlunchbox777 mrlunchbox777 linked an issue Jun 28, 2024 that may be closed by this pull request
1 task
…pts-to-golang

Conflicts:
	bsctl/go.mod
	bsctl/go.sum
@github-actions github-actions bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. changes/root Root file changes changes/meta .github file changes and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 28, 2024
@github-actions github-actions bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 28, 2024
@github-actions github-actions bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 28, 2025
@mrlunchbox777 mrlunchbox777 added changes/source Source file changes kind/feature New feature or request priority/3 Medium priority labels Jun 28, 2025
@mrlunchbox777 mrlunchbox777 marked this pull request as ready for review June 28, 2025 06:17
@mrlunchbox777 mrlunchbox777 self-assigned this Jun 28, 2025
@mrlunchbox777 mrlunchbox777 requested a review from Copilot June 28, 2025 06:17
Copy link
Contributor

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 enhances CLI tooling by moving more shell scripts to Go, improving I/O stream handling with tee functionality, integrating schema validation, and enforcing version/CHANGELOG bumps in CI.

  • Introduced ReaderTee/WriterTee with full unit tests and wired streams through the factory to commands.
  • Refactored config client to reconcile and validate new FailValidationAbove10 field.
  • Updated bash workflows and scripts to check version and CHANGELOG consistency and bumped constants.

Reviewed Changes

Copilot reviewed 52 out of 54 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
shared-scripts/k8s/clear-finalizers.sh New script to bulk-clear Kubernetes namespace finalizers
shared-scripts/big-bang/readme-bump.sh Parameterized Helm docs bump to use a branch variable
bsctl/util/k8s/io_streams_tees.go Added tee implementations for I/O streams
bsctl/util/k8s/io_streams_* Added getters, stores, wrappers, and tests to support new stream API
bsctl/util/test/fake_factory.go Extended fake factory with IOStreamsGetter for CLI testing
bsctl/util/config/schemas/* Introduced FailValidationAbove10 setting with validation
bsctl/util/config/client_functions.go Upgraded getConfig to return errors and perform struct validation
bsctl/util/factory.go Exposed GetStreams() on the factory interface
bsctl/static/constants.go Added ConstantsClient interface and GetDefaultConstants()
bsctl/cmd/{completion,version,cmd}.go Refactored commands to use new streams interface
bsctl/go.mod Bumped Go version and updated indirect dependencies
bsctl/scripts/workflows/ Added scripts for version/CHANGELOG checks and action-validator linting
CHANGELOG.md Bumped project to 0.1.2 and documented new features
Makefile Updated vet target to invoke make vet
Comments suppressed due to low confidence (3)

bsctl/util/test/fake_factory.go:20

  • [nitpick] The field name streamsInstance is ambiguous. Consider renaming it to streamsGetter or ioStreamsProvider to clarify it implements IOStreamsGetter.
		streamsInstance: k8s.GetStoreOnlyStreams(),

shared-scripts/k8s/clear-finalizers.sh:1

  • There are no tests covering this new cleanup script. Adding integration or unit tests (e.g., via bats-core) would improve confidence and coverage.
#! /usr/bin/env bash

shared-scripts/big-bang/readme-bump.sh:94

  • The updated Helm docs bump script is not covered by tests; consider adding a test or CI step to validate it against a sample chart.
curl -LO https://repo1.dso.mil/big-bang/apps/library-charts/gluon/-/raw/$branch/docs/README.md.gotmpl

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Andrew Shoell <mrlunchbox777@gmail.com>
@github-actions
Copy link

Merging this branch changes the coverage (1 decrease, 4 increase)

Impacted Packages Coverage Δ 🤖
github.com/mrlunchbox777/basic-setup/bsctl 86.21% (+86.21%) 🌟
github.com/mrlunchbox777/basic-setup/bsctl/cmd 100.00% (+2.78%) 👍
github.com/mrlunchbox777/basic-setup/bsctl/cmd/basic_setup 100.00% (+22.22%) 🌟
github.com/mrlunchbox777/basic-setup/bsctl/static 100.00% (ø)
github.com/mrlunchbox777/basic-setup/bsctl/util 100.00% (+92.31%) 🌟
github.com/mrlunchbox777/basic-setup/bsctl/util/config 93.02% (-6.98%) 👎
github.com/mrlunchbox777/basic-setup/bsctl/util/config/schemas 100.00% (ø)
github.com/mrlunchbox777/basic-setup/bsctl/util/k8s 100.00% (ø)
github.com/mrlunchbox777/basic-setup/bsctl/util/test 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/mrlunchbox777/basic-setup/bsctl/cmd/basic_setup/add_general_rc.go 100.00% (+50.00%) 5 (+1) 5 (+3) 0 (-2) 🌟
github.com/mrlunchbox777/basic-setup/bsctl/cmd/basic_setup/root.go 100.00% (ø) 6 (+1) 6 (+1) 0
github.com/mrlunchbox777/basic-setup/bsctl/cmd/cmd.go 100.00% (ø) 19 19 0
github.com/mrlunchbox777/basic-setup/bsctl/cmd/completion.go 100.00% (ø) 10 (+1) 10 (+1) 0
github.com/mrlunchbox777/basic-setup/bsctl/cmd/version.go 100.00% (+12.50%) 9 (+1) 9 (+2) 0 (-1) 🎉
github.com/mrlunchbox777/basic-setup/bsctl/main.go 86.21% (+86.21%) 29 (+3) 25 (+25) 4 (-22) 🌟
github.com/mrlunchbox777/basic-setup/bsctl/static/constants.go 100.00% (ø) 11 (+2) 11 (+2) 0
github.com/mrlunchbox777/basic-setup/bsctl/util/config/client.go 100.00% (ø) 7 7 0
github.com/mrlunchbox777/basic-setup/bsctl/util/config/client_functions.go 91.43% (-8.57%) 35 (+8) 32 (+5) 3 (+3) 👎
github.com/mrlunchbox777/basic-setup/bsctl/util/config/client_getter.go 100.00% (ø) 1 1 0
github.com/mrlunchbox777/basic-setup/bsctl/util/config/schemas/example_configuration.go 100.00% (ø) 8 (+2) 8 (+2) 0
github.com/mrlunchbox777/basic-setup/bsctl/util/config/schemas/global_configuration.go 100.00% (ø) 9 (-1) 9 (-1) 0
github.com/mrlunchbox777/basic-setup/bsctl/util/factory.go 100.00% (+92.31%) 15 (+2) 15 (+14) 0 (-12) 🌟
github.com/mrlunchbox777/basic-setup/bsctl/util/k8s/io_streams.go 100.00% (+100.00%) 4 (+4) 4 (+4) 0 🌟
github.com/mrlunchbox777/basic-setup/bsctl/util/k8s/io_streams_and_stores.go 100.00% (+100.00%) 6 (+6) 6 (+6) 0 🌟
github.com/mrlunchbox777/basic-setup/bsctl/util/k8s/io_streams_getter.go 100.00% (+100.00%) 12 (+12) 12 (+12) 0 🌟
github.com/mrlunchbox777/basic-setup/bsctl/util/k8s/io_streams_store.go 100.00% (+100.00%) 1 (+1) 1 (+1) 0 🌟
github.com/mrlunchbox777/basic-setup/bsctl/util/k8s/io_streams_tees.go 100.00% (+100.00%) 28 (+28) 28 (+28) 0 🌟
github.com/mrlunchbox777/basic-setup/bsctl/util/k8s/iostreams.go 0.00% (-100.00%) 0 (-2) 0 (-2) 0 💀 💀 💀 💀 💀
github.com/mrlunchbox777/basic-setup/bsctl/util/test/fake_factory.go 0.00% (ø) 27 (+2) 0 27 (+2)

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/mrlunchbox777/basic-setup/bsctl/cmd/basic_setup/add_general_rc_test.go
  • github.com/mrlunchbox777/basic-setup/bsctl/cmd/basic_setup/root_test.go
  • github.com/mrlunchbox777/basic-setup/bsctl/cmd/cmd_test.go
  • github.com/mrlunchbox777/basic-setup/bsctl/cmd/completion_test.go
  • github.com/mrlunchbox777/basic-setup/bsctl/cmd/version_test.go
  • github.com/mrlunchbox777/basic-setup/bsctl/main_test.go
  • github.com/mrlunchbox777/basic-setup/bsctl/static/constants_test.go
  • github.com/mrlunchbox777/basic-setup/bsctl/util/config/client_functions_test.go
  • github.com/mrlunchbox777/basic-setup/bsctl/util/config/client_getter_test.go
  • github.com/mrlunchbox777/basic-setup/bsctl/util/config/client_test.go
  • github.com/mrlunchbox777/basic-setup/bsctl/util/config/schemas/global_configuration_test.go
  • github.com/mrlunchbox777/basic-setup/bsctl/util/factory_test.go
  • github.com/mrlunchbox777/basic-setup/bsctl/util/k8s/io_streams_and_stores_test.go
  • github.com/mrlunchbox777/basic-setup/bsctl/util/k8s/io_streams_getter_test.go
  • github.com/mrlunchbox777/basic-setup/bsctl/util/k8s/io_streams_store_test.go
  • github.com/mrlunchbox777/basic-setup/bsctl/util/k8s/io_streams_tees_test.go
  • github.com/mrlunchbox777/basic-setup/bsctl/util/k8s/io_streams_test.go
  • github.com/mrlunchbox777/basic-setup/bsctl/util/k8s/iostreams_test.go

@mrlunchbox777
Copy link
Owner Author

looks like there are a few branches in github.com/mrlunchbox777/basic-setup/bsctl/util/config that need to be covered to finish this

…mrlunchbox777/basic-setup into 180-feature-move-more-scripts-to-golang
@github-actions github-actions bot added the changes/submodule Submodule file changes label Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changes/documentation Documentation file changes changes/meta .github file changes changes/root Root file changes changes/source Source file changes changes/submodule Submodule file changes kind/feature New feature or request priority/3 Medium priority size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature: Move more scripts to golang

2 participants