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

Chore: Add go workspace #83191

Merged
merged 6 commits into from
Feb 23, 2024
Merged

Chore: Add go workspace #83191

merged 6 commits into from
Feb 23, 2024

Conversation

toddtreece
Copy link
Member

@toddtreece toddtreece commented Feb 21, 2024

What is this feature?

This uses a go workspace for pkg/util/xorm instead of using a replace statement in grafana's go.mod.

Why do we need this feature?

This is needed to test go workspaces with the current build & release process.

Who is this feature for?

[Add information on what kind of user the feature is for.]

Which issue(s) does this PR fix?:

Fixes #

Special notes for your reviewer:

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@toddtreece toddtreece requested review from itsmylife, kylebrandt and a team February 21, 2024 18:47
@toddtreece toddtreece requested a review from a team as a code owner February 21, 2024 18:47
@toddtreece toddtreece requested review from papagian, idafurjes and yangkb09 and removed request for a team February 21, 2024 18:47
@grafana-delivery-bot grafana-delivery-bot bot added this to the 11.0.x milestone Feb 21, 2024
go.work Outdated Show resolved Hide resolved
@toddtreece toddtreece added no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes add to changelog and removed no-changelog Skip including change in changelog/release notes labels Feb 21, 2024
@toddtreece toddtreece requested review from tolzhabayev and a team as code owners February 21, 2024 18:56
@grafana-pr-automation grafana-pr-automation bot added the type/ci Tasks related to Continuous Integration workflow label Feb 21, 2024
@@ -1,13 +1,20 @@
module xorm.io/xorm
Copy link
Contributor

Choose a reason for hiding this comment

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

should we rename this?
Something like github.com/grafana/grafana/pkg/util/xorm

Copy link
Member Author

Choose a reason for hiding this comment

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

good question. i'll try that and see if it still works. my guess is that it might break imports

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh yeah that's true. But if we will publish this module how will it be like for a consumer? I am asking this to have an idea for our future packages.

Copy link
Member Author

Choose a reason for hiding this comment

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

it seems like replace works in go.sum. see: 14735ec

./pkg/util/xorm
)

replace xorm.io/xorm => ./pkg/util/xorm
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we comment on why we have this replace? (Basically following the other thread on the package name). Since this is first entry in this file, but also a bit of edge case, I think it is good to make that clear to people looking at this file.

Copy link
Contributor

@kylebrandt kylebrandt left a comment

Choose a reason for hiding this comment

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

Looks okay to me - one note about adding a comment on the replace

Copy link
Contributor

@aangelisc aangelisc left a comment

Choose a reason for hiding this comment

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

LGTM for the build process, we'll see how it goes with releasing once merged 😊

