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

[content-service] Remove git no-single-branch flag #13053

Merged
merged 4 commits into from Sep 22, 2022
Merged

Conversation

aledbf
Copy link
Member

@aledbf aledbf commented Sep 16, 2022

Description

The flag --no-single-branch was introduced in #6464 in an attempt to use --filter=blob:none (which didn't make it). By checking all the existing branches, even if we use --depth=1

xref: #12682

How to test

  • Open a workspace
  • Trigger a prebuild and open the workspace
  • No git errors should be present}
  • Trigger a prebuild and check there are no issues

Release Notes

NONE

Werft options:

  • /werft with-preview
  • /werft with-integration-tests=workspace
    Valid options are all, workspace, webapp, ide

/hold

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-aledbf-git-nsb.0 because the annotations in the pull request description changed
(with .werft/ from main)

@roboquat roboquat added size/S and removed size/XS labels Sep 18, 2022
@aledbf aledbf marked this pull request as ready for review September 18, 2022 15:42
@aledbf aledbf requested a review from a team September 18, 2022 15:42
@github-actions github-actions bot added the team: workspace Issue belongs to the Workspace team label Sep 18, 2022
@jenting
Copy link
Contributor

jenting commented Sep 18, 2022

If it's not the default branch, manually trigger prebuild failed.

image

Prebuild failed for system reasons. Please contact support. cannot initialize workspace: cannot initialize workspace: git initializer clone: git checkout -B prebuild-without-pvc origin/prebuild-without-pvc failed (exit status 128): fatal: 'origin/prebuild-without-pvc' is not a commit and a branch 'prebuild-wit ...

@kylos101
Copy link
Contributor

Works with multi-repo too 👍

@aledbf
Copy link
Member Author

aledbf commented Sep 19, 2022

/werft run

👍 started the job as gitpod-build-aledbf-git-nsb.5
(with .werft/ from main)

@aledbf aledbf force-pushed the aledbf/git-nsb branch 2 times, most recently from 0ea6af4 to a8ebb28 Compare September 19, 2022 16:14
@aledbf
Copy link
Member Author

aledbf commented Sep 19, 2022

@jenting please check again

@sagor999
Copy link
Contributor

/hold
lets merge this after the new cluster has been deployed 🙏

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-aledbf-git-nsb.12 because the annotations in the pull request description changed
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-aledbf-git-nsb.13 because the annotations in the pull request description changed
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-aledbf-git-nsb.14 because the annotations in the pull request description changed
(with .werft/ from main)

@kylos101
Copy link
Contributor

FYI, for integration tests to run, you may need to rebase with main.

I am guessing you need c524a00

The error is:

[Run integration tests] [test-ws-manager|FAIL] 1
[Run integration tests] [test-workspace] running integration for workspace - log file at /tmp/tmp.q8ghJqttKy/workspace.log
[Run integration tests] [test-workspace] go: conflicting replacements for github.com/seccomp/libseccomp-golang:
[Run integration tests] [test-workspace] 	github.com/gitpod-io/libseccomp-golang@v0.9.2-0.20220701021458-9bf1c833815b
[Run integration tests] [test-workspace] 	github.com/gitpod-io/libseccomp-golang@v0.9.2-0.20220203100026-45179215fdb1
[Run integration tests] [test-workspace] use "go work edit -replace github.com/seccomp/libseccomp-golang=[override]" to resolve

@aledbf
Copy link
Member Author

aledbf commented Sep 19, 2022

FYI, for integration tests to run, you may need to rebase with main.

done

Copy link
Contributor

@jenting jenting left a comment

Choose a reason for hiding this comment

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

Work like a charm

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-aledbf-git-nsb.16 because the annotations in the pull request description changed
(with .werft/ from main)

@@ -186,7 +194,7 @@ func (ws *GitInitializer) realizeCloneTarget(ctx context.Context) (err error) {
}

// checkout specific commit
if err := ws.Git(ctx, "checkout", ws.CloneTarget); err != nil {
if err := ws.Git(ctx, "switch", "-C", ws.CloneTarget); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey @aledbf 👋 ,

question (non-blocking): how come some case statements ☝️ are logging errors and others do not? I ask because I'm not sure why there is variance.

It seems like we may want to log the errors in each case (especially because we're changing from checkout to switch), but I could also be being naive. I haven't opened this to see if the calling function logs the related error.

https://github.com/gitpod-io/gitpod/pull/13053/files#diff-c9626ddd8d63f48f858c8e81807c14008f5c4199bd41ba80a2981401111356f0R186

https://github.com/gitpod-io/gitpod/pull/13053/files#diff-c9626ddd8d63f48f858c8e81807c14008f5c4199bd41ba80a2981401111356f0R193

https://github.com/gitpod-io/gitpod/pull/13053/files#diff-c9626ddd8d63f48f858c8e81807c14008f5c4199bd41ba80a2981401111356f0R198

@kylos101
Copy link
Contributor

test-workspace integration test was failing, but, that was in a prior run when we ran all tests.

I changed the description for this PR, so that we just run workspace tests, being run in: https://werft.gitpod-dev.com/job/gitpod-build-aledbf-git-nsb.16

@utam0k are the test-workspace tests still flakey? I ask because a prior run for this branch appeared to timeout. 🤔

@sagor999
Copy link
Contributor

also once all conversations are resolved, feel free to remove the hold. (not removing it myself as it will auto merge)

@kylos101
Copy link
Contributor

@utam0k can you help analyze this failure?

It failed with this message, but I'm not sure where to look (expand does not have more info):

[Run integration tests] [test-workspace] FAIL
[Run integration tests] [test-workspace] FAIL	github.com/gitpod-io/gitpod/test/tests/workspace	2191.554s
[Run integration tests] [test-workspace] FAIL
[Run integration tests] /workspace
[Run integration tests] [test-workspace|FAIL] 1
[Run integration tests] 
[Run integration tests] Failed. Expand to see why
[Run integration tests|FAIL]

@utam0k
Copy link
Contributor

utam0k commented Sep 21, 2022

@kylos101 Sure.

@utam0k
Copy link
Contributor

utam0k commented Sep 21, 2022

I think this PR brought the broken integration tests.

@utam0k are the test-workspace tests still flakey? I ask because a prior run for this branch appeared to timeout. thinking

The test to launch gitpod from the git tag pointed to HEAD until now. This seems to have changed and now points to a hash value.

contexts_test.go:200: expected branch 'HEAD', got 'a89cab1135a2d05901ca3021d1608f24a0400932'!

I honestly don't think this change will cause any problems for users, so I think we should just fix the test. However, you should write to Changelog.

Name: "open tag",
ContextURL: "github.com/gitpod-io/gitpod-test-repo/tree/integration-test-context-tag",
WorkspaceRoot: "/workspace/gitpod-test-repo",
ExpectedBranch: "HEAD",

@utam0k
Copy link
Contributor

utam0k commented Sep 21, 2022

@utam0k can you help analyze this failure?

It failed with this message, but I'm not sure where to look (expand does not have more info):

[Run integration tests] [test-workspace] FAIL
[Run integration tests] [test-workspace] FAIL	github.com/gitpod-io/gitpod/test/tests/workspace	2191.554s
[Run integration tests] [test-workspace] FAIL
[Run integration tests] /workspace
[Run integration tests] [test-workspace|FAIL] 1
[Run integration tests] 
[Run integration tests] Failed. Expand to see why
[Run integration tests|FAIL]

TIPS: Please search FAIL: via your browser and you can see specific failed tests.

@kylos101
Copy link
Contributor

Thanks for the heads up @utam0k !

@aledbf can you update the test @utam0k shared is failing?

@aledbf
Copy link
Member Author

aledbf commented Sep 21, 2022

@aledbf can you update the #13053 (comment) @utam0k shared is failing?

done

@kylos101
Copy link
Contributor

kylos101 commented Sep 21, 2022

Hmm, I am seeing a different test failures, but, am skeptical it is related to this PR.

@jenting are you aware of the below test being flakey?

[Run integration tests] [test-ws-manager] --- FAIL: TestOpenWorkspaceFromPrebuild (546.19s)
[Run integration tests] [test-ws-manager]     --- FAIL: TestOpenWorkspaceFromPrebuild/prebuild (546.19s)
[Run integration tests] [test-ws-manager]         --- FAIL: TestOpenWorkspaceFromPrebuild/prebuild/it_should_open_workspace_from_prebuild_successfully (546.19s)
[Run integration tests] [test-ws-manager]             --- FAIL: TestOpenWorkspaceFromPrebuild/prebuild/it_should_open_workspace_from_prebuild_successfully/classic (216.68s)
[Run integration tests] [test-ws-manager]             --- PASS: TestOpenWorkspaceFromPrebuild/prebuild/it_should_open_workspace_from_prebuild_successfully/pvc (329.51s)

@jenting
Copy link
Contributor

jenting commented Sep 22, 2022

Hmm, I am seeing a different test failures, but, am skeptical it is related to this PR.

@jenting are you aware of the below test being flakey?


[Run integration tests] [test-ws-manager] --- FAIL: TestOpenWorkspaceFromPrebuild (546.19s)

[Run integration tests] [test-ws-manager]     --- FAIL: TestOpenWorkspaceFromPrebuild/prebuild (546.19s)

[Run integration tests] [test-ws-manager]         --- FAIL: TestOpenWorkspaceFromPrebuild/prebuild/it_should_open_workspace_from_prebuild_successfully (546.19s)

[Run integration tests] [test-ws-manager]             --- FAIL: TestOpenWorkspaceFromPrebuild/prebuild/it_should_open_workspace_from_prebuild_successfully/classic (216.68s)

[Run integration tests] [test-ws-manager]             --- PASS: TestOpenWorkspaceFromPrebuild/prebuild/it_should_open_workspace_from_prebuild_successfully/pvc (329.51s)

Ya, I am working on fixing this flaky test in this PR #13170

Copy link
Contributor

@kylos101 kylos101 left a comment

Choose a reason for hiding this comment

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

Works as advertised, I tested prebuilds by making a team, project, and pushing commits, rather than use #prebuild, which is going away in the not too distant future.

@kylos101
Copy link
Contributor

/unhold

🚂 choo, choo!

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-aledbf-git-nsb.18 because the annotations in the pull request description changed
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-aledbf-git-nsb.19 because the annotations in the pull request description changed
(with .werft/ from main)

@roboquat roboquat merged commit 6475a78 into main Sep 22, 2022
@roboquat roboquat deleted the aledbf/git-nsb branch September 22, 2022 00:35
@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note-none and removed release-note labels Sep 28, 2022
@atduarte
Copy link
Contributor

@aledbf FYI replace the one-line release notes with a key highlight here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note-none size/S team: workspace Issue belongs to the Workspace team
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

7 participants