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

chore(ci): fix flakiness, misc improvements #7605

Merged
merged 9 commits into from Mar 17, 2023

Conversation

anshbansal
Copy link
Collaborator

@anshbansal anshbansal commented Mar 16, 2023

venv contains python. Caching whole venv instead of just pip cache means you are backing up python which is problematic and is probably causing python not being found randomly in the smoke tests. If it is causing issues with smoke tests it would also cause issues with metadata-ingestion so removing that too.

e.g. https://github.com/datahub-project/datahub/actions/runs/4433850334/jobs/7779664856 where log says

+++ dirname ./smoke-test/run-quickstart.sh
++ cd ./smoke-test
++ pwd
+ DIR=/home/runner/work/datahub/datahub/smoke-test
+ cd /home/runner/work/datahub/datahub/smoke-test
+ python3 -m venv venv
Error: [Errno 2] No such file or directory: '/home/runner/work/datahub/datahub/smoke-test/venv/bin/python3': '/home/runner/work/datahub/datahub/smoke-test/venv/bin/python3'

Python not being found is really odd as we have a setup python step. It is probably the venv cache after that which is messing things somehow.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the devops PR or Issue related to DataHub backend & deployment label Mar 16, 2023
@anshbansal anshbansal requested a review from hsheth2 March 16, 2023 11:31
@anshbansal anshbansal changed the title chore(ci): add info log to find flakiness chore(ci): fix flakiness, misc improvements Mar 16, 2023
@anshbansal anshbansal added ingestion PR or Issue related to the ingestion of metadata and removed devops PR or Issue related to DataHub backend & deployment labels Mar 16, 2023
@anshbansal anshbansal mentioned this pull request Mar 16, 2023
5 tasks
Copy link
Collaborator

@hsheth2 hsheth2 left a comment

Choose a reason for hiding this comment

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

Unsure if we want to remove the venv cache wholesale vs just commenting out

id: cache-venv
with:
path: ./smoke-test/venv/
key: smoke-venv-${{ runner.os }}-${{ steps.packages_checksum.outputs.packages_checksum }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we comment this out instead? Do you actually know what the issue was here or just disabling because of issues?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is no difference in run time. See master and this branch's runs. No time difference is there.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Weird - that probably means the caching wasn't even working?

path: ./metadata-ingestion/venv/
key: ${{ runner.os }}-venv-${{ steps.packages_checksum.outputs.packages_checksum }}-${{ matrix.python-version }}
- name: Install package
run: ./gradlew :metadata-ingestion:installPackageOnly
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this just for debugging?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No. Wanted to see how much time installing the package takes separately to the tests.

@@ -12,7 +12,8 @@ if (!project.hasProperty("extra_pip_requirements")) {
}

task checkPythonVersion(type: Exec) {
commandLine python_executable, '-c', 'import sys; assert sys.version_info >= (3, 7)'
commandLine python_executable, '-c',
'import sys; assert (3, 11) > sys.version_info >= (3, 7), f"Python version {sys.version_info[:2]} not allowed"'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Change message to "Is too old"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What do you mean? If someone is using 3.11 it won't be too old but too new.

Copy link
Collaborator

Choose a reason for hiding this comment

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

oh i missed the 3.11 part - then this is fine

@hsheth2
Copy link
Collaborator

hsheth2 commented Mar 16, 2023

Also it seems strange that we've seen issues in smoke test but not with metadata ingestion yet. Any ideas why that could be?

@anshbansal anshbansal merged commit c43d7dd into master Mar 17, 2023
48 of 50 checks passed
@anshbansal anshbansal deleted the aseem-add-info-to-find-flakiness branch March 17, 2023 04:04
yoonhyejin pushed a commit to yoonhyejin/datahub-project-forked that referenced this pull request Mar 17, 2023
iprentic pushed a commit to iprentic/datahub that referenced this pull request Mar 20, 2023
shirshanka pushed a commit to shirshanka/datahub that referenced this pull request Mar 22, 2023
shirshanka pushed a commit to shirshanka/datahub that referenced this pull request Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants