Skip to content

[MERGE LAST] Move + edit root files for first basic CI for Contrib#86

Merged
codeboten merged 146 commits intoopen-telemetry:masterfrom
NathanielRN:move-edit-root-files-for-ci
Nov 4, 2020
Merged

[MERGE LAST] Move + edit root files for first basic CI for Contrib#86
codeboten merged 146 commits intoopen-telemetry:masterfrom
NathanielRN:move-edit-root-files-for-ci

Conversation

@NathanielRN
Copy link
Copy Markdown
Contributor

Description

Moves some root level files from the core repo into the contrib repo.

The original code is being copied over from the Core repo here: https://github.com/open-telemetry/opentelemetry-python/tree/master

The modifications are what's necessary to get a simple CI pipline. This is also pending another workflow which would allow PRs in the Core repo to trigger workflow runs in this Contrib repo

How Has This Been Tested?

Introduces a CI to tests all PRs before it.

Will include tests to validate these PRs:
#49
#50
#51
#52
#53
#54
#55
#56
#57
#58
#59
#60
#61
#62
#63
#64
#65
#66
#67
#68
#69
#70
#71
#72
#73
#74
#75
#76
#77
#78
#79
#80
#81
#82
#83
#84
#85

Checklist:

  • Followed the style guidelines of this project
    - [ ] Changelogs have been updated
    - [ ] Unit tests have been added
    - [ ] Documentation has been updated

Oberon00 and others added 30 commits June 25, 2019 08:52
* Add .pylintrc based on OpenCensus (related open-telemetry#6).

* Fix/disable pylint warnings.

* pylint: Fix W0107: Unnecessary pass statement (unnecessary-pass)

I'm not sure I like this warning.
* Build docs.

* Minor tox.ini improvements.

* .gitignore mypy

* Fix doc build.

* Tell travis to build docs (with 3.7).
I believe it would be nice to have
tests on CI not only for Python 3.7,
but for all supported Python versions.

These changes:

 - fix compatibility with Python 3.5 and 3.4

 - add tests for various Python versions on CI

 - allow running tests for any branches
Adds requests integration. Two commits that might be of special interest (see open-telemetry#94):

* c66af2faa100b0f41afafdb6e4de9f4de4cc62bc requests test: Use actual Response object.

Co-Authored-By: Allan Feldman <6374032+a-feld@users.noreply.github.com>

* 1b90a0ddc286c936f7256b14e14ef36fd3c6a24f More tests, rename to http-requests to work around pylint bug (?)

See previous CI failure for pylint issue:

************* Module ext/opentelemetry-ext-requests/src/__init__.py
ext/opentelemetry-ext-requests/src/__init__.py:1:0: F0001: No module named ext/opentelemetry-ext-requests/src/__init__.py (fatal)

It seems that pylint gets confused when there is more than one "requests" module??
These changes follow up the "Fix and improve tests for Python != 3.7" PR.
Sometimes it complains and it is difficult to understand what exactly it wants.
The --diff option allows to know what is the format it expects.
These changes follow up the "Fix and improve tests for Python != 3.7" PR.

The multi_line_output was already set to 3 in the
"Add initial black formatting" PR, so after rebasing to master
this commit contains only comment that describes a magic number
from the isort configuration file.

Corresponding PR:

 - open-telemetry/opentelemetry-python#109

Related discussions:

 - open-telemetry/opentelemetry-python#95 (comment)

 - open-telemetry/opentelemetry-python#95 (comment)
* Fix setup for ext packages.

Previously the wheels would contain the metadata but not the actual
code.

* Check that all packages install properly in test.

* Document why we don't use -e.
…metry#129)

Creating an example app that showcases how an application integrates with opentelemetry.
…metry#124)

* Ensure that type info is picked up from installed package.

This required moving all top-level modules to a sub-package, to not
create collisions with py.typed marker files.

See https://www.python.org/dev/peps/pep-0561/#packaging-type-information

* Add MANIFEST.in for SDK package.
This adds a Jeager exporter for OpenTelemetry.  This exporter is based
on https://github.com/census-instrumentation/opencensus-python/tree/master/contrib/opencensus-ext-jaeger.

The exporter uses thrift and can be configured to send data to the agent and
also to a remote collector.

There is a long discussion going on about how to include generated files
in the repo, so for now just put them here.
In particular, the following errors are fixed in this commit:

* Don't return False in __exit__

Returning a literal causes a mypy error when combined with the
`typing.Optional[bool]` type hint. Furthermore, exception handling is
the same when returning `False` and when returning `None` (the
exception is re-raised). Therefore, it's simpler to remove the return
statement and change the type hint to `None`.

* Correctly initialize nested tuple

Tuples of length 1 should be initialized with a trailing comma to be
properly interpreted.

* Pass correct type to use_context() in test

* Add type annotations for test helper functions

Since we have `disallow_untyped_calls = True` in our mypy config for
tests, we must add type annotations to any function that is called
from a test.


Addditionally, bump minimal mypy version to 0.740 to consistently reproduce these errors.
Initial implementation, without baggage support.
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Oct 21, 2020

CLA Check

@NathanielRN NathanielRN force-pushed the move-edit-root-files-for-ci branch 3 times, most recently from 1c455ab to 4f24bc6 Compare October 29, 2020 16:48
@NathanielRN NathanielRN marked this pull request as ready for review October 29, 2020 16:49
@NathanielRN NathanielRN requested a review from a team October 29, 2020 16:49
@NathanielRN NathanielRN force-pushed the move-edit-root-files-for-ci branch 4 times, most recently from 6354d7d to 4f2d70b Compare November 3, 2020 18:04
@NathanielRN NathanielRN force-pushed the move-edit-root-files-for-ci branch 10 times, most recently from b882240 to 1714707 Compare November 3, 2020 21:47
@NathanielRN NathanielRN force-pushed the move-edit-root-files-for-ci branch 2 times, most recently from 1ad5579 to a464c90 Compare November 4, 2020 00:23
@NathanielRN NathanielRN force-pushed the move-edit-root-files-for-ci branch from a464c90 to 5135b80 Compare November 4, 2020 00:41
@codeboten codeboten merged commit bcb1908 into open-telemetry:master Nov 4, 2020
@NathanielRN NathanielRN deleted the move-edit-root-files-for-ci branch November 25, 2020 18:13
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.