@toddtreece toddtreece merged commit 49d3cb2 into main Feb 23, 2024
12 checks passed
@toddtreece toddtreece deleted the toddtreece/add-workspace-xorm branch February 23, 2024 13:54
yuri-tceretian pushed a commit that referenced this pull request Feb 26, 2024
---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
chalapat pushed a commit to nokia/grafana that referenced this pull request Feb 27, 2024
---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
kminehart pushed a commit that referenced this pull request Jun 21, 2024
---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
kminehart pushed a commit that referenced this pull request Jun 21, 2024
---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
kminehart pushed a commit that referenced this pull request Jun 21, 2024
---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
kminehart pushed a commit that referenced this pull request Jun 24, 2024
---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
kminehart added a commit that referenced this pull request Jun 24, 2024
* Chore: Add go workspace (#83191)

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>

* CI: Make pkg/build its own module, remove unused Grafana modules in go.mo… (#89243)

* Make pkg/build its own module, remove unused Grafana modules in go.mod/go.sum

* fix go.work format

* log errors on file close errors

* CI: Add release-pr workflow (#89005)

* Add release-pr workflow

* update CODEOWNERS

* CI: Trigger release pr workflow when a release is completed (#89062)

* Automation: Verify release artifacts on grafana.com (#89197)

* baldm0mma/verify_release/ create verify_release_for_download function

* baldm0mma/verify_release/ add name, image, env

* baldm0mma/verify_release/ add initial commands

* baldm0mma/verify_release/ add deps?

* baldm0mma/verify_release/ update location

* baldm0mma/verify_release/ add anno to lib-star

* bald0mma/verify_release/ update func name to verify_grafanacom_step

* baldm0mma/verify_release/ add verify shell script

* baldm0mma/verify_release/ add script content, first attempt

* baldm0mma/verify_release/ add node image to verify_grafanacom_step

* baldm0mma/verify_release/ add gcom secret note

* baldm0mma/verify_release/ add sudo to apt-get

* baldm0mma/verify_release/ add anno

* baldm0mma/verify_release/ add anno to secrets

* baldm0mma/verify_release/ update commands to reflect node env image

* baldm0mma/verify_release/ update annos

* baldm0mma/verify_release/ update tag variable

* baldm0mma/verify release/ add whitespace

* baldm0mma/verify_releases/ update with no bash loops

* baldm0mma/verify_release/ update exit logic

* baldm0mma/verify_release/ remove annos

* baldm0mma/verify_releasse/ resign and build yml

* baldm0mma/verify_release/ remove annos

* baldm0mma/verify_release/ update signature

* baldm0mma/verify_release/ download curl

* baldm0mma/verify_release/ remove temp key folder removal

* baldm0mma/verify_release/ account for artifact download time

* baldm0mma/verify_release/ add anno

* baldm0mma/verify_release/ update location

* baldm0mma/verify_release/ update script

* baldm0mma/verify_release/ make drone

* baldm0mma/verify_release/ update script for oss or ent

* baldm0mma/verify_release/ add promotion option

* baldm0mma/verify_release/ make drone

* Update scripts/drone/events/release.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* Update scripts/drone/steps/lib.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* Update scripts/drone/steps/lib.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* baldm0mma/verify_release/ update drone

* Update scripts/drone/events/release.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* baldm0mma/verify_release/ update drone

* Update scripts/drone/steps/lib.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* baldm0mma/update drone

* baldm0mma/verify_release/ update path

* baldm0mma/verify_release/ make drone

* baldm0mma/update drone

* Apply suggestions from code review

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* baldm0mma/verify_release/ update for loop to account for failure

* baldm0mma/verify_release/ make drone

* baldm0mma/verify_release/ make format-drone

* baldm0mma/verify_release/ rem unused var

---------

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* CI: Add bump-version action to the release PR workflow (#89491)

* Remove pkg/build/actions

* remove pkg/util/xorm since it's not being used anyways...

* allow grpc.dial

---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Jev Forsberg <46619047+baldm0mma@users.noreply.github.com>
kminehart added a commit that referenced this pull request Jun 24, 2024
* Chore: Add go workspace (#83191)

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>

* CI: Add release-pr workflow (#89005)

* Add release-pr workflow

* update CODEOWNERS

* CI: Trigger release pr workflow when a release is completed (#89062)

* Automation: Verify release artifacts on grafana.com (#89197)

* baldm0mma/verify_release/ create verify_release_for_download function

* baldm0mma/verify_release/ add name, image, env

* baldm0mma/verify_release/ add initial commands

* baldm0mma/verify_release/ add deps?

* baldm0mma/verify_release/ update location

* baldm0mma/verify_release/ add anno to lib-star

* bald0mma/verify_release/ update func name to verify_grafanacom_step

* baldm0mma/verify_release/ add verify shell script

* baldm0mma/verify_release/ add script content, first attempt

* baldm0mma/verify_release/ add node image to verify_grafanacom_step

* baldm0mma/verify_release/ add gcom secret note

* baldm0mma/verify_release/ add sudo to apt-get

* baldm0mma/verify_release/ add anno

* baldm0mma/verify_release/ add anno to secrets

* baldm0mma/verify_release/ update commands to reflect node env image

* baldm0mma/verify_release/ update annos

* baldm0mma/verify_release/ update tag variable

* baldm0mma/verify release/ add whitespace

* baldm0mma/verify_releases/ update with no bash loops

* baldm0mma/verify_release/ update exit logic

* baldm0mma/verify_release/ remove annos

* baldm0mma/verify_releasse/ resign and build yml

* baldm0mma/verify_release/ remove annos

* baldm0mma/verify_release/ update signature

* baldm0mma/verify_release/ download curl

* baldm0mma/verify_release/ remove temp key folder removal

* baldm0mma/verify_release/ account for artifact download time

* baldm0mma/verify_release/ add anno

* baldm0mma/verify_release/ update location

* baldm0mma/verify_release/ update script

* baldm0mma/verify_release/ make drone

* baldm0mma/verify_release/ update script for oss or ent

* baldm0mma/verify_release/ add promotion option

* baldm0mma/verify_release/ make drone

* Update scripts/drone/events/release.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* Update scripts/drone/steps/lib.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* Update scripts/drone/steps/lib.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* baldm0mma/verify_release/ update drone

* Update scripts/drone/events/release.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* baldm0mma/verify_release/ update drone

* Update scripts/drone/steps/lib.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* baldm0mma/update drone

* baldm0mma/verify_release/ update path

* baldm0mma/verify_release/ make drone

* baldm0mma/update drone

* Apply suggestions from code review

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* baldm0mma/verify_release/ update for loop to account for failure

* baldm0mma/verify_release/ make drone

* baldm0mma/verify_release/ make format-drone

* baldm0mma/verify_release/ rem unused var

---------

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* CI: Make pkg/build its own module, remove unused Grafana modules in go.mo… (#89243)

* Make pkg/build its own module, remove unused Grafana modules in go.mod/go.sum

* fix go.work format

* log errors on file close errors

* CI: Add release-pr workflow (#89005)

* Add release-pr workflow

* update CODEOWNERS

* remove pkg/build/actions

---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Jev Forsberg <46619047+baldm0mma@users.noreply.github.com>
kminehart added a commit that referenced this pull request Jun 24, 2024
* Chore: Add go workspace (#83191)


---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>

* CI: Make pkg/build its own module, remove unused Grafana modules in go.mo… (#89243)

* Make pkg/build its own module, remove unused Grafana modules in go.mod/go.sum

* fix go.work format

* log errors on file close errors

* CI: Add release-pr workflow (#89005)

* Add release-pr workflow

* update CODEOWNERS

* CI: Trigger release pr workflow when a release is completed (#89062)

* Automation: Verify release artifacts on grafana.com (#89197)

* baldm0mma/verify_release/ create verify_release_for_download function

* baldm0mma/verify_release/ add name, image, env

* baldm0mma/verify_release/ add initial commands

* baldm0mma/verify_release/ add deps?

* baldm0mma/verify_release/ update location

* baldm0mma/verify_release/ add anno to lib-star

* bald0mma/verify_release/ update func name to verify_grafanacom_step

* baldm0mma/verify_release/ add verify shell script

* baldm0mma/verify_release/ add script content, first attempt

* baldm0mma/verify_release/ add node image to verify_grafanacom_step

* baldm0mma/verify_release/ add gcom secret note

* baldm0mma/verify_release/ add sudo to apt-get

* baldm0mma/verify_release/ add anno

* baldm0mma/verify_release/ add anno to secrets

* baldm0mma/verify_release/ update commands to reflect node env image

* baldm0mma/verify_release/ update annos

* baldm0mma/verify_release/ update tag variable

* baldm0mma/verify release/ add whitespace

* baldm0mma/verify_releases/ update with no bash loops

* baldm0mma/verify_release/ update exit logic

* baldm0mma/verify_release/ remove annos

* baldm0mma/verify_releasse/ resign and build yml

* baldm0mma/verify_release/ remove annos

* baldm0mma/verify_release/ update signature

* baldm0mma/verify_release/ download curl

* baldm0mma/verify_release/ remove temp key folder removal

* baldm0mma/verify_release/ account for artifact download time

* baldm0mma/verify_release/ add anno

* baldm0mma/verify_release/ update location

* baldm0mma/verify_release/ update script

* baldm0mma/verify_release/ make drone

* baldm0mma/verify_release/ update script for oss or ent

* baldm0mma/verify_release/ add promotion option

* baldm0mma/verify_release/ make drone

* Update scripts/drone/events/release.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* Update scripts/drone/steps/lib.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* Update scripts/drone/steps/lib.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* baldm0mma/verify_release/ update drone

* Update scripts/drone/events/release.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* baldm0mma/verify_release/ update drone

* Update scripts/drone/steps/lib.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* baldm0mma/update drone

* baldm0mma/verify_release/ update path

* baldm0mma/verify_release/ make drone

* baldm0mma/update drone

* Apply suggestions from code review

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* baldm0mma/verify_release/ update for loop to account for failure

* baldm0mma/verify_release/ make drone

* baldm0mma/verify_release/ make format-drone

* baldm0mma/verify_release/ rem unused var

---------

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* CI: Add bump-version action to the release PR workflow (#89491)

---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Jev Forsberg <46619047+baldm0mma@users.noreply.github.com>
kminehart added a commit that referenced this pull request Jun 24, 2024
* Chore: Add go workspace (#83191)


---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>

* CI: Make pkg/build its own module, remove unused Grafana modules in go.mo… (#89243)

* Make pkg/build its own module, remove unused Grafana modules in go.mod/go.sum

* fix go.work format

* log errors on file close errors

* CI: Add release-pr workflow (#89005)

* Add release-pr workflow

* update CODEOWNERS

* CI: Trigger release pr workflow when a release is completed (#89062)

* Automation: Verify release artifacts on grafana.com (#89197)

* baldm0mma/verify_release/ create verify_release_for_download function

* baldm0mma/verify_release/ add name, image, env

* baldm0mma/verify_release/ add initial commands

* baldm0mma/verify_release/ add deps?

* baldm0mma/verify_release/ update location

* baldm0mma/verify_release/ add anno to lib-star

* bald0mma/verify_release/ update func name to verify_grafanacom_step

* baldm0mma/verify_release/ add verify shell script

* baldm0mma/verify_release/ add script content, first attempt

* baldm0mma/verify_release/ add node image to verify_grafanacom_step

* baldm0mma/verify_release/ add gcom secret note

* baldm0mma/verify_release/ add sudo to apt-get

* baldm0mma/verify_release/ add anno

* baldm0mma/verify_release/ add anno to secrets

* baldm0mma/verify_release/ update commands to reflect node env image

* baldm0mma/verify_release/ update annos

* baldm0mma/verify_release/ update tag variable

* baldm0mma/verify release/ add whitespace

* baldm0mma/verify_releases/ update with no bash loops

* baldm0mma/verify_release/ update exit logic

* baldm0mma/verify_release/ remove annos

* baldm0mma/verify_releasse/ resign and build yml

* baldm0mma/verify_release/ remove annos

* baldm0mma/verify_release/ update signature

* baldm0mma/verify_release/ download curl

* baldm0mma/verify_release/ remove temp key folder removal

* baldm0mma/verify_release/ account for artifact download time

* baldm0mma/verify_release/ add anno

* baldm0mma/verify_release/ update location

* baldm0mma/verify_release/ update script

* baldm0mma/verify_release/ make drone

* baldm0mma/verify_release/ update script for oss or ent

* baldm0mma/verify_release/ add promotion option

* baldm0mma/verify_release/ make drone

* Update scripts/drone/events/release.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* Update scripts/drone/steps/lib.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* Update scripts/drone/steps/lib.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* baldm0mma/verify_release/ update drone

* Update scripts/drone/events/release.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* baldm0mma/verify_release/ update drone

* Update scripts/drone/steps/lib.star

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* baldm0mma/update drone

* baldm0mma/verify_release/ update path

* baldm0mma/verify_release/ make drone

* baldm0mma/update drone

* Apply suggestions from code review

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

* baldm0mma/verify_release/ update for loop to account for failure

* baldm0mma/verify_release/ make drone

* baldm0mma/verify_release/ make format-drone

* baldm0mma/verify_release/ rem unused var

---------

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>

---------

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Jev Forsberg <46619047+baldm0mma@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/backend no-backport Skip backport of PR type/ci Tasks related to Continuous Integration workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants