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

Enhancement/Bugfix: Downstream qld-gov-au fix's #232

Merged
merged 193 commits into from
Nov 21, 2024
Merged

Conversation

duttonw
Copy link
Collaborator

@duttonw duttonw commented Oct 25, 2024

  • feat: @JVickery-TBS work on validation integration (await successful validation prior to doing datastore work via 'IPipeValidation'
  • fix: handle gracefully if tabulator load fails by trying 'direct load'
  • fix: Excel blank header row bug
  • fix: Datastore truncate, restart identity so numbering restarts from 0 again (when imported data has same columns and types
  • fix: parital fix on DB deadlock by adding timeouts on DDL events
  • test: test_simple_large_file, test_with_blanks, test_with_empty_lines, test_with_extra_blank_cells
  • test: test_require_validation, test_enforce_validation_schema
  • chore: min version requirements for cve's,
    requests>=2.32.0
    urllib3>=2.2.2
    zipp>=3.19.1

dependabot-preview bot and others added 30 commits April 28, 2021 22:14
Develop to master - merge from upstream
Develop to master - make datastore more robust
- If all types have been rejected, ensure that the fallback flag is correctly set
- replace empty strings with None if they have types that will choke on empty string
- Column that has some rows with free text and others with numeric data
- Column that has some rows with timestamp and others with empty string
- Remove unused imports, or tag those that serve a purpose (testing what can be imported)
- Remove obsolete exclusions from Flake8 config
- Show the first 100 and last 100 logs, with a message between to say how many were skipped
- Start with the first and last 50 rows, provide a link to double it
- Add a notice at the top of the page when logs have been hidden.
- Clarify that we are hiding logs, not skipping actual processing of data.
- Add 'Show All' link to show all logs if the user is confident they can handle it.
[QOLSVC-1863] truncate on-page XLoader logs if there are too many
Develop to master - merge and fix upstream changes
- This is more efficient than setting it on each call,
and applies even to code that just reads the config without accepting an override.
duttonw and others added 18 commits July 24, 2024 07:19
…/validation-support

Validation Extension Support (Minified)
Develop -> Master: feat(dev): implement IPipeValidation + updates
…GovAuToCkan)

Conflicts Fixed:
	ckanext/xloader/jobs.py
	ckanext/xloader/loader.py
	ckanext/xloader/plugin.py
	ckanext/xloader/templates/package/resource_read.html
	ckanext/xloader/tests/samples/mixed_numeric_string_sample.csv
	ckanext/xloader/tests/samples/sample_with_blanks.csv
	ckanext/xloader/tests/test_loader.py
	ckanext/xloader/tests/test_plugin.py
	ckanext/xloader/utils.py
	requirements.txt

Changes to be committed:
	modified:   ckanext/xloader/config_declaration.yaml
	modified:   ckanext/xloader/jobs.py
	modified:   ckanext/xloader/loader.py
	modified:   ckanext/xloader/plugin.py
	modified:   ckanext/xloader/templates/package/resource_read.html
	modified:   ckanext/xloader/tests/samples/sample_with_blanks.csv
	new file:   ckanext/xloader/tests/samples/sample_with_extra_blank_cells.csv
	modified:   ckanext/xloader/tests/test_loader.py
	modified:   ckanext/xloader/tests/test_plugin.py
	modified:   ckanext/xloader/utils.py
	modified:   dev-requirements.txt
	modified:   requirements.txt
…dab1141f96ac

[Snyk] Fix for 4 vulnerabilities
- Added status badges.

Author:    Jesse Vickery <jesse.vickery@tbs-sct.gc.ca>
- Reverse debug badge logic.
fix: asset inclusion must be in the block being rendered,
@duttonw duttonw requested a review from ThrawnCA October 25, 2024 00:50
@duttonw duttonw self-assigned this Oct 25, 2024
@duttonw duttonw changed the base branch from develop to master October 25, 2024 04:55
@@ -124,6 +124,7 @@ def xloader_data_into_datastore(input):
if tries < MAX_RETRIES:
tries = tries + 1
log.info("Job %s failed due to temporary error [%s], retrying", job_id, e)
logger.info("Job failed due to temporary error [%s], retrying", e)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems to be a duplicate. Should use one logger or the other, not both, I think?

Copy link
Collaborator Author

@duttonw duttonw Oct 30, 2024

Choose a reason for hiding this comment

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

we have root file
log = logging.getLogger(__name__)

and then we have per job logging

 level = logging.DEBUG
    handler.setLevel(level)
    logger = logging.getLogger(job_id)
    handler.setFormatter(logging.Formatter('%(message)s'))
    logger.addHandler(handler)
    # also show logs on stderr
    logger.addHandler(logging.StreamHandler())
    logger.setLevel(logging.DEBUG)

@duttonw duttonw merged commit 9f398b0 into ckan:master Nov 21, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants