Skip to content

Conversation

@igor-karpukhin
Copy link
Collaborator

@igor-karpukhin igor-karpukhin commented Oct 15, 2024

Test helm update

All Submissions:

  • Have you signed our CLA?
  • Put closes #XXXX in your comment to auto-close the issue that your PR fixes (if there is one).
  • Update docs/release-notes/release-notes-template.md if your changes should be included in the release notes for the next release.

# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= $(shell git describe --tags --dirty --broken | cut -c 2-)
VERSION ?= $(shell git describe --always --tags --dirty --broken | cut -c 2-)
Copy link
Collaborator

Choose a reason for hiding this comment

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

what does --always change in terms of VERSION generation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This makes sure that git always returns exit code 0. Without it, if will fail with "Nothing to describe" if there are no tags

Copy link
Collaborator

@josvazg josvazg left a comment

Choose a reason for hiding this comment

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

Does this finally work? I can't see a working run here:
https://github.com/mongodb/mongodb-atlas-kubernetes/actions/workflows/update-helm.yaml

@josvazg
Copy link
Collaborator

josvazg commented Oct 16, 2024

FYI, I created CLOUDP-278910 CI GH App token action consistent for a discussion

@igor-karpukhin
Copy link
Collaborator Author

@josvazg unfortunately it doesn't. But as you can see, I found a way to generate token inside the Github Action, instead of encoding the key with base64 and then calling a makefile

@igor-karpukhin
Copy link
Collaborator Author

igor-karpukhin commented Oct 16, 2024

Reopened as the workflow has been proved to be correct. The issue is with the credentials

@igor-karpukhin igor-karpukhin force-pushed the CLOUDP-277319/helm-automation branch from 33d2f14 to b336d99 Compare October 16, 2024 13:57
@josvazg
Copy link
Collaborator

josvazg commented Oct 23, 2024

Does this actually work?

I fear there is no special permission to allow for a workflow in one repo to actually make a commit or PR on another repo. Instead, we will need to do this in 2 pieces:

  • From the AKO repo we trigger a workflow in the helm-charts repo.
  • The helm-charts repo workflow does the required update.
    This 2 pieces flow is currently working with our Github App, when releasing AKO we trigger a creation of a PR in the helm charts repo.

If cross referencing repos has not been proved to work using a test Github App, I would assume it does not work. Using user level credentials might allow cross repo changes, but GitHub Apps might not get the same privileges, specially on org owned accounts.

@igor-karpukhin
Copy link
Collaborator Author

igor-karpukhin commented Oct 23, 2024

If cross referencing repos has not been proved to work using a test Github App, I would assume it does not work

I can show you that it works in my two private repos

@josvazg
Copy link
Collaborator

josvazg commented Oct 23, 2024

If cross referencing repos has not been proved to work using a test Github App, I would assume it does not work

I can show you that it works in my two private repos

With a Github App key? what permissions did you add exactly to get that working?
Using user creds is not comparable.

@igor-karpukhin
Copy link
Collaborator Author

If cross referencing repos has not been proved to work using a test Github App, I would assume it does not work

I can show you that it works in my two private repos

With a Github App key? what permissions did you add exactly to get that working? Using user creds is not comparable.

Yes, with the Github App key. The app is installed in both repos and has permissions to create PRs in another repo. The workflow is the same. And it works. See the generated PR: igor-karpukhin/dotfiles#1 from the github actions job: https://github.com/igor-karpukhin/actions-test/blob/main/.github/workflows/createPR.yaml

@josvazg
Copy link
Collaborator

josvazg commented Oct 23, 2024

If cross referencing repos has not been proved to work using a test Github App, I would assume it does not work

I can show you that it works in my two private repos

With a Github App key? what permissions did you add exactly to get that working? Using user creds is not comparable.

Yes, with the Github App key. The app is installed in both repos and has permissions to create PRs in another repo. The workflow is the same. And it works. See the generated PR: igor-karpukhin/dotfiles#1 from the github actions job: https://github.com/igor-karpukhin/actions-test/blob/main/.github/workflows/createPR.yaml

Cannot access your repo. Can you share the Github App credential permissions set? I think we will need to show those particular details to the team provisioning our GitHub org permissions.

@josvazg
Copy link
Collaborator

josvazg commented Oct 25, 2024

Test helm update
@s-urbaniak this is now working after updating permissions and commit e980c7a

@igor-karpukhin igor-karpukhin merged commit 5f3c8cd into main Oct 28, 2024
8 checks passed
@igor-karpukhin igor-karpukhin deleted the CLOUDP-277319/helm-automation branch October 28, 2024 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants