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

Fix TSDB issues on Windows, add CI #6547

Merged
merged 1 commit into from Jan 4, 2020
Merged

Fix TSDB issues on Windows, add CI #6547

merged 1 commit into from Jan 4, 2020

Conversation

brian-brazil
Copy link
Contributor

No description provided.

@brian-brazil brian-brazil force-pushed the tsdb-win branch 2 times, most recently from a752834 to 5d8c230 Compare January 3, 2020 11:00
@roidelapluie
Copy link
Member

@brian-brazil does this need to be added to github repo config as well?

@brian-brazil
Copy link
Contributor Author

This is me playing around, we don't have the right sort of CircleCI account for it though.

@roidelapluie
Copy link
Member

you need to add it to jobs: as well

@brian-brazil brian-brazil force-pushed the tsdb-win branch 5 times, most recently from 120df37 to ab5e7ad Compare January 3, 2020 11:19
steps:
- checkout
- run:
- command: go test ./...
Copy link
Member

Choose a reason for hiding this comment

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

shell: bash.exe

working_directory: /go/src/github.com/prometheus/prometheus
steps:
- checkout
- run: go test ./...
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- run: go test ./...
- run:
command: go test ./...
shell: bash.exe

Copy link
Member

Choose a reason for hiding this comment

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

mmh it works with powershell apparently.

@brian-brazil brian-brazil force-pushed the tsdb-win branch 6 times, most recently from 4c3a6b5 to 175c440 Compare January 3, 2020 11:49
@@ -720,6 +720,7 @@ func (w *Writer) writePostingsOffsetTable() error {
}

// Cleanup temporary file.
f.Close() // Needed for Windows.
Copy link
Member

Choose a reason for hiding this comment

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

Just curious.. why? (:

Copy link
Member

@bwplotka bwplotka Jan 3, 2020

Choose a reason for hiding this comment

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

👍

f is mmap of fP0 so it's important to close this handler. I would say it's sane for non windows as well (: so maybe commnet not needed?

Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Nice!

@brian-brazil brian-brazil force-pushed the tsdb-win branch 9 times, most recently from 2ecdd3a to c16d52b Compare January 3, 2020 12:58
@brian-brazil brian-brazil force-pushed the tsdb-win branch 5 times, most recently from 4922615 to ffdd974 Compare January 3, 2020 13:24
if err := w.ensureStage(idxStageDone); err != nil {
return err
}
// Even if this failes, we need to close all the files.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Even if this failes, we need to close all the files.
// Even if this fails, we need to close all the files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@brian-brazil brian-brazil force-pushed the tsdb-win branch 2 times, most recently from 8f75c50 to 11fe8cf Compare January 3, 2020 13:30
@brian-brazil brian-brazil changed the title WIP - Windows CI Fix TSDB issues on Windows, add CI Jan 3, 2020
@brian-brazil
Copy link
Contributor Author

@simonpasquier @SuperQ This is touching CI, so one of ye should have a look at that bit. I did just enough to get it working.

@brian-brazil brian-brazil force-pushed the tsdb-win branch 6 times, most recently from 6b82eae to 9e474db Compare January 3, 2020 15:16
@brian-brazil
Copy link
Contributor Author

This is ready for review.

Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@@ -720,6 +724,8 @@ func (w *Writer) writePostingsOffsetTable() error {
}

// Cleanup temporary file.
f.Close() // Needed for Windows.
Copy link
Member

Choose a reason for hiding this comment

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

Do we care about errors on close? (I know we used to not care) 🤔 should we log at least? It's a pretty unlikely error and not related to the bug we fix here, so not really necessary for this PR.

FYI we have this helper on Thanos: https://github.com/thanos-io/thanos/blob/865d5ec710b5651ead08a7dc73864a6f5dbeeaa9/pkg/runutil/runutil.go#L119

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't generally care, but I've returned it on the happy path here just in case.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

Add back Windows CI, we lost it when tsdb was merged into the prometheus
repo. There's many tests failing outside tsdb, so only test tsdb for
now.

Fixes #6513

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
@brian-brazil brian-brazil merged commit 536d416 into master Jan 4, 2020
@brian-brazil brian-brazil deleted the tsdb-win branch January 4, 2020 14:55
bwplotka pushed a commit that referenced this pull request Jan 6, 2020
Add back Windows CI, we lost it when tsdb was merged into the prometheus
repo. There's many tests failing outside tsdb, so only test tsdb for
now.

Fixes #6513

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
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.

None yet

3 participants