Skip to content

Conversation

@filiptronicek
Copy link
Member

Description

The tests still targetted our old self-hosted instance and had some inconsistencies with actual current behavior.

Additionally, this PR fixes a bug with the getCommitHistory method, which wrongly included the current commit as part of the history (this was the only SCM provider left for which we didn't skip the requested revision in the response).

Related Issue(s)

Fixes CLC-932

How to test

GITPOD_TEST_TOKEN_BITBUCKET_SERVER=VALUE_FROM_1PASSWORD yarn mocha './**/bitbucket-server-repository-provider.spec.js' --exclude './node_modules/**' --exit

/hold


const commits = commitsResult.values || [];
return commits.map((c) => c.id);
return commits.map((c) => c.id).slice(1);
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the place we change behavior. AFAIK, it did not cause any issues. This is because when we had checks checking things about each historical revision (like if there exists a prebuild for it), we just failed to find a prebuild twice instead of only once.

This way, the only impacted feature was our configurable prebuilds interval, which must've been off by one this whole time.

Copy link
Member

Choose a reason for hiding this comment

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

Nice find! ❤️

@filiptronicek filiptronicek self-assigned this Nov 13, 2024
@roboquat roboquat merged commit e5eb61d into main Nov 13, 2024
32 checks passed
@roboquat roboquat deleted the ft/fix-bitbucket-integration-tests branch November 13, 2024 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants