Skip to content

Fix Unknown build info in CodeFlare operator log #528

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

oksanabaza
Copy link
Contributor

@oksanabaza oksanabaza commented Apr 17, 2024

Issue link

https://issues.redhat.com/browse/RHOAIENG-118

What changes have been made

Fix Unknown build info in CodeFlare operator log

Verification steps

To test this PR you should modify Dockerfile, build your own image and add it to DSC

  1. In the Dockerfile, add the following two lines to retrieve the BUILD_VERSION variable from your Git repository:
COPY .git .git
RUN git config --global --add safe.directory /workspace
  1. build the image using new makefile command: docker build -t quay.io/username/imagename:tag .If running on macOS, use: docker build --platform linux/amd64 -t quay.io/username/imagename:tag

  2. push your docker image to your quay.io account

  3. add your custom image to config/manager/params.env and push your changes to github

  4. Inside your cluster, navigate to 'rhods' under DataScienceCluster. In the YAML file, under spec -> components, add the following devFlag:

 devFlags:
        manifests:
          - contextDir: config
            sourcePath: manifests
            uri: 'https://github.com/username/codeflare-operator/tarball/branch-name
  1. Restart your pod under the codeflare-operator-manager deployment
  2. now, in pod logs, you should be able to see the output of operatorVersion and the build date instead of UNKNOWN values

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

Makefile Outdated
@@ -155,6 +155,15 @@ build: fmt vet ## Build manager binary.
" \
-o bin/manager main.go

.PHONY: docker-build
docker-build: fmt vet ## Build manager binary.
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we rename this directive. This is a little too similar to make image-build which builds the container image and I can see it possibly causing a bit of confusion. Something like go-build-for-image maybe, WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@KPostOffice I agree, I also had doubts about the command name, thanks

Copy link
Collaborator

@KPostOffice KPostOffice left a comment

Choose a reason for hiding this comment

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

Looks good! Just one small nit

Copy link
Contributor

@VanillaSpoon VanillaSpoon left a comment

Choose a reason for hiding this comment

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

lgtm

Thanks for the steps also :)

No longer seeing:

INFO    setup    Build info    {"operatorVersion": "UNKNOWN", "mcadVersion": "UNKNOWN", "instaScaleVersion": "UNKNOWN", "date": "UNKNOWN"}  

We now have:

 INFO    setup    Build info    {"operatorVersion": "1.4.0-62cef7e-dirty", "date": "2024-04-24 15:10"}   

Copy link

openshift-ci bot commented Apr 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: KPostOffice

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

The pull request process is described here

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

@openshift-merge-bot openshift-merge-bot bot merged commit 4606269 into project-codeflare:main Apr 26, 2024
8 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.

3 participants