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

[build/fs] Fix copyAll default atime and mtime #88921

Merged
merged 2 commits into from
Jan 21, 2021
Merged

Conversation

jbudz
Copy link
Member

@jbudz jbudz commented Jan 20, 2021

When copying files during builds we're passing a default of Date.now() (time since epoch in ms) to fs.utimes. fs.utimes expects this argument to be in seconds. This can result in a corrupt timestamp on file access and file modified:

~/Downloads/tmp » tar -xvf kibana-7.11.0-docker-build-context.tar.gz                                                                                                             
Dockerfile                                                                                                                                                                                                         
bin/                                                                                                                                                                                                               
config/                                                                                                                                                                                                            
tar: Archive contains ‘0-250645035 ’ where numeric time_t value expected                                                                                                                                           
bin/kibana-docker                                                                                                                                                                                                  
tar: bin/kibana-docker: implausibly old time stamp 1969-12-31 17:59:59                                                                                                                                             
tar: Archive contains ‘0-250645031 ’ where numeric time_t value expected                                                                                                                                           
config/kibana.yml                                                                                                                                                                                                  
tar: config/kibana.yml: implausibly old time stamp 1969-12-31 17:59:59                                                                                                                                             
tar: Exiting with failure status due to previous errors  

Behavior appears to be inconsistent across build environments. Locally, I'm setting the year to 2446, in contrast to the 7.11.0 BC above with a year of 1969.

@jbudz jbudz added the Team:Operations Team label for Operations Team label Jan 20, 2021
@jbudz jbudz requested a review from a team as a code owner January 20, 2021 23:22
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

src/dev/build/lib/fs.ts Show resolved Hide resolved
@jbudz jbudz added release_note:skip Skip the PR/issue when compiling release notes and removed release_note:fix labels Jan 20, 2021
@wylieconlon wylieconlon added v8.0.0 and removed 8.0.0 labels Jan 20, 2021
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

LGTM

@jbudz jbudz merged commit f6813b8 into elastic:master Jan 21, 2021
@jbudz jbudz deleted the fix/copyAll branch January 21, 2021 16:32
@jbudz
Copy link
Member Author

jbudz commented Jan 21, 2021

7.x: d8ef1b4
7.11: 2d86004
7.10: e433cbf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.10.3 v7.11.0 v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants