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

Qe branch 3 #1399

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

Qe branch 3 #1399

wants to merge 3 commits into from

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Jan 5, 2024

I think I pushed.

Copy link
Contributor

openshift-ci bot commented Jan 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k

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:

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 5, 2024
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 20, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 20, 2024
Copy link
Contributor

openshift-ci bot commented Mar 20, 2024

@deads2k: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/lint 6c7b79a link true /test lint

Full PR test history. Your PR dashboard.

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/test-infra repository. I understand the commands that are listed here.

Comment on lines +745 to 749
name = strings.ReplaceAll(name, "f28", "fXX")
name = strings.ReplaceAll(name, "f14", "fXX")
name = strings.ReplaceAll(name, "f7", "fXX")
name = strings.ReplaceAll(name, "f6", "fXX")
return name
Copy link
Member

@stbenjam stbenjam Mar 20, 2024

Choose a reason for hiding this comment

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

Will they have other frequencies? I know you hate regex but this isn't too bad:

re := regexp.MustCompile(`-f\d+`)
name = re.ReplaceAllString(name, "-fXX")

cmd := &cobra.Command{
Use: "component-readiness",

Run: func(cmd *cobra.Command, arguments []string) {
Copy link
Member

Choose a reason for hiding this comment

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

Style nit, but we prefer RunE and return errors everywhere else instead of bailing with Fatalf.


var bigQueryClient *bigquery.Client
var gcsClient *storage.Client
if f.GoogleCloudFlags.ServiceAccountCredentialFile != "" {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd like to push this logic into the GoogleCloudFlags type, so we can be consistent with how to get output from the input.

release := req.URL.Query().Get("release")

api.PrintUpgradeJSONReportFromDB(w, req, s.db, release)
}

func (s *Server) jsonInstallReportFromDB(w http.ResponseWriter, req *http.Request) {
if s.db == nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These blocks looked ugly to me. Pointing it out in case there's a better option for handling the situation.

Copy link
Member

@stbenjam stbenjam Mar 22, 2024

Choose a reason for hiding this comment

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

There's an if block in the server section that checks for s.db. Leftover from when we were partially on testgrid disk data and partially on postgres. You could move all these under there.

Copy link
Member

Choose a reason for hiding this comment

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

I refactored this quite a bit in #1559, it includes most of this PR

@@ -7,12 +7,22 @@ import (
)

func (s *Server) jsonUpgradeReportFromDB(w http.ResponseWriter, req *http.Request) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Overall, would we try to refactor Server to have a componentREadinessServer?

@stbenjam
Copy link
Member

I don't think this has to be perfect to merge, it's making progress and would keep you from having to maintain a separate branch. I think we should just merge this once lint passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants