Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

New python:3.7 and renames python:3.6#61

Merged
csantanapr merged 3 commits intoibm-functions:masterfrom
csantanapr:new_python3.7
Oct 6, 2018
Merged

New python:3.7 and renames python:3.6#61
csantanapr merged 3 commits intoibm-functions:masterfrom
csantanapr:new_python3.7

Conversation

@csantanapr
Copy link
Copy Markdown
Contributor

New runtime for python 3.7

  • Using Watson SDK 2.x
  • Using Linux Debian Stretch

Current python 3.6 changes

  • Continues to use Watson SDK 1.x
  • gradle project/directory python now python3.6
  • kind python-jessie:3 now kind python:3.6
  • image action-python-v3 now action-python-v3.6
  • Using Linux Debian Jessie

@csantanapr csantanapr changed the title WIP: New python:3.7 and renames python:3.6 New python:3.7 and renames python:3.6 Oct 4, 2018
@csantanapr csantanapr requested a review from dubee October 4, 2018 02:57
Comment thread .travis.yml
repo: ibm-functions/runtime-python
- provider: script
script: "./tools/travis/publish.sh ibmfunctions $TRAVIS_TAG"
script: "./tools/travis/publish.sh ibmfunctions 3.6 master && ./tools/travis/publish.sh ibmfunctions 3.7 master "
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should 3.6 and 3.7 be hardcoded?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes as this are two different images, and the tools/publish.sh will parse this prefix

@@ -26,8 +26,9 @@ import org.scalatest.BeforeAndAfterAll
@RunWith(classOf[JUnitRunner])
class CredentialsIBMPythonCOSTests extends TestHelpers with WskTestHelpers with BeforeAndAfterAll with WskActorSystem {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems like all these classes with lazy val defaultKind can be changed to take a kind variable and remove RunWith(classOf[JUnitRunner]).

class CredentialsIBMPythonCOSTests(kind: String)...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't follow
This has being the way we run all our tests multiple times for different kinds, to override certain variables.

The RunWith(classOf[JUnitRunner]) is required so they get pickup by gradle/junit test we can't remove.
This Classes are not called programmatically so a contructor can't be use.

Copy link
Copy Markdown
Contributor

@dubee dubee Oct 5, 2018

Choose a reason for hiding this comment

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

A constructor can still be used when extending the base class.

abstract class Base(val kind: String) {}


@RunWith(classOf[JUnitRunner])
class ExtendedBase() extends Base(kind = "python:3")   {}

Copy link
Copy Markdown
Contributor

@dubee dubee left a comment

Choose a reason for hiding this comment

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

@csantanapr, do all of the runtimes run the same integration tests? If so, it seems like we could have one code base for the tests instead of duplicating code. The fixture extension to use can be determined dynamically based on the kind when the tests run.

@csantanapr
Copy link
Copy Markdown
Contributor Author

@dubee there is no duplicate scala tests, the tests just run twice, this is how do it in core and in runtime repos, a base class contains the tests, and another Class with an override property extend the first class.

@dubee
Copy link
Copy Markdown
Contributor

dubee commented Oct 5, 2018

Looks like the same tests are duplicated across https://github.com/ibm-functions/runtime-* repos.

@dubee
Copy link
Copy Markdown
Contributor

dubee commented Oct 5, 2018

@csantanapr
Copy link
Copy Markdown
Contributor Author

@dubee

These look like the same tests to me, but that is a different issue.
https://github.com/ibm-functions/runtime-python/tree/master/tests/src/test/scala/integration
https://github.com/ibm-functions/runtime-nodejs/tree/master/tests/src/test/scala/integration

Ah I see a cross runtime repos, yes they are similar and maybe some consolidation can be done.
I think is a good discussion to have and measure the pro and cons and some question to answer.

  • In what repo to locate the common test lib code
  • How to test this common test lib code
  • How it feels having the tests in one repo and the implementation in another repo
  • etc

But I don't think we should block this PR, because of these.

@csantanapr csantanapr merged commit 772879b into ibm-functions:master Oct 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants