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

feat(jvmid): provide method for determining JVM's own hash ID without JMX connection #309

Merged
merged 3 commits into from
Dec 4, 2023

Conversation

andrewazores
Copy link
Member

Copy link

ARCH IMAGE
amd64 ghcr.io/cryostatio/cryostat-core:pr-309-6a1bb0a8e63f49dd06454ba416668eb59a24be28-linux-amd64
arm64 ghcr.io/cryostatio/cryostat-core:pr-309-6a1bb0a8e63f49dd06454ba416668eb59a24be28-linux-arm64

To run smoketest:

# amd64
CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-core:pr-309-6a1bb0a8e63f49dd06454ba416668eb59a24be28-linux-amd64 sh smoketest.sh

# or arm64
CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-core:pr-309-6a1bb0a8e63f49dd06454ba416668eb59a24be28-linux-arm64 sh smoketest.sh

Copy link

ARCH IMAGE
amd64 ghcr.io/cryostatio/cryostat-core:pr-309-6a1bb0a8e63f49dd06454ba416668eb59a24be28-linux-amd64
arm64 ghcr.io/cryostatio/cryostat-core:pr-309-6a1bb0a8e63f49dd06454ba416668eb59a24be28-linux-arm64

To run smoketest:

# amd64
CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-core:pr-309-6a1bb0a8e63f49dd06454ba416668eb59a24be28-linux-amd64 sh smoketest.sh

# or arm64
CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-core:pr-309-6a1bb0a8e63f49dd06454ba416668eb59a24be28-linux-arm64 sh smoketest.sh

Copy link

ARCH IMAGE
amd64 ghcr.io/cryostatio/cryostat-core:pr-309-6a1bb0a8e63f49dd06454ba416668eb59a24be28-linux-amd64
arm64 ghcr.io/cryostatio/cryostat-core:pr-309-6a1bb0a8e63f49dd06454ba416668eb59a24be28-linux-arm64

To run smoketest:

# amd64
CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-core:pr-309-6a1bb0a8e63f49dd06454ba416668eb59a24be28-linux-amd64 sh smoketest.sh

# or arm64
CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-core:pr-309-6a1bb0a8e63f49dd06454ba416668eb59a24be28-linux-arm64 sh smoketest.sh

@andrewazores
Copy link
Member Author

/build_test

Copy link

Cryostat Test: At least one test failed ❌
https://github.com/cryostatio/cryostat-core/actions/runs/7052673314

Copy link

Image does not exist! Please wait for the initial build and push to complete before using /build_test command.

Copy link

github-actions bot commented Dec 1, 2023

ARCH IMAGE
amd64 ghcr.io/cryostatio/cryostat-core:pr-309-5801ab499d2a14550de1af205266529ab382e5a9-linux-amd64
arm64 ghcr.io/cryostatio/cryostat-core:pr-309-5801ab499d2a14550de1af205266529ab382e5a9-linux-arm64

To run smoketest:

# amd64
CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-core:pr-309-5801ab499d2a14550de1af205266529ab382e5a9-linux-amd64 sh smoketest.sh

# or arm64
CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-core:pr-309-5801ab499d2a14550de1af205266529ab382e5a9-linux-arm64 sh smoketest.sh

@andrewazores andrewazores marked this pull request as ready for review December 1, 2023 14:55
Copy link

github-actions bot commented Dec 1, 2023

ARCH IMAGE
amd64 ghcr.io/cryostatio/cryostat-core:pr-309-f2194fd4f668b7d4c4fff04067171853d630f513-linux-amd64
arm64 ghcr.io/cryostatio/cryostat-core:pr-309-f2194fd4f668b7d4c4fff04067171853d630f513-linux-arm64

To run smoketest:

# amd64
CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-core:pr-309-f2194fd4f668b7d4c4fff04067171853d630f513-linux-amd64 sh smoketest.sh

# or arm64
CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-core:pr-309-f2194fd4f668b7d4c4fff04067171853d630f513-linux-arm64 sh smoketest.sh

@mwangggg
Copy link
Member

mwangggg commented Dec 1, 2023

/build_test

Copy link

github-actions bot commented Dec 1, 2023

Cryostat Test: At least one test failed ❌
https://github.com/cryostatio/cryostat-core/actions/runs/7063961328

Copy link

github-actions bot commented Dec 1, 2023

Image does not exist! Please wait for the initial build and push to complete before using /build_test command.

@mwangggg
Copy link
Member

mwangggg commented Dec 1, 2023

I don't really understand why this error is occurring... I opened a PR in my forked repo and it's able to pull the image. Thus I can't really test any changes I make to the workflow files to see if they'll fix this issue. I can add a line to make the read packages permission explicit, but otherwise this might not be a permissions problem...

@andrewazores
Copy link
Member Author

I'm not sure either. It's complaining about being "denied", and I can see that the image it tried to pull does actually exist in the container image registry associated with this repository, so I guessed it had to do with the Actions default permissions level change - but that still doesn't sound right, because the change was just from granting read+write to read-only permissions by default. And I would expect that the action being denied only needs permission to read the container image.

@aali309
Copy link
Contributor

aali309 commented Dec 1, 2023

I'm not sure either. It's complaining about being "denied", and I can see that the image it tried to pull does actually exist in the container image registry associated with this repository, so I guessed it had to do with the Actions default permissions level change - but that still doesn't sound right, because the change was just from granting read+write to read-only permissions by default. And I would expect that the action being denied only needs permission to read the container image.

may be adding : permissions: read after logging in?

      uses: redhat-actions/podman-login@v1
      with:
        registry: ghcr.io/${{ github.repository_owner }}
        username: ${{ github.event.comment.user.login }}
        password: ${{ secrets.GITHUB_TOKEN }} 
        permissions: read
        ```
the current setup looks right though and works well on my local branch too.

@mwangggg
Copy link
Member

mwangggg commented Dec 3, 2023

I'm not sure either. It's complaining about being "denied", and I can see that the image it tried to pull does actually exist in the container image registry associated with this repository, so I guessed it had to do with the Actions default permissions level change - but that still doesn't sound right, because the change was just from granting read+write to read-only permissions by default. And I would expect that the action being denied only needs permission to read the container image.

may be adding : permissions: read after logging in?

      uses: redhat-actions/podman-login@v1
      with:
        registry: ghcr.io/${{ github.repository_owner }}
        username: ${{ github.event.comment.user.login }}
        password: ${{ secrets.GITHUB_TOKEN }} 
        permissions: read
        ```
the current setup looks right though and works well on my local branch too.

I'm pretty sure the redhat-actions/podman-login@v1 doesn't have a permissions input: https://github.com/redhat-actions/podman-login#action-inputs

@aali309
Copy link
Contributor

aali309 commented Dec 3, 2023

I'm not sure either. It's complaining about being "denied", and I can see that the image it tried to pull does actually exist in the container image registry associated with this repository, so I guessed it had to do with the Actions default permissions level change - but that still doesn't sound right, because the change was just from granting read+write to read-only permissions by default. And I would expect that the action being denied only needs permission to read the container image.

may be adding : permissions: read after logging in?

  uses: redhat-actions/podman-login@v1
  with:
    registry: ghcr.io/${{ github.repository_owner }}
    username: ${{ github.event.comment.user.login }}
    password: ${{ secrets.GITHUB_TOKEN }} 
    permissions: read
    ```

the current setup looks right though and works well on my local branch too.

I'm pretty sure the redhat-actions/podman-login@v1 doesn't have a permissions input: https://github.com/redhat-actions/podman-login#action-inputs

Yes, it doesn't, the current setup look right

@mwangggg
Copy link
Member

mwangggg commented Dec 3, 2023

I'm not sure either. It's complaining about being "denied", and I can see that the image it tried to pull does actually exist in the container image registry associated with this repository, so I guessed it had to do with the Actions default permissions level change - but that still doesn't sound right, because the change was just from granting read+write to read-only permissions by default. And I would expect that the action being denied only needs permission to read the container image.

Oh I see what the problem is. https://github.com/cryostatio/cryostat-core/actions/runs/7063961328/job/19231025484#step:1:16 For some reason, only Metadata has read permissions. I'm not sure what happened here, considering the organizational permisisons changes should still provide contents and packages read-only permissions. But explicitly adding the packages: read permissions should fix this error for now until I figure out exactly why they're missing 😄

@mwangggg
Copy link
Member

mwangggg commented Dec 3, 2023

I'm not sure either. It's complaining about being "denied", and I can see that the image it tried to pull does actually exist in the container image registry associated with this repository, so I guessed it had to do with the Actions default permissions level change - but that still doesn't sound right, because the change was just from granting read+write to read-only permissions by default. And I would expect that the action being denied only needs permission to read the container image.

Oh I see what the problem is. https://github.com/cryostatio/cryostat-core/actions/runs/7063961328/job/19231025484#step:1:16 For some reason, only Metadata has read permissions. I'm not sure what happened here, considering the organizational permisisons changes should still provide contents and packages read-only permissions. But explicitly adding the packages: read permissions should fix this error for now until I figure out exactly why they're missing 😄

Just kidding... I took at look at the PRs in my forked repo and they also don't include packages: read in the GITHUB_TOKEN Permissions section 😢 I think it might be worth it to still try because the integration test actions in Cryostat include packages and contents read permissions

Copy link

github-actions bot commented Dec 4, 2023

ARCH IMAGE
amd64 ghcr.io/cryostatio/cryostat-core:pr-309-b7d0e9886ae672bc8d9afd1ee23ef33821deccfb-linux-amd64
arm64 ghcr.io/cryostatio/cryostat-core:pr-309-b7d0e9886ae672bc8d9afd1ee23ef33821deccfb-linux-arm64

To run smoketest:

# amd64
CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-core:pr-309-b7d0e9886ae672bc8d9afd1ee23ef33821deccfb-linux-amd64 sh smoketest.sh

# or arm64
CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-core:pr-309-b7d0e9886ae672bc8d9afd1ee23ef33821deccfb-linux-arm64 sh smoketest.sh

@andrewazores
Copy link
Member Author

/build_test

Copy link

github-actions bot commented Dec 4, 2023

Cryostat Test: At least one test failed ❌
https://github.com/cryostatio/cryostat-core/actions/runs/7088215941

@andrewazores
Copy link
Member Author

/build_test

Copy link

github-actions bot commented Dec 4, 2023

Cryostat Test: All tests pass ✅
https://github.com/cryostatio/cryostat-core/actions/runs/7088387974

Copy link
Contributor

@aali309 aali309 left a comment

Choose a reason for hiding this comment

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

LGTM

@aali309
Copy link
Contributor

aali309 commented Dec 4, 2023

LGTM

Just rebase, please.

Copy link

github-actions bot commented Dec 4, 2023

ARCH IMAGE
amd64 ghcr.io/cryostatio/cryostat-core:pr-309-7a574424b5349c58ac99f0e5c08375478afdac44-linux-amd64
arm64 ghcr.io/cryostatio/cryostat-core:pr-309-7a574424b5349c58ac99f0e5c08375478afdac44-linux-arm64

To run smoketest:

# amd64
CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-core:pr-309-7a574424b5349c58ac99f0e5c08375478afdac44-linux-amd64 sh smoketest.sh

# or arm64
CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-core:pr-309-7a574424b5349c58ac99f0e5c08375478afdac44-linux-arm64 sh smoketest.sh

@mwangggg
Copy link
Member

mwangggg commented Dec 4, 2023

oh I'm glad adding the permission worked!!

@andrewazores
Copy link
Member Author

Any other review thoughts @mwangggg or can I merge this?

@mwangggg
Copy link
Member

mwangggg commented Dec 4, 2023

Any other review thoughts @mwangggg or can I merge this?

Looks good to me too 👍

@andrewazores andrewazores merged commit 8249df1 into cryostatio:main Dec 4, 2023
13 checks passed
@andrewazores andrewazores deleted the non-jmx-jvmid branch December 4, 2023 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request safe-to-test
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants