Skip to content
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

Remove unnecessary variables from Makefiles #20620

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

kariya-mitsuru
Copy link
Contributor

Comprehensive Summary of your change

  1. Makefile

    • Remove -e option since it is unnecessary when passing variables as command line arguments to make -f make/photon/Makefile. (The -e option is used to override variables defined in the Makefile with environment variables.)

    • Remove DEVFLAG and REGISTRYVERSION from make -f make/photon/Makefile command line arguments since they are unused in make/photon/Makefile.

    • Add TRIVYFLAG to make -f make/photon/Makefile command line argument since it is used in make/photon/Makefile. Strictly speaking, this argument is unnecessary, but it is better to have it to explicitly indicate that make/photon/Makefile also uses this variable.

    • Remove the variable definitions since the following variables are unused.

      • CONFIGPATH
      • CORE_PATH
      • DEVFLAG
      • DOCKERFILEPATH_COMMON
      • GOBUILD
      • GOBUILDMAKEPATH_EXPORTER
      • GOBUILDPATH_EXPORTER
      • GOCLEAN
      • GOCMD
      • GODEP
      • GOFMT
      • GOINSTALL
      • GOTEST
      • PORTAL_PATH
      • PREPAREPATH
      • SRCPATH
      • ZIPCMD
  2. make/photon/Makefile

    • Remove the variable definitions since the following variables are unused.

      • CORE_BINARYNAME
      • CORE_SOURCECODE
      • DOCKERFILENAME_POSTGRESQL
      • DOCKERFILEPATH_POSTGRESQL
      • DOCKERIMAGENAME_POSTGRESQL
      • DOCKERIMAGES
      • JOBSERVICEBINARYNAME
      • JOBSERVICESOURCECODE
      • POSTGRESQL
      • SEDCMD
      • SRCPATH
      • TOOLSPATH
      • WGET
    • Remove the variable definitions since the following variables are specified as command line arguments when executed from Makefile.

      • BASEIMAGENAMESPACE
      • IMAGENAMESPACE

Issue being fixed

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

1. Makefile

   - Remove -e option since it is unnecessary when passing variables as
     command line arguments to `make -f make/photon/Makefile`.
     (The -e option is used to override variables defined in the Makefile
     with environment variables.)

   - Remove DEVFLAG and REGISTRYVERSION from `make -f make/photon/Makefile`
     command line arguments since they are unused in make/photon/Makefile.

   - Add TRIVYFLAG to `make -f make/photon/Makefile` command line argument
     since it is used in make/photon/Makefile.
     Strictly speaking, this argument is unnecessary, but it is better to
     have it to explicitly indicate that make/photon/Makefile also uses
     this variable.

   - Remove the variable definitions since the following variables are unused.

     - CONFIGPATH
     - CORE_PATH
     - DEVFLAG
     - DOCKERFILEPATH_COMMON
     - GOBUILD
     - GOBUILDMAKEPATH_EXPORTER
     - GOBUILDPATH_EXPORTER
     - GOCLEAN
     - GOCMD
     - GODEP
     - GOFMT
     - GOINSTALL
     - GOTEST
     - PORTAL_PATH
     - PREPAREPATH
     - SRCPATH
     - ZIPCMD

2. make/photon/Makefile

   - Remove the variable definitions since the following variables are unused.

     - CORE_BINARYNAME
     - CORE_SOURCECODE
     - DOCKERFILENAME_POSTGRESQL
     - DOCKERFILEPATH_POSTGRESQL
     - DOCKERIMAGENAME_POSTGRESQL
     - DOCKERIMAGES
     - JOBSERVICEBINARYNAME
     - JOBSERVICESOURCECODE
     - POSTGRESQL
     - SEDCMD
     - SRCPATH
     - TOOLSPATH
     - WGET

   - Remove the variable definitions since the following variables are
     specified as command line arguments when executed from Makefile.

     - BASEIMAGENAMESPACE
     - IMAGENAMESPACE

Signed-off-by: Mitsuru Kariya <mitsuru.kariya@nttdata.com>
Copy link

codecov bot commented Jun 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.16%. Comparing base (c8c11b4) to head (aa6a0e2).
Report is 285 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #20620       +/-   ##
===========================================
+ Coverage   45.36%   66.16%   +20.80%     
===========================================
  Files         244     1048      +804     
  Lines       13333   114471   +101138     
  Branches     2719     2856      +137     
===========================================
+ Hits         6049    75745    +69696     
- Misses       6983    34580    +27597     
- Partials      301     4146     +3845     
Flag Coverage Δ
unittests 66.16% <ø> (+20.80%) ⬆️

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

see 1287 files with indirect coverage changes

Fix make argument to be executed in the recipe for build_standalone_db_migrator.

Signed-off-by: Mitsuru Kariya <mitsuru.kariya@nttdata.com>
@kariya-mitsuru
Copy link
Contributor Author

Sorry, I realized I forgot to fix build_standalone_db_migrator target, so I fixed it and pushed.

@@ -21,20 +17,11 @@ DOCKERCMD=$(shell which docker)
DOCKERBUILD=$(DOCKERCMD) build --no-cache
DOCKERBUILD_WITH_PULL_PARA=$(DOCKERBUILD) --pull=$(PULL_BASE_FROM_DOCKERHUB)
DOCKERRMIMAGE=$(DOCKERCMD) rmi
DOCKERIMAGES=$(DOCKERCMD) images
Copy link
Contributor

Choose a reason for hiding this comment

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

keep them as a default value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants