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

adding .dockerignore file to fix git submodule builds #3689

Merged
merged 3 commits into from
Nov 21, 2022

Conversation

jrynkiew
Copy link
Contributor

@jrynkiew jrynkiew commented Nov 7, 2022

Description

The issue occurs when iotex-core is used as a submodule of a project. The Dockerfile copies the entire contents of the iotex-core folder into itself, but if it is added as a submodule, the parent of the git repository is incorrectly determined. If this fix is not applied, the following error occurs.

[build 8/8] RUN mkdir -p /go/pkg/linux_amd64/github.com/iotexproject/ && make clean build-all:
#0 0.681 error obtaining VCS status: exit status 128
#0 0.681 Use -buildvcs=false to disable VCS stamping.
#0 0.681 error obtaining VCS status: exit status 128
#0 0.681 Use -buildvcs=false to disable VCS stamping.
#0 0.681 error obtaining VCS status: exit status 128
#0 0.681 Use -buildvcs=false to disable VCS stamping.
#0 0.681 error obtaining VCS status: exit status 128
#0 0.681 Use -buildvcs=false to disable VCS stamping.
#0 0.681 error obtaining VCS status: exit status 128
#0 0.681 Use -buildvcs=false to disable VCS stamping.
#0 0.681 error obtaining VCS status: exit status 128
#0 0.681 Use -buildvcs=false to disable VCS stamping.
#0 0.681 error obtaining VCS status: exit status 128
#0 0.681 Use -buildvcs=false to disable VCS stamping.
#0 0.681 error obtaining VCS status: exit status 128
#0 0.681 Use -buildvcs=false to disable VCS stamping.
#0 0.681 error obtaining VCS status: exit status 128
#0 0.681 Use -buildvcs=false to disable VCS stamping.
#0 0.681 error obtaining VCS status: exit status 128
#0 0.681 Use -buildvcs=false to disable VCS stamping.
#0 0.681 error obtaining VCS status: exit status 128
#0 0.681 Use -buildvcs=false to disable VCS stamping.
#0 0.681 error obtaining VCS status: exit status 128
#0 0.681 Use -buildvcs=false to disable VCS stamping.
#0 0.681 error obtaining VCS status: exit status 128
#0 0.681 Use -buildvcs=false to disable VCS stamping.
#0 0.681 error obtaining VCS status: exit status 128
#0 0.681 Use -buildvcs=false to disable VCS stamping.
#0 0.681 error obtaining VCS status: exit status 128
#0 0.681 Use -buildvcs=false to disable VCS stamping.
#0 0.681 error obtaining VCS status: exit status 128
#0 0.681 Use -buildvcs=false to disable VCS stamping.
#0 0.999 error obtaining VCS status: exit status 128
#0 0.999 Use -buildvcs=false to disable VCS stamping.
#0 0.999 error obtaining VCS status: exit status 128
#0 0.999 Use -buildvcs=false to disable VCS stamping.
#0 0.999 error obtaining VCS status: exit status 128
#0 0.999 Use -buildvcs=false to disable VCS stamping.
#0 0.999 error obtaining VCS status: exit status 128
#0 0.999 Use -buildvcs=false to disable VCS stamping.
#0 0.999 error obtaining VCS status: exit status 128
#0 0.999 Use -buildvcs=false to disable VCS stamping.
#0 0.999 error obtaining VCS status: exit status 128
#0 0.999 Use -buildvcs=false to disable VCS stamping.
#0 0.999 error obtaining VCS status: exit status 128
#0 0.999 Use -buildvcs=false to disable VCS stamping.
#0 0.999 error obtaining VCS status: exit status 128
#0 0.999 Use -buildvcs=false to disable VCS stamping.
#0 0.999 error obtaining VCS status: exit status 128
#0 0.999 Use -buildvcs=false to disable VCS stamping.
#0 0.999 error obtaining VCS status: exit status 128
#0 0.999 Use -buildvcs=false to disable VCS stamping.
#0 0.999 error obtaining VCS status: exit status 128
#0 0.999 Use -buildvcs=false to disable VCS stamping.
#0 0.999 error obtaining VCS status: exit status 128
#0 0.999 Use -buildvcs=false to disable VCS stamping.
#0 0.999 error obtaining VCS status: exit status 128
#0 0.999 Use -buildvcs=false to disable VCS stamping.
#0 0.999 error obtaining VCS status: exit status 128
#0 0.999 Use -buildvcs=false to disable VCS stamping.
#0 0.999 error obtaining VCS status: exit status 128
#0 0.999 Use -buildvcs=false to disable VCS stamping.
#0 0.999 error obtaining VCS status: exit status 128
#0 0.999 Use -buildvcs=false to disable VCS stamping.
#0 1.001 fatal: not a git repository: /go/apps/iotex-core/../../.git/modules/external/iotex-core
#0 1.002 fatal: not a git repository: /go/apps/iotex-core/../../.git/modules/external/iotex-core
#0 1.002 fatal: not a git repository: /go/apps/iotex-core/../../.git/modules/external/iotex-core
#0 1.007 Cleaning...
#0 1.021 go build -ldflags "-X 'github.com/iotexproject/iotex-core/pkg/version.PackageVersion=' -X 'github.com/iotexproject/iotex-core/pkg/version.PackageCommitID=' -X 'github.com/iotexproject/iotex-core/pkg/version.GitStatus="clean"' -X 'github.com/iotexproject/iotex-core/pkg/version.GoVersion=go version go1.18.5 linux/amd64' -X 'github.com/iotexproject/iotex-core/pkg/version.BuildTime=2022-11-06-UTC/18:41:39' -s -w" -o ./bin/ioctl -v ./tools/ioctl
#0 1.202 # cd /go/apps/iotex-core; git status --porcelain
#0 1.202 fatal: not a git repository: /go/apps/iotex-core/../../.git/modules/external/iotex-core
#0 1.202 error obtaining VCS status: exit status 128
#0 1.202 Use -buildvcs=false to disable VCS stamping.
#0 1.204 make: *** [Makefile:233: ioctl] Error 1

failed to solve: executor failed running [/bin/sh -c mkdir -p $GOPATH/pkg/linux_amd64/github.com/iotexproject/ && make clean build-all]: exit code: 2

Fixes #(issue)

Type of change

Please delete options that are not relevant.

  • [] New feature (non-breaking change which adds functionality)

Adds functionality of allowing to use iotex-core as a submodule

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [] make test

Test Configuration:
System Information for: JEREMI
Manufacturer: Micro-Star International Co., Ltd.
Model: MS-7C31
CPU: Intel(R) Core(TM) i7-9700F CPU @ 3.00GHz
HDD Capacity: 310.31GB
HDD Space: 32.91% Free (102.11GB)
RAM: 15.94GB
Operating System: Microsoft Windows 11 Home, Service Pack: 0

running in WSL2 Ubuntu

Checklist:

  • [] My code follows the style guidelines of this project
  • [] I have performed a self-review of my code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes
  • [] Any dependent changes have been merged and published in downstream modules

@jrynkiew jrynkiew requested a review from a team as a code owner November 7, 2022 21:34
@guo guo assigned guo and unassigned guo Nov 7, 2022
.dockerignore Outdated
@@ -0,0 +1 @@
.git/
Copy link
Member

Choose a reason for hiding this comment

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

add a new line

.dockerignore Outdated
@@ -0,0 +1 @@
.git/
Copy link
Member

Choose a reason for hiding this comment

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

.git/ or .git?

@codecov
Copy link

codecov bot commented Nov 16, 2022

Codecov Report

Merging #3689 (86ad2aa) into master (263ff82) will decrease coverage by 0.77%.
The diff coverage is 88.80%.

@@            Coverage Diff             @@
##           master    #3689      +/-   ##
==========================================
- Coverage   74.47%   73.69%   -0.78%     
==========================================
  Files         269      276       +7     
  Lines       23925    24130     +205     
==========================================
- Hits        17818    17783      -35     
- Misses       5174     5440     +266     
+ Partials      933      907      -26     
Impacted Files Coverage Δ
action/protocol/staking/candidate_statereader.go 53.94% <ø> (-3.38%) ⬇️
db/db_bolt.go 68.53% <0.00%> (-3.60%) ⬇️
ioctl/newcmd/action/actiontransfer.go 100.00% <ø> (ø)
ioctl/newcmd/action/stake2withdraw.go 95.74% <ø> (ø)
ioctl/newcmd/action/xrc20transferfrom.go 100.00% <ø> (ø)
ioctl/newcmd/did/didgethash.go 100.00% <ø> (ø)
ioctl/newcmd/did/didgeturi.go 100.00% <ø> (ø)
server/itx/server.go 62.20% <ø> (+2.20%) ⬆️
action/protocol/staking/handlers.go 74.47% <33.33%> (-0.64%) ⬇️
ioctl/newcmd/did/didgenerate.go 83.67% <83.67%> (ø)
... and 17 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sonarcloud
Copy link

sonarcloud bot commented Nov 20, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@Liuhaai Liuhaai merged commit c14dcca into iotexproject:master Nov 21, 2022
dustinxie added a commit that referenced this pull request Jan 4, 2023
dustinxie pushed a commit to dustinxie/iotex-core that referenced this pull request Jan 4, 2023
dustinxie added a commit that referenced this pull request Jan 5, 2023
#3750)

This reverts commit c14dcca.

Co-authored-by: Jeremi [IoTeX] Rynkiewicz JRPC <63042547+jrynkiew@users.noreply.github.com>
envestcc added a commit that referenced this pull request Jan 12, 2023
* move IsValidCandidateName to action package (#3706)

* move IsValidCandidateName to action package

* move IsValidCandidateName to action package

* delete validations.go

* update tests

* delete ErrInvalidAmount in staking

* Remove stale comment "This is an alpha release and is not ...." in all files (#3713)

* remove stale comment

* remove stale comment

* remove nonce field (#3714)

Co-authored-by: dustinxie <dahuaxie@gmail.com>

* [evm] proper handle refundSnapshot and upgrade go-ethereum release (#3715)

* [ioctl] modify did command parameters (#3668)

* modify action.Read default parameters

* use constant

* use config.GasStation instead of config.API #3718 (#3721)

Co-authored-by: dustinxie <dahuaxie@gmail.com>

* [genesis] set Okhotsk to activate at 01-11-2023 12am UTC (#3720)

* [tests] add more cases for gas refund (#3707)

* add more cases for gas refund

* remove debug flag

Co-authored-by: dustinxie <dahuaxie@gmail.com>

* [api] web3 rewarding action (#3691)

* add rewarding execute action

* add rewarding execute test

* add commmet for public type

* add builder test

* complete web3 rewarding read

* complete web3 rewarding read test

* remove read api and receive create rewarding action enterance

* add test to rlp tx test

* change name

* revert fix amount bug for deposit cost bug

* change check error style

* add entrance for web3 rewarding

Co-authored-by: dustinxie <dahuaxie@gmail.com>

* update mockgen (#3733)

* [ioctl] use candidate.OperatorAddress to show probated delegates (#3727)

Co-authored-by: dustinxie <dahuaxie@gmail.com>

* [config] move config.Consensus to consensus package (#3735)

* [action] validate candidate name  (#3705)

* Update release.yaml

* [config] move config.Blocksync to blocksync package (#3736)

* move config.BlockSync to blocksync package

* remove def of BlockSync in config

* rename newBlockSyncer to newBlockSyncerForTest

* [ioctl] Build contract deploy command line into new ioctl (#3708)

* [ioctl] build contract deploy command line into new ioctl

* build unittest to cover the modification1~

* group iotex-core packages

* remove stale comments

Co-authored-by: huofei <68298506@qq.com>

* [ioctl] Build contract invoke command line into new ioctl (#3709)

* [ioctl] build contract invoke command line into new ioctl

* build unittest to cover the modification1~

* remove stale comments

Co-authored-by: huofei <68298506@qq.com>

* [github] Update codeowner (#3742)

* [ioctl] Build contract compile command line into new ioctl (#3676)

* [ioctl] build contract compile command line into new ioctl

Co-authored-by: huof6890 <68298506@qq.com>

* [config] move config.API to api package (#3739)

* move config.GasStation to gasstation package

* move config.API to api package

* make fields of testConfig  to be private

Co-authored-by: CoderZhi <thecoderzhi@gmail.com>

* complete web3 intergrity test (#3743)

* complete tests

* complete requires

* format

* init monitor message framework

* [ioctl/newcmd] fix node delegate run failed  (#3729)

* fix grpc error and show right datas

* check chainMeta.Epoch

* modify as currEpochNum

* init broadcast framework

* update broadcast framework

* update broadcast framework

* [ioctl] Build contract test bytecode command line into new ioctl (#3738)

* [ioctl] build contract test bytecode command line into new ioctl

* build unittest to cover the modification

* format

Co-authored-by: huofei <68298506@qq.com>

* [ioctl] Build contract prepare command line into new ioctl (#3737)

* [ioctl] build contract prepare command line into new ioctl

* build unittest to cover the modification

* fix commit

* update assert message

* update solc version

* update solc message version

* format

* brew install solidity

Co-authored-by: huofei <68298506@qq.com>

* add node package to handle node info manager

* update

* Update release.yaml

* Revert "adding .dockerignore file to fix git submodule builds (#3689)" (#3750)

This reverts commit c14dcca.

Co-authored-by: Jeremi [IoTeX] Rynkiewicz JRPC <63042547+jrynkiew@users.noreply.github.com>

* update docker build command (#3751)

* [actpool] Improve actqueue efficiency (#3377)

* opt actpool.Add()

* improve actqueue efficiency

* add node info request and response message

* remove delegate manager dependency

* add message sign

* add sign for node info message

* fix unittest error

* Update CODEOWNERS (#3754)

* [rewarding] add active web3 rewarding settings (#3740)

* add active web3 rewarding settings

* check active when encoding is web3

* check active with deposit action

* remove check logic to workingset

* add check in API module

* fix check validte web3 rewarding bug

Co-authored-by: Haaai <55118568+Liuhaai@users.noreply.github.com>

* add unittest for node

* add pubkey in nodeinfo message

* fix compile error

* update go.mod

Co-authored-by: millken <millken@gmail.com>
Co-authored-by: huofei <68298506@qq.com>
Co-authored-by: dustinxie <dahuaxie@gmail.com>
Co-authored-by: Xueping Yang <xueping.yang@gmail.com>
Co-authored-by: xianhuawei <258022429@qq.com>
Co-authored-by: Jeremy Chou <lucky90322@gmail.com>
Co-authored-by: Haaai <55118568+Liuhaai@users.noreply.github.com>
Co-authored-by: CoderZhi <thecoderzhi@gmail.com>
Co-authored-by: Jeremi [IoTeX] Rynkiewicz JRPC <63042547+jrynkiew@users.noreply.github.com>
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