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

test(redirects): refactor redirect handling #152

Merged
merged 4 commits into from
Nov 10, 2023

Conversation

andrewazores
Copy link
Member

Welcome to Cryostat3! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits using a GPG signature

To recreate commits with GPG signature git fetch upstream && git rebase --force --gpg-sign upstream/main


Related to #150

Description of the change:

Refactors redirect handling utility methods into a WebClient extension

Motivation for the change:

Slight clean up for encapsulation and clarify between what is a base webclient capability versus what is an extension for our integration tests only

@andrewazores andrewazores requested a review from a team as a code owner November 8, 2023 18:27
@github-actions github-actions bot added the needs-triage Needs thorough attention from code reviewers label Nov 8, 2023
@andrewazores andrewazores force-pushed the refactor-itest-redirects branch from 985b074 to 85bc37e Compare November 8, 2023 18:28
@andrewazores andrewazores removed the needs-triage Needs thorough attention from code reviewers label Nov 8, 2023
@andrewazores andrewazores force-pushed the refactor-itest-redirects branch 3 times, most recently from b77ab35 to b1c88db Compare November 9, 2023 14:27
@andrewazores
Copy link
Member Author

/build_test

@andrewazores
Copy link
Member Author

@aali309 doesn't seem to have run ^ looks like everything got skipped: https://github.com/cryostatio/cryostat3/actions/runs/6813168509

@aali309
Copy link
Contributor

aali309 commented Nov 9, 2023

/build_test

@andrewazores
Copy link
Member Author

@aali309
Copy link
Contributor

aali309 commented Nov 9, 2023

Works well for me after pulling latest code.
https://github.com/aali309/cryostat3/actions/runs/6813400456
image

@andrewazores
Copy link
Member Author

Not sure what you mean. This PR is already rebased on the latest main - is there some other code I need to pull in too?

@andrewazores
Copy link
Member Author

Usually the "this job was skipped" message/status on those workflows means that there was an if: condition on the workflow/step that evaluated to false.

https://github.com/cryostatio/cryostat3/actions/runs/6813168509/workflow

It seems like the first step must be the one that was skipped, and the rest have needs: [] on it, so they got skipped as well since they are dependent. So really the only if: that causes this must be here:

https://github.com/cryostatio/cryostat3/actions/runs/6813168509/workflow#L19

I don't know why that would be evaluating to false though.

@aali309
Copy link
Contributor

aali309 commented Nov 9, 2023

Yes, the if condition looks correct and should not be false. I was hoping it was a typo because I do that a lot. I checked the code and the updated parts looks ok. I tried removing the owner part on the if statement, it works well on my local main. But then the build-and-test previously also had the if: github.repository.owner == 'cryostatio' and it worked fine. I am still looking.

@aali309
Copy link
Contributor

aali309 commented Nov 9, 2023

This does not look right. we should have two jobs here. build-and-test java 17 and build-and-test java 21
image

like so?
image

@aali309
Copy link
Contributor

aali309 commented Nov 9, 2023

if: github.repository.owner == 'cryostatio' -> if: github.repository_owner == 'cryostatio'
This is the reason

@andrewazores
Copy link
Member Author

That could be a red herring - maybe it doesn't get fully evaluated since it's from a matrix workflow that was entirely skipped because its dependencies were skipped.

@andrewazores
Copy link
Member Author

if: github.repository.owner == 'cryostatio' -> if: github.repository_owner == 'cryostatio' This is the reason

Ah, nice find!

@andrewazores andrewazores force-pushed the refactor-itest-redirects branch from b1c88db to f416cf1 Compare November 9, 2023 16:22
@andrewazores
Copy link
Member Author

/build_test

Copy link

github-actions bot commented Nov 9, 2023

Workflow started at 11/9/2023, 11:22:57 AM. View Actions Run.

Copy link

github-actions bot commented Nov 9, 2023

CI build and push: All tests pass ✅
https://github.com/cryostatio/cryostat3/actions/runs/6814570092

1 similar comment
Copy link

github-actions bot commented Nov 9, 2023

CI build and push: All tests pass ✅
https://github.com/cryostatio/cryostat3/actions/runs/6814570092

Copy link
Contributor

@lkonno lkonno left a comment

Choose a reason for hiding this comment

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

This solution creating an extension to call the methods is much better and it will be easier to apply to the the other tests.

@andrewazores andrewazores force-pushed the refactor-itest-redirects branch from 4b5975c to fab1514 Compare November 10, 2023 02:56
@andrewazores andrewazores merged commit d38e55f into cryostatio:main Nov 10, 2023
7 checks passed
@andrewazores andrewazores deleted the refactor-itest-redirects branch November 10, 2023 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants