Skip to content

NETOBSERV-1578 Fix bash issues on macos#150

Merged
jpinsonneau merged 2 commits intonetobserv:mainfrom
jpinsonneau:bash_fix
Jan 23, 2025
Merged

NETOBSERV-1578 Fix bash issues on macos#150
jpinsonneau merged 2 commits intonetobserv:mainfrom
jpinsonneau:bash_fix

Conversation

@jpinsonneau
Copy link
Member

@jpinsonneau jpinsonneau commented Jan 16, 2025

Description

  • use #!/usr/bin/env bash on scripts
  • require bash >= 4.2.0

Dependencies

n/a

Checklist

If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.

  • Is this PR backed with a JIRA ticket? If so, make sure it is written as a title prefix (in general, PRs affecting the NetObserv/Network Observability product should be backed with a JIRA ticket - especially if they bring user facing changes).
  • Does this PR require product documentation?
    • If so, make sure the JIRA epic is labelled with "documentation" and provides a description relevant for doc writers, such as use cases or scenarios. Any required step to activate or configure the feature should be documented there, such as new CRD knobs.
  • Does this PR require a product release notes entry?
    • If so, fill in "Release Note Text" in the JIRA.
  • Is there anything else the QE team should know before testing? E.g: configuration changes, environment setup, etc.
    • If so, make sure it is described in the JIRA ticket.
  • QE requirements (check 1 from the list):
    • Standard QE validation, with pre-merge tests unless stated otherwise.
    • Regression tests only (e.g. refactoring with no user-facing change).
    • No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team).

endif

GOLANGCI_LINT_VERSION = v1.61.0
BASH_VERSION = v4.2.0
Copy link
Member

Choose a reason for hiding this comment

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

@jpinsonneau - just to confirm, this has to be 4.2 or some other version? I just suggested from vague memory :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Associative array been introduced in bash 4.0 alpha but been polished in 4.1 & 4.2 so it's safer to require 4.2 and more I guess.
If you are able to ensure it works on 4.0.0 I can change the value here.

There are still some fixes in the next versions but I feel less important than the firsts. WDYT ?

https://github.com/bminor/bash/blob/master/CHANGES

Copy link
Member

Choose a reason for hiding this comment

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

I am cool with recommending 4.2 then, thanks!

@codecov
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 22.48%. Comparing base (b2b688c) to head (f629eae).
Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #150   +/-   ##
=======================================
  Coverage   22.48%   22.48%           
=======================================
  Files          10       10           
  Lines        1343     1343           
=======================================
  Hits          302      302           
  Misses       1024     1024           
  Partials       17       17           
Flag Coverage Δ
unittests 22.48% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@memodi
Copy link
Member

memodi commented Jan 17, 2025

/label qe-approved

@memodi
Copy link
Member

memodi commented Jan 17, 2025

/ok-to-test

@github-actions
Copy link

New image:
quay.io/netobserv/network-observability-cli:9d99903

It will expire after two weeks.

To use this build, update your commands using:

USER=netobserv VERSION=9d99903 make commands

or download the updated commands.

@openshift-ci
Copy link

openshift-ci bot commented Jan 23, 2025

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jpinsonneau jpinsonneau merged commit b39d101 into netobserv:main Jan 23, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants