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

Bazel build is missing .coveragerc #437

Closed
busunkim96 opened this issue Jun 3, 2020 · 7 comments
Closed

Bazel build is missing .coveragerc #437

busunkim96 opened this issue Jun 3, 2020 · 7 comments
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@busunkim96
Copy link
Contributor

busunkim96 commented Jun 3, 2020

Bazel builds seem to not have a .coveragerc. This file has been around for a while so I don't think it's a version issue.

bazel build //google/cloud/documentai/v1beta2:documentai-v1beta2-py

Contents of tar (just missing .coveragerc)

$ ls -a
.  ..  docs  google  MANIFEST.in  mypy.ini  noxfile.py  scripts  setup.py  tests

Resolved in #550: Unit test subdirs are also missing the __init__.py. https://github.com/googleapis/gapic-generator-python/blob/master/gapic/templates/tests/unit/gapic/%25name_%25version/%25sub/__init__.py

CC @vam-google

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Jun 4, 2020
@miraleung miraleung added priority: p2 Moderately-important priority. Fix may not be included in next release. type: cleanup An internal cleanup or hygiene concern. and removed triage me I really want to be triaged. labels Jun 5, 2020
@busunkim96 busunkim96 changed the title Bazel build is missing .coveragerc Bazel build is missing .coveragerc and __init__.py Jun 24, 2020
@danoscarmike danoscarmike added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed type: cleanup An internal cleanup or hygiene concern. labels Jul 21, 2020
busunkim96 added a commit that referenced this issue Jul 23, 2020
Otherwise this file is excluded from generation. Partially addresses #437
software-dov pushed a commit that referenced this issue Jul 23, 2020
Otherwise this file is excluded from generation. Partially addresses #437
@busunkim96 busunkim96 changed the title Bazel build is missing .coveragerc and __init__.py Bazel build is missing .coveragerc Sep 29, 2020
@arithmetic1728
Copy link
Collaborator

any updates as we are out of slo

gcf-merge-on-green bot pushed a commit to googleapis/python-firestore that referenced this issue Oct 23, 2020
Note that the synthtool-generated `.coveragerc` (see #224) does *not* include all changes needed for 100% coverage:  see:

- googleapis/gapic-generator-python#171
- googleapis/gapic-generator-python#437

Closes #92.
Closes #195.
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Nov 30, 2020
@busunkim96
Copy link
Contributor Author

@software-dov @vam-google Friendly ping. We now use Bazel in almost all the Python repositories so this is more of a problem.

When I last tested this the .coveragerc was present when I ran the generator locally or via the Docker image. It only seems to disappear when bazel was used.

Maybe the .coveragerc is dropped somewhere here?

script = """
mkdir -p {package_dir_path}
for srcjar_src in {srcjar_srcs}; do
unzip -q -o $srcjar_src -d {package_dir_path}
done
cd {package_dir_path}/..
tar -zchpf {package_dir}/{package_dir}.tar.gz {package_dir}
cd -
mv {package_dir_path}/{package_dir}.tar.gz {pkg}
rm -rf {package_dir_path}
""".format(

@hkdevandla
Copy link
Member

@vam-google @software-dov , any updates on this? We are out of SLO on this. Also, it seems important to fix this as we started to build libraries using bazel. thanks!

@hkdevandla
Copy link
Member

@vam-google, any updates on this?

@vam-google
Copy link
Contributor

@hkdevandla Working on it

@vam-google
Copy link
Contributor

vam-google commented Jan 3, 2021

Apparently the issue was in bazel's glob() function by default not including files with names starting with dot (.), probably assuming those are supposed to be hidden files.

@vam-google
Copy link
Contributor

Fixed in #723. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

7 participants