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

Step in Github action workflow to verify each go test files have a build tag assigned to it #2373

Merged
merged 4 commits into from
Mar 6, 2025

Conversation

sanyamsinghal
Copy link
Collaborator

@sanyamsinghal sanyamsinghal commented Mar 4, 2025

Describe the changes in this pull request

Output in case of go build tag missing in test files

image

Describe if there are any user-facing changes

NA

How was this pull request tested?

Existing tests

Does your PR have changes that can cause upgrade issues?

Component Breaking changes?
MetaDB Yes/No
Name registry json Yes/No
Data File Descriptor Json Yes/No
Export Snapshot Status Json Yes/No
Import Data State Yes/No
Export Status Json Yes/No
Data .sql files of tables Yes/No
Export and import data queue Yes/No
Schema Dump Yes/No
AssessmentDB Yes/No
Sizing DB Yes/No
Migration Assessment Report Json Yes/No
Callhome Json Yes/No
YugabyteD Tables Yes/No
TargetDB Metadata Tables Yes/No

@sanyamsinghal sanyamsinghal self-assigned this Mar 4, 2025
@sanyamsinghal sanyamsinghal force-pushed the sanyam/build-tags-verify branch from 0e7f111 to 8a07e25 Compare March 4, 2025 11:21
@sanyamsinghal sanyamsinghal marked this pull request as ready for review March 4, 2025 16:46
@@ -23,6 +23,16 @@ jobs:
cd yb-voyager
go build -v ./...

- name: Verify Build Tags in Test Files
Copy link
Collaborator

Choose a reason for hiding this comment

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

with the way that our pipelines are at the moment, if there are no tags on a test file, will they not run?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@makalaaneesh it will run.
there are two cases for test file:

  1. with tag
  2. without tag

go test -v ./... -tags tag1 executes the test with tag1 and untagged
go test -v ./... -tags tag2 executes the test with tag2 and untagged

so the untagged ones will be unnecessarily executed.
Anyways since we are using tags now, so each file should be categorised to a tag.

@sanyamsinghal sanyamsinghal merged commit 941eec4 into main Mar 6, 2025
66 checks passed
@sanyamsinghal sanyamsinghal deleted the sanyam/build-tags-verify branch March 6, 2025 06:00
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.

2 participants