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

Upgrade devfile registry testing modules & CI to Go 1.21 #420

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

michael-valdron
Copy link
Member

@michael-valdron michael-valdron commented Jun 11, 2024

What does this PR do?:

Summarize the changes. Are any stacks or samples added or updated?

Summary of Updates:

  • Updates Go testing modules, build scripts, and workflow configs to use Go 1.21
  • Updates documentation to refer to Go 1.21
  • Updates to Kubernetes 1.29 for devfile registry deployment
  • Updates to devfile 2.3.0 validation

Which issue(s) this PR fixes:

Link to github issue(s)

fixes devfile/api#1558

PR acceptance criteria:

  • Contributing guide
    Have you read the devfile registry contributing guide and followed its instructions?
  • Test automation
    Does this repository's tests pass with your changes?
  • Documentation
    Does any documentation need to be updated with your changes?
  • Check Tools Provider
    Have you tested the changes with existing tools, i.e. Odo, Che, Console? (See devfile registry contributing guide on how to test changes)

How to test changes / Special notes to the reviewer:

Copy link

openshift-ci bot commented Jun 11, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link
Contributor

@thepetk thepetk left a comment

Choose a reason for hiding this comment

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

Shouldn't we update the workflows too?

@@ -1,6 +1,6 @@
module github.com/devfile/registry/tests/odov3

go 1.19
go 1.21

require (
github.com/devfile/api/v2 v2.2.2
Copy link
Contributor

Choose a reason for hiding this comment

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

might worth upgrading the devfile/api too?

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 why I left this PR in WIP / blocked, need devfile/library#212 to merge before I can update devfile/api since devfile/library is a direct dependency as well.

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 why I left this PR in WIP / blocked, need devfile/library#212 to merge before I can update devfile/api since devfile/library is a direct dependency as well.

Oh I see its merged now, I'll update the dependencies today.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also I didn't notice while reviewing that the PR was actually draft :D

Copy link
Member Author

Choose a reason for hiding this comment

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

Just waiting for openshift/release#53126 now.

Signed-off-by: Michael Valdron <[email protected]>
Signed-off-by: Michael Valdron <[email protected]>
@michael-valdron
Copy link
Member Author

/hold

waiting for openshift/release#53126 to be merged.

@michael-valdron
Copy link
Member Author

/unhold

openshift/release#53126 is merged now

@michael-valdron
Copy link
Member Author

/retest all

Copy link

openshift-ci bot commented Jun 12, 2024

@michael-valdron: The /retest command does not accept any targets.
The following commands are available to trigger required jobs:

  • /test v4.15-images
  • /test v4.15-registry-test

Use /test all to run all jobs.

In response to this:

/retest all

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@michael-valdron
Copy link
Member Author

/test all

@@ -39,7 +39,6 @@ var stacksPath string
var stackDirs string

func init() {
rand.Seed(time.Now().UnixNano())
Copy link
Contributor

Choose a reason for hiding this comment

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

I understand we removed this due to it being deprecated now in our updated Go version but did it serve an important purpose? Should we be looking into using the suggested change here?

Copy link
Member Author

@michael-valdron michael-valdron Jun 12, 2024

Choose a reason for hiding this comment

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

@Jdubrick From my understanding, this is why I removed it:

If Seed is not called, the generator is seeded randomly at program startup.

Before 1.20, we needed to call rand.Seed(time.Now().UnixNano()) to generate a random seed, since 1.20 this is done at startup therefore we do not need to do this anymore. NewRand(NewSource(seed)) is for setting deterministic seeds with a scoped random generator.

@@ -19,7 +17,6 @@ var stacksPath string
var stackDirs string

func init() {
rand.Seed(time.Now().UnixNano())
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as other comment

@Jdubrick
Copy link
Contributor

/retest

Copy link
Contributor

@thepetk thepetk left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Looks good to me label Jun 13, 2024
Copy link

openshift-ci bot commented Jun 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Jdubrick, michael-valdron, thepetk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [Jdubrick,michael-valdron,thepetk]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@michael-valdron michael-valdron merged commit c7ff486 into devfile:main Jun 13, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm Looks good to me
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Community Devfile Registry should be updated to support Go 1.21
3 participants