Skip to content

S fairchild/aro 25143#4680

Open
s-fairchild wants to merge 6 commits intomasterfrom
s-fairchild/ARO-25143
Open

S fairchild/aro 25143#4680
s-fairchild wants to merge 6 commits intomasterfrom
s-fairchild/ARO-25143

Conversation

@s-fairchild
Copy link
Collaborator

@s-fairchild s-fairchild commented Mar 11, 2026

Which issue this PR addresses:

Fixes
https://issues.redhat.com/browse/ARO-25143
https://issues.redhat.com/browse/ARO-25110

Related to https://issues.redhat.com/browse/ARO-24815#

The fixes to hive-generate-config.sh technically block me from deploying a full service dev rp. Although it's easily fixed by using this branch locally before merging.

What this PR does / why we need it:

  1. yq appears to have remove the -y option in it's latest release.
    • This pull request is primarily to fix this, allowing the Hive development config to be built and deployed to development aks clusters.
  2. Correct a broken source path for hack/util.sh
  3. Separate functions that should be shared into hack/util.sh
  4. Add additional logging utilities
    • Log messages can now be emitted by setting LOG_LEVEL (defaults to info)
    • Everything <= LOG_LEVEL will be logged
    • Add log level colors
    • Add iso-8601 timestamps to log messages
    • Change DEBUG to XTRACE to avoid confusing LOG_LEVEL_DEBUG with set -xtrace
  5. General dev environment documentation improvements
    • I split up much of the prerequisite actions as the main document was getting very cluttered
    • Created a bash helpers doc folder with items related to setup

Test plan for issue:

Manually tested passing and failing conditions in my local dev environment.

Here are some examples of how the logging utility updates can be used:

# Default hive commit hash is used, LOG_LEVEL defaults to LOG_LEVEL_INFO
hack/hive/hive-generate-config.sh

# Provide your own hive commit hash
# Use image tags from https://quay.io/repository/app-sre/hive?tab=tags
hack/hive/hive-generate-config.sh 77a42df421

# Sets `set -o xtrace`
XTRACE=true hack/hive/hive-generate-config.sh

# Reduce log verbosity by setting LOG_LEVEL to LOG_LEVEL_CRIT (only fatal will log)
LOG_LEVEL=2 hack/hive/hive-generate-config.sh

# Same as above but restrict log verbosity. Useful for debugging.
LOG_LEVEL=2 XTRACE=true hack/hive/hive-generate-config.sh 

# Reduce verbosity by setting LOG_LEVEL=LOG_LEVEL_WARN
LOG_LEVEL=4 hack/hive/hive-generate-config.sh

Is there any documentation that needs to be updated for this PR?

There should be a document added to docs/dev-environment detailing how to use hack/util.sh log functions. I'd prefer to do this in a follow up PR.

How do you know this will function as expected in production?

N/A dev environments only

Add optional information on how to install Go via gvm
Add variable to reference golint version to be installed
  * This prevents us from hardcoding a version in the setup doc.
Add makefile.md documentation
  * Seperating this simplifies our primary dev-env-setup document.
Add bash environment helpers documentation
Update dev-setup docs relocating Debian and Mac OS dependencies
  * They should be grouped under all OS specific dependencies to be installed.
Fix formatting issues
…local rp development

The primary setup document was getting very cluttered. This helps it to be more easily read and understood.
Simplifies running yq in a container.
It seems that -y is no longer accepted by yq.

Cleaned up scripts by moving some functions into hack/util.sh
Fixed sourcing path

Remove unnecessary variable name references
    * A name ref for the image variable caused an interesting problem when running yq as a container. yq image assignment was attempting to overwrite hive_image. Passing the variable as a value mitigated this.
Copy link
Collaborator

@shubhadapaithankar shubhadapaithankar left a comment

Choose a reason for hiding this comment

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

LGTM

@s-fairchild s-fairchild force-pushed the s-fairchild/ARO-25143 branch from 1e094d3 to 3342ea3 Compare March 12, 2026 22:09
@s-fairchild s-fairchild removed the size-small Size small label Mar 12, 2026
@s-fairchild s-fairchild force-pushed the s-fairchild/ARO-25143 branch 2 times, most recently from 302720b to 6263ea9 Compare March 13, 2026 14:14
* Add additional bash script logging utilities
* Update default hive hash to latest
* Update hive-dev-install.sh
    * Simplify
    * Create hive secret completely in memory to remove writing of
      temporary pull secret to filesystem

* Check if util.sh has been already been sourced before attempting to source it.
    * Prevents failures caused by re-assigning readonly variables.

Correct Hive repository url
Update default hive image tag to use full commits (as used in the new
repo)
@s-fairchild s-fairchild force-pushed the s-fairchild/ARO-25143 branch from 6263ea9 to b613acb Compare March 13, 2026 14:15
Bash uses spaces for indentation. Tabs were erroneously added.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation loki

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants