GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Reassert idp-sql and django tests by glasnt · Pull Request #7779 · GoogleCloudPlatform/python-docs-samples

Conversation

@glasnt

@glasnt glasnt commented Apr 11, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Description

#7342 introduced a change where nox would check for test_*.py and *_test.py files. Django and IDP-SQL had their tests in test/, so this glob didn't find these files, and these tests haven't been run for a bit.

Outstanding issues with these tests:

dynamic PR status update follows


  • Django: Postgres 9.6 EOL
Step #6 - "Migrate database": django.db.utils.ProgrammingError: column c.relispartition does not exist
Step #6 - "Migrate database": LINE 3:             CASE WHEN c.relispartition THEN 'p' WHEN c.relki...
Step #6 - "Migrate database": 

Debugging seems to indicate this happens on old versions of postgres. Django 4.0 no longer supports Postgres 9.6. test-instance-pg is Postgres 9.6, which is EOL as of November 2021.

Suggest creating a newer versioned instance of a postgres testing database (happy to help here where I can).

Update: test-instance-pg has been updated to Postgres 14


  • IDP: Linting issues
./middleware.py:31:29: ANN401 Dynamically typed expressions (typing.Any) are disallowed
    def decorated_function(*args: Any, **kwargs: Any) -> Any:
                            ^
./middleware.py:31:42: ANN401 Dynamically typed expressions (typing.Any) are disallowed
    def decorated_function(*args: Any, **kwargs: Any) -> Any:
                                         ^
./middleware.py:31:61: ANN401 Dynamically typed expressions (typing.Any) are disallowed
    def decorated_function(*args: Any, **kwargs: Any) -> Any:
                                                            ^

This is being addressed as of v2.9.0 of flake8-annotations. sco1/flake8-annotations#136

It will require adding --allow-star-arg-any to the flake8 call.

Update: while this flag could be used, I opted to use the TypeVar method in #7789


Checklist

  • I have followed Sample Guidelines from AUTHORING_GUIDE.MD
  • README is updated to include all relevant information
  • Tests pass: nox -s py-3.6 (see Test Environment Setup)
  • Lint pass: nox -s lint (see Test Environment Setup)
  • These samples need a new API enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • Please merge this PR for me once it is approved.
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@glasnt
Move idp-sql and django tests to confirm with standard
c2a769c
@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Apr 11, 2022
glasnt added 2 commits April 11, 2022 11:29
@glasnt
Correct relative filenames
f05a6a9
@glasnt
Correct another filename
ecac5a7
@glasnt glasnt changed the title Move idp-sql and django tests to confirm with standard Reassert idp-sql and django tests Apr 11, 2022
averikitsch
averikitsch approved these changes Apr 11, 2022
View reviewed changes

@averikitsch averikitsch left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thank you @glasnt

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@glasnt glasnt mentioned this pull request Apr 12, 2022
Cloud Run tests are throwing lint errors #7787
Closed
Ace Nassri
Merge branch 'main' into topic/tests
d1ed8c6
@ace-n

ace-n commented Apr 12, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

I'm on board w/ this as a temporary fix, but this looks like a good opportunity to use Terraform + fresh GCP projects.

(Terraform abstracts away retries. We'd need to update our CI infrastructure, though. Googlers, see this link.)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@glasnt
Merge branch 'main' into topic/tests
24952eb
@glasnt
glasnt marked this pull request as ready for review April 19, 2022 23:13
@glasnt
glasnt requested review from a team as code owners April 19, 2022 23:13
@glasnt
Fix type checking for middleware.py
2346473
@blunderbuss-gcf blunderbuss-gcf Bot assigned leahecole Apr 19, 2022
leahecole
leahecole approved these changes Apr 20, 2022
View reviewed changes
@leahecole
Merge branch 'main' into topic/tests
394be9f
@leahecole leahecole added the automerge Merge the pull request once unit tests and other checks pass. label Apr 20, 2022
@gcf-merge-on-green
gcf-merge-on-green Bot merged commit fde487c into GoogleCloudPlatform:main Apr 20, 2022
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@averikitsch averikitsch averikitsch approved these changes
@leahecole leahecole leahecole approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@leahecole leahecole

Labels

samples Issues that are directly related to samples.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@glasnt @ace-n @averikitsch @leahecole
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.