Skip to content

Commit

Permalink
Merge branch 'devel' into AAP-35905
Browse files Browse the repository at this point in the history
  • Loading branch information
matoval authored Nov 21, 2024
2 parents 17b96a1 + 3d98c01 commit 9200956
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_binary_from_ref.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.20"
go-version: "1.22"

- name: build-all target
run: make receptor
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage_reporting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on: # yamllint disable-line rule:truthy
branches: [devel]

env:
DESIRED_GO_VERSION: '1.20'
DESIRED_GO_VERSION: '1.22'

jobs:
go_test_coverage:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.20"
go-version: "1.22"

- name: Build packages
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: # yamllint disable-line rule:truthy
pull_request: # yamllint disable-line rule:empty-values

env:
DESIRED_GO_VERSION: '1.20'
DESIRED_GO_VERSION: '1.22'
DESIRED_GOLANGCI_LINT_VERSION: 'v1.60'
DESIRED_PYTHON_VERSION: '3.12'

Expand Down Expand Up @@ -34,7 +34,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: ["1.20", "1.21"]
go-version: ["1.22"]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
python-version: ${{ matrix.python-version }}
session: tests-${{ matrix.python-version }}
download-receptor: true
go-version: '1.20'
go-version: '1.22'

lint-receptorctl:
name: Lint receptorctl${{ '' }} # Nest jobs under the same sidebar category
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-reporting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on: # yamllint disable-line rule:truthy
branches: [devel]

env:
DESIRED_GO_VERSION: '1.20'
DESIRED_GO_VERSION: '1.22'

jobs:
generate_junit_test_report:
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-lts-latest
tools:
golang: "1.21"
golang: "1.22"
python: "3.12"
# You can also specify other tool versions:
# nodejs: "20"
Expand Down
15 changes: 15 additions & 0 deletions docs/source/developer_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@ Receptor is an open source project that lives at `ansible/receptor repository <h

See the :ref:`contributing:contributing` for more general details.

---------
Debugging
---------

^^^^^^^^^^^
Unix Socket
^^^^^^^^^^^
If you don't want to use receptorctl to control nodes, `socat <https://www.redhat.com/en/blog/getting-started-socat>` can be used to interact with unix sockets directly.

Example:

.. code-block:: bash
echo -e '{"command": "work", "subcommand": "submit", "node": "execution", "worktype": "cat", }\n"Hi"' | socat - UNIX-CONNECT:/tmp/control.sock
-------
Linters
-------
Expand Down
2 changes: 1 addition & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Installation guide

Download and extract precompiled binary for your OS and platform from `the releases page on GitHub <https://github.com/ansible/receptor/releases>`_

Alternatively, you can compile Receptor from source code (Golang 1.20+ required)
Alternatively, you can compile Receptor from source code (Golang 1.22+ required)

.. code-block:: bash
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/ansible/receptor

go 1.22.9
go 1.22

require (
github.com/creack/pty v1.1.23
Expand Down
4 changes: 2 additions & 2 deletions packaging/container/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi9/ubi:9.4 AS builder
FROM registry.access.redhat.com/ubi9/ubi:9.5 AS builder
ARG VERSION

RUN dnf -y update && \
Expand All @@ -9,7 +9,7 @@ ADD source.tar.gz /source
WORKDIR /source
RUN make VERSION=${VERSION}

FROM registry.access.redhat.com/ubi9/ubi:9.4
FROM registry.access.redhat.com/ubi9/ubi:9.5
ARG VERSION

LABEL license="ASL2"
Expand Down
12 changes: 7 additions & 5 deletions pkg/workceptor/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,14 +385,16 @@ func (kw *KubeUnit) kubeLoggingWithReconnect(streamWait *sync.WaitGroup, stdout
}

split := strings.SplitN(line, " ", 2)
timeStamp := ParseTime(split[0])
if timeStamp != nil {
if !timeStamp.After(sinceTime) && !successfulWrite {
msg := line
timestamp := ParseTime(split[0])
if timestamp != nil {
kw.GetWorkceptor().nc.GetLogger().Debug("No timestamp received, log line: '%s'", line)
if !timestamp.After(sinceTime) && !successfulWrite {
continue
}
sinceTime = *timeStamp
sinceTime = *timestamp
msg = split[1]
}
msg := split[1]

_, err = stdout.Write([]byte(msg))
if err != nil {
Expand Down

0 comments on commit 9200956

Please sign in to comment.