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

[CI] UpdateCLI: Added go mod tidy #41170

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

pazone
Copy link
Contributor

@pazone pazone commented Oct 8, 2024

Proposed commit message

Performs go mod tidy after updating the go version in go.mod

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@pazone pazone added enhancement Team:Ingest-EngProd backport-8.x Automated backport to the 8.x branch with mergify labels Oct 8, 2024
@pazone pazone requested review from v1v and cmacknz October 8, 2024 09:58
@pazone pazone requested a review from a team as a code owner October 8, 2024 09:58
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Oct 8, 2024
@mergify mergify bot assigned pazone Oct 8, 2024
Comment on lines +28 to +30
- uses: actions/setup-go@v5
with:
go-version-file: .go-version
Copy link
Member

Choose a reason for hiding this comment

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

Will this cause any issues if the golang-bump happens afterwards? Let's say current version is 1.22.7 and the upcoming one is 1.22.8, hence this step will point to 1.22.7 but the updatecli pipeline will move the version from 1.22.7 to 1.22.8

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question. It's better to install the new version of go.

Copy link
Member

@v1v v1v Oct 10, 2024

Choose a reason for hiding this comment

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

Hence, this change will not install the new version if that's the pre-req

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updatecli can neither execute a specified target nor run a subset of targets. I came up with one solution that I don't like.

  1. run updatecli with --commit false --push false. It applies the changes to the target files.
  2. install go with GHA using updated .go-version
  3. run updatecli again without --commit false --push false and it pushes the changes.

Please check the updates. Do you have any ideas on how can we make it in one execution?

Copy link
Member

@v1v v1v Oct 23, 2024

Choose a reason for hiding this comment

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

First, can you explain the motivation for running go mod tidy? I have not seen the need to use it while running the same mechanism with other golang versions:

Updatecli can neither execute a specified target nor run a subset of targets.

As far as I see there is a parameter called dependson, see https://www.updatecli.io/docs/core/target/#_parameters:

"dependson" allows to specify the order of execution of resources It accepts a list of rules like "(resourceType#)resourceId(:booleanOperator)" The resourceType is optional and can be one of "condition", "source" or "target"

Copy link
Member

@v1v v1v left a comment

Choose a reason for hiding this comment

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

Will this change also needed in bump-golang-7.17.yml?

@pazone
Copy link
Contributor Author

pazone commented Oct 10, 2024

Added the same for 7.17

@@ -33,7 +37,7 @@ jobs:
- if: ${{ failure() }}
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
with:
channel-id: '#ingest-notifications'
channel-id: "#ingest-notifications"
Copy link
Member

Choose a reason for hiding this comment

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

ditto

@rowlandgeoff
Copy link
Contributor

This change affected by #41563?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify enhancement Team:Ingest-EngProd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants