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

add CI test for files metadata #47

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

add CI test for files metadata #47

wants to merge 1 commit into from

Conversation

AbcSxyZ
Copy link
Contributor

@AbcSxyZ AbcSxyZ commented Dec 15, 2021

Fix #33

Convert tests + add a class to check files information inside containers.

Run CI tests

Will need some documentation to facilitate usage, but for now it's possible to run it using:

python3 -m tests.integration_runner --platform amd64 --image [dogecoin-image] --version 1.14.5 [--verbose]

@AbcSxyZ
Copy link
Contributor Author

AbcSxyZ commented Dec 15, 2021

Need #48 to trigger tests.

@patricklodder patricklodder added the qa Such quality label Dec 15, 2021
@xanimo
Copy link
Member

xanimo commented Dec 16, 2021

Need #48 to trigger tests.

can you please rebase and try again? i checked out and rebased against upstream/main and it was able to detect the file additions and modifications:
https://github.com/xanimo/docker/runs/4541907538?check_suite_focus=true

i'm just not certain if its caching a previous attempt with a test branch containing both #47 and #48

@AbcSxyZ
Copy link
Contributor Author

AbcSxyZ commented Dec 16, 2021

done

@AbcSxyZ
Copy link
Contributor Author

AbcSxyZ commented Dec 16, 2021

Weird to see tests launching on your repo and not here...

@AbcSxyZ
Copy link
Contributor Author

AbcSxyZ commented Dec 16, 2021

It's because your PR contain more commit, with some changes related to the Dockerfile ;)

@xanimo
Copy link
Member

xanimo commented Dec 16, 2021

Weird to see tests launching on your repo and not here...

they shouldn't run here since i made a pr on my fork. can you try:

git fetch upstream
git checkout -b qa/files-metadata-test  qa/files-metadata
git rebase -i upstream/main
git push origin qa/files-metadata-test

and open a pr against yourself? your commit should be behind #42 since it was merged earlier. i'd just like to see if this resolves #48 for you and if #48 is necessary.

@AbcSxyZ AbcSxyZ marked this pull request as draft December 16, 2021 02:41
@AbcSxyZ AbcSxyZ marked this pull request as ready for review December 16, 2021 02:41
@AbcSxyZ AbcSxyZ closed this Dec 16, 2021
@AbcSxyZ AbcSxyZ reopened this Dec 16, 2021
@AbcSxyZ
Copy link
Contributor Author

AbcSxyZ commented Dec 16, 2021

My branch is already rebased, check commits. I've a mysterious rebase check error I won't investigate tonight (I don't see why it complains after rebase...) , https://github.com/AbcSxyZ/docker/pull/14. I reopened the PR to relaunch tests, but nothing is triggered.

#48 fix a syntax error

@xanimo
Copy link
Member

xanimo commented Dec 16, 2021

sorry bud i don't mean to waste your time, but what i did to successfully get this to pass was on my local repo i ran:

git fetch abc (which is my remote configured with your repo git add remote abc https://github.com/abcsxyz/docker.git which you obv don't need to do)

git checkout -b files-metadata-test abc/qa/files-metadata

then i fetch upstream (this can happen either before or after):
git fetch upstream

then i interactively rebase your branch:
git rebase -i upstream/main

and finally pushed which alleviated the:

Base commit: 7f84ca856ce9fce5dd405a3d10d8c33ea53882ff
Head commit: 3e9f739a4a2f2758fce15daa04843552fbda5c30
Error: The head commit for this pull_request event is not ahead of the base commit. Please submit an issue on this action's GitHub repo.

you can see the error is thrown because your commit is the HEAD where as here it's 2 commits back from mains HEAD.

in any case thanks for trying, i'll checkout #48 tomorrow. ❤️

@AbcSxyZ
Copy link
Contributor Author

AbcSxyZ commented Dec 16, 2021

I don't understand my problem with commits, my main is updated and my branch qa/files-metadata is rebased. I don't understand why my GA action is not launching (or failing, because it shouldn't start...) and I'm not sure about what you're asking me to do. It's late...

@xanimo
Copy link
Member

xanimo commented Dec 16, 2021

I don't understand my problem with commits, my main is updated and my branch qa/files-metadata is rebased. I don't understand why my GA action is not launching (or failing, because it shouldn't start...) and I'm not sure about what you're asking me to do.

so after looking at your error it's actually in your repo jitterbit is throwing error because the head commit of this pull request is not ahead of 'add tests path for workflow' commit

Run jitterbit/get-changed-files@v1
  with:
    format: json
    token: ***
Base commit: 7f84ca856ce9fce5dd405a3d10d8c33ea53882ff
Head commit: 3e9f739a4a2f2758fce15daa04843552fbda5c30
Error: The head commit for this pull_request event is not ahead of the base commit. Please submit an issue on this action's GitHub repo.

don't worry about it. your pr is fine. sorry for the trouble. will finish review of this and #48 tomorrow.

@AbcSxyZ
Copy link
Contributor Author

AbcSxyZ commented Dec 16, 2021

It's even more confusing ! I don't understand why it asks to be ahead of a still pending PR.

@patricklodder
Copy link
Member

The reason on-push doesn't work for changing files is caused by rebase, because rebase changes history. I played with the thought for a moment to write a custom diff script but have not acted on that because it means even more maintenance pressure. Instead, the diff action currently only works for PRs and linear pushes, but not for force pushes.

The way to test:

  1. make a new branch based of whatever base state you need
  2. push it
  3. merge your work on top
  4. push that
  5. now it works

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

Successfully merging this pull request may close these issues.

Convert test from pytest to CI test framework
3 participants