-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add Authentication & Logging #11
Add Authentication & Logging #11
Conversation
9cd65ce
to
8c86edf
Compare
…/github.com/microsoft/fabric-cicd into users/JacobKnightley/authentication_logging
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.
Please make changes.
|
||
|
||
class FabricEndpoint: | ||
""" | ||
Handles interactions with the Fabric API, including authentication and request management. | ||
""" | ||
|
||
def __init__(self, debug_output=False): | ||
def __init__(self, token_credential=None): |
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.
Should not be optional
sample/optional_parameters.py
Outdated
token_credential = TokenCredential | ||
|
||
# Optional: Print all API calls to log file | ||
change_log_level() |
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.
Invalid, needs "DEBUG" in call
Fixed all suggested changes. |
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.
Reviewed each of the files and the changes look good.
This pull request includes several updates to the project, focusing on configuration improvements, dependency management, and adding sample scripts for various authentication methods. The most important changes are grouped by theme below:
Configuration Improvements:
.vscode/settings.json
: Enablededitor.formatOnSave
for all files and specifically for PowerShell files, and removed redundanteditor.formatOnSave
setting from theruff
section. [1] [2]Dependency Management:
pyproject.toml
: Changed to dynamically load version and dependencies fromVERSION
andrequirements.txt
files, respectively. [1] [2]requirements-dev.txt
: Addedruff
,gitpython
,build
, andtwine
as development dependencies.Version Update:
VERSION
: Updated the version to0.1.6
.Sample Scripts:
sample/auth_default_credential.py
: Example leveraging default authentication flows.sample/auth_spn_secret.py
: Example of authenticating with SPN + Secret.sample/optional_parameters.py
: Example of optional parameters forFabricWorkspace
and publish functions.sample/set_vars_from_ado_build.py
: Example to set variables based on the target environment using ADO build.sample/set_vars_from_git_branch.py
: Example to set variables based on the current Git branch name.Code Enhancements:
src/fabric_cicd/__init__.py
: Added achange_log_level
function to configure logging levels and included logging setup in the module initialization.src/fabric_cicd/_common/_exceptions.py
: Introduced custom exception classes for better error handling.