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

HPCC-30571 LogAccess to report procid by default #17920

Merged

Conversation

rpastrana
Copy link
Member

@rpastrana rpastrana commented Oct 19, 2023

  • Introduces logaccess column alias concept
  • Adds WsLogAccess.getinfo Alias column
  • Populates Alias column if reported in configuration
  • Annotates ALA v1 instance with hpcc_log_component name
  • Adds alias to helm schema
    Signed-off-by: Rodrigo Pastrana [email protected]

Type of change:

  • This change is a bug fix (non-breaking change which fixes an issue).
  • This change is a new feature (non-breaking change which adds functionality).
  • This change improves the code (refactor or other change that does not change the functionality)
  • This change fixes warnings (the fix does not alter the functionality or the generated code)
  • This change is a breaking change (fix or feature that will cause existing behavior to change).
  • This change alters the query API (existing queries will have to be recompiled)

Checklist:

  • My code follows the code style of this project.
    • My code does not create any new warnings from compiler, build system, or lint.
  • The commit message is properly formatted and free of typos.
    • The commit message title makes sense in a changelog, by itself.
    • The commit is signed.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly, or...
    • I have created a JIRA ticket to update the documentation.
    • Any new interfaces or exported functions are appropriately commented.
  • I have read the CONTRIBUTORS document.
  • The change has been fully tested:
    • I have added tests to cover my changes.
    • All new and existing tests passed.
    • I have checked that this change does not introduce memory leaks.
    • I have used Valgrind or similar tools to check for potential issues.
  • I have given due consideration to all of the following potential concerns:
    • Scalability
    • Performance
    • Security
    • Thread-safety
    • Cloud-compatibility
    • Premature optimization
    • Existing deployed queries will not be broken
    • This change fixes the problem, not just the symptom
    • The target branch of this pull request is appropriate for such a change.
  • There are no similar instances of the same problem that should be addressed
    • I have addressed them here
    • I have raised JIRA issues to address them separately
  • This is a user interface / front-end modification
    • I have tested my changes in multiple modern browsers
    • The component(s) render as expected

Smoketest:

  • Send notifications about my Pull Request position in Smoketest queue.
  • Test my draft Pull Request.

Testing:

@github-actions
Copy link

@rpastrana rpastrana force-pushed the HPCC-30571-LogAccess-Alias branch 2 times, most recently from 6d0a677 to 33e0b82 Compare October 19, 2023 14:24
@rpastrana rpastrana requested review from wangkx and jeclrsg October 23, 2023 14:42
Copy link
Member

@wangkx wangkx left a comment

Choose a reason for hiding this comment

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

@rpastrana please see 2 questions.

{
try
{
espLogColumn->setAlias(column.queryProp("@alias"));
Copy link
Member

Choose a reason for hiding this comment

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

The alias is a string. I am wondering that the try/catch is needed for this line.

@@ -59,7 +59,7 @@ global:
- type: "instance"
storeName: "ContainerInventory"
searchColumn: "Name"
projectName: "hpcc_log_component"
Copy link
Member

Choose a reason for hiding this comment

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

If this line is removed, should the line 37 of the esp/services/ws_logaccess/WsLogAccessService.cpp be also removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Great catch @wangkx !

@jeclrsg This means we already had a mechanism in place, where I would report the Alias/ProjectName as the Name of the field so the UI doesn't have to do the lookup. I say we scrap the Alias and stick to the existing mechanism, agree?

@rpastrana
Copy link
Member Author

@jeclrsg as discussed offline, these changes are not needed, and will reuse this pr to report the procid instead. Please test and let me know.

@rpastrana rpastrana force-pushed the HPCC-30571-LogAccess-Alias branch from b830481 to 5895db3 Compare October 25, 2023 20:53
@rpastrana rpastrana changed the title HPCC-30571 LogAccess to report log column alias HPCC-30571 LogAccess to report procid by default Oct 25, 2023
@ghalliday
Copy link
Member

@rpastrana please can you update the jira to indicate what this is including and why it is useful. Thanks.

@rpastrana
Copy link
Member Author

@rpastrana please can you update the jira to indicate what this is including and why it is useful. Thanks.

Sure, I had already updated the Jira: "LogAccess should report procid by default"
I'll mention that the UI is expecting the procid, and @jakesmith confirmed it is useful even in containerized mode.

- Reports procid by default

Signed-off-by: Rodrigo Pastrana <[email protected]>
@rpastrana rpastrana force-pushed the HPCC-30571-LogAccess-Alias branch from 5895db3 to c9ee951 Compare October 26, 2023 20:09
@rpastrana rpastrana requested review from jeclrsg and wangkx October 26, 2023 20:09
@rpastrana
Copy link
Member Author

@wangkx the gist of this PR has changed, there's not much ESP related work but please review

Copy link
Member

@wangkx wangkx left a comment

Choose a reason for hiding this comment

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

@rpastrana looks fine for me.

@rpastrana
Copy link
Member Author

@ghalliday ready to merge

@ghalliday ghalliday merged commit 61a245b into hpcc-systems:candidate-9.4.x Nov 2, 2023
50 of 51 checks passed
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.

4 participants