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

failed to update repository fro Octopilot Yaml updater #232

Open
topeawolwo opened this issue Jun 2, 2023 · 9 comments
Open

failed to update repository fro Octopilot Yaml updater #232

topeawolwo opened this issue Jun 2, 2023 · 9 comments

Comments

@topeawolwo
Copy link

Having this issue with Octopilot in my Githubaction workflow

``
time="2023-06-02T10:00:01Z" level=error msg="Repository update failed" error="failed to update repository xxxxxxx/manifest-temp: failed to update repository oxygen-manifest-temp: failed to get value: failed to read file VERSION: open /tmp/octopilot4137132539/xxxxxx/oxygen-manifest-temp/VERSION: no such file or directory" repository=oxygen-manifest-temp
time="2023-06-02T10:00:01Z" level=info msg="Updates finished" repositories-count=1

``

Had gone through the docs : https://dailymotion-oss.github.io/octopilot/v1.0.10/index.html

``

      - name: Octo Command
        shell: bash
        run: |
              octopilot \
                --github-auth-method "token" \
                --github-token "${{ steps.xxx-githubrunner-test-token.outputs.token }}" \
                --github-app-id xxxxx \
                --github-installation-id xxxx \
                --pr-base-branch "main" \
                --git-branch-prefix "oxygen-update" \
                --repo "xxxx-manifest-temp" \
                --pr-merge "true" \
                --update "yaml(file=value.yaml,path='version')=file(path=VERSION)" \
                --strategy "recreate"

``

@vbehar
Copy link
Collaborator

vbehar commented Jun 2, 2023

hi, do you have a VERSION file in your xxxx-manifest-temp repo?

@topeawolwo
Copy link
Author

topeawolwo commented Jun 2, 2023

@vbehar thanks for the response!, I am trying to update another hosted github repo containing this VERSION.yaml

""
imagetag: v1.0
version: 1.0.0

""

I want to update version: 1.0.0 to values: 2.0.0 using the --strategy "recreate"

@vbehar
Copy link
Collaborator

vbehar commented Jun 2, 2023

oh then you should --update "yaml(file=value.yaml,path='version')=file(path=VERSION.yaml)" if the name of the file is VERSION.yaml (just adding the extension)

@topeawolwo
Copy link
Author

I am using https://github.com/dailymotion-oss/octopilot/releases/download/v1.2.7/octopilot_1.2.7_linux_amd64, could you let me know what is wrong with the code above

@topeawolwo
Copy link
Author

still having the same error, let me take the question again, this is my updated code in my Githubaction workflow :

octopilot
--github-auth-method "token"
--github-token "${{ steps.xxx-githubrunner-test-token.outputs.token }}"
--github-app-id xxxxx
--github-installation-id xxxx
--pr-base-branch "main"
--git-branch-prefix "oxygen-update"
--repo "xxxx-manifest-temp"
--pr-merge "true"
--update "yaml(file=values.yaml,path='app.values')=file(path=VALUES.yaml)"
--strategy "recreate"

            The remote Github repo I want to update xxxx-manifest-temp

            is having having this file in it MAIN branch base root


            ``
              app:
                imagetag: v1.0
                values: 1.0.0

            ``

@topeawolwo
Copy link
Author

The error from my Githubaction pipeline
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} time="2023-06-02T15:54:19Z" level=error msg="Repository update failed" error="failed to update repository xxxxxxx/xxxxxx-manifest-temp: failed to update repository xxxxxxx/xxxxxx-manifest-temp: failed to get value: failed to read file VALUES.yaml: open github.com/xxxxx/xxxxx-manifest-temp/VALUES.yaml: no such file or directory" repository=xxxxx/xxxxx-manifest-temp time="2023-06-02T15:54:19Z" level=info msg="Updates finished" repositories-count=1

@topeawolwo
Copy link
Author

Another question! this line of code

is it

--update "yaml(file=values.yaml,path='app.values')=file(path='VALUES.yaml')" \

or

--update "yaml(file=values.yaml,path='app.values')=file(path=VALUES.yaml)" \

@vbehar
Copy link
Collaborator

vbehar commented Jun 5, 2023

Hi,

the error is open github.com/xxxxx/xxxxx-manifest-temp/VALUES.yaml: no such file or directory - are you sure that you have a file named VALUES.yaml in the xxxxx-manifest-temp repository?

you can also try to use the --log-level=trace (or debug) flag, to get more logs. If you combine it with the --keep-files flag, it won't delete the cloned files, and you can find the path of the cloned repo in the logs, and check if there is a VALUES.yaml file there manually.

@chekly
Copy link

chekly commented Jun 5, 2023

thanks could you issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